-
Notifications
You must be signed in to change notification settings - Fork 46.5k
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
chore: update package.json files with repository fields #29582
base: main
Are you sure you want to change the base?
chore: update package.json files with repository fields #29582
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -1,20 +1,23 @@ | |||
{ | |||
"name": "@react/forget-napi", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems to be the only package.json
in the repo using "4 spaces", so it's the biggest diff. the only change should be the new repository field.
viewing the diff with "hide whitespace" makes this more clear :)
Comparing: d17e9d1...2ffb45a Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
8d5a5a2
to
eb32a88
Compare
eb32a88
to
10946fd
Compare
10946fd
to
d9dd5cb
Compare
b353c3c
to
996c486
Compare
Thanks for your contribution @skratchdot! I was about to add With your PR merged, we’ll see new links like these: Underlying metadata: react/packages/react/package.json Lines 8 to 9 in f5af92d
react/packages/react/package.json Lines 44 to 48 in f5af92d
A diff with a script may take a bit longer to review, so if splitting this PR into two helps, it’d be great if maintainers could share their opinion. In theory, we can merge |
Thanks for the comments and for taking a look! I was hesitant to add the script to the PR, but ended up doing it anyways. It might make more sense to make it a gist and reference it in the PR 🤷. I don't like the idea of adding unnecessary bloat to the repo (especially if the script has to be manually ran- and is only useful if new packages are added). I think adding I'll wait for comments from the maintainers before doing anything. |
996c486
to
309d3cf
Compare
309d3cf
to
cea8078
Compare
Summary
I recently learned about
eslint-plugin-react-compiler
so wanted to try it in one of my projects. I rannpm repo eslint-plugin-react-compiler
to find out more (and see where I could submit a PR for a small issue I found), but that did not work. It took me a while to find the source code.I decided to make a small script to add a "repository" field to all the
package.json
in this repo. After we merge this PR, and publish new packages, thennpm repo
will work for the newly published packages.I spent a little time to ignore certain private package.json files (that didn't need the "repository" field):
https://github.com/facebook/react/pull/29582/files#diff-c38afa3bfcedbfb5d75f077f1449459fcc0044ed09a12f75f6b93d0dd16f4f4fR30-R34
I also added some extra logic to include the new "repository" field before "scripts" (if it exists) or else "dependencies" (if it exists) or else at the bottom of the file.
Hopefully this PR is minimal enough to be accepted. Let me know if you have any questions/concerns!
All the
package.json
changes were made by runningnode scripts/tasks/update-package-files.js
in the root folder.If there is no need to ever use this script again, I can remove it from the PR, and only submit the
package.json
changes.How did you test this change?
I ran the script a few times while working on it (using
git diff
andgit checkout
to confirm my changes and re-run from a fresh state, etc).Running the script should be "run twice safe" (idempotent) and the output looks like: