-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Update yarn build options #30422
Update yarn build options #30422
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
nice!
The sizebot failure is benign and likely a race condition, you might have opened this PR before CI on the HEAD commit finished. I'll see if I can fix that with a check if the workflow is still pending but in the meantime just restarting the job should fix |
Improve command documentation and make it easier to build specific bundle types **Before** ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --ci Run tests in CI [choices: "circleci", "github"] ✨ Done in 0.69s. ``` **After** ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --bundle Build the given bundle type. [choices: "NODE_ES2015", "ESM_DEV", "ESM_PROD", "NODE_DEV", "NODE_PROD", "NODE_PROFILING", "BUN_DEV", "BUN_PROD", "FB_WWW_DEV", "FB_WWW_PROD", "FB_WWW_PROFILING", "RN_OSS_DEV", "RN_OSS_PROD", "RN_OSS_PROFILING", "RN_FB_DEV", "RN_FB_PROD", "RN_FB_PROFILING", "BROWSER_SCRIPT"] --ci Run tests in CI [choices: "circleci", "github"] --names Build for matched bundle names. Example: "react-test,index.js". [array] --pretty Force pretty output. [boolean] --sync-fbsource Include to sync build to fbsource. [string] --sync-www Include to sync build to www. [string] --unsafe-partial Do not clean ./build first. [boolean] ✨ Done in 0.61s. ``` Changes - Use yargs to document existing options: `pretty`, `sync-fbsource`, `sync-www`, `unsafe-partial`. - Move `_` arg to `names` option for consistency with other options and discoverability through yargs help - Add `bundle` option in place of `argv.type` that allows choices of any BundleType to be passed in directly.
Improve command documentation and make it easier to build specific bundle types **Before** ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --ci Run tests in CI [choices: "circleci", "github"] ✨ Done in 0.69s. ``` **After** ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --bundle Build the given bundle type. [choices: "NODE_ES2015", "ESM_DEV", "ESM_PROD", "NODE_DEV", "NODE_PROD", "NODE_PROFILING", "BUN_DEV", "BUN_PROD", "FB_WWW_DEV", "FB_WWW_PROD", "FB_WWW_PROFILING", "RN_OSS_DEV", "RN_OSS_PROD", "RN_OSS_PROFILING", "RN_FB_DEV", "RN_FB_PROD", "RN_FB_PROFILING", "BROWSER_SCRIPT"] --ci Run tests in CI [choices: "circleci", "github"] --names Build for matched bundle names. Example: "react-test,index.js". [array] --pretty Force pretty output. [boolean] --sync-fbsource Include to sync build to fbsource. [string] --sync-www Include to sync build to www. [string] --unsafe-partial Do not clean ./build first. [boolean] ✨ Done in 0.61s. ``` Changes - Use yargs to document existing options: `pretty`, `sync-fbsource`, `sync-www`, `unsafe-partial`. - Move `_` arg to `names` option for consistency with other options and discoverability through yargs help - Add `bundle` option in place of `argv.type` that allows choices of any BundleType to be passed in directly.
I think this broke a bunch of shorts both in: https://github.com/facebook/react/blob/main/package.json#L113-L116 And personal ones that I already have. A reminder to keep in mind that for anyone actively working in the code base the easiest option is previous one because that's the one they're used to. Every time someone changes the options (happens every year) you have to relearn it and update shortcuts. |
Improve command documentation and make it easier to build specific bundle types **Before** ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --ci Run tests in CI [choices: "circleci", "github"] ✨ Done in 0.69s. ``` **After** ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --bundle Build the given bundle type. [choices: "NODE_ES2015", "ESM_DEV", "ESM_PROD", "NODE_DEV", "NODE_PROD", "NODE_PROFILING", "BUN_DEV", "BUN_PROD", "FB_WWW_DEV", "FB_WWW_PROD", "FB_WWW_PROFILING", "RN_OSS_DEV", "RN_OSS_PROD", "RN_OSS_PROFILING", "RN_FB_DEV", "RN_FB_PROD", "RN_FB_PROFILING", "BROWSER_SCRIPT"] --ci Run tests in CI [choices: "circleci", "github"] --names Build for matched bundle names. Example: "react-test,index.js". [array] --pretty Force pretty output. [boolean] --sync-fbsource Include to sync build to fbsource. [string] --sync-www Include to sync build to www. [string] --unsafe-partial Do not clean ./build first. [boolean] ✨ Done in 0.61s. ``` Changes - Use yargs to document existing options: `pretty`, `sync-fbsource`, `sync-www`, `unsafe-partial`. - Move `_` arg to `names` option for consistency with other options and discoverability through yargs help - Add `bundle` option in place of `argv.type` that allows choices of any BundleType to be passed in directly.
@sebmarkbage Yeah my bad missing those. Will put up a fix. I can probably keep existing usage working as-is while introducing the new exact bundle type match option |
Improve command documentation and make it easier to build specific bundle types **Before** ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --ci Run tests in CI [choices: "circleci", "github"] ✨ Done in 0.69s. ``` **After** ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --bundle Build the given bundle type. [choices: "NODE_ES2015", "ESM_DEV", "ESM_PROD", "NODE_DEV", "NODE_PROD", "NODE_PROFILING", "BUN_DEV", "BUN_PROD", "FB_WWW_DEV", "FB_WWW_PROD", "FB_WWW_PROFILING", "RN_OSS_DEV", "RN_OSS_PROD", "RN_OSS_PROFILING", "RN_FB_DEV", "RN_FB_PROD", "RN_FB_PROFILING", "BROWSER_SCRIPT"] --ci Run tests in CI [choices: "circleci", "github"] --names Build for matched bundle names. Example: "react-test,index.js". [array] --pretty Force pretty output. [boolean] --sync-fbsource Include to sync build to fbsource. [string] --sync-www Include to sync build to www. [string] --unsafe-partial Do not clean ./build first. [boolean] ✨ Done in 0.61s. ``` Changes - Use yargs to document existing options: `pretty`, `sync-fbsource`, `sync-www`, `unsafe-partial`. - Move `_` arg to `names` option for consistency with other options and discoverability through yargs help - Add `bundle` option in place of `argv.type` that allows choices of any BundleType to be passed in directly.
Improve command documentation and make it easier to build specific bundle types **Before** ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --ci Run tests in CI [choices: "circleci", "github"] ✨ Done in 0.69s. ``` **After** ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --bundle Build the given bundle type. [choices: "NODE_ES2015", "ESM_DEV", "ESM_PROD", "NODE_DEV", "NODE_PROD", "NODE_PROFILING", "BUN_DEV", "BUN_PROD", "FB_WWW_DEV", "FB_WWW_PROD", "FB_WWW_PROFILING", "RN_OSS_DEV", "RN_OSS_PROD", "RN_OSS_PROFILING", "RN_FB_DEV", "RN_FB_PROD", "RN_FB_PROFILING", "BROWSER_SCRIPT"] --ci Run tests in CI [choices: "circleci", "github"] --names Build for matched bundle names. Example: "react-test,index.js". [array] --pretty Force pretty output. [boolean] --sync-fbsource Include to sync build to fbsource. [string] --sync-www Include to sync build to www. [string] --unsafe-partial Do not clean ./build first. [boolean] ✨ Done in 0.61s. ``` Changes - Use yargs to document existing options: `pretty`, `sync-fbsource`, `sync-www`, `unsafe-partial`. - Move `_` arg to `names` option for consistency with other options and discoverability through yargs help - Add `bundle` option in place of `argv.type` that allows choices of any BundleType to be passed in directly.
Improve command documentation and make it easier to build specific bundle types **Before** ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --ci Run tests in CI [choices: "circleci", "github"] ✨ Done in 0.69s. ``` **After** ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --bundle Build the given bundle type. [choices: "NODE_ES2015", "ESM_DEV", "ESM_PROD", "NODE_DEV", "NODE_PROD", "NODE_PROFILING", "BUN_DEV", "BUN_PROD", "FB_WWW_DEV", "FB_WWW_PROD", "FB_WWW_PROFILING", "RN_OSS_DEV", "RN_OSS_PROD", "RN_OSS_PROFILING", "RN_FB_DEV", "RN_FB_PROD", "RN_FB_PROFILING", "BROWSER_SCRIPT"] --ci Run tests in CI [choices: "circleci", "github"] --names Build for matched bundle names. Example: "react-test,index.js". [array] --pretty Force pretty output. [boolean] --sync-fbsource Include to sync build to fbsource. [string] --sync-www Include to sync build to www. [string] --unsafe-partial Do not clean ./build first. [boolean] ✨ Done in 0.61s. ``` Changes - Use yargs to document existing options: `pretty`, `sync-fbsource`, `sync-www`, `unsafe-partial`. - Move `_` arg to `names` option for consistency with other options and discoverability through yargs help - Add `bundle` option in place of `argv.type` that allows choices of any BundleType to be passed in directly.
Improve command documentation and make it easier to build specific bundle types **Before** ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --ci Run tests in CI [choices: "circleci", "github"] ✨ Done in 0.69s. ``` **After** ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --bundle Build the given bundle type. [choices: "NODE_ES2015", "ESM_DEV", "ESM_PROD", "NODE_DEV", "NODE_PROD", "NODE_PROFILING", "BUN_DEV", "BUN_PROD", "FB_WWW_DEV", "FB_WWW_PROD", "FB_WWW_PROFILING", "RN_OSS_DEV", "RN_OSS_PROD", "RN_OSS_PROFILING", "RN_FB_DEV", "RN_FB_PROD", "RN_FB_PROFILING", "BROWSER_SCRIPT"] --ci Run tests in CI [choices: "circleci", "github"] --names Build for matched bundle names. Example: "react-test,index.js". [array] --pretty Force pretty output. [boolean] --sync-fbsource Include to sync build to fbsource. [string] --sync-www Include to sync build to www. [string] --unsafe-partial Do not clean ./build first. [boolean] ✨ Done in 0.61s. ``` Changes - Use yargs to document existing options: `pretty`, `sync-fbsource`, `sync-www`, `unsafe-partial`. - Move `_` arg to `names` option for consistency with other options and discoverability through yargs help - Add `bundle` option in place of `argv.type` that allows choices of any BundleType to be passed in directly.
#30422 broke existing build shortcuts. Revert the usage of `names` (`_`) and `type` args. `yarn build-for-devtools` / `yarn build-for-devtools-dev` / `yarn build-for-devtools-prod` should all work again. Moved the bundleType documentation into description so they can be fuzzy matched. But a build like `yarn build --type FB_WWW_PROD` still works when matched exactly. There's probably a better way to document the positional `names` arg in the `--help` command, but didn't see it when browsing the yargs docs so let's just fix the existing builds for now. Now: ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --ci Run tests in CI [choices: "circleci", "github"] --type Build the given bundle type. (NODE_ES2015,ESM_DEV,ESM_PROD,NODE_DEV,NODE_PROD,NODE_PROFILING,BUN_DEV,BUN_PROD,FB_WWW_DEV,FB_WWW_PROD,FB_WWW_PROFILING,RN_OSS_DE V,RN_OSS_PROD,RN_OSS_PROFILING,RN_FB_DEV,RN_FB_PROD,RN_FB_PROFILING,BROWSER_SCRIPT) [string] --pretty Force pretty output. [boolean] --sync-fbsource Include to sync build to fbsource. [string] --sync-www Include to sync build to www. [string] --unsafe-partial Do not clean ./build first. ```
Improve command documentation and make it easier to build specific bundle types
Before
After
Changes
pretty
,sync-fbsource
,sync-www
,unsafe-partial
._
arg tonames
option for consistency with other options and discoverability through yargs helpbundle
option in place ofargv.type
that allows choices of any BundleType to be passed in directly.