Skip to content

Commit 436331a

Browse files
authored
Add tsec script to all packages (#8285)
Added the `yarn trusted-type-check` script to all packages. The script runs https://github.com/google/tsec to report possible security issues related to XSS.
1 parent 92a39b5 commit 436331a

File tree

35 files changed

+56
-8
lines changed

35 files changed

+56
-8
lines changed

config/tsconfig.base.json

+6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
"target": "es5",
2626
"typeRoots": [
2727
"../node_modules/@types"
28+
],
29+
"plugins": [
30+
{
31+
"name": "tsec",
32+
"reportTsecDiagnosticsOnly": true
33+
}
2834
]
2935
}
3036
}

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"test:changed": "ts-node-script scripts/ci-test/test_changed.ts",
3939
"test:setup": "node tools/config.js",
4040
"test:saucelabs": "node scripts/run_saucelabs.js",
41+
"trusted-type-check": "lerna run --scope @firebase/* trusted-type-check --no-bail",
4142
"docgen": "ts-node-script scripts/docgen/docgen.ts",
4243
"docgen:compat": "node scripts/docgen-compat/generate-docs.js --api js",
4344
"docgen:all": "yarn docgen devsite && yarn docgen toc",
@@ -151,6 +152,7 @@
151152
"terser": "5.16.1",
152153
"ts-loader": "9.5.1",
153154
"ts-node": "10.9.1",
155+
"tsec": "0.2.8",
154156
"tslint": "6.1.3",
155157
"typedoc": "0.16.11",
156158
"typescript": "4.7.4",

packages/analytics-compat/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
5050
"test:browser": "karma start --single-run",
5151
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
52+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
5253
"add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../analytics/dist/analytics-public.d.ts -o dist/src/index.d.ts -a -r Analytics:FirebaseAnalytics -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/analytics"
5354
},
5455
"typings": "dist/src/index.d.ts",

packages/analytics/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
3232
"test:browser": "karma start --single-run --nocache",
3333
"test:integration": "karma start ./karma.integration.conf.js --single-run --nocache",
34+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
3435
"api-report": "api-extractor run --local --verbose",
3536
"doc": "api-documenter markdown --input temp --output docs",
3637
"build:doc": "yarn build && yarn doc",

packages/app-check-compat/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"test": "run-p --npm-path npm lint test:browser",
3030
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
3131
"test:browser": "karma start --single-run --nocache",
32+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
3233
"add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../app-check/dist/app-check-public.d.ts -o dist/src/index.d.ts -a -r AppCheck:FirebaseAppCheck -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/app-check"
3334
},
3435
"peerDependencies": {

packages/app-check/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"test": "run-p --npm-path npm lint test:browser",
3030
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
3131
"test:browser": "karma start --single-run --nocache",
32+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
3233
"api-report": "api-extractor run --local --verbose",
3334
"doc": "api-documenter markdown --input temp --output docs",
3435
"build:doc": "yarn build && yarn doc",

packages/app-compat/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"test:browser": "karma start --single-run",
3636
"test:browser:debug": "karma start --browsers Chrome --auto-watch",
3737
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* src/**/*.test.ts --config ../../config/mocharc.node.js",
38+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
3839
"api-report": "api-extractor run --local --verbose",
3940
"typings:public": "node ../../scripts/build/use_typings.js ./dist/app-compat-public.d.ts"
4041
},

packages/app/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"test:all": "run-p --npm-path npm test:browser test:node",
3232
"test:browser": "karma start --single-run",
3333
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.ts --config ../../config/mocharc.node.js",
34+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
3435
"api-report": "api-extractor run --local --verbose",
3536
"doc": "api-documenter markdown --input temp --output docs",
3637
"build:doc": "yarn build && yarn doc",

packages/auth-compat/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"test:node:integration": "ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts --integration",
4545
"test:webdriver": "rollup -c test/integration/webdriver/static/rollup.config.js && ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts --webdriver",
4646
"test:integration": "firebase emulators:exec --project demo-emulatedproject --only auth \"run-s --npm-path npm test:browser:integration test:node:integration test:webdriver\"",
47+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
4748
"add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../auth/dist/auth-public.d.ts -o dist/auth-compat/index.d.ts -a -r Auth:types.FirebaseAuth -r User:types.User -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/auth"
4849
},
4950
"peerDependencies": {

packages/auth/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
"test:node:integration": "ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts --integration",
112112
"test:node:integration:local": "ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts --integration --local",
113113
"test:webdriver": "rollup -c test/integration/webdriver/static/rollup.config.js && ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts --webdriver",
114+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
114115
"api-report": "api-extractor run --local --verbose --config ./api-extractor.json && api-extractor run --local --verbose --config ./web-extension/api-extractor.json && api-extractor run --local --verbose --config ./cordova/api-extractor.json",
115116
"doc": "api-documenter markdown --input temp --output docs",
116117
"build:doc": "yarn build && yarn doc",

packages/component/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"test:all": "run-p --npm-path npm test:browser test:node",
3030
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
3131
"test:browser": "karma start --single-run",
32-
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.ts --config ../../config/mocharc.node.js"
32+
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.ts --config ../../config/mocharc.node.js",
33+
"trusted-type-check": "tsec -p tsconfig.json --noEmit"
3334
},
3435
"dependencies": {
3536
"@firebase/util": "1.9.6",

packages/database-compat/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test",
4848
"test:browser": "karma start --single-run",
4949
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
50+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
5051
"add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../database/dist/public.d.ts -o dist/database-compat/src/index.d.ts -a -r Database:types.FirebaseDatabase -r Query:types.Query -r DatabaseReference:types.Reference -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/database"
5152
},
5253
"dependencies": {

packages/database/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"test:browser": "karma start --single-run",
4242
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
4343
"test:emulator": "ts-node --compiler-options='{\"module\":\"commonjs\"}' ../../scripts/emulator-testing/database-test-runner.ts",
44+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
4445
"api-report": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node ../../repo-scripts/prune-dts/extract-public-api.ts --package database --packageRoot . --typescriptDts ./dist/src/index.d.ts --rollupDts ./dist/private.d.ts --untrimmedRollupDts ./dist/internal.d.ts --publicDts ./dist/public.d.ts && yarn api-report:api-json",
4546
"api-report:api-json": "rm -rf temp && api-extractor run --local --verbose",
4647
"doc": "api-documenter markdown --input temp --output docs",

packages/firebase/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,8 @@
383383
"build:compat": "rollup -c compat/rollup.config.js",
384384
"dev": "rollup -c -w",
385385
"test": "echo 'No test suite for firebase wrapper'",
386-
"test:ci": "echo 'No test suite for firebase wrapper'"
386+
"test:ci": "echo 'No test suite for firebase wrapper'",
387+
"trusted-type-check": "tsec -p tsconfig.json --noEmit"
387388
},
388389
"dependencies": {
389390
"@firebase/app": "0.10.5",

packages/firestore-compat/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"test:all": "run-p --npm-path npm test:browser test:node",
4242
"test:browser": "karma start --single-run",
4343
"test:node": "mocha --require babel-register.js --require src/index.node.ts --timeout 5000 'test/*.test.ts'",
44+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
4445
"add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../firestore/dist/index.d.ts -o dist/src/index.d.ts -a -r Firestore:types.FirebaseFirestore -r CollectionReference:types.CollectionReference -r DocumentReference:types.DocumentReference -r Query:types.Query -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/firestore"
4546
},
4647
"peerDependencies": {

packages/firestore/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"test:node:persistence:prod": "ts-node ./scripts/run-tests.ts --main=test/register.ts --persistence 'test/{,!(browser|lite)/**/}*.test.ts'",
4747
"test:travis": "ts-node --compiler-options='{\"module\":\"commonjs\"}' ../../scripts/emulator-testing/firestore-test-runner.ts",
4848
"test:minified": "(cd ../../integration/firestore ; yarn test)",
49+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
4950
"api-report:main": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node ../../repo-scripts/prune-dts/extract-public-api.ts --package firestore --packageRoot . --typescriptDts ./dist/firestore/src/index.d.ts --rollupDts ./dist/private.d.ts --untrimmedRollupDts ./dist/internal.d.ts --publicDts ./dist/index.d.ts",
5051
"api-report:lite": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node ../../repo-scripts/prune-dts/extract-public-api.ts --package firestore-lite --packageRoot . --typescriptDts ./dist/firestore/lite/index.d.ts --rollupDts ./dist/lite/private.d.ts --untrimmedRollupDts ./dist/lite/internal.d.ts --publicDts ./dist/lite/index.d.ts",
5152
"api-report:api-json": "rm -rf temp && api-extractor run --local --verbose",

packages/functions-compat/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
6060
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'src/{,!(browser)/**/}*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
6161
"test:emulator": "env FIREBASE_FUNCTIONS_HOST=http://localhost FIREBASE_FUNCTIONS_PORT=5005 run-p --npm-path npm test:node",
62+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
6263
"add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../functions/dist/functions-public.d.ts -o dist/src/index.d.ts -a -r Functions:types.FirebaseFunctions -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/functions"
6364
},
6465
"typings": "dist/src/index.d.ts",

packages/functions/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
4141
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'src/{,!(browser)/**/}*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
4242
"test:emulator": "env FIREBASE_FUNCTIONS_EMULATOR_ORIGIN=http://localhost:5005 run-p --npm-path npm test:node",
43+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
4344
"api-report": "api-extractor run --local --verbose",
4445
"doc": "api-documenter markdown --input temp --output docs",
4546
"build:doc": "yarn build && yarn doc",

packages/installations-compat/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"test:ci": "node ../../scripts/run_tests_in_ci.js",
3232
"test:karma": "karma start --single-run",
3333
"test:debug": "karma start --browsers=Chrome --auto-watch",
34+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
3435
"type-check": "tsc -p . --noEmit",
3536
"serve": "yarn serve:build && yarn serve:host",
3637
"serve:build": "rollup -c test-app/rollup.config.js",

packages/installations/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"test:ci": "node ../../scripts/run_tests_in_ci.js",
3232
"test:karma": "karma start --single-run",
3333
"test:debug": "karma start --browsers=Chrome --auto-watch",
34+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
3435
"type-check": "tsc -p . --noEmit",
3536
"serve": "yarn serve:build && yarn serve:host",
3637
"serve:build": "rollup -c test-app/rollup.config.js",

packages/logger/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"test:all": "run-p --npm-path npm test:browser test:node",
3030
"test:browser": "karma start --single-run",
3131
"test:browser:debug": "karma start --browsers Chrome --auto-watch",
32-
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* --config ../../config/mocharc.node.js"
32+
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* --config ../../config/mocharc.node.js",
33+
"trusted-type-check": "tsec -p tsconfig.json --noEmit"
3334
},
3435
"license": "Apache-2.0",
3536
"dependencies": {

packages/messaging-compat/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"test:ci": "node ../../scripts/run_tests_in_ci.js",
3333
"test:karma": "karma start --single-run",
3434
"test:debug": "karma start --browsers=Chrome --auto-watch",
35+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
3536
"type-check": "tsc --noEmit",
3637
"add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../messaging/dist/index-public.d.ts -o dist/src/index.d.ts -a -r Messaging:MessagingCompat -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/messaging"
3738
},

packages/messaging/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"api-report:sw": "ts-node-script ../../repo-scripts/prune-dts/extract-public-api.ts --package messaging-sw --packageRoot . --typescriptDts ./dist/src/index.sw.d.ts --rollupDts ./dist/sw/private.d.ts --untrimmedRollupDts ./dist/sw/internal.d.ts --publicDts ./dist/sw/index-public.d.ts",
4747
"api-report:api-json": "api-extractor run --local --verbose",
4848
"type-check": "tsc --noEmit",
49+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
4950
"typings:public": "node ../../scripts/build/use_typings.js ./dist/index-public.d.ts"
5051
},
5152
"license": "Apache-2.0",

packages/performance-compat/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
3232
"test:browser": "karma start --single-run",
3333
"test:browser:debug": "karma start --browsers Chrome --auto-watch",
34+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
3435
"prettier": "prettier --write '{src,test}/**/*.{js,ts}'",
3536
"add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../performance/dist/src/index.d.ts -o dist/src/index.d.ts -a -r FirebasePerformance:FirebasePerformanceCompat -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/performance"
3637
},

packages/performance/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
3131
"test:browser": "karma start --single-run",
3232
"test:debug": "karma start --browsers=Chrome --auto-watch",
33+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
3334
"prettier": "prettier --write '{src,test}/**/*.{js,ts}'",
3435
"api-report": "api-extractor run --local --verbose",
3536
"doc": "api-documenter markdown --input temp --output docs",

packages/remote-config-compat/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
3232
"test:browser": "karma start --single-run",
3333
"test:browser:debug": "karma start --browsers Chrome --auto-watch",
34+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
3435
"add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../remote-config/dist/remote-config-public.d.ts -o dist/src/index.d.ts -a -r RemoteConfig:RemoteConfigCompat -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/remote-config"
3536
},
3637
"license": "Apache-2.0",

packages/remote-config/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
3131
"test:browser": "karma start --single-run",
3232
"test:debug": "karma start --browsers=Chrome --auto-watch",
33+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
3334
"prettier": "prettier --write '{src,test}/**/*.{js,ts}'",
3435
"api-report": "api-extractor run --local --verbose",
3536
"doc": "api-documenter markdown --input temp --output docs",

packages/rules-unit-testing/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"test:nyc": "TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --config ./mocharc.node.js",
3333
"test": "(cd functions && yarn) && firebase --project=demo-foo --debug emulators:exec 'yarn test:nyc'",
3434
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test",
35+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
3536
"api-report": "api-extractor run --local --verbose",
3637
"doc": "api-documenter markdown --input temp --output docs",
3738
"build:doc": "yarn build && yarn doc"

packages/storage-compat/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"test:browser": "karma start --single-run",
3232
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file src/index.ts --config ../../config/mocharc.node.js",
3333
"test:debug": "karma start --browser=Chrome",
34+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
3435
"prettier": "prettier --write 'src/**/*.ts' 'test/**/*.ts'",
3536
"add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../storage/dist/storage-public.d.ts -o dist/src/index.d.ts -a -r FirebaseStorage:types.FirebaseStorage -r StorageReference:types.Reference -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/storage"
3637
},

packages/storage/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"test:browser": "karma start --single-run",
4141
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
4242
"test:debug": "karma start --browser=Chrome",
43+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
4344
"prettier": "prettier --write 'src/**/*.ts' 'test/**/*.ts'",
4445
"api-report": "api-extractor run --local --verbose && ts-node-script ../../repo-scripts/prune-dts/prune-dts.ts --input dist/storage-public.d.ts --output dist/storage-public.d.ts",
4546
"typings:public": "node ../../scripts/build/use_typings.js ./dist/storage-public.d.ts"

packages/template/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
3838
"test:all": "run-p --npm-path npm test:browser test:node",
3939
"test:browser": "karma start --single-run",
40-
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.* --config ../../config/mocharc.node.js"
40+
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.* --config ../../config/mocharc.node.js",
41+
"trusted-type-check": "tsec -p tsconfig.json --noEmit"
4142
},
4243
"peerDependencies": {
4344
"@firebase/app": "0.x",

packages/util/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"test:all": "run-p --npm-path npm test:browser test:node",
3939
"test:browser": "karma start --single-run",
4040
"test:node": "TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* --config ../../config/mocharc.node.js",
41+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
4142
"api-report": "api-extractor run --local --verbose",
4243
"typings:public": "node ../../scripts/build/use_typings.js ./dist/util-public.d.ts"
4344
},

0 commit comments

Comments
 (0)