Skip to content

Commit a987459

Browse files
committed
A different approach to getting public typings for firebase-js-sdk/integration/firestore tests, so that internal APIs are still available for the compat build
1 parent 664b284 commit a987459

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

integration/firestore/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"private": true,
55
"scripts": {
66
"build:deps": "lerna run --scope @firebase/'{app,firestore}' --include-dependencies build",
7+
"postbuild:deps": "lerna run --scope @firebase/'{app,firestore}' --include-dependencies typings:public",
78
"build:persistence": "INCLUDE_FIRESTORE_PERSISTENCE=true gulp compile-tests",
89
"build:memory": "INCLUDE_FIRESTORE_PERSISTENCE=false gulp compile-tests",
910
"karma:singlerun": "karma start",

packages/firestore/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"compile": "tsc --emitDeclarationOnly --declaration -p tsconfig.json",
1212
"prebuild": "tsc --emitDeclarationOnly --declaration -p tsconfig.json; yarn api-report",
1313
"build": "run-p --npm-path npm build:lite build:main",
14-
"build:release": "yarn build",
14+
"build:release": "yarn build && yarn typings:public",
1515
"build:scripts": "tsc -moduleResolution node --module commonjs scripts/*.ts && ls scripts/*.js | xargs -I % sh -c 'terser % -o %'",
1616
"build:deps": "lerna run --scope @firebase/firestore --include-dependencies build",
1717
"build:main": "rollup -c rollup.config.js",
@@ -57,6 +57,7 @@
5757
"api-report:api-json": "rm -rf temp && api-extractor run --local --verbose",
5858
"api-report": "run-s --npm-path npm api-report:main api-report:pipelines api-report:lite api-report:lite:pipelines && yarn api-report:api-json",
5959
"doc": "api-documenter markdown --input temp --output docs",
60+
"typings:public": "node ../../scripts/build/use_typings.js ./dist/index.d.ts",
6061
"assertion-id:check": "ts-node scripts/assertion-id-tool.ts --dir=src --check",
6162
"assertion-id:new": "ts-node scripts/assertion-id-tool.ts --dir=src --new",
6263
"assertion-id:list": "ts-node scripts/assertion-id-tool.ts --dir=src --list",
@@ -172,7 +173,7 @@
172173
"bugs": {
173174
"url": "https://github.com/firebase/firebase-js-sdk/issues"
174175
},
175-
"typings": "dist/index.d.ts",
176+
"typings": "dist/firestore/src/index.d.ts",
176177
"nyc": {
177178
"extension": [
178179
".ts"

0 commit comments

Comments
 (0)