From 0af23e02e0c90ae550dd3edf1c9244a8eba3aee1 Mon Sep 17 00:00:00 2001 From: Daniel La Rocque Date: Thu, 23 May 2024 13:12:19 -0400 Subject: [PATCH] Generate dts rollups for auth webextension and cordova (#8251) --- .changeset/wet-hotels-greet.md | 5 +++++ packages/auth/cordova/api-extractor.json | 16 ++++++++++++++++ packages/auth/cordova/package.json | 4 ++-- packages/auth/package.json | 6 +++--- packages/auth/web-extension/api-extractor.json | 16 ++++++++++++++++ packages/auth/web-extension/package.json | 4 ++-- 6 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 .changeset/wet-hotels-greet.md create mode 100644 packages/auth/cordova/api-extractor.json create mode 100644 packages/auth/web-extension/api-extractor.json diff --git a/.changeset/wet-hotels-greet.md b/.changeset/wet-hotels-greet.md new file mode 100644 index 00000000000..41cafaae220 --- /dev/null +++ b/.changeset/wet-hotels-greet.md @@ -0,0 +1,5 @@ +--- +'@firebase/auth': patch +--- + +Generate dts rollups for auth web extension and cordova diff --git a/packages/auth/cordova/api-extractor.json b/packages/auth/cordova/api-extractor.json new file mode 100644 index 00000000000..e76c159a8ef --- /dev/null +++ b/packages/auth/cordova/api-extractor.json @@ -0,0 +1,16 @@ +{ + "extends": "../../../config/api-extractor.json", + "mainEntryPointFilePath": "/dist/cordova/index.cordova.d.ts", + "apiReport": { + "enabled": false + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "/dist/cordova/.d.ts", + "publicTrimmedFilePath": "/dist/cordova/-public.d.ts" + }, + "docModel": { + "enabled": true, + "apiJsonFilePath": "/temp/subpackages/.api.json" + } +} diff --git a/packages/auth/cordova/package.json b/packages/auth/cordova/package.json index b133d280d44..aef216664f4 100644 --- a/packages/auth/cordova/package.json +++ b/packages/auth/cordova/package.json @@ -1,7 +1,7 @@ { - "name": "@firebase/auth/cordova", + "name": "@firebase/auth-cordova", "description": "A Cordova-specific build of the Firebase Auth JS SDK", "browser": "../dist/cordova/index.js", "module": "../dist/cordova/index.js", - "typings": "../dist/cordova/index.cordova.d.ts" + "typings": "../dist/cordova/auth-cordova-public.d.ts" } \ No newline at end of file diff --git a/packages/auth/package.json b/packages/auth/package.json index 0b4829da3ca..33d01f4ca51 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -39,11 +39,11 @@ "default": "./dist/esm2017/index.js" }, "./cordova": { - "types": "./dist/cordova/index.cordova.d.ts", + "types": "./dist/cordova/auth-cordova-public.d.ts", "default": "./dist/cordova/index.js" }, "./web-extension": { - "types:": "./dist/web-extension-esm2017/index.web-extension.d.ts", + "types:": "./dist/web-extension-esm2017/auth-web-extension-public.d.ts", "import": "./dist/web-extension-esm2017/index.js", "require": "./dist/web-extension-cjs/index.js", "default": "./dist/web-extension-esm2017/index.js" @@ -111,7 +111,7 @@ "test:node:integration": "ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts --integration", "test:node:integration:local": "ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts --integration --local", "test:webdriver": "rollup -c test/integration/webdriver/static/rollup.config.js && ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts --webdriver", - "api-report": "api-extractor run --local --verbose", + "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", "doc": "api-documenter markdown --input temp --output docs", "build:doc": "yarn build && yarn doc", "typings:public": "node ../../scripts/build/use_typings.js ./dist/auth-public.d.ts" diff --git a/packages/auth/web-extension/api-extractor.json b/packages/auth/web-extension/api-extractor.json new file mode 100644 index 00000000000..d12063c69b5 --- /dev/null +++ b/packages/auth/web-extension/api-extractor.json @@ -0,0 +1,16 @@ +{ + "extends": "../../../config/api-extractor.json", + "mainEntryPointFilePath": "/dist/web-extension-esm2017/index.web-extension.d.ts", + "apiReport": { + "enabled": false + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "/dist/web-extension-esm2017/.d.ts", + "publicTrimmedFilePath": "/dist/web-extension-esm2017/-public.d.ts" + }, + "docModel": { + "enabled": true, + "apiJsonFilePath": "/temp/subpackages/.api.json" + } +} diff --git a/packages/auth/web-extension/package.json b/packages/auth/web-extension/package.json index 1a46dcf1f90..f3882a4f1d0 100644 --- a/packages/auth/web-extension/package.json +++ b/packages/auth/web-extension/package.json @@ -1,8 +1,8 @@ { - "name": "@firebase/auth/web-extension", + "name": "@firebase/auth-web-extension", "description": "A Chrome-Manifest-v3-specific build of the Firebase Auth JS SDK", "main": "../dist/web-extension-cjs/index.js", "browser": "../dist/web-extension-esm2017/index.js", "module": "../dist/web-extension-esm2017/index.js", - "typings": "../dist/web-extension-esm2017/index.web-extension.d.ts" + "typings": "../dist/web-extension-esm2017/auth-web-extension-public.d.ts" } \ No newline at end of file