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

Fix nightly release job #28824

Merged
merged 1 commit into from Apr 11, 2024
Merged

Fix nightly release job #28824

merged 1 commit into from Apr 11, 2024

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Apr 11, 2024

Summary

By upgrading Node.js in #28774, NPM was also upgraded. npm view of a non-existing version now exits non-zero so we need to adjust our implementation to detect if the package was already published.

Fixes

Command failed: npm view eslint-plugin-react-hooks@5.1.0-canary-bf09089f6-20240410

-- https://app.circleci.com/pipelines/github/facebook/react/52188/workflows/71bfe167-2a02-4924-98cf-824b7812614e

How did you test this change?

// main.js
const {spawnSync} = require('child_process');

function npmPackageExists(packageName, version) {
  const {status} = spawnSync('npm', ['view', `${packageName}@${version}`]);
  return status === 0;
}

function main() {
  console.log(npmPackageExists('react', '17.0.1'));
  console.log(npmPackageExists('react', '19.0.0-canary-bf09089f6-20240410'));
}

main();
$ node --version
v18.20.0
$ npm --version
10.5.0
$ node index.js 
true
false

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Apr 11, 2024
@eps1lon eps1lon force-pushed the nightly-fix branch 2 times, most recently from 9277b0a to 1b25fdc Compare April 11, 2024 15:28
@react-sizebot
Copy link

react-sizebot commented Apr 11, 2024

Comparing: bf09089...6973306

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 168.12 kB 168.12 kB = 52.72 kB 52.72 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 169.92 kB 169.92 kB = 53.26 kB 53.26 kB
facebook-www/ReactDOM-prod.classic.js = 588.50 kB 588.50 kB = 103.50 kB 103.50 kB
facebook-www/ReactDOM-prod.modern.js = 564.35 kB 564.35 kB = 99.66 kB 99.66 kB
test_utils/ReactAllWarnings.js Deleted 64.24 kB 0.00 kB Deleted 16.03 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 64.24 kB 0.00 kB Deleted 16.03 kB 0.00 kB

Generated by 🚫 dangerJS against 6973306

@eps1lon eps1lon force-pushed the nightly-fix branch 2 times, most recently from ce90e5d to 34f9cb4 Compare April 11, 2024 15:39
@eps1lon eps1lon merged commit a258207 into facebook:main Apr 11, 2024
38 checks passed
@eps1lon eps1lon deleted the nightly-fix branch April 11, 2024 16:08
rickhanlonii pushed a commit that referenced this pull request Apr 11, 2024
rickhanlonii pushed a commit that referenced this pull request Apr 11, 2024
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants