Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add component name to StrictMode error message #25718

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into add-component-name-to-error-message
  • Loading branch information
sammy-SC committed Dec 2, 2022
commit 4c2cb99171104d3a037693dbe9b00ccef922f507
44 changes: 7 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ jobs:
command: |
yarn extract-errors
git diff --quiet || (echo "Found unminified errors. Either update the error codes map or disable error minification for the affected build, if appropriate." && false)

check_generated_fizz_runtime:
docker: *docker
environment: *environment
Expand Down Expand Up @@ -462,54 +462,24 @@ jobs:
cp ./scripts/release/ci-npmrc ~/.npmrc
scripts/release/publish.js --ci --tags << parameters.dist_tag >>

# We don't always keep the reconciler forks in sync (otherwise it we wouldn't
# have forked it) but during periods when they are meant to be in sync, we
# use this job to confirm there are no differences.
sync_reconciler_forks:
docker: *docker
environment: *environment
steps:
- checkout
- *restore_node_modules
- run:
name: Fetch revisions that contain an intentional fork
# This will fetch each revision listed in the `forked-revisions` file,
# which may be necessary if it's not part of main. For example, it
# may have been part of a PR branch that was squashed on merge.
command: |
cut -d " " -f 1 scripts/merge-fork/forked-revisions | xargs -r git fetch origin
- run:
name: Revert forked revisions
# This will revert the changes without committing. At the end, it's
# expected that both forks will be identical.
command: |
cut -d " " -f 1 scripts/merge-fork/forked-revisions | xargs -r git revert --no-commit
- run:
name: Confirm reconciler forks are the same
command: |
yarn replace-fork
git diff --quiet || (echo "Reconciler forks are not the same! Run yarn replace-fork. Or, if this was intentional, add the commit SHA to scripts/merge-fork/forked-revisions." && false)


workflows:
version: 2

# New workflow that will replace "stable" and "experimental"
build_and_test:
unless: << pipeline.parameters.prerelease_commit_sha >>
jobs:
- setup
- setup:
filters:
branches:
ignore:
- builds/facebook-www
- yarn_flow:
requires:
- setup
# NOTE: This job is only enabled when we want the forks to be in sync.
# When the forks intentionally diverge, comment out the job to disable it.
- sync_reconciler_forks:
requires:
- setup
- check_generated_fizz_runtime:
requires:
- setup
- setup
- yarn_lint:
requires:
- setup
Expand Down
8 changes: 0 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,6 @@ module.exports = {
'react-internal/no-to-warn-dev-within-to-throw': ERROR,
'react-internal/warning-args': ERROR,
'react-internal/no-production-logging': ERROR,
'react-internal/no-cross-fork-imports': ERROR,
'react-internal/no-cross-fork-types': [
ERROR,
{
old: [],
new: [],
},
],
},

overrides: [
Expand Down
153 changes: 153 additions & 0 deletions .github/workflows/commit_artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
name: Commit Artifacts for Facebook WWW

on:
push:
branches: [main]

jobs:
download_artifacts:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm init -y
- run: npm install node-fetch@2
- name: Download and unzip artifacts
uses: actions/github-script@v6
with:
script: |
const cp = require('child_process');
const fetch = require('node-fetch');

function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}

function execHelper(command, options, streamStdout = false) {
return new Promise((resolve, reject) => {
const proc = cp.exec(
command,
options,
(error, stdout) => (error ? reject(error) : resolve(stdout.trim())),
);
if (streamStdout) {
proc.stdout.pipe(process.stdout);
}
});
}

let artifactsUrl = null;
// This is a temporary, dirty hack to avoid needing a GitHub auth token in the circleci
// workflow to notify this GitHub action. Sorry!
let iter = 0;
spinloop: while (iter < 15) {
const res = await github.rest.repos.listCommitStatusesForRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: context.sha
});
for (const status of res.data) {
if (/process_artifacts_combined/.test(status.context)) {
switch (status.state) {
case 'pending': {
console.log(`${status.context} is still pending`);
break;
}
case 'failure':
case 'error': {
throw new Error(`${status.context} has failed or errored`);
}
case 'success': {
// The status does not include a build ID, but we can extract it
// from the URL. I couldn't find a better way to do this.
const ciBuildId = /\/facebook\/react\/([0-9]+)/.exec(
status.target_url,
)[1];
console.log(`CircleCI build id found: ${ciBuildId}`);
if (Number.parseInt(ciBuildId, 10) + '' === ciBuildId) {
artifactsUrl =
`https://circleci.com/api/v1.1/project/github/facebook/react/${ciBuildId}/artifacts`;
break spinloop;
} else {
throw new Error(`${ciBuildId} isn't a number`);
}
break;
}
default: {
throw new Error(`Unhandled status state: ${status.state}`);
break;
}
}
}
}
iter++;
console.log("Sleeping for 60s...");
await sleep(60_000);
}
if (artifactsUrl != null) {
const res = await fetch(artifactsUrl);
const data = await res.json();
for (const artifact of data) {
if (artifact.path === 'build.tgz') {
console.log(`Downloading and unzipping ${artifact.url}`);
await execHelper(
`curl -L ${artifact.url} | tar -xvz`
);
}
}
} else {
process.exitCode = 1;
}
- name: Move relevant files into compiled
run: |
mkdir -p ./compiled
mkdir -p ./compiled/facebook-www
mkdir -p ./compiled/babel-plugin-react-refresh

# Copy the facebook-www folder into compiled
mv build/facebook-www ./compiled

# Copy WARNINGS to facebook-www
mv build/WARNINGS ./compiled/facebook-www/WARNINGS

# Copy eslint-plugin-react-hooks into facebook-www
mv build/oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js \
./compiled/facebook-www/eslint-plugin-react-hooks.js

# Copy unstable_server-external-runtime.js into facebook-www
mv build/oss-stable/react-dom/unstable_server-external-runtime.js \
./compiled/facebook-www/unstable_server-external-runtime.js

# Copy react-refresh-babel.development.js into babel-plugin-react-refresh
mv build/oss-stable/react-refresh/cjs/react-refresh-babel.development.js \
./compiled/babel-plugin-react-refresh/index.js

ls -R ./compiled
- uses: actions/upload-artifact@v3
with:
name: compiled
path: compiled/

commit_artifacts:
needs: download_artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: builds/facebook-www
- name: Ensure clean directory
run: rm -rf compiled
- uses: actions/download-artifact@v3
with:
name: compiled
path: compiled/
- run: git status -u
- name: Commit changes to branch
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Build for ${{ github.sha }}
branch: builds/facebook-www
commit_user_name: ${{ github.actor }}
commit_user_email: ${{ github.actor }}@users.noreply.github.com
create_branch: true
6 changes: 3 additions & 3 deletions fixtures/blocks/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3390,9 +3390,9 @@ decamelize@^1.2.0:
integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=

decode-uri-component@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
version "0.2.2"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==

decompress-response@^3.3.0:
version "3.3.0"
Expand Down
6 changes: 3 additions & 3 deletions fixtures/concurrent/time-slicing/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2294,9 +2294,9 @@ decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=

decode-uri-component@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
version "0.2.2"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==

deep-equal@^1.0.1:
version "1.1.1"
Expand Down
6 changes: 3 additions & 3 deletions fixtures/dom/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2274,9 +2274,9 @@ decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=

decode-uri-component@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
version "0.2.2"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==

deep-equal@^1.0.1:
version "1.1.1"
Expand Down
6 changes: 3 additions & 3 deletions fixtures/fizz/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2149,9 +2149,9 @@ decamelize@^1.2.0:
integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=

decode-uri-component@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
version "0.2.2"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==

decompress-response@^3.3.0:
version "3.3.0"
Expand Down
6 changes: 3 additions & 3 deletions fixtures/legacy-jsx-runtimes/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1156,9 +1156,9 @@ decimal.js@^10.2.1:
integrity sha512-Nv6ENEzyPQ6AItkGwLE2PGKinZZ9g59vSh2BeH6NqPu0OTKZ5ruJsVqh/orbAnqXc9pBbgXAIrc2EyaCj8NpGg==

decode-uri-component@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
version "0.2.2"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==

deep-is@~0.1.3:
version "0.1.4"
Expand Down
6 changes: 3 additions & 3 deletions fixtures/ssr/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1949,9 +1949,9 @@ decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=

decode-uri-component@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
version "0.2.2"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==

deep-extend@^0.6.0:
version "0.6.0"
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@
"prettier": "node ./scripts/prettier/index.js write-changed",
"prettier-all": "node ./scripts/prettier/index.js write",
"version-check": "node ./scripts/tasks/version-check.js",
"merge-fork": "node ./scripts/merge-fork/merge-fork.js",
"replace-fork": "node ./scripts/merge-fork/replace-fork.js",
"publish-prereleases": "node ./scripts/release/publish-using-ci-workflow.js",
"download-build": "node ./scripts/release/download-experimental-build.js",
"download-build-for-head": "node ./scripts/release/download-experimental-build.js --commit=$(git rev-parse HEAD)",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-devtools-core",
"version": "4.26.1",
"version": "4.27.0",
"description": "Use react-devtools outside of the browser",
"license": "MIT",
"main": "./dist/backend.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-devtools-extensions/chrome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"manifest_version": 3,
"name": "React Developer Tools",
"description": "Adds React debugging tools to the Chrome Developer Tools.",
"version": "4.26.1",
"version_name": "4.26.1",
"version": "4.27.0",
"version_name": "4.27.0",
"minimum_chrome_version": "88",
"icons": {
"16": "icons/16-production.png",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-devtools-extensions/edge/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"manifest_version": 3,
"name": "React Developer Tools",
"description": "Adds React debugging tools to the Microsoft Edge Developer Tools.",
"version": "4.26.1",
"version_name": "4.26.1",
"version": "4.27.0",
"version_name": "4.27.0",
"minimum_chrome_version": "88",
"icons": {
"16": "icons/16-production.png",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-extensions/firefox/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "React Developer Tools",
"description": "Adds React debugging tools to the Firefox Developer Tools.",
"version": "4.26.1",
"version": "4.27.0",
"applications": {
"gecko": {
"id": "@react-devtools",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-inline/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-devtools-inline",
"version": "4.26.1",
"version": "4.27.0",
"description": "Embed react-devtools within a website",
"license": "MIT",
"main": "./dist/backend.js",
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.