Lauren Tan
0a5e0b0c2e
[compiler] Fix outdated comment in scripts/release
...
ghstack-source-id: a37c6faa8b6d0fa443b5a3cb2f0d8398f8e7588c
Pull Request resolved: https://github.com/facebook/react/pull/29800
2024-06-07 12:29:50 -04:00
Lauren Tan
c998bb1ed4
[compiler] Run prettier, fix snap
...
After this is merged, I'll add it to .git-blame-ignore-revs. I can't do
it now as the hash will change after ghstack lands this stack.
ghstack-source-id: 054ca869b7
Pull Request resolved: https://github.com/facebook/react/pull/29214
2024-05-29 11:46:27 +09:00
Lauren Tan
1052a5f2dd
[compiler:publish] Don't check branch in debug mode
...
ghstack-source-id: 465f5a358096c55310ebf5a0beef581646ab553e
Pull Request resolved: https://github.com/facebook/react/pull/29153
2024-05-17 15:11:17 -07:00
Lauren Tan
38d961f8ff
[compiler:publish] Bump time to reconsider to 3s
...
ghstack-source-id: afc8976a8956db79ed824f30cf575d3f5cf93cfe
Pull Request resolved: https://github.com/facebook/react/pull/29150
2024-05-17 15:07:04 -07:00
Lauren Tan
b195a947de
[compiler:publish] Prompt for OTP
...
Makes running the script a little more ergonomic by prompting for OTP
upfront.
ghstack-source-id: e9967bfde1ab01ff9417a848154743ae1926318d
Pull Request resolved: https://github.com/facebook/react/pull/29149
2024-05-17 15:07:04 -07:00
Lauren Tan
4fbc3a37f5
[compiler:publish] Don't hash node_modules
...
ghstack-source-id: 4ac2ecc8654b1a8c149ab9d00c06cb4c401473da
Pull Request resolved: https://github.com/facebook/react/pull/29147
2024-05-17 15:07:04 -07:00
Lauren Tan
e7673e496c
[compiler:publish] Rename publish script
...
ghstack-source-id: 1cccc91b5d0e69240b2f4f539c60eab0f156e15f
Pull Request resolved: https://github.com/facebook/react/pull/29148
2024-05-17 15:07:04 -07:00
Lauren Tan
7f22c5243e
[compiler:publish] Specify https for registry
...
Uses https for the npm registry so the publishing script isn't rejected.
Fixes:
```
Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
```
ghstack-source-id: b247d044ea48f3007cf8bd13445fb7ece0f5b02f
Pull Request resolved: https://github.com/facebook/react/pull/29087
2024-05-15 17:42:19 -07:00
Lauren Tan
a0eb2653b8
[compiler] Check if current branch is main
...
This script needs to run from `main` since it commits version bumps for
packages, and those need to point to publicly available hashes. So,
throw an error if we're not already on main.
ghstack-source-id: ce0168e826
Pull Request resolved: https://github.com/facebook/react/pull/29083
2024-05-15 16:17:23 -07:00
Lauren Tan
5572edc929
[compiler] Various fixes for publishing script
...
- Specify a registry for npm publish because otherwise it tries to use
the yarn registry
- `packages` option actually works
This _should_ work now (note last line of output), will test it once we
land this since i want to publish a new version of the eslint plugin
with some important fixes.
```
npm notice
npm notice 📦 eslint-plugin-react-compiler@0.0.0-experimental-53bb89e-20240515
npm notice === Tarball Contents ===
npm notice 827B README.md
npm notice 2.1MB dist/index.js
npm notice 1.0kB package.json
npm notice === Tarball Details ===
npm notice name: eslint-plugin-react-compiler
npm notice version: 0.0.0-experimental-53bb89e-20240515
npm notice filename: eslint-plugin-react-compiler-0.0.0-experimental-53bb89e-20240515.tgz
npm notice package size: 300.9 kB
npm notice unpacked size: 2.1 MB
npm notice shasum: cb99823f3a483c74f470085cac177bd020f7a85a
npm notice integrity: sha512-L3HV9qja1dnCl[...]IaRSZJ3P/v6yQ==
npm notice total files: 3
npm notice
npm notice Publishing to http://registry.npmjs.org/ with tag latest and default access (dry-run)
```
ghstack-source-id: 63067ef772
Pull Request resolved: https://github.com/facebook/react/pull/29082
2024-05-15 16:17:23 -07:00
Lauren Tan
41142f306e
Unthrow publish script
2024-05-15 08:03:50 -07:00
Lauren Tan
6948639df6
[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:02:29 -04:00
Joe Savona
48e0c70292
Rename babel plugin
...
ghstack-source-id: bb66913e2d3c814696311371ed655f3da03d1199
Pull Request resolved: https://github.com/facebook/react-forget/pull/2926
2024-05-02 14:12:33 -07:00
Joe Savona
f33e63838d
Update copyrights to reference Meta instead of Facebook
...
Thanks @zpao!!! This was mostly his work, i just fixed up the last bit.
2024-04-03 08:43:36 -07:00
Joe Savona
0846daaa54
Commit message script captures non-ghstack messages
...
Tested by manually passing in the commit message from
1028504dc8
and verifying that it grabbed the description from GH.
2024-04-02 20:55:41 -07:00
Lauren Tan
5516cbb708
[ez] Fix unneeded path in copyright script
2024-04-02 10:32:22 -04:00
Lauren Tan
8d2cd323a4
Include package.json when bundling for oss
...
This was causing issues for an external partner's build pipeline which expected
each package to have its own package.json.
2024-03-29 12:19:04 -04:00
Sathya Gunasekaran
9358aeab34
[scripts] Add script to pull commit message from PR description
2024-03-19 11:23:43 +00:00
Jan Kassens
da7c466f07
Rename eslint-plugin-react-forget to eslint-plugin-react-compiler
...
Rename eslint-plugin-react-forget to eslint-plugin-react-compiler
2024-01-16 17:36:37 -05:00
Joe Savona
90348cc873
[housekeeping] Remove disabled test262 setup
...
I sincerely appreciate the effort to get test262 up and running. This was my
idea, it seemed like a really good way to test our correctness on edge cases of
JS. Unfortunately test262 relies heavily on a few specific features that we
don't support, like classes and `var`, which has meant that we never actually
use this as a test suite.
In the meantime we've created a pretty extensive test suite and have tools like
Sprout to test actual memoization behavior at runtime, which is the right place
to invest our energy. Let's remove?
2024-01-12 12:26:30 -08:00
Lauren Tan
a6e492d8d0
[feedback] Add script to build packages for testapp
...
In order to make changes to the testapp's dependencies, we need to update the
lockfile which means modules need to actually exist. This adds a new script to
just run a build of the packages we sync so that module resolution in the
testapp will work
2023-11-09 11:31:33 -05:00
Lauren Tan
0cc473fc9a
[ez] Move copyright script to top level
2023-11-02 12:43:33 -04:00
Lauren Tan
5bd9642578
[feedback] Combine bundle scripts and don't commit dist
...
This combines our scripts and makes it so we no longer need to create a separate
commit to add the forget-feedback/dist directory into the react-forget repo. I
originally did that so I could run tests here, but now that the external repo is
created and has its test suite hooked up to CI, this is now unnecessary friction
to run a sync
2023-11-02 11:58:11 -04:00
Lauren Tan
5cdfa7cdc4
[feedback] Don't skip copying dist
2023-11-01 13:45:50 -04:00
Lauren Tan
7042983f69
[feedback] Add changelog to build
2023-10-31 18:31:09 -04:00
Lauren Tan
8860faa65c
[feedback] Add script to copy forget-feedback to new repo
2023-10-31 17:14:19 -04:00
lauren
a0dc166991
[rfc] Remove top level forget directory
...
Sorry about the thrash in advance! This removes the top level `forget` directory
which adds unnecessary nesting to our repo
Hopefully everything still works
2023-08-22 15:04:54 -04:00