From 9cdd90196d875645451a6d4a4183b11d99ff6f94 Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Mon, 12 Apr 2021 17:56:16 -0700 Subject: [PATCH] Revert to minimal changes --- packages-exp/analytics-compat/package.json | 18 ++++----------- packages-exp/analytics-exp/package.json | 18 ++++----------- packages-exp/app-compat/package.json | 20 ++++------------ packages-exp/app-exp/package.json | 18 ++++----------- packages-exp/auth-compat-exp/package.json | 18 ++++----------- packages-exp/auth-exp/package.json | 21 ++++------------- packages-exp/functions-compat/package.json | 18 ++++----------- packages-exp/functions-exp/package.json | 18 ++++----------- .../installations-compat/package.json | 18 ++++----------- packages-exp/installations-exp/package.json | 18 ++++----------- packages-exp/messaging-compat/package.json | 11 +-------- packages-exp/messaging-exp/package.json | 11 +-------- packages-exp/messaging-exp/sw/package.json | 23 ++++++++----------- packages-exp/performance-compat/package.json | 18 ++++----------- packages-exp/performance-exp/package.json | 18 ++++----------- .../remote-config-compat/package.json | 18 ++++----------- packages-exp/remote-config-exp/package.json | 18 ++++----------- packages/database/exp/package.json | 6 ++--- .../exp/prepare-database-for-exp-release.ts | 14 +---------- .../exp/prepare-firestore-for-exp-release.ts | 11 --------- .../exp/prepare-storage-for-exp-release.ts | 10 -------- 21 files changed, 86 insertions(+), 257 deletions(-) diff --git a/packages-exp/analytics-compat/package.json b/packages-exp/analytics-compat/package.json index 0e37bbf89ac..7926e1a2b0d 100644 --- a/packages-exp/analytics-compat/package.json +++ b/packages-exp/analytics-compat/package.json @@ -5,8 +5,9 @@ "private": true, "author": "Firebase (https://firebase.google.com/)", "main": "dist/index.cjs.js", - "browser": "dist/index.esm2017.js", - "module": "dist/index.esm2017.js", + "browser": "dist/index.esm.js", + "module": "dist/index.esm.js", + "esm2017": "dist/index.esm2017.js", "files": [ "dist" ], @@ -55,14 +56,5 @@ ".ts" ], "reportDir": "./coverage/node" - }, - "exports": { - "main": "./dist/index.cjs.js", - "esm5": "./dist/index.esm.js", - "browser": "./dist/index.esm2017.js", - "module": "./dist/index.esm2017.js", - "node": "./dist/index.cjs.js", - "default": "./dist/index.esm2017.js" - }, - "esm5": "dist/index.esm.js" -} \ No newline at end of file + } +} diff --git a/packages-exp/analytics-exp/package.json b/packages-exp/analytics-exp/package.json index 0b4a31fc173..d5b3814bc47 100644 --- a/packages-exp/analytics-exp/package.json +++ b/packages-exp/analytics-exp/package.json @@ -5,8 +5,9 @@ "description": "A analytics package for new firebase packages", "author": "Firebase (https://firebase.google.com/)", "main": "dist/index.cjs.js", - "browser": "dist/index.esm2017.js", - "module": "dist/index.esm2017.js", + "browser": "dist/index.esm.js", + "module": "dist/index.esm.js", + "esm2017": "dist/index.esm2017.js", "files": [ "dist" ], @@ -62,14 +63,5 @@ ".ts" ], "reportDir": "./coverage/node" - }, - "exports": { - "main": "./dist/index.cjs.js", - "esm5": "./dist/index.esm.js", - "browser": "./dist/index.esm2017.js", - "module": "./dist/index.esm2017.js", - "node": "./dist/index.cjs.js", - "default": "./dist/index.esm2017.js" - }, - "esm5": "dist/index.esm.js" -} \ No newline at end of file + } +} diff --git a/packages-exp/app-compat/package.json b/packages-exp/app-compat/package.json index de45cb9b8c8..fb3a3982e39 100644 --- a/packages-exp/app-compat/package.json +++ b/packages-exp/app-compat/package.json @@ -5,8 +5,9 @@ "author": "Firebase (https://firebase.google.com/)", "private": true, "main": "dist/index.cjs.js", - "browser": "dist/index.esm2017.js", - "module": "dist/index.esm2017.js", + "browser": "dist/index.esm5.js", + "module": "dist/index.esm5.js", + "esm2017": "dist/index.esm2017.js", "lite": "dist/index.lite.js", "lite-esm2017": "dist/index.lite.esm2017.js", "files": [ @@ -57,16 +58,5 @@ ".ts" ], "reportDir": "./coverage/node" - }, - "exports": { - "main": "./dist/index.cjs.js", - "esm5": "./dist/index.esm5.js", - "browser": "./dist/index.esm2017.js", - "module": "./dist/index.esm2017.js", - "lite": "./dist/index.lite.js", - "lite-esm2017": "./dist/index.lite.esm2017.js", - "node": "./dist/index.cjs.js", - "default": "./dist/index.esm2017.js" - }, - "esm5": "dist/index.esm5.js" -} \ No newline at end of file + } +} diff --git a/packages-exp/app-exp/package.json b/packages-exp/app-exp/package.json index 4f561a1cbdc..03c099e6a07 100644 --- a/packages-exp/app-exp/package.json +++ b/packages-exp/app-exp/package.json @@ -5,8 +5,9 @@ "description": "FirebaseApp", "author": "Firebase (https://firebase.google.com/)", "main": "dist/index.cjs.js", - "browser": "dist/index.esm2017.js", - "module": "dist/index.esm2017.js", + "browser": "dist/index.esm5.js", + "module": "dist/index.esm5.js", + "esm2017": "dist/index.esm2017.js", "files": [ "dist" ], @@ -57,14 +58,5 @@ ".ts" ], "reportDir": "./coverage/node" - }, - "exports": { - "main": "./dist/index.cjs.js", - "esm5": "./dist/index.esm5.js", - "browser": "./dist/index.esm2017.js", - "module": "./dist/index.esm2017.js", - "node": "./dist/index.cjs.js", - "default": "./dist/index.esm2017.js" - }, - "esm5": "dist/index.esm5.js" -} \ No newline at end of file + } +} diff --git a/packages-exp/auth-compat-exp/package.json b/packages-exp/auth-compat-exp/package.json index 257bd5ebbff..10bdc54daf6 100644 --- a/packages-exp/auth-compat-exp/package.json +++ b/packages-exp/auth-compat-exp/package.json @@ -5,8 +5,9 @@ "description": "FirebaseAuth compatibility package that uses API style compatible with Firebase@7 and prior versions", "author": "Firebase (https://firebase.google.com/)", "main": "dist/index.node.cjs.js", - "browser": "dist/index.esm2017.js", - "module": "dist/index.esm2017.js", + "browser": "dist/index.esm.js", + "module": "dist/index.esm.js", + "esm2017": "dist/index.esm2017.js", "files": [ "dist" ], @@ -63,14 +64,5 @@ ".ts" ], "reportDir": "./coverage/node" - }, - "exports": { - "main": "./dist/index.node.cjs.js", - "esm5": "./dist/index.esm.js", - "browser": "./dist/index.esm2017.js", - "module": "./dist/index.esm2017.js", - "node": "./dist/index.node.cjs.js", - "default": "./dist/index.esm2017.js" - }, - "esm5": "dist/index.esm.js" -} \ No newline at end of file + } +} diff --git a/packages-exp/auth-exp/package.json b/packages-exp/auth-exp/package.json index ec7db23fb8a..5eb035bc0a9 100644 --- a/packages-exp/auth-exp/package.json +++ b/packages-exp/auth-exp/package.json @@ -6,9 +6,10 @@ "author": "Firebase (https://firebase.google.com/)", "main": "dist/node/index.js", "react-native": "dist/rn/index.js", - "browser": "dist/esm2017/index.js", + "browser": "dist/esm5/index.js", "cordova": "dist/cordova/index.esm5.js", - "module": "dist/esm2017/index.js", + "module": "dist/esm5/index.js", + "esm2017": "dist/esm2017/index.js", "webworker": "dist/index.webworker.esm5.js", "files": [ "dist", @@ -80,17 +81,5 @@ ".ts" ], "reportDir": "./coverage/node" - }, - "exports": { - "main": "./dist/node/index.js", - "esm5": "./dist/esm5/index.js", - "browser": "./dist/esm2017/index.js", - "module": "./dist/esm2017/index.js", - "react-native": "./dist/rn/index.js", - "cordova": "./dist/cordova/index.esm5.js", - "webworker": "./dist/index.webworker.esm5.js", - "node": "./dist/node/index.js", - "default": "./dist/esm2017/index.js" - }, - "esm5": "dist/esm5/index.js" -} \ No newline at end of file + } +} diff --git a/packages-exp/functions-compat/package.json b/packages-exp/functions-compat/package.json index 085f34f83e3..6ac214472e6 100644 --- a/packages-exp/functions-compat/package.json +++ b/packages-exp/functions-compat/package.json @@ -5,8 +5,9 @@ "private": true, "author": "Firebase (https://firebase.google.com/)", "main": "dist/index.node.cjs.js", - "browser": "dist/index.esm2017.js", - "module": "dist/index.esm2017.js", + "browser": "dist/index.esm5.js", + "module": "dist/index.esm5.js", + "esm2017": "dist/index.esm2017.js", "files": [ "dist" ], @@ -59,14 +60,5 @@ ".ts" ], "reportDir": "./coverage/node" - }, - "exports": { - "main": "./dist/index.node.cjs.js", - "esm5": "./dist/index.esm5.js", - "browser": "./dist/index.esm2017.js", - "module": "./dist/index.esm2017.js", - "node": "./dist/index.node.cjs.js", - "default": "./dist/index.esm2017.js" - }, - "esm5": "dist/index.esm5.js" -} \ No newline at end of file + } +} diff --git a/packages-exp/functions-exp/package.json b/packages-exp/functions-exp/package.json index 2b340af9a4f..5c88f4131c9 100644 --- a/packages-exp/functions-exp/package.json +++ b/packages-exp/functions-exp/package.json @@ -5,8 +5,9 @@ "private": true, "author": "Firebase (https://firebase.google.com/)", "main": "dist/index.node.cjs.js", - "browser": "dist/index.esm2017.js", - "module": "dist/index.esm2017.js", + "browser": "dist/index.esm.js", + "module": "dist/index.esm.js", + "esm2017": "dist/index.esm2017.js", "files": [ "dist" ], @@ -61,14 +62,5 @@ ".ts" ], "reportDir": "./coverage/node" - }, - "exports": { - "main": "./dist/index.node.cjs.js", - "esm5": "./dist/index.esm.js", - "browser": "./dist/index.esm2017.js", - "module": "./dist/index.esm2017.js", - "node": "./dist/index.node.cjs.js", - "default": "./dist/index.esm2017.js" - }, - "esm5": "dist/index.esm.js" -} \ No newline at end of file + } +} diff --git a/packages-exp/installations-compat/package.json b/packages-exp/installations-compat/package.json index 0abc1b087f4..9bbe5293cfc 100644 --- a/packages-exp/installations-compat/package.json +++ b/packages-exp/installations-compat/package.json @@ -4,8 +4,9 @@ "private": true, "author": "Firebase (https://firebase.google.com/)", "main": "dist/index.cjs.js", - "module": "dist/index.esm2017.js", - "browser": "dist/index.esm2017.js", + "module": "dist/index.esm.js", + "browser": "dist/index.esm.js", + "esm2017": "dist/index.esm2017.js", "typings": "dist/installations-compat.d.ts", "license": "Apache-2.0", "files": [ @@ -55,14 +56,5 @@ "@firebase/component": "0.4.1", "idb": "3.0.2", "tslib": "^2.1.0" - }, - "exports": { - "main": "./dist/index.cjs.js", - "esm5": "./dist/index.esm.js", - "browser": "./dist/index.esm2017.js", - "module": "./dist/index.esm2017.js", - "node": "./dist/index.cjs.js", - "default": "./dist/index.esm2017.js" - }, - "esm5": "dist/index.esm.js" -} \ No newline at end of file + } +} diff --git a/packages-exp/installations-exp/package.json b/packages-exp/installations-exp/package.json index 37bf7aaf4b0..4c5cdb02b72 100644 --- a/packages-exp/installations-exp/package.json +++ b/packages-exp/installations-exp/package.json @@ -4,8 +4,9 @@ "private": true, "author": "Firebase (https://firebase.google.com/)", "main": "dist/index.cjs.js", - "module": "dist/index.esm2017.js", - "browser": "dist/index.esm2017.js", + "module": "dist/index.esm.js", + "browser": "dist/index.esm.js", + "esm2017": "dist/index.esm2017.js", "typings": "dist/src/index.d.ts", "license": "Apache-2.0", "files": [ @@ -59,14 +60,5 @@ "@firebase/component": "0.4.1", "idb": "3.0.2", "tslib": "^2.1.0" - }, - "exports": { - "main": "./dist/index.cjs.js", - "esm5": "./dist/index.esm.js", - "browser": "./dist/index.esm2017.js", - "module": "./dist/index.esm2017.js", - "node": "./dist/index.cjs.js", - "default": "./dist/index.esm2017.js" - }, - "esm5": "dist/index.esm.js" -} \ No newline at end of file + } +} diff --git a/packages-exp/messaging-compat/package.json b/packages-exp/messaging-compat/package.json index cc07e4a465c..d993ee136b1 100644 --- a/packages-exp/messaging-compat/package.json +++ b/packages-exp/messaging-compat/package.json @@ -52,14 +52,5 @@ }, "bugs": { "url": "https://github.com/firebase/firebase-js-sdk/issues" - }, - "exports": { - "main": "./dist/index.cjs.js", - "esm5": "./dist/index.esm.js", - "browser": "./dist/index.esm2017.js", - "module": "./dist/index.esm2017.js", - "sw": "./dist/index.sw.esm2017.js", - "node": "./dist/index.cjs.js", - "default": "./dist/index.esm2017.js" } -} \ No newline at end of file +} diff --git a/packages-exp/messaging-exp/package.json b/packages-exp/messaging-exp/package.json index 537fb8d558f..28d0eb1f61f 100644 --- a/packages-exp/messaging-exp/package.json +++ b/packages-exp/messaging-exp/package.json @@ -53,14 +53,5 @@ }, "bugs": { "url": "https://github.com/firebase/firebase-js-sdk/issues" - }, - "exports": { - "main": "./dist/index.cjs.js", - "esm5": "./dist/index.esm.js", - "browser": "./dist/index.esm2017.js", - "module": "./dist/index.esm2017.js", - "sw": "./dist/index.sw.esm2017.js", - "node": "./dist/index.cjs.js", - "default": "./dist/index.esm2017.js" } -} \ No newline at end of file +} diff --git a/packages-exp/messaging-exp/sw/package.json b/packages-exp/messaging-exp/sw/package.json index 56f8e2afc9f..cd2c0ca6bc5 100644 --- a/packages-exp/messaging-exp/sw/package.json +++ b/packages-exp/messaging-exp/sw/package.json @@ -1,15 +1,12 @@ { - "name": "@firebase/messaging-exp", - "private": true, - "version": "0.0.900", - "description": "", - "author": "Firebase (https://firebase.google.com/)", - "module": "../dist/index.sw.esm2017.js", - "typings": "../dist/index.sw.d.ts", - "files": [ - "dist" - ], - "exports": { - "module": "./../dist/index.sw.esm2017.js" + "name": "@firebase/messaging-exp", + "private": true, + "version": "0.0.900", + "description": "", + "author": "Firebase (https://firebase.google.com/)", + "module": "../dist/index.sw.esm2017.js", + "typings": "../dist/index.sw.d.ts", + "files": [ + "dist" + ] } -} \ No newline at end of file diff --git a/packages-exp/performance-compat/package.json b/packages-exp/performance-compat/package.json index 798861f2edc..907f65d0d6b 100644 --- a/packages-exp/performance-compat/package.json +++ b/packages-exp/performance-compat/package.json @@ -5,8 +5,9 @@ "author": "Firebase (https://firebase.google.com/)", "private": true, "main": "dist/index.cjs.js", - "browser": "dist/index.esm2017.js", - "module": "dist/index.esm2017.js", + "browser": "dist/index.esm5.js", + "module": "dist/index.esm5.js", + "esm2017": "dist/index.esm2017.js", "files": [ "dist" ], @@ -59,14 +60,5 @@ ".ts" ], "reportDir": "./coverage/node" - }, - "exports": { - "main": "./dist/index.cjs.js", - "esm5": "./dist/index.esm5.js", - "browser": "./dist/index.esm2017.js", - "module": "./dist/index.esm2017.js", - "node": "./dist/index.cjs.js", - "default": "./dist/index.esm2017.js" - }, - "esm5": "dist/index.esm5.js" -} \ No newline at end of file + } +} diff --git a/packages-exp/performance-exp/package.json b/packages-exp/performance-exp/package.json index fe370b80b94..6c8adf022a1 100644 --- a/packages-exp/performance-exp/package.json +++ b/packages-exp/performance-exp/package.json @@ -5,8 +5,9 @@ "author": "Firebase (https://firebase.google.com/)", "private": true, "main": "dist/index.cjs.js", - "browser": "dist/index.esm2017.js", - "module": "dist/index.esm2017.js", + "browser": "dist/index.esm.js", + "module": "dist/index.esm.js", + "esm2017": "dist/index.esm2017.js", "files": [ "dist" ], @@ -59,14 +60,5 @@ ".ts" ], "reportDir": "./coverage/node" - }, - "exports": { - "main": "./dist/index.cjs.js", - "esm5": "./dist/index.esm.js", - "browser": "./dist/index.esm2017.js", - "module": "./dist/index.esm2017.js", - "node": "./dist/index.cjs.js", - "default": "./dist/index.esm2017.js" - }, - "esm5": "dist/index.esm.js" -} \ No newline at end of file + } +} diff --git a/packages-exp/remote-config-compat/package.json b/packages-exp/remote-config-compat/package.json index 233ba1c9e32..c6252283cb8 100644 --- a/packages-exp/remote-config-compat/package.json +++ b/packages-exp/remote-config-compat/package.json @@ -5,8 +5,9 @@ "author": "Firebase (https://firebase.google.com/)", "private": true, "main": "dist/index.cjs.js", - "browser": "dist/index.esm2017.js", - "module": "dist/index.esm2017.js", + "browser": "dist/index.esm5.js", + "module": "dist/index.esm5.js", + "esm2017": "dist/index.esm2017.js", "files": [ "dist" ], @@ -58,14 +59,5 @@ ".ts" ], "reportDir": "./coverage/node" - }, - "exports": { - "main": "./dist/index.cjs.js", - "esm5": "./dist/index.esm5.js", - "browser": "./dist/index.esm2017.js", - "module": "./dist/index.esm2017.js", - "node": "./dist/index.cjs.js", - "default": "./dist/index.esm2017.js" - }, - "esm5": "dist/index.esm5.js" -} \ No newline at end of file + } +} diff --git a/packages-exp/remote-config-exp/package.json b/packages-exp/remote-config-exp/package.json index 2e58d10f760..742c9c2cc1c 100644 --- a/packages-exp/remote-config-exp/package.json +++ b/packages-exp/remote-config-exp/package.json @@ -5,8 +5,9 @@ "author": "Firebase (https://firebase.google.com/)", "private": true, "main": "dist/index.cjs.js", - "browser": "dist/index.esm2017.js", - "module": "dist/index.esm2017.js", + "browser": "dist/index.esm.js", + "module": "dist/index.esm.js", + "esm2017": "dist/index.esm2017.js", "files": [ "dist" ], @@ -60,14 +61,5 @@ ".ts" ], "reportDir": "./coverage/node" - }, - "exports": { - "main": "./dist/index.cjs.js", - "esm5": "./dist/index.esm.js", - "browser": "./dist/index.esm2017.js", - "module": "./dist/index.esm2017.js", - "node": "./dist/index.cjs.js", - "default": "./dist/index.esm2017.js" - }, - "esm5": "dist/index.esm.js" -} \ No newline at end of file + } +} diff --git a/packages/database/exp/package.json b/packages/database/exp/package.json index b77d3319b29..916f8918e64 100644 --- a/packages/database/exp/package.json +++ b/packages/database/exp/package.json @@ -2,8 +2,8 @@ "name": "@firebase/database-exp", "description": "A version of the Realtime Database SDK that is compatible with the tree-shakeable Firebase SDK", "main": "../dist/exp/index.node.cjs.js", - "esm5": "../dist/exp/index.esm.js", - "browser": "../dist/exp/index.esm2017.js", - "module": "../dist/exp/index.esm2017.js", + "browser": "../dist/exp/index.esm.js", + "module": "../dist/exp/index.esm.js", + "esm2017": "../dist/exp/index.esm2017.js", "typings": "../dist/exp/index.d.ts" } diff --git a/scripts/exp/prepare-database-for-exp-release.ts b/scripts/exp/prepare-database-for-exp-release.ts index 73fdf7a64a2..058424108c7 100644 --- a/scripts/exp/prepare-database-for-exp-release.ts +++ b/scripts/exp/prepare-database-for-exp-release.ts @@ -45,21 +45,9 @@ export async function prepare() { }; packageJson.main = expPackageJson.main.replace('../', ''); - packageJson.module = expPackageJson.module.replace('../', ''); packageJson.browser = expPackageJson.browser.replace('../', ''); - packageJson.esm5 = expPackageJson.esm5.replace('../', ''); - - // Add exports field. These need to be relative paths so start with './'; - packageJson.exports = { - main: expPackageJson.main.replace('../', './'), - // Again, these are esm2017 now. - module: expPackageJson.module.replace('../', './'), - browser: expPackageJson.browser.replace('../', './'), - esm5: expPackageJson.esm5.replace('../', './'), - node: expPackageJson.main.replace('../', './'), - default: expPackageJson.browser.replace('../', './') - }; + packageJson.esm2017 = expPackageJson.esm2017.replace('../', ''); packageJson.typings = expPackageJson.typings.replace('../', ''); diff --git a/scripts/exp/prepare-firestore-for-exp-release.ts b/scripts/exp/prepare-firestore-for-exp-release.ts index d0890894874..1df5571afcf 100644 --- a/scripts/exp/prepare-firestore-for-exp-release.ts +++ b/scripts/exp/prepare-firestore-for-exp-release.ts @@ -54,17 +54,6 @@ export async function prepare() { delete packageJson['main-esm2017']; delete packageJson['esm2017']; - // Add exports field. These need to be relative paths so start with './'; - packageJson.exports = { - main: expPackageJson.main.replace('../', './'), - module: expPackageJson.module.replace('../', './'), - browser: expPackageJson.browser.replace('../', './'), - 'react-native': expPackageJson['react-native'].replace('../', './'), - node: expPackageJson.main.replace('../', './'), - default: expPackageJson.browser.replace('../', './') - // No esm5 build for Firestore? - }; - packageJson.typings = expPackageJson.typings.replace('../', ''); // include files to be published diff --git a/scripts/exp/prepare-storage-for-exp-release.ts b/scripts/exp/prepare-storage-for-exp-release.ts index 3f2f0dd2139..ca2f3fc9ff9 100644 --- a/scripts/exp/prepare-storage-for-exp-release.ts +++ b/scripts/exp/prepare-storage-for-exp-release.ts @@ -50,16 +50,6 @@ export async function prepare() { packageJson.browser = expPackageJson.browser.replace('./', 'exp/'); delete packageJson['esm2017']; - // Add exports field. These need to be relative paths so start with './'; - packageJson.exports = { - main: expPackageJson.main.replace('../', './'), - module: expPackageJson.module.replace('../', './'), - browser: expPackageJson.browser.replace('../', './'), - node: expPackageJson.main.replace('../', './'), - default: expPackageJson.browser.replace('../', './') - // No esm5 build for Storage? - }; - packageJson.typings = expPackageJson.typings.replace('./', 'exp/'); // include files to be published