Files
react/compiler/package.json

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.5 KiB
JSON
Raw Permalink Normal View History

2021-05-11 16:10:34 -07:00
{
"private": true,
"workspaces": {
2024-01-30 14:54:04 -05:00
"packages": [
"packages/*"
2024-01-30 14:54:04 -05:00
]
2021-05-11 16:10:34 -07:00
},
"repository": {
"type": "git",
"url": "git+https://github.com/facebook/react.git"
2021-05-11 16:10:34 -07:00
},
"scripts": {
"copyright": "node scripts/copyright.js",
"hash": "scripts/hash.sh",
"start": "yarn workspace playground run start",
"next": "yarn workspace playground run dev",
"build": "yarn workspaces run build",
[compiler] Switch to esbuild (#31963) This migrates the compiler's bundler to esbuild instead of rollup. Unlike React, our bundling use cases are far simpler since the majority of our packages are meant to be run on node. Rollup was adding considerable build time overhead whereas esbuild remains fast and has all the functionality we need out of the box. ### Before ``` time yarn workspaces run build yarn workspaces v1.22.22 > babel-plugin-react-compiler yarn run v1.22.22 $ rimraf dist && rollup --config --bundleConfigAsCjs src/index.ts → dist/index.js... (!) Circular dependencies # ... created dist/index.js in 15.5s ✨ Done in 16.45s. > eslint-plugin-react-compiler yarn run v1.22.22 $ rimraf dist && rollup --config --bundleConfigAsCjs src/index.ts → dist/index.js... (!) Circular dependencies # ... created dist/index.js in 9.1s ✨ Done in 10.11s. > make-read-only-util yarn run v1.22.22 warning package.json: No license field $ tsc ✨ Done in 1.81s. > react-compiler-healthcheck yarn run v1.22.22 $ rimraf dist && rollup --config --bundleConfigAsCjs src/index.ts → dist/index.js... (!) Circular dependencies # ... created dist/index.js in 8.7s ✨ Done in 10.43s. > react-compiler-runtime yarn run v1.22.22 $ rimraf dist && rollup --config --bundleConfigAsCjs src/index.ts → dist/index.js... (!) src/index.ts (1:0): Module level directives cause errors when bundled, "use no memo" in "src/index.ts" was ignored. # ... created dist/index.js in 1.1s ✨ Done in 1.82s. > snap yarn run v1.22.22 $ rimraf dist && concurrently -n snap,runtime "tsc --build" "yarn --silent workspace react-compiler-runtime build --silent" $ rimraf dist && rollup --config --bundleConfigAsCjs --silent [runtime] yarn --silent workspace react-compiler-runtime build --silent exited with code 0 [snap] tsc --build exited with code 0 ✨ Done in 5.73s. ✨ Done in 47.30s. yarn workspaces run build 75.92s user 5.48s system 170% cpu 47.821 total ``` ### After ``` time yarn workspaces run build yarn workspaces v1.22.22 > babel-plugin-react-compiler yarn run v1.22.22 $ rimraf dist && scripts/build.js ✨ Done in 1.02s. > eslint-plugin-react-compiler yarn run v1.22.22 $ rimraf dist && scripts/build.js ✨ Done in 0.93s. > make-read-only-util yarn run v1.22.22 warning package.json: No license field $ rimraf dist && scripts/build.js ✨ Done in 0.89s. > react-compiler-healthcheck yarn run v1.22.22 $ rimraf dist && scripts/build.js ✨ Done in 0.58s. > react-compiler-runtime yarn run v1.22.22 $ rimraf dist && scripts/build.js ✨ Done in 0.48s. > snap yarn run v1.22.22 $ rimraf dist && concurrently -n snap,runtime "tsc --build" "yarn --silent workspace react-compiler-runtime build" $ rimraf dist && scripts/build.js [runtime] yarn --silent workspace react-compiler-runtime build exited with code 0 [snap] tsc --build exited with code 0 ✨ Done in 4.69s. ✨ Done in 9.46s. yarn workspaces run build 9.70s user 0.99s system 103% cpu 10.329 total ``` --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31963). * #31964 * __->__ #31963 * #31962
2025-01-02 16:59:56 -05:00
"dev": "cd apps/playground && yarn dev",
2023-06-06 10:56:20 -04:00
"test": "yarn workspaces run test",
"snap": "yarn workspace babel-plugin-react-compiler run snap",
"snap:build": "yarn workspace snap run build",
"npm:publish": "node scripts/release/publish",
"eslint-docs": "yarn workspace babel-plugin-react-compiler build && node scripts/build-eslint-docs.js"
[compiler] Refactor release script Updates the release script to publish tags as well as take a `--ci` option Test plan: ``` $ yarn npm:publish --debug --frfr yarn run v1.22.22 $ node scripts/release/publish --debug --frfr ℹ Preparing to publish (for real) [debug=true] ℹ Building packages ✔ Successfully built babel-plugin-react-compiler ✔ Successfully built eslint-plugin-react-compiler ✔ Successfully built react-compiler-healthcheck NPM 2-factor auth code: ****** ✔ Wrote package.json for babel-plugin-react-compiler@0.0.0-experimental-10cf18a-20240806 ========== babel-plugin-react-compiler ========== ⠧ Publishing babel-plugin-react-compiler@0.0.0-experimental-10cf18a-20240806 to npm + babel-plugin-react-compiler@0.0.0-experimental-10cf18a-20240806 ✔ Successfully published babel-plugin-react-compiler to npm ℹ dry-run: npm dist-tag add babel-plugin-react-compiler@0.0.0-experimental-10cf18a-20240806 experimental --otp=****** ✔ Successfully pushed dist-tag experimental for babel-plugin-react-compiler to npm ✔ Wrote package.json for eslint-plugin-react-compiler@0.0.0-experimental-532f76b-20240806 ========== eslint-plugin-react-compiler ========== ⠹ Publishing eslint-plugin-react-compiler@0.0.0-experimental-532f76b-20240806 to npm + eslint-plugin-react-compiler@0.0.0-experimental-532f76b-20240806 ✔ Successfully published eslint-plugin-react-compiler to npm ℹ dry-run: npm dist-tag add eslint-plugin-react-compiler@0.0.0-experimental-532f76b-20240806 experimental --otp=****** ✔ Successfully pushed dist-tag experimental for eslint-plugin-react-compiler to npm ✔ Wrote package.json for react-compiler-healthcheck@0.0.0-experimental-48a8743-20240806 ========== react-compiler-healthcheck ========== ⠙ Publishing react-compiler-healthcheck@0.0.0-experimental-48a8743-20240806 to npm + react-compiler-healthcheck@0.0.0-experimental-48a8743-20240806 ✔ Successfully published react-compiler-healthcheck to npm ℹ dry-run: npm dist-tag add react-compiler-healthcheck@0.0.0-experimental-48a8743-20240806 experimental --otp=****** ✔ Successfully pushed dist-tag experimental for react-compiler-healthcheck to npm ✅ All done ✨ Done in 50.64s. ``` ghstack-source-id: 405cc001c2ab2adaad2bfe4f11fdb7fd28d7e2d1 Pull Request resolved: https://github.com/facebook/react/pull/30614
2024-08-06 14:41:26 -04:00
},
"dependencies": {
"fs-extra": "^4.0.2",
"react-is": "0.0.0-experimental-4beb1fd8-20241118"
2021-05-11 16:10:34 -07:00
},
"devDependencies": {
[compiler] Dedupe @babel/types (#32581) Extracting portions of #32416 for easier review. This PR dedupes @babel/types to resolve to 7.26.3, for compatibility in the root workspace where eslint-plugin-react-hooks resides. I also needed to update @babel/preset-typescript in snap. The compiler changes in HIR and ReactiveScopes were needed due to types changing. Notably, Babel [added support for optional chaining assignment](https://github.com/babel/babel/pull/15751) (currently [Stage 1](https://github.com/tc39/proposal-optional-chaining-assignment)), so in the latest versions of @babel/types, AssignmentExpression.left can now also be of t.OptionalMemberExpression. Given that this is in Stage 1, the compiler probably shouldn't support this syntax, so this PR updates HIR to bailout with a TODO if there is a non LVal on the lhs of an Assignment Expression. There was also a small superficial SourceLocation change needed in `InferReactiveScopeVariables` as Babel 8 changes were [accidentally released in 7](https://github.com/babel/babel/issues/10746#issuecomment-2699146670). It doesn't affect our analysis so it seems fine to just update with the new properties. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32581). * #32582 * __->__ #32581 Co-authored-by: michael faith <michaelfaith@users.noreply.github.com> Co-authored-by: michael faith <michaelfaith@users.noreply.github.com>
2025-03-12 17:02:10 -04:00
"@babel/types": "^7.26.0",
2024-04-02 12:13:39 -04:00
"@tsconfig/strictest": "^2.0.5",
"concurrently": "^7.4.0",
"esbuild": "^0.25.0",
[publish] Add script to publish packages Adds a script to publish babel-plugin-react-compiler, eslint-plugin-react-compiler, and react-compiler-healthcheck to npm. Instructions are in a comment in scripts/publish.js, please read carefully before using this script! Test plan: ``` $ yarn npm:publish yarn run v1.22.10 $ node scripts/publish ℹ Preparing to publish (dry run) [debug=false] ℹ Building packages ✔ Successfully built babel-plugin-react-compiler ✔ Successfully built eslint-plugin-react-compiler ✔ Successfully built react-compiler-healthcheck ℹ Dry run: Report tarball contents ========== babel-plugin-react-compiler ========== ⠴ Running npm pack --dry-run npm WARN config init.author.name Use `--init-author-name` instead. npm WARN config init.author.email Use `--init-author-email` instead. ⠦ Running npm pack --dry-run npm notice npm notice 📦 babel-plugin-react-compiler@0.0.1 npm notice === Tarball Contents === npm notice 11B dist/__tests__/DisjointSet-test.d.ts npm notice 11B dist/__tests__/envConfig-test.d.ts npm notice 11B dist/__tests__/Logger-test.d.ts npm notice 11B dist/__tests__/parseConfigPragma-test.d.ts npm notice 11B dist/__tests__/Result-test.d.ts npm notice 145B dist/__tests__/test-utils/validateNoUseBeforeDefine.d.ts npm notice 144B dist/Babel/BabelPlugin.d.ts npm notice 350B dist/Babel/RunReactCompilerBabelPlugin.d.ts npm notice 2.4kB dist/CompilerError.d.ts npm notice 455B dist/Entrypoint/Gating.d.ts npm notice 376B dist/Entrypoint/Imports.d.ts npm notice 166B dist/Entrypoint/index.d.ts npm notice 1.8kB dist/Entrypoint/Options.d.ts npm notice 1.3kB dist/Entrypoint/Pipeline.d.ts npm notice 819B dist/Entrypoint/Program.d.ts npm notice 295B dist/Entrypoint/Reanimated.d.ts npm notice 753B dist/Entrypoint/Suppression.d.ts npm notice 113B dist/HIR/AssertConsistentIdentifiers.d.ts npm notice 115B dist/HIR/AssertTerminalSuccessorsExist.d.ts npm notice 529B dist/HIR/AssertValidBlockNesting.d.ts npm notice 110B dist/HIR/AssertValidMutableRanges.d.ts npm notice 585B dist/HIR/BuildHIR.d.ts npm notice 116B dist/HIR/BuildReactiveScopeTerminalsHIR.d.ts npm notice 125B dist/HIR/ComputeUnconditionalBlocks.d.ts npm notice 602B dist/HIR/Dominator.d.ts npm notice 12.7kB dist/HIR/Environment.d.ts npm notice 184B dist/HIR/FindContextIdentifiers.d.ts npm notice 401B dist/HIR/Globals.d.ts npm notice 22.2kB dist/HIR/HIR.d.ts npm notice 2.8kB dist/HIR/HIRBuilder.d.ts npm notice 1.1kB dist/HIR/index.d.ts npm notice 108B dist/HIR/MergeConsecutiveBlocks.d.ts npm notice 115B dist/HIR/MergeOverlappingReactiveScopesHIR.d.ts npm notice 2.2kB dist/HIR/ObjectShape.d.ts npm notice 1.4kB dist/HIR/PrintHIR.d.ts npm notice 106B dist/HIR/PruneUnusedLabelsHIR.d.ts npm notice 1.1kB dist/HIR/Types.d.ts npm notice 1.9kB dist/HIR/visitors.d.ts npm notice 776B dist/index.d.ts npm notice 5.4MB dist/index.js npm notice 429B dist/Inference/AnalyseFunctions.d.ts npm notice 324B dist/Inference/DropManualMemoization.d.ts npm notice 436B dist/Inference/index.d.ts npm notice 224B dist/Inference/InferAlias.d.ts npm notice 204B dist/Inference/InferAliasForPhis.d.ts npm notice 206B dist/Inference/InferAliasForStores.d.ts npm notice 115B dist/Inference/InferMutableContextVariables.d.ts npm notice 151B dist/Inference/InferMutableLifetimes.d.ts npm notice 109B dist/Inference/InferMutableRanges.d.ts npm notice 212B dist/Inference/InferMutableRangesForAlias.d.ts npm notice 106B dist/Inference/InferReactivePlaces.d.ts npm notice 368B dist/Inference/InferReferenceEffects.d.ts npm notice 201B dist/Inference/InferTryCatchAliases.d.ts npm notice 130B dist/Inference/InlineImmediatelyInvokedFunctionExpressions.d.ts npm notice 106B dist/Optimization/ConstantPropagation.d.ts npm notice 258B dist/Optimization/DeadCodeElimination.d.ts npm notice 177B dist/Optimization/index.d.ts npm notice 103B dist/Optimization/PruneMaybeThrows.d.ts npm notice 108B dist/ReactiveScopes/AlignMethodCallScopes.d.ts npm notice 110B dist/ReactiveScopes/AlignObjectMethodScopes.d.ts npm notice 133B dist/ReactiveScopes/AlignReactiveScopesToBlockScopes.d.ts npm notice 126B dist/ReactiveScopes/AlignReactiveScopesToBlockScopesHIR.d.ts npm notice 132B dist/ReactiveScopes/AssertScopeInstructionsWithinScope.d.ts npm notice 125B dist/ReactiveScopes/AssertWellFormedBreakTargets.d.ts npm notice 363B dist/ReactiveScopes/BuildReactiveBlocks.d.ts npm notice 142B dist/ReactiveScopes/BuildReactiveFunction.d.ts npm notice 759B dist/ReactiveScopes/CodegenReactiveFunction.d.ts npm notice 154B dist/ReactiveScopes/CollectReactiveIdentifiers.d.ts npm notice 128B dist/ReactiveScopes/CollectReferencedGlobals.d.ts npm notice 698B dist/ReactiveScopes/DeriveMinimalDependencies.d.ts npm notice 138B dist/ReactiveScopes/ExtractScopeDeclarationsFromDestructuring.d.ts npm notice 121B dist/ReactiveScopes/FlattenReactiveLoops.d.ts npm notice 124B dist/ReactiveScopes/FlattenScopesWithHooksOrUse.d.ts npm notice 2.1kB dist/ReactiveScopes/index.d.ts npm notice 370B dist/ReactiveScopes/InferReactiveScopeVariables.d.ts npm notice 217B dist/ReactiveScopes/MemoizeFbtOperandsInSameScope.d.ts npm notice 127B dist/ReactiveScopes/MergeOverlappingReactiveScopes.d.ts npm notice 138B dist/ReactiveScopes/MergeReactiveScopesThatInvalidateTogether.d.ts npm notice 1.0kB dist/ReactiveScopes/PrintReactiveFunction.d.ts npm notice 123B dist/ReactiveScopes/PromoteUsedTemporaries.d.ts npm notice 118B dist/ReactiveScopes/PropagateEarlyReturns.d.ts npm notice 127B dist/ReactiveScopes/PropagateScopeDependencies.d.ts npm notice 123B dist/ReactiveScopes/PruneAllReactiveScopes.d.ts npm notice 126B dist/ReactiveScopes/PruneAlwaysInvalidatingScopes.d.ts npm notice 117B dist/ReactiveScopes/PruneHoistedContexts.d.ts npm notice 227B dist/ReactiveScopes/PruneNonEscapingScopes.d.ts npm notice 125B dist/ReactiveScopes/PruneNonReactiveDependencies.d.ts npm notice 122B dist/ReactiveScopes/PruneTemporaryLValues.d.ts npm notice 118B dist/ReactiveScopes/PruneUnusedLabels.d.ts npm notice 118B dist/ReactiveScopes/PruneUnusedScopes.d.ts npm notice 123B dist/ReactiveScopes/RenameVariables.d.ts npm notice 114B dist/ReactiveScopes/StabilizeBlockIds.d.ts npm notice 3.1kB dist/ReactiveScopes/visitors.d.ts npm notice 170B dist/SSA/EliminateRedundantPhi.d.ts npm notice 101B dist/SSA/EnterSSA.d.ts npm notice 154B dist/SSA/index.d.ts npm notice 99B dist/SSA/LeaveSSA.d.ts npm notice 63.5kB dist/tsconfig.tsbuildinfo npm notice 43B dist/TypeInference/index.d.ts npm notice 103B dist/TypeInference/InferTypes.d.ts npm notice 352B dist/Utils/ComponentDeclaration.d.ts npm notice 256B dist/Utils/DisjointSet.d.ts npm notice 322B dist/Utils/HookDeclaration.d.ts npm notice 613B dist/Utils/logger.d.ts npm notice 2.3kB dist/Utils/Result.d.ts npm notice 119B dist/Utils/RuntimeDiagnosticConstants.d.ts npm notice 1.1kB dist/Utils/Stack.d.ts npm notice 149B dist/Utils/todo.d.ts npm notice 782B dist/Utils/utils.d.ts npm notice 603B dist/Validation/index.d.ts npm notice 117B dist/Validation/ValidateContextVariableLValues.d.ts npm notice 109B dist/Validation/ValidateHooksUsage.d.ts npm notice 214B dist/Validation/ValidateMemoizedEffectDependencies.d.ts npm notice 113B dist/Validation/ValidateNoCapitalizedCalls.d.ts npm notice 114B dist/Validation/ValidateNoRefAccesInRender.d.ts npm notice 113B dist/Validation/ValidateNoSetStateInRender.d.ts npm notice 131B dist/Validation/ValidatePreservedManualMemoization.d.ts npm notice 102B dist/Validation/ValidateUseMemo.d.ts npm notice 2.3kB package.json npm notice === Tarball Details === npm notice name: babel-plugin-react-compiler npm notice version: 0.0.1 npm notice filename: babel-plugin-react-compiler-0.0.1.tgz npm notice package size: 1.1 MB npm notice unpacked size: 5.5 MB npm notice shasum: 9a0fb71bdc904d6ab92432a506b0e037f10dd7ce npm notice integrity: sha512-hXtObyIEP4MbO[...]jstRbpztyLf4g== npm notice total files: 119 npm notice ========== eslint-plugin-react-compiler ========== ⠴ Running npm pack --dry-run npm WARN config init.author.name Use `--init-author-name` instead. npm WARN config init.author.email Use `--init-author-email` instead. ⠋ Running npm pack --dry-run npm notice npm notice 📦 eslint-plugin-react-compiler@0.0.0 npm notice === Tarball Contents === npm notice 827B README.md npm notice 2.1MB dist/index.js npm notice 968B package.json npm notice === Tarball Details === npm notice name: eslint-plugin-react-compiler npm notice version: 0.0.0 npm notice filename: eslint-plugin-react-compiler-0.0.0.tgz npm notice package size: 300.5 kB npm notice unpacked size: 2.1 MB npm notice shasum: f24dab544b03d36d9bb676a16256f114bd5e0ed6 npm notice integrity: sha512-8PcKZXZ+RVBDP[...]D7jFmkvHJoBeA== npm notice total files: 3 npm notice ========== react-compiler-healthcheck ========== ⠼ Running npm pack --dry-run npm WARN config init.author.name Use `--init-author-name` instead. npm WARN config init.author.email Use `--init-author-email` instead. ⠏ Running npm pack --dry-run npm notice npm notice 📦 react-compiler-healthcheck@0.0.0 npm notice === Tarball Contents === npm notice 2.1MB dist/index.js npm notice 677B package.json npm notice 1.8kB rollup.config.js npm notice 1.1kB src/checks/libraryCompat.ts npm notice 3.2kB src/checks/reactCompiler.ts npm notice 759B src/checks/strictMode.ts npm notice 67B src/config.ts npm notice 1.5kB src/index.ts npm notice 602B tsconfig.json npm notice === Tarball Details === npm notice name: react-compiler-healthcheck npm notice version: 0.0.0 npm notice filename: react-compiler-healthcheck-0.0.0.tgz npm notice package size: 290.4 kB npm notice unpacked size: 2.1 MB npm notice shasum: 55c0eb57aebc7305270a29e78ebf6c056044bae0 npm notice integrity: sha512-nPVhGyh8i9PoO[...]v52c3U0tKGpzA== npm notice total files: 9 npm notice ✔ Please confirm contents of packages before publishing. You can run this command again with --for-real to publish to npm ✨ Done in 61.19s. ``` ``` $ yarn npm:publish --debug --for-real yarn run v1.22.10 $ node scripts/publish --debug --for-real ℹ Preparing to publish (for real) [debug=true] ℹ Building packages ✔ Successfully built babel-plugin-react-compiler ✔ Successfully built eslint-plugin-react-compiler ✔ Successfully built react-compiler-healthcheck ✔ Bumped babel-plugin-react-compiler to 0.0.0-experimental-2769f7a-20240513 ✔ Bumped eslint-plugin-react-compiler to 0.0.0-experimental-e04a001-20240513 ✔ Bumped react-compiler-healthcheck to 0.0.0-experimental-410375f-20240513 ========== babel-plugin-react-compiler ========== ⠋ Publishing babel-plugin-react-compiler to npm Command that would have run: npm publish --dry-run /Users/lauren/code/react-forget/compiler/scripts/publish.js:188 throw new Error( ^ Error: This error is intentional, please double check scripts/publish.js and remove this error prior to publishing at main (/Users/lauren/code/react-forget/compiler/scripts/publish.js:188:13) Node.js v20.11.0 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` On the day of launch, remove the hardcoded error, then run `yarn npm:publish --debug --for-real` first as a sanity check. Confirm the contents are correct. Then when you are certain, run `yarn npm:publish --for-real`, and push the commited version bumps to GitHub so the hashes that the packages originate from are public. ghstack-source-id: 403bc22d4b340056fd112fcfc38580f28ed6c986 Pull Request resolved: https://github.com/facebook/react-forget/pull/2966
2024-05-14 11:01:17 -04:00
"folder-hash": "^4.0.4",
"npm-dts": "^1.3.13",
"object-assign": "^4.1.1",
[publish] Add script to publish packages Adds a script to publish babel-plugin-react-compiler, eslint-plugin-react-compiler, and react-compiler-healthcheck to npm. Instructions are in a comment in scripts/publish.js, please read carefully before using this script! Test plan: ``` $ yarn npm:publish yarn run v1.22.10 $ node scripts/publish ℹ Preparing to publish (dry run) [debug=false] ℹ Building packages ✔ Successfully built babel-plugin-react-compiler ✔ Successfully built eslint-plugin-react-compiler ✔ Successfully built react-compiler-healthcheck ℹ Dry run: Report tarball contents ========== babel-plugin-react-compiler ========== ⠴ Running npm pack --dry-run npm WARN config init.author.name Use `--init-author-name` instead. npm WARN config init.author.email Use `--init-author-email` instead. ⠦ Running npm pack --dry-run npm notice npm notice 📦 babel-plugin-react-compiler@0.0.1 npm notice === Tarball Contents === npm notice 11B dist/__tests__/DisjointSet-test.d.ts npm notice 11B dist/__tests__/envConfig-test.d.ts npm notice 11B dist/__tests__/Logger-test.d.ts npm notice 11B dist/__tests__/parseConfigPragma-test.d.ts npm notice 11B dist/__tests__/Result-test.d.ts npm notice 145B dist/__tests__/test-utils/validateNoUseBeforeDefine.d.ts npm notice 144B dist/Babel/BabelPlugin.d.ts npm notice 350B dist/Babel/RunReactCompilerBabelPlugin.d.ts npm notice 2.4kB dist/CompilerError.d.ts npm notice 455B dist/Entrypoint/Gating.d.ts npm notice 376B dist/Entrypoint/Imports.d.ts npm notice 166B dist/Entrypoint/index.d.ts npm notice 1.8kB dist/Entrypoint/Options.d.ts npm notice 1.3kB dist/Entrypoint/Pipeline.d.ts npm notice 819B dist/Entrypoint/Program.d.ts npm notice 295B dist/Entrypoint/Reanimated.d.ts npm notice 753B dist/Entrypoint/Suppression.d.ts npm notice 113B dist/HIR/AssertConsistentIdentifiers.d.ts npm notice 115B dist/HIR/AssertTerminalSuccessorsExist.d.ts npm notice 529B dist/HIR/AssertValidBlockNesting.d.ts npm notice 110B dist/HIR/AssertValidMutableRanges.d.ts npm notice 585B dist/HIR/BuildHIR.d.ts npm notice 116B dist/HIR/BuildReactiveScopeTerminalsHIR.d.ts npm notice 125B dist/HIR/ComputeUnconditionalBlocks.d.ts npm notice 602B dist/HIR/Dominator.d.ts npm notice 12.7kB dist/HIR/Environment.d.ts npm notice 184B dist/HIR/FindContextIdentifiers.d.ts npm notice 401B dist/HIR/Globals.d.ts npm notice 22.2kB dist/HIR/HIR.d.ts npm notice 2.8kB dist/HIR/HIRBuilder.d.ts npm notice 1.1kB dist/HIR/index.d.ts npm notice 108B dist/HIR/MergeConsecutiveBlocks.d.ts npm notice 115B dist/HIR/MergeOverlappingReactiveScopesHIR.d.ts npm notice 2.2kB dist/HIR/ObjectShape.d.ts npm notice 1.4kB dist/HIR/PrintHIR.d.ts npm notice 106B dist/HIR/PruneUnusedLabelsHIR.d.ts npm notice 1.1kB dist/HIR/Types.d.ts npm notice 1.9kB dist/HIR/visitors.d.ts npm notice 776B dist/index.d.ts npm notice 5.4MB dist/index.js npm notice 429B dist/Inference/AnalyseFunctions.d.ts npm notice 324B dist/Inference/DropManualMemoization.d.ts npm notice 436B dist/Inference/index.d.ts npm notice 224B dist/Inference/InferAlias.d.ts npm notice 204B dist/Inference/InferAliasForPhis.d.ts npm notice 206B dist/Inference/InferAliasForStores.d.ts npm notice 115B dist/Inference/InferMutableContextVariables.d.ts npm notice 151B dist/Inference/InferMutableLifetimes.d.ts npm notice 109B dist/Inference/InferMutableRanges.d.ts npm notice 212B dist/Inference/InferMutableRangesForAlias.d.ts npm notice 106B dist/Inference/InferReactivePlaces.d.ts npm notice 368B dist/Inference/InferReferenceEffects.d.ts npm notice 201B dist/Inference/InferTryCatchAliases.d.ts npm notice 130B dist/Inference/InlineImmediatelyInvokedFunctionExpressions.d.ts npm notice 106B dist/Optimization/ConstantPropagation.d.ts npm notice 258B dist/Optimization/DeadCodeElimination.d.ts npm notice 177B dist/Optimization/index.d.ts npm notice 103B dist/Optimization/PruneMaybeThrows.d.ts npm notice 108B dist/ReactiveScopes/AlignMethodCallScopes.d.ts npm notice 110B dist/ReactiveScopes/AlignObjectMethodScopes.d.ts npm notice 133B dist/ReactiveScopes/AlignReactiveScopesToBlockScopes.d.ts npm notice 126B dist/ReactiveScopes/AlignReactiveScopesToBlockScopesHIR.d.ts npm notice 132B dist/ReactiveScopes/AssertScopeInstructionsWithinScope.d.ts npm notice 125B dist/ReactiveScopes/AssertWellFormedBreakTargets.d.ts npm notice 363B dist/ReactiveScopes/BuildReactiveBlocks.d.ts npm notice 142B dist/ReactiveScopes/BuildReactiveFunction.d.ts npm notice 759B dist/ReactiveScopes/CodegenReactiveFunction.d.ts npm notice 154B dist/ReactiveScopes/CollectReactiveIdentifiers.d.ts npm notice 128B dist/ReactiveScopes/CollectReferencedGlobals.d.ts npm notice 698B dist/ReactiveScopes/DeriveMinimalDependencies.d.ts npm notice 138B dist/ReactiveScopes/ExtractScopeDeclarationsFromDestructuring.d.ts npm notice 121B dist/ReactiveScopes/FlattenReactiveLoops.d.ts npm notice 124B dist/ReactiveScopes/FlattenScopesWithHooksOrUse.d.ts npm notice 2.1kB dist/ReactiveScopes/index.d.ts npm notice 370B dist/ReactiveScopes/InferReactiveScopeVariables.d.ts npm notice 217B dist/ReactiveScopes/MemoizeFbtOperandsInSameScope.d.ts npm notice 127B dist/ReactiveScopes/MergeOverlappingReactiveScopes.d.ts npm notice 138B dist/ReactiveScopes/MergeReactiveScopesThatInvalidateTogether.d.ts npm notice 1.0kB dist/ReactiveScopes/PrintReactiveFunction.d.ts npm notice 123B dist/ReactiveScopes/PromoteUsedTemporaries.d.ts npm notice 118B dist/ReactiveScopes/PropagateEarlyReturns.d.ts npm notice 127B dist/ReactiveScopes/PropagateScopeDependencies.d.ts npm notice 123B dist/ReactiveScopes/PruneAllReactiveScopes.d.ts npm notice 126B dist/ReactiveScopes/PruneAlwaysInvalidatingScopes.d.ts npm notice 117B dist/ReactiveScopes/PruneHoistedContexts.d.ts npm notice 227B dist/ReactiveScopes/PruneNonEscapingScopes.d.ts npm notice 125B dist/ReactiveScopes/PruneNonReactiveDependencies.d.ts npm notice 122B dist/ReactiveScopes/PruneTemporaryLValues.d.ts npm notice 118B dist/ReactiveScopes/PruneUnusedLabels.d.ts npm notice 118B dist/ReactiveScopes/PruneUnusedScopes.d.ts npm notice 123B dist/ReactiveScopes/RenameVariables.d.ts npm notice 114B dist/ReactiveScopes/StabilizeBlockIds.d.ts npm notice 3.1kB dist/ReactiveScopes/visitors.d.ts npm notice 170B dist/SSA/EliminateRedundantPhi.d.ts npm notice 101B dist/SSA/EnterSSA.d.ts npm notice 154B dist/SSA/index.d.ts npm notice 99B dist/SSA/LeaveSSA.d.ts npm notice 63.5kB dist/tsconfig.tsbuildinfo npm notice 43B dist/TypeInference/index.d.ts npm notice 103B dist/TypeInference/InferTypes.d.ts npm notice 352B dist/Utils/ComponentDeclaration.d.ts npm notice 256B dist/Utils/DisjointSet.d.ts npm notice 322B dist/Utils/HookDeclaration.d.ts npm notice 613B dist/Utils/logger.d.ts npm notice 2.3kB dist/Utils/Result.d.ts npm notice 119B dist/Utils/RuntimeDiagnosticConstants.d.ts npm notice 1.1kB dist/Utils/Stack.d.ts npm notice 149B dist/Utils/todo.d.ts npm notice 782B dist/Utils/utils.d.ts npm notice 603B dist/Validation/index.d.ts npm notice 117B dist/Validation/ValidateContextVariableLValues.d.ts npm notice 109B dist/Validation/ValidateHooksUsage.d.ts npm notice 214B dist/Validation/ValidateMemoizedEffectDependencies.d.ts npm notice 113B dist/Validation/ValidateNoCapitalizedCalls.d.ts npm notice 114B dist/Validation/ValidateNoRefAccesInRender.d.ts npm notice 113B dist/Validation/ValidateNoSetStateInRender.d.ts npm notice 131B dist/Validation/ValidatePreservedManualMemoization.d.ts npm notice 102B dist/Validation/ValidateUseMemo.d.ts npm notice 2.3kB package.json npm notice === Tarball Details === npm notice name: babel-plugin-react-compiler npm notice version: 0.0.1 npm notice filename: babel-plugin-react-compiler-0.0.1.tgz npm notice package size: 1.1 MB npm notice unpacked size: 5.5 MB npm notice shasum: 9a0fb71bdc904d6ab92432a506b0e037f10dd7ce npm notice integrity: sha512-hXtObyIEP4MbO[...]jstRbpztyLf4g== npm notice total files: 119 npm notice ========== eslint-plugin-react-compiler ========== ⠴ Running npm pack --dry-run npm WARN config init.author.name Use `--init-author-name` instead. npm WARN config init.author.email Use `--init-author-email` instead. ⠋ Running npm pack --dry-run npm notice npm notice 📦 eslint-plugin-react-compiler@0.0.0 npm notice === Tarball Contents === npm notice 827B README.md npm notice 2.1MB dist/index.js npm notice 968B package.json npm notice === Tarball Details === npm notice name: eslint-plugin-react-compiler npm notice version: 0.0.0 npm notice filename: eslint-plugin-react-compiler-0.0.0.tgz npm notice package size: 300.5 kB npm notice unpacked size: 2.1 MB npm notice shasum: f24dab544b03d36d9bb676a16256f114bd5e0ed6 npm notice integrity: sha512-8PcKZXZ+RVBDP[...]D7jFmkvHJoBeA== npm notice total files: 3 npm notice ========== react-compiler-healthcheck ========== ⠼ Running npm pack --dry-run npm WARN config init.author.name Use `--init-author-name` instead. npm WARN config init.author.email Use `--init-author-email` instead. ⠏ Running npm pack --dry-run npm notice npm notice 📦 react-compiler-healthcheck@0.0.0 npm notice === Tarball Contents === npm notice 2.1MB dist/index.js npm notice 677B package.json npm notice 1.8kB rollup.config.js npm notice 1.1kB src/checks/libraryCompat.ts npm notice 3.2kB src/checks/reactCompiler.ts npm notice 759B src/checks/strictMode.ts npm notice 67B src/config.ts npm notice 1.5kB src/index.ts npm notice 602B tsconfig.json npm notice === Tarball Details === npm notice name: react-compiler-healthcheck npm notice version: 0.0.0 npm notice filename: react-compiler-healthcheck-0.0.0.tgz npm notice package size: 290.4 kB npm notice unpacked size: 2.1 MB npm notice shasum: 55c0eb57aebc7305270a29e78ebf6c056044bae0 npm notice integrity: sha512-nPVhGyh8i9PoO[...]v52c3U0tKGpzA== npm notice total files: 9 npm notice ✔ Please confirm contents of packages before publishing. You can run this command again with --for-real to publish to npm ✨ Done in 61.19s. ``` ``` $ yarn npm:publish --debug --for-real yarn run v1.22.10 $ node scripts/publish --debug --for-real ℹ Preparing to publish (for real) [debug=true] ℹ Building packages ✔ Successfully built babel-plugin-react-compiler ✔ Successfully built eslint-plugin-react-compiler ✔ Successfully built react-compiler-healthcheck ✔ Bumped babel-plugin-react-compiler to 0.0.0-experimental-2769f7a-20240513 ✔ Bumped eslint-plugin-react-compiler to 0.0.0-experimental-e04a001-20240513 ✔ Bumped react-compiler-healthcheck to 0.0.0-experimental-410375f-20240513 ========== babel-plugin-react-compiler ========== ⠋ Publishing babel-plugin-react-compiler to npm Command that would have run: npm publish --dry-run /Users/lauren/code/react-forget/compiler/scripts/publish.js:188 throw new Error( ^ Error: This error is intentional, please double check scripts/publish.js and remove this error prior to publishing at main (/Users/lauren/code/react-forget/compiler/scripts/publish.js:188:13) Node.js v20.11.0 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` On the day of launch, remove the hardcoded error, then run `yarn npm:publish --debug --for-real` first as a sanity check. Confirm the contents are correct. Then when you are certain, run `yarn npm:publish --for-real`, and push the commited version bumps to GitHub so the hashes that the packages originate from are public. ghstack-source-id: 403bc22d4b340056fd112fcfc38580f28ed6c986 Pull Request resolved: https://github.com/facebook/react-forget/pull/2966
2024-05-14 11:01:17 -04:00
"ora": "5.4.1",
"prettier": "^3.3.3",
"prettier-plugin-hermes-parser": "^0.26.0",
"prompt-promise": "^1.0.3",
"rimraf": "^6.0.1",
[compiler] Dedupe @babel/types (#32581) Extracting portions of #32416 for easier review. This PR dedupes @babel/types to resolve to 7.26.3, for compatibility in the root workspace where eslint-plugin-react-hooks resides. I also needed to update @babel/preset-typescript in snap. The compiler changes in HIR and ReactiveScopes were needed due to types changing. Notably, Babel [added support for optional chaining assignment](https://github.com/babel/babel/pull/15751) (currently [Stage 1](https://github.com/tc39/proposal-optional-chaining-assignment)), so in the latest versions of @babel/types, AssignmentExpression.left can now also be of t.OptionalMemberExpression. Given that this is in Stage 1, the compiler probably shouldn't support this syntax, so this PR updates HIR to bailout with a TODO if there is a non LVal on the lhs of an Assignment Expression. There was also a small superficial SourceLocation change needed in `InferReactiveScopeVariables` as Babel 8 changes were [accidentally released in 7](https://github.com/babel/babel/issues/10746#issuecomment-2699146670). It doesn't affect our analysis so it seems fine to just update with the new properties. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32581). * #32582 * __->__ #32581 Co-authored-by: michael faith <michaelfaith@users.noreply.github.com> Co-authored-by: michael faith <michaelfaith@users.noreply.github.com>
2025-03-12 17:02:10 -04:00
"to-fast-properties": "^2.0.0",
[compiler] Migrate compiler packages to tsup (#32550) Currently in the `compiler` workspace, we invoke esbuild directly to build most packages (with the exception of `snap`). This has been mostly fine, but does not allow us to do things like generate type declaration files. I would like #32416 to be able to consume the merged eslint-plugin-react-compiler from source rather than via npm, and one of the things that has come up from my exploration in that stack using the compiler from source is that babel-plugin-react-compiler is missing type declarations. This is primarily because React's build process uses rollup + rollup-plugin-typescript, which runs tsc. So the merged plugin needs to typecheck properly in order to build. An alternative might be to migrate to something like babel with rollup instead to simply strip types rather than typecheck before building. The minor downside of that approach is that we would need to manually maintain a d.ts file for eslint-plugin-react-hooks. For now I would like to see if this PR helps us make progress rather than go for the slightly worse alternative. [`tsup`](https://github.com/egoist/tsup) is esbuild based so build performance is comparable. It is slower when generating d.ts files, but it's still much faster than rollup which we used prior to esbuild. For now, I have turned off `dts` by default, and it is only passed when publishing on npm. If you want to also generate d.ts files you can run `yarn build --dts`. ``` # BEFORE: build all compiler packages (esbuild) $ time yarn build ✨ Done in 15.61s. yarn build 13.82s user 1.54s system 96% cpu 15.842 total # --- # AFTER: build all compiler packages (tsup) $ time yarn build ✨ Done in 12.39s. yarn build 12.58s user 1.68s system 106% cpu 13.350 total # --- # AFTER: build all compiler packages and type declarations (tsup) $ time yarn build --dts ✨ Done in 30.69s. yarn build 43.57s user 3.20s system 150% cpu 31.061 total ``` I still need to test if this unblocks #32416 but this stack can be landed independently though as we could probably just release type declarations on npm. No one should be using the compiler directly, but if they really wanted to, lack of type declarations would not stop them (cf React secret internals). Note that I still kept esbuild as we still use it directly for forgive. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32550). * #32551 * __->__ #32550
2025-03-07 16:41:55 -05:00
"tsup": "^8.4.0",
[publish] Add script to publish packages Adds a script to publish babel-plugin-react-compiler, eslint-plugin-react-compiler, and react-compiler-healthcheck to npm. Instructions are in a comment in scripts/publish.js, please read carefully before using this script! Test plan: ``` $ yarn npm:publish yarn run v1.22.10 $ node scripts/publish ℹ Preparing to publish (dry run) [debug=false] ℹ Building packages ✔ Successfully built babel-plugin-react-compiler ✔ Successfully built eslint-plugin-react-compiler ✔ Successfully built react-compiler-healthcheck ℹ Dry run: Report tarball contents ========== babel-plugin-react-compiler ========== ⠴ Running npm pack --dry-run npm WARN config init.author.name Use `--init-author-name` instead. npm WARN config init.author.email Use `--init-author-email` instead. ⠦ Running npm pack --dry-run npm notice npm notice 📦 babel-plugin-react-compiler@0.0.1 npm notice === Tarball Contents === npm notice 11B dist/__tests__/DisjointSet-test.d.ts npm notice 11B dist/__tests__/envConfig-test.d.ts npm notice 11B dist/__tests__/Logger-test.d.ts npm notice 11B dist/__tests__/parseConfigPragma-test.d.ts npm notice 11B dist/__tests__/Result-test.d.ts npm notice 145B dist/__tests__/test-utils/validateNoUseBeforeDefine.d.ts npm notice 144B dist/Babel/BabelPlugin.d.ts npm notice 350B dist/Babel/RunReactCompilerBabelPlugin.d.ts npm notice 2.4kB dist/CompilerError.d.ts npm notice 455B dist/Entrypoint/Gating.d.ts npm notice 376B dist/Entrypoint/Imports.d.ts npm notice 166B dist/Entrypoint/index.d.ts npm notice 1.8kB dist/Entrypoint/Options.d.ts npm notice 1.3kB dist/Entrypoint/Pipeline.d.ts npm notice 819B dist/Entrypoint/Program.d.ts npm notice 295B dist/Entrypoint/Reanimated.d.ts npm notice 753B dist/Entrypoint/Suppression.d.ts npm notice 113B dist/HIR/AssertConsistentIdentifiers.d.ts npm notice 115B dist/HIR/AssertTerminalSuccessorsExist.d.ts npm notice 529B dist/HIR/AssertValidBlockNesting.d.ts npm notice 110B dist/HIR/AssertValidMutableRanges.d.ts npm notice 585B dist/HIR/BuildHIR.d.ts npm notice 116B dist/HIR/BuildReactiveScopeTerminalsHIR.d.ts npm notice 125B dist/HIR/ComputeUnconditionalBlocks.d.ts npm notice 602B dist/HIR/Dominator.d.ts npm notice 12.7kB dist/HIR/Environment.d.ts npm notice 184B dist/HIR/FindContextIdentifiers.d.ts npm notice 401B dist/HIR/Globals.d.ts npm notice 22.2kB dist/HIR/HIR.d.ts npm notice 2.8kB dist/HIR/HIRBuilder.d.ts npm notice 1.1kB dist/HIR/index.d.ts npm notice 108B dist/HIR/MergeConsecutiveBlocks.d.ts npm notice 115B dist/HIR/MergeOverlappingReactiveScopesHIR.d.ts npm notice 2.2kB dist/HIR/ObjectShape.d.ts npm notice 1.4kB dist/HIR/PrintHIR.d.ts npm notice 106B dist/HIR/PruneUnusedLabelsHIR.d.ts npm notice 1.1kB dist/HIR/Types.d.ts npm notice 1.9kB dist/HIR/visitors.d.ts npm notice 776B dist/index.d.ts npm notice 5.4MB dist/index.js npm notice 429B dist/Inference/AnalyseFunctions.d.ts npm notice 324B dist/Inference/DropManualMemoization.d.ts npm notice 436B dist/Inference/index.d.ts npm notice 224B dist/Inference/InferAlias.d.ts npm notice 204B dist/Inference/InferAliasForPhis.d.ts npm notice 206B dist/Inference/InferAliasForStores.d.ts npm notice 115B dist/Inference/InferMutableContextVariables.d.ts npm notice 151B dist/Inference/InferMutableLifetimes.d.ts npm notice 109B dist/Inference/InferMutableRanges.d.ts npm notice 212B dist/Inference/InferMutableRangesForAlias.d.ts npm notice 106B dist/Inference/InferReactivePlaces.d.ts npm notice 368B dist/Inference/InferReferenceEffects.d.ts npm notice 201B dist/Inference/InferTryCatchAliases.d.ts npm notice 130B dist/Inference/InlineImmediatelyInvokedFunctionExpressions.d.ts npm notice 106B dist/Optimization/ConstantPropagation.d.ts npm notice 258B dist/Optimization/DeadCodeElimination.d.ts npm notice 177B dist/Optimization/index.d.ts npm notice 103B dist/Optimization/PruneMaybeThrows.d.ts npm notice 108B dist/ReactiveScopes/AlignMethodCallScopes.d.ts npm notice 110B dist/ReactiveScopes/AlignObjectMethodScopes.d.ts npm notice 133B dist/ReactiveScopes/AlignReactiveScopesToBlockScopes.d.ts npm notice 126B dist/ReactiveScopes/AlignReactiveScopesToBlockScopesHIR.d.ts npm notice 132B dist/ReactiveScopes/AssertScopeInstructionsWithinScope.d.ts npm notice 125B dist/ReactiveScopes/AssertWellFormedBreakTargets.d.ts npm notice 363B dist/ReactiveScopes/BuildReactiveBlocks.d.ts npm notice 142B dist/ReactiveScopes/BuildReactiveFunction.d.ts npm notice 759B dist/ReactiveScopes/CodegenReactiveFunction.d.ts npm notice 154B dist/ReactiveScopes/CollectReactiveIdentifiers.d.ts npm notice 128B dist/ReactiveScopes/CollectReferencedGlobals.d.ts npm notice 698B dist/ReactiveScopes/DeriveMinimalDependencies.d.ts npm notice 138B dist/ReactiveScopes/ExtractScopeDeclarationsFromDestructuring.d.ts npm notice 121B dist/ReactiveScopes/FlattenReactiveLoops.d.ts npm notice 124B dist/ReactiveScopes/FlattenScopesWithHooksOrUse.d.ts npm notice 2.1kB dist/ReactiveScopes/index.d.ts npm notice 370B dist/ReactiveScopes/InferReactiveScopeVariables.d.ts npm notice 217B dist/ReactiveScopes/MemoizeFbtOperandsInSameScope.d.ts npm notice 127B dist/ReactiveScopes/MergeOverlappingReactiveScopes.d.ts npm notice 138B dist/ReactiveScopes/MergeReactiveScopesThatInvalidateTogether.d.ts npm notice 1.0kB dist/ReactiveScopes/PrintReactiveFunction.d.ts npm notice 123B dist/ReactiveScopes/PromoteUsedTemporaries.d.ts npm notice 118B dist/ReactiveScopes/PropagateEarlyReturns.d.ts npm notice 127B dist/ReactiveScopes/PropagateScopeDependencies.d.ts npm notice 123B dist/ReactiveScopes/PruneAllReactiveScopes.d.ts npm notice 126B dist/ReactiveScopes/PruneAlwaysInvalidatingScopes.d.ts npm notice 117B dist/ReactiveScopes/PruneHoistedContexts.d.ts npm notice 227B dist/ReactiveScopes/PruneNonEscapingScopes.d.ts npm notice 125B dist/ReactiveScopes/PruneNonReactiveDependencies.d.ts npm notice 122B dist/ReactiveScopes/PruneTemporaryLValues.d.ts npm notice 118B dist/ReactiveScopes/PruneUnusedLabels.d.ts npm notice 118B dist/ReactiveScopes/PruneUnusedScopes.d.ts npm notice 123B dist/ReactiveScopes/RenameVariables.d.ts npm notice 114B dist/ReactiveScopes/StabilizeBlockIds.d.ts npm notice 3.1kB dist/ReactiveScopes/visitors.d.ts npm notice 170B dist/SSA/EliminateRedundantPhi.d.ts npm notice 101B dist/SSA/EnterSSA.d.ts npm notice 154B dist/SSA/index.d.ts npm notice 99B dist/SSA/LeaveSSA.d.ts npm notice 63.5kB dist/tsconfig.tsbuildinfo npm notice 43B dist/TypeInference/index.d.ts npm notice 103B dist/TypeInference/InferTypes.d.ts npm notice 352B dist/Utils/ComponentDeclaration.d.ts npm notice 256B dist/Utils/DisjointSet.d.ts npm notice 322B dist/Utils/HookDeclaration.d.ts npm notice 613B dist/Utils/logger.d.ts npm notice 2.3kB dist/Utils/Result.d.ts npm notice 119B dist/Utils/RuntimeDiagnosticConstants.d.ts npm notice 1.1kB dist/Utils/Stack.d.ts npm notice 149B dist/Utils/todo.d.ts npm notice 782B dist/Utils/utils.d.ts npm notice 603B dist/Validation/index.d.ts npm notice 117B dist/Validation/ValidateContextVariableLValues.d.ts npm notice 109B dist/Validation/ValidateHooksUsage.d.ts npm notice 214B dist/Validation/ValidateMemoizedEffectDependencies.d.ts npm notice 113B dist/Validation/ValidateNoCapitalizedCalls.d.ts npm notice 114B dist/Validation/ValidateNoRefAccesInRender.d.ts npm notice 113B dist/Validation/ValidateNoSetStateInRender.d.ts npm notice 131B dist/Validation/ValidatePreservedManualMemoization.d.ts npm notice 102B dist/Validation/ValidateUseMemo.d.ts npm notice 2.3kB package.json npm notice === Tarball Details === npm notice name: babel-plugin-react-compiler npm notice version: 0.0.1 npm notice filename: babel-plugin-react-compiler-0.0.1.tgz npm notice package size: 1.1 MB npm notice unpacked size: 5.5 MB npm notice shasum: 9a0fb71bdc904d6ab92432a506b0e037f10dd7ce npm notice integrity: sha512-hXtObyIEP4MbO[...]jstRbpztyLf4g== npm notice total files: 119 npm notice ========== eslint-plugin-react-compiler ========== ⠴ Running npm pack --dry-run npm WARN config init.author.name Use `--init-author-name` instead. npm WARN config init.author.email Use `--init-author-email` instead. ⠋ Running npm pack --dry-run npm notice npm notice 📦 eslint-plugin-react-compiler@0.0.0 npm notice === Tarball Contents === npm notice 827B README.md npm notice 2.1MB dist/index.js npm notice 968B package.json npm notice === Tarball Details === npm notice name: eslint-plugin-react-compiler npm notice version: 0.0.0 npm notice filename: eslint-plugin-react-compiler-0.0.0.tgz npm notice package size: 300.5 kB npm notice unpacked size: 2.1 MB npm notice shasum: f24dab544b03d36d9bb676a16256f114bd5e0ed6 npm notice integrity: sha512-8PcKZXZ+RVBDP[...]D7jFmkvHJoBeA== npm notice total files: 3 npm notice ========== react-compiler-healthcheck ========== ⠼ Running npm pack --dry-run npm WARN config init.author.name Use `--init-author-name` instead. npm WARN config init.author.email Use `--init-author-email` instead. ⠏ Running npm pack --dry-run npm notice npm notice 📦 react-compiler-healthcheck@0.0.0 npm notice === Tarball Contents === npm notice 2.1MB dist/index.js npm notice 677B package.json npm notice 1.8kB rollup.config.js npm notice 1.1kB src/checks/libraryCompat.ts npm notice 3.2kB src/checks/reactCompiler.ts npm notice 759B src/checks/strictMode.ts npm notice 67B src/config.ts npm notice 1.5kB src/index.ts npm notice 602B tsconfig.json npm notice === Tarball Details === npm notice name: react-compiler-healthcheck npm notice version: 0.0.0 npm notice filename: react-compiler-healthcheck-0.0.0.tgz npm notice package size: 290.4 kB npm notice unpacked size: 2.1 MB npm notice shasum: 55c0eb57aebc7305270a29e78ebf6c056044bae0 npm notice integrity: sha512-nPVhGyh8i9PoO[...]v52c3U0tKGpzA== npm notice total files: 9 npm notice ✔ Please confirm contents of packages before publishing. You can run this command again with --for-real to publish to npm ✨ Done in 61.19s. ``` ``` $ yarn npm:publish --debug --for-real yarn run v1.22.10 $ node scripts/publish --debug --for-real ℹ Preparing to publish (for real) [debug=true] ℹ Building packages ✔ Successfully built babel-plugin-react-compiler ✔ Successfully built eslint-plugin-react-compiler ✔ Successfully built react-compiler-healthcheck ✔ Bumped babel-plugin-react-compiler to 0.0.0-experimental-2769f7a-20240513 ✔ Bumped eslint-plugin-react-compiler to 0.0.0-experimental-e04a001-20240513 ✔ Bumped react-compiler-healthcheck to 0.0.0-experimental-410375f-20240513 ========== babel-plugin-react-compiler ========== ⠋ Publishing babel-plugin-react-compiler to npm Command that would have run: npm publish --dry-run /Users/lauren/code/react-forget/compiler/scripts/publish.js:188 throw new Error( ^ Error: This error is intentional, please double check scripts/publish.js and remove this error prior to publishing at main (/Users/lauren/code/react-forget/compiler/scripts/publish.js:188:13) Node.js v20.11.0 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` On the day of launch, remove the hardcoded error, then run `yarn npm:publish --debug --for-real` first as a sanity check. Confirm the contents are correct. Then when you are certain, run `yarn npm:publish --for-real`, and push the commited version bumps to GitHub so the hashes that the packages originate from are public. ghstack-source-id: 403bc22d4b340056fd112fcfc38580f28ed6c986 Pull Request resolved: https://github.com/facebook/react-forget/pull/2966
2024-05-14 11:01:17 -04:00
"typescript": "^5.4.3",
"wait-on": "^7.2.0",
[publish] Add script to publish packages Adds a script to publish babel-plugin-react-compiler, eslint-plugin-react-compiler, and react-compiler-healthcheck to npm. Instructions are in a comment in scripts/publish.js, please read carefully before using this script! Test plan: ``` $ yarn npm:publish yarn run v1.22.10 $ node scripts/publish ℹ Preparing to publish (dry run) [debug=false] ℹ Building packages ✔ Successfully built babel-plugin-react-compiler ✔ Successfully built eslint-plugin-react-compiler ✔ Successfully built react-compiler-healthcheck ℹ Dry run: Report tarball contents ========== babel-plugin-react-compiler ========== ⠴ Running npm pack --dry-run npm WARN config init.author.name Use `--init-author-name` instead. npm WARN config init.author.email Use `--init-author-email` instead. ⠦ Running npm pack --dry-run npm notice npm notice 📦 babel-plugin-react-compiler@0.0.1 npm notice === Tarball Contents === npm notice 11B dist/__tests__/DisjointSet-test.d.ts npm notice 11B dist/__tests__/envConfig-test.d.ts npm notice 11B dist/__tests__/Logger-test.d.ts npm notice 11B dist/__tests__/parseConfigPragma-test.d.ts npm notice 11B dist/__tests__/Result-test.d.ts npm notice 145B dist/__tests__/test-utils/validateNoUseBeforeDefine.d.ts npm notice 144B dist/Babel/BabelPlugin.d.ts npm notice 350B dist/Babel/RunReactCompilerBabelPlugin.d.ts npm notice 2.4kB dist/CompilerError.d.ts npm notice 455B dist/Entrypoint/Gating.d.ts npm notice 376B dist/Entrypoint/Imports.d.ts npm notice 166B dist/Entrypoint/index.d.ts npm notice 1.8kB dist/Entrypoint/Options.d.ts npm notice 1.3kB dist/Entrypoint/Pipeline.d.ts npm notice 819B dist/Entrypoint/Program.d.ts npm notice 295B dist/Entrypoint/Reanimated.d.ts npm notice 753B dist/Entrypoint/Suppression.d.ts npm notice 113B dist/HIR/AssertConsistentIdentifiers.d.ts npm notice 115B dist/HIR/AssertTerminalSuccessorsExist.d.ts npm notice 529B dist/HIR/AssertValidBlockNesting.d.ts npm notice 110B dist/HIR/AssertValidMutableRanges.d.ts npm notice 585B dist/HIR/BuildHIR.d.ts npm notice 116B dist/HIR/BuildReactiveScopeTerminalsHIR.d.ts npm notice 125B dist/HIR/ComputeUnconditionalBlocks.d.ts npm notice 602B dist/HIR/Dominator.d.ts npm notice 12.7kB dist/HIR/Environment.d.ts npm notice 184B dist/HIR/FindContextIdentifiers.d.ts npm notice 401B dist/HIR/Globals.d.ts npm notice 22.2kB dist/HIR/HIR.d.ts npm notice 2.8kB dist/HIR/HIRBuilder.d.ts npm notice 1.1kB dist/HIR/index.d.ts npm notice 108B dist/HIR/MergeConsecutiveBlocks.d.ts npm notice 115B dist/HIR/MergeOverlappingReactiveScopesHIR.d.ts npm notice 2.2kB dist/HIR/ObjectShape.d.ts npm notice 1.4kB dist/HIR/PrintHIR.d.ts npm notice 106B dist/HIR/PruneUnusedLabelsHIR.d.ts npm notice 1.1kB dist/HIR/Types.d.ts npm notice 1.9kB dist/HIR/visitors.d.ts npm notice 776B dist/index.d.ts npm notice 5.4MB dist/index.js npm notice 429B dist/Inference/AnalyseFunctions.d.ts npm notice 324B dist/Inference/DropManualMemoization.d.ts npm notice 436B dist/Inference/index.d.ts npm notice 224B dist/Inference/InferAlias.d.ts npm notice 204B dist/Inference/InferAliasForPhis.d.ts npm notice 206B dist/Inference/InferAliasForStores.d.ts npm notice 115B dist/Inference/InferMutableContextVariables.d.ts npm notice 151B dist/Inference/InferMutableLifetimes.d.ts npm notice 109B dist/Inference/InferMutableRanges.d.ts npm notice 212B dist/Inference/InferMutableRangesForAlias.d.ts npm notice 106B dist/Inference/InferReactivePlaces.d.ts npm notice 368B dist/Inference/InferReferenceEffects.d.ts npm notice 201B dist/Inference/InferTryCatchAliases.d.ts npm notice 130B dist/Inference/InlineImmediatelyInvokedFunctionExpressions.d.ts npm notice 106B dist/Optimization/ConstantPropagation.d.ts npm notice 258B dist/Optimization/DeadCodeElimination.d.ts npm notice 177B dist/Optimization/index.d.ts npm notice 103B dist/Optimization/PruneMaybeThrows.d.ts npm notice 108B dist/ReactiveScopes/AlignMethodCallScopes.d.ts npm notice 110B dist/ReactiveScopes/AlignObjectMethodScopes.d.ts npm notice 133B dist/ReactiveScopes/AlignReactiveScopesToBlockScopes.d.ts npm notice 126B dist/ReactiveScopes/AlignReactiveScopesToBlockScopesHIR.d.ts npm notice 132B dist/ReactiveScopes/AssertScopeInstructionsWithinScope.d.ts npm notice 125B dist/ReactiveScopes/AssertWellFormedBreakTargets.d.ts npm notice 363B dist/ReactiveScopes/BuildReactiveBlocks.d.ts npm notice 142B dist/ReactiveScopes/BuildReactiveFunction.d.ts npm notice 759B dist/ReactiveScopes/CodegenReactiveFunction.d.ts npm notice 154B dist/ReactiveScopes/CollectReactiveIdentifiers.d.ts npm notice 128B dist/ReactiveScopes/CollectReferencedGlobals.d.ts npm notice 698B dist/ReactiveScopes/DeriveMinimalDependencies.d.ts npm notice 138B dist/ReactiveScopes/ExtractScopeDeclarationsFromDestructuring.d.ts npm notice 121B dist/ReactiveScopes/FlattenReactiveLoops.d.ts npm notice 124B dist/ReactiveScopes/FlattenScopesWithHooksOrUse.d.ts npm notice 2.1kB dist/ReactiveScopes/index.d.ts npm notice 370B dist/ReactiveScopes/InferReactiveScopeVariables.d.ts npm notice 217B dist/ReactiveScopes/MemoizeFbtOperandsInSameScope.d.ts npm notice 127B dist/ReactiveScopes/MergeOverlappingReactiveScopes.d.ts npm notice 138B dist/ReactiveScopes/MergeReactiveScopesThatInvalidateTogether.d.ts npm notice 1.0kB dist/ReactiveScopes/PrintReactiveFunction.d.ts npm notice 123B dist/ReactiveScopes/PromoteUsedTemporaries.d.ts npm notice 118B dist/ReactiveScopes/PropagateEarlyReturns.d.ts npm notice 127B dist/ReactiveScopes/PropagateScopeDependencies.d.ts npm notice 123B dist/ReactiveScopes/PruneAllReactiveScopes.d.ts npm notice 126B dist/ReactiveScopes/PruneAlwaysInvalidatingScopes.d.ts npm notice 117B dist/ReactiveScopes/PruneHoistedContexts.d.ts npm notice 227B dist/ReactiveScopes/PruneNonEscapingScopes.d.ts npm notice 125B dist/ReactiveScopes/PruneNonReactiveDependencies.d.ts npm notice 122B dist/ReactiveScopes/PruneTemporaryLValues.d.ts npm notice 118B dist/ReactiveScopes/PruneUnusedLabels.d.ts npm notice 118B dist/ReactiveScopes/PruneUnusedScopes.d.ts npm notice 123B dist/ReactiveScopes/RenameVariables.d.ts npm notice 114B dist/ReactiveScopes/StabilizeBlockIds.d.ts npm notice 3.1kB dist/ReactiveScopes/visitors.d.ts npm notice 170B dist/SSA/EliminateRedundantPhi.d.ts npm notice 101B dist/SSA/EnterSSA.d.ts npm notice 154B dist/SSA/index.d.ts npm notice 99B dist/SSA/LeaveSSA.d.ts npm notice 63.5kB dist/tsconfig.tsbuildinfo npm notice 43B dist/TypeInference/index.d.ts npm notice 103B dist/TypeInference/InferTypes.d.ts npm notice 352B dist/Utils/ComponentDeclaration.d.ts npm notice 256B dist/Utils/DisjointSet.d.ts npm notice 322B dist/Utils/HookDeclaration.d.ts npm notice 613B dist/Utils/logger.d.ts npm notice 2.3kB dist/Utils/Result.d.ts npm notice 119B dist/Utils/RuntimeDiagnosticConstants.d.ts npm notice 1.1kB dist/Utils/Stack.d.ts npm notice 149B dist/Utils/todo.d.ts npm notice 782B dist/Utils/utils.d.ts npm notice 603B dist/Validation/index.d.ts npm notice 117B dist/Validation/ValidateContextVariableLValues.d.ts npm notice 109B dist/Validation/ValidateHooksUsage.d.ts npm notice 214B dist/Validation/ValidateMemoizedEffectDependencies.d.ts npm notice 113B dist/Validation/ValidateNoCapitalizedCalls.d.ts npm notice 114B dist/Validation/ValidateNoRefAccesInRender.d.ts npm notice 113B dist/Validation/ValidateNoSetStateInRender.d.ts npm notice 131B dist/Validation/ValidatePreservedManualMemoization.d.ts npm notice 102B dist/Validation/ValidateUseMemo.d.ts npm notice 2.3kB package.json npm notice === Tarball Details === npm notice name: babel-plugin-react-compiler npm notice version: 0.0.1 npm notice filename: babel-plugin-react-compiler-0.0.1.tgz npm notice package size: 1.1 MB npm notice unpacked size: 5.5 MB npm notice shasum: 9a0fb71bdc904d6ab92432a506b0e037f10dd7ce npm notice integrity: sha512-hXtObyIEP4MbO[...]jstRbpztyLf4g== npm notice total files: 119 npm notice ========== eslint-plugin-react-compiler ========== ⠴ Running npm pack --dry-run npm WARN config init.author.name Use `--init-author-name` instead. npm WARN config init.author.email Use `--init-author-email` instead. ⠋ Running npm pack --dry-run npm notice npm notice 📦 eslint-plugin-react-compiler@0.0.0 npm notice === Tarball Contents === npm notice 827B README.md npm notice 2.1MB dist/index.js npm notice 968B package.json npm notice === Tarball Details === npm notice name: eslint-plugin-react-compiler npm notice version: 0.0.0 npm notice filename: eslint-plugin-react-compiler-0.0.0.tgz npm notice package size: 300.5 kB npm notice unpacked size: 2.1 MB npm notice shasum: f24dab544b03d36d9bb676a16256f114bd5e0ed6 npm notice integrity: sha512-8PcKZXZ+RVBDP[...]D7jFmkvHJoBeA== npm notice total files: 3 npm notice ========== react-compiler-healthcheck ========== ⠼ Running npm pack --dry-run npm WARN config init.author.name Use `--init-author-name` instead. npm WARN config init.author.email Use `--init-author-email` instead. ⠏ Running npm pack --dry-run npm notice npm notice 📦 react-compiler-healthcheck@0.0.0 npm notice === Tarball Contents === npm notice 2.1MB dist/index.js npm notice 677B package.json npm notice 1.8kB rollup.config.js npm notice 1.1kB src/checks/libraryCompat.ts npm notice 3.2kB src/checks/reactCompiler.ts npm notice 759B src/checks/strictMode.ts npm notice 67B src/config.ts npm notice 1.5kB src/index.ts npm notice 602B tsconfig.json npm notice === Tarball Details === npm notice name: react-compiler-healthcheck npm notice version: 0.0.0 npm notice filename: react-compiler-healthcheck-0.0.0.tgz npm notice package size: 290.4 kB npm notice unpacked size: 2.1 MB npm notice shasum: 55c0eb57aebc7305270a29e78ebf6c056044bae0 npm notice integrity: sha512-nPVhGyh8i9PoO[...]v52c3U0tKGpzA== npm notice total files: 9 npm notice ✔ Please confirm contents of packages before publishing. You can run this command again with --for-real to publish to npm ✨ Done in 61.19s. ``` ``` $ yarn npm:publish --debug --for-real yarn run v1.22.10 $ node scripts/publish --debug --for-real ℹ Preparing to publish (for real) [debug=true] ℹ Building packages ✔ Successfully built babel-plugin-react-compiler ✔ Successfully built eslint-plugin-react-compiler ✔ Successfully built react-compiler-healthcheck ✔ Bumped babel-plugin-react-compiler to 0.0.0-experimental-2769f7a-20240513 ✔ Bumped eslint-plugin-react-compiler to 0.0.0-experimental-e04a001-20240513 ✔ Bumped react-compiler-healthcheck to 0.0.0-experimental-410375f-20240513 ========== babel-plugin-react-compiler ========== ⠋ Publishing babel-plugin-react-compiler to npm Command that would have run: npm publish --dry-run /Users/lauren/code/react-forget/compiler/scripts/publish.js:188 throw new Error( ^ Error: This error is intentional, please double check scripts/publish.js and remove this error prior to publishing at main (/Users/lauren/code/react-forget/compiler/scripts/publish.js:188:13) Node.js v20.11.0 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` On the day of launch, remove the hardcoded error, then run `yarn npm:publish --debug --for-real` first as a sanity check. Confirm the contents are correct. Then when you are certain, run `yarn npm:publish --for-real`, and push the commited version bumps to GitHub so the hashes that the packages originate from are public. ghstack-source-id: 403bc22d4b340056fd112fcfc38580f28ed6c986 Pull Request resolved: https://github.com/facebook/react-forget/pull/2966
2024-05-14 11:01:17 -04:00
"yargs": "^17.7.2"
},
"resolutions": {
[compiler] Dedupe @babel/types (#32581) Extracting portions of #32416 for easier review. This PR dedupes @babel/types to resolve to 7.26.3, for compatibility in the root workspace where eslint-plugin-react-hooks resides. I also needed to update @babel/preset-typescript in snap. The compiler changes in HIR and ReactiveScopes were needed due to types changing. Notably, Babel [added support for optional chaining assignment](https://github.com/babel/babel/pull/15751) (currently [Stage 1](https://github.com/tc39/proposal-optional-chaining-assignment)), so in the latest versions of @babel/types, AssignmentExpression.left can now also be of t.OptionalMemberExpression. Given that this is in Stage 1, the compiler probably shouldn't support this syntax, so this PR updates HIR to bailout with a TODO if there is a non LVal on the lhs of an Assignment Expression. There was also a small superficial SourceLocation change needed in `InferReactiveScopeVariables` as Babel 8 changes were [accidentally released in 7](https://github.com/babel/babel/issues/10746#issuecomment-2699146670). It doesn't affect our analysis so it seems fine to just update with the new properties. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32581). * #32582 * __->__ #32581 Co-authored-by: michael faith <michaelfaith@users.noreply.github.com> Co-authored-by: michael faith <michaelfaith@users.noreply.github.com>
2025-03-12 17:02:10 -04:00
"@babel/types": "7.26.3"
},
"packageManager": "yarn@1.22.22"
2021-05-11 16:10:34 -07:00
}