-
Notifications
You must be signed in to change notification settings - Fork 946
Public typings only swapped on build:exp:release #3082
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
Conversation
Binary Size ReportAffected SDKsNo changes between base commit (3de5763) and head commit (408b81f). Test Logs
|
package.json
Outdated
@@ -24,6 +24,8 @@ | |||
"dev": "lerna run --parallel --scope @firebase/* --scope firebase --scope rxfire dev", | |||
"build": "lerna run --scope @firebase/* --scope firebase --scope rxfire prepare", | |||
"build:exp": "lerna run --scope @firebase/*-exp --scope firebase-exp build", | |||
"build:release": "lerna run --scope @firebase/* --scope firebase --ignore @firebase/*-exp --scope firebase-exp build", | |||
"build:exp:release": "yarn build:exp && yarn --cwd packages-exp/app-exp typings:public", |
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.
I'd like to keep the swapping typings step in @firebase/app-exp
because I want this step to run when I run build:release
in @firebase/app-exp
.
How about "build:exp:release": "lerna run --scope @firebase/*-exp --scope firebase-exp prepare"
?
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.
Ok, app-exp prepare
, which is only run by the root script, will not swap typings, but app-exp build:release
which is only run locally, will.
Need to prevent this from swapping typings when run by the root script until all the other -exp packages have built.
@@ -16,16 +17,23 @@ | |||
*/ | |||
|
|||
const { writeFileSync } = require('fs'); | |||
const { argv } = require('yargs'); |
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.
Since the script takes an argument now, rename it to use_typings.js
?
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.
Done.
package.json
Outdated
@@ -24,6 +24,8 @@ | |||
"dev": "lerna run --parallel --scope @firebase/* --scope firebase --scope rxfire dev", | |||
"build": "lerna run --scope @firebase/* --scope firebase --scope rxfire prepare", |
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.
replace prepare
with build
, so it doesn't run swapping public typings in local builds.
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.
It won't (see comment above) but it is better to run the expected command. Changed.
packages-exp/app-exp/package.json
Outdated
@@ -15,19 +15,21 @@ | |||
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'", | |||
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'", | |||
"build": "rollup -c && yarn api-report", | |||
"build:release": "rollup -c rollup.config.release.js && node ./use_public_typings.js", | |||
"build:release": "rollup -c rollup.config.release.js && yarn typings:public", |
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.
Can you please add yarn api-report
as the second step? It generates the rollup d.ts files.
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.
Done!
Add/change scripts:
Root:
build:release
- For prod release builds, excludespackages-exp
buld:release:exp
- For exp releases, last step is to swap in public typings forapp-exp
.These two scripts will only be run by our release scripts. Regular builds will no longer touch the typings field.
In app-exp:
build:release
- Modified to not swap public typings. Should be done at end of all exp package builds.typings:public
- Swaps package.json field to point at public typings. Called by root build:release:exp.typings:internal
- Swaps package.json field to point at internal typings. Scripts do not use this but it may be a useful shortcut for devs or future scripts.