diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/nested-optional-chains.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/nested-optional-chains.expect.md index 456172d794..0acf33b2ed 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/nested-optional-chains.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/nested-optional-chains.expect.md @@ -33,7 +33,7 @@ function useFoo({ // prop3 and prop4?.inner should be hoisted as the dependency of z const z = prop3?.fn(prop4?.inner.value).toString(); - // prop5 and prop4?.inner should be hoisted as the dependency of z + // prop5 and prop6?.inner should be hoisted as the dependency of zz const zz = prop5?.fn(prop6?.inner.value)?.toString(); return [x, y, z, zz]; } diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/nested-optional-chains.ts b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/nested-optional-chains.ts index 8fd13fff02..d00cb4fee6 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/nested-optional-chains.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/nested-optional-chains.ts @@ -29,7 +29,7 @@ function useFoo({ // prop3 and prop4?.inner should be hoisted as the dependency of z const z = prop3?.fn(prop4?.inner.value).toString(); - // prop5 and prop4?.inner should be hoisted as the dependency of z + // prop5 and prop6?.inner should be hoisted as the dependency of zz const zz = prop5?.fn(prop6?.inner.value)?.toString(); return [x, y, z, zz]; } diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/nested-optional-chains.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/nested-optional-chains.expect.md index 18dfd38f37..56b987c677 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/nested-optional-chains.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/nested-optional-chains.expect.md @@ -35,7 +35,7 @@ function useFoo({ // prop3 and prop4?.inner should be hoisted as the dependency of z const z = prop3?.fn(prop4?.inner.value).toString(); - // prop5 and prop4?.inner should be hoisted as the dependency of z + // prop5 and prop6?.inner should be hoisted as the dependency of zz const zz = prop5?.fn(prop6?.inner.value)?.toString(); return [x, y, z, zz]; } diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/nested-optional-chains.ts b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/nested-optional-chains.ts index 7d0b7ad44f..48f3b2de2a 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/nested-optional-chains.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/nested-optional-chains.ts @@ -31,7 +31,7 @@ function useFoo({ // prop3 and prop4?.inner should be hoisted as the dependency of z const z = prop3?.fn(prop4?.inner.value).toString(); - // prop5 and prop4?.inner should be hoisted as the dependency of z + // prop5 and prop6?.inner should be hoisted as the dependency of zz const zz = prop5?.fn(prop6?.inner.value)?.toString(); return [x, y, z, zz]; } diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/reduce-reactive-deps/merge-uncond-optional-chain-and-cond.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/reduce-reactive-deps/merge-uncond-optional-chain-and-cond.expect.md index 2b50c5f2b6..8703c30cb0 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/reduce-reactive-deps/merge-uncond-optional-chain-and-cond.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/reduce-reactive-deps/merge-uncond-optional-chain-and-cond.expect.md @@ -5,16 +5,6 @@ // @enablePropagateDepsInHIR import {identity} from 'shared-runtime'; -/** - * Evaluator failure: - * Found differences in evaluator results - * Non-forget (expected): - * (kind: ok) {} - * [[ (exception in render) TypeError: Cannot read properties of null (reading 'title_text') ]] - * Forget: - * (kind: ok) {} - * {} - */ /** * Very contrived text fixture showing that it's technically incorrect to merge * a conditional dependency (e.g. dep.path in `cond ? dep.path : ...`) and an @@ -43,16 +33,6 @@ export const FIXTURE_ENTRYPOINT = { import { c as _c } from "react/compiler-runtime"; // @enablePropagateDepsInHIR import { identity } from "shared-runtime"; -/** - * Evaluator failure: - * Found differences in evaluator results - * Non-forget (expected): - * (kind: ok) {} - * [[ (exception in render) TypeError: Cannot read properties of null (reading 'title_text') ]] - * Forget: - * (kind: ok) {} - * {} - */ /** * Very contrived text fixture showing that it's technically incorrect to merge * a conditional dependency (e.g. dep.path in `cond ? dep.path : ...`) and an diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/reduce-reactive-deps/merge-uncond-optional-chain-and-cond.ts b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/reduce-reactive-deps/merge-uncond-optional-chain-and-cond.ts index 27b2f3f031..2275412d77 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/reduce-reactive-deps/merge-uncond-optional-chain-and-cond.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/reduce-reactive-deps/merge-uncond-optional-chain-and-cond.ts @@ -1,16 +1,6 @@ // @enablePropagateDepsInHIR import {identity} from 'shared-runtime'; -/** - * Evaluator failure: - * Found differences in evaluator results - * Non-forget (expected): - * (kind: ok) {} - * [[ (exception in render) TypeError: Cannot read properties of null (reading 'title_text') ]] - * Forget: - * (kind: ok) {} - * {} - */ /** * Very contrived text fixture showing that it's technically incorrect to merge * a conditional dependency (e.g. dep.path in `cond ? dep.path : ...`) and an diff --git a/scripts/devtools/publish-release.js b/scripts/devtools/publish-release.js index 495fddefc2..6a2ab4f79d 100755 --- a/scripts/devtools/publish-release.js +++ b/scripts/devtools/publish-release.js @@ -82,18 +82,13 @@ async function publishToNPM() { // If so we might be resuming from a previous run. // We could infer this by comparing the build-info.json, // But for now the easiest way is just to ask if this is expected. - const info = await execRead(`npm view ${npmPackage}@${version}`) - // Early versions of npm view gives empty response, but newer versions give 404 error. - // Catch the error to keep it consistent. - .catch(childProcessError => { - if (childProcessError.stderr.startsWith('npm ERR! code E404')) { - return null; - } + const versionListJSON = await execRead( + `npm view ${npmPackage} versions --json` + ); + const versionList = JSON.parse(versionListJSON); + const versionIsAlreadyPublished = versionList.includes(version); - throw childProcessError; - }); - - if (info) { + if (versionIsAlreadyPublished) { console.log(''); console.log( `${npmPackage} version ${chalk.bold(