-
Notifications
You must be signed in to change notification settings - Fork 928
Use pruned DTS file for API report #4207
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
|
Size Analysis Report |
@Feiyang1 I was wondering if you had an opinion here. Should we carry this forward? |
b9c52e3
to
6c99bde
Compare
packages/firestore/package.json
Outdated
@@ -79,7 +78,8 @@ | |||
"@firebase/app-types": "0.x" | |||
}, | |||
"devDependencies": { | |||
"@firebase/app": "0.6.14", | |||
"@firebase/app": "0.6.13", |
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.
bump back up to 14
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.
Yeah, I think this was causing all the build failures earlier.
packages/firestore/package.json
Outdated
@@ -27,9 +25,9 @@ | |||
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'", | |||
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'", | |||
"prettier": "prettier --write '*.js' '*.ts' '@(lite|exp|src|test)/**/*.ts'", | |||
"pregendeps:exp": "yarn api-report:exp && node scripts/build-bundle.js --input ./exp/index.ts --output ./dist/exp/tmp.js", | |||
"pregendeps:exp": "yarn api-report&& node scripts/build-bundle.js --input ./exp/index.ts --output ./dist/exp/tmp.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.
Space before && (don't think it NEEDS it but for formatting)
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
Added bug fix to Prune DTS so that it no longer replaces PromiseLike with LoadBundleTask. |
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.
LGTM, I don't know if @Feiyang1 wants to take a second glance at the api-report script.
packages/firestore/package.json
Outdated
@@ -46,7 +44,8 @@ | |||
"test:node:persistence:prod": "node ./scripts/run-tests.js --main=index.node.ts --persistence 'test/{,!(browser|lite)/**/}*.test.ts'", | |||
"test:travis": "ts-node --compiler-options='{\"module\":\"commonjs\"}' ../../scripts/emulator-testing/firestore-test-runner.ts", | |||
"test:minified": "(cd ../../integration/firestore ; yarn test)", | |||
"api-report": "rm -rf temp && api-extractor run --local --verbose", | |||
"prepare": "yarn build:release", | |||
"api-report": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node ./scripts/api-report.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.
Should we execute api-report.ts
directly since we are using ts-node. Then we won't need to commit the compiled 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.
The compiled JS gets committed because of the yarn build:scripts
rule which is needed because of rollup
. I fixed this line though since using ts-node
and the .js
script is pretty... awkward.
Co-authored-by: Feiyang <[email protected]>
Co-authored-by: Feiyang <[email protected]>
Co-authored-by: Feiyang <[email protected]>
Co-authored-by: Feiyang <[email protected]>
…-js-sdk into mrschmidt/apiextractor
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.
Addressed feedback. Thanks for making most of it clickable :)
packages/firestore/package.json
Outdated
@@ -46,7 +44,8 @@ | |||
"test:node:persistence:prod": "node ./scripts/run-tests.js --main=index.node.ts --persistence 'test/{,!(browser|lite)/**/}*.test.ts'", | |||
"test:travis": "ts-node --compiler-options='{\"module\":\"commonjs\"}' ../../scripts/emulator-testing/firestore-test-runner.ts", | |||
"test:minified": "(cd ../../integration/firestore ; yarn test)", | |||
"api-report": "rm -rf temp && api-extractor run --local --verbose", | |||
"prepare": "yarn build:release", | |||
"api-report": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node ./scripts/api-report.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.
The compiled JS gets committed because of the yarn build:scripts
rule which is needed because of rollup
. I fixed this line though since using ts-node
and the .js
script is pretty... awkward.
This PR hooks the "prune-dts" script into Firestor's API Extractor pipeline. It runs three phases:
As you can see in the output, this removes all sort of weird private types from the API report.
Also changed the
.eslint.json
inprune-dts
to be more efficient by not including all.ts
files in the entire repo.Fixes #4441