Skip to content

Commit

Permalink
Merge branch 'master' into mila/BloomFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
milaGGL committed Feb 2, 2023
2 parents 7e2f069 + 70c042a commit c128eaa
Show file tree
Hide file tree
Showing 40 changed files with 1,337 additions and 668 deletions.
19 changes: 19 additions & 0 deletions .changeset/ninety-taxis-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
'@firebase/auth': patch
'@firebase/auth-compat': patch
'@firebase/database': patch
'@firebase/database-compat': patch
'firebase': patch
'@firebase/firestore': patch
'@firebase/firestore-compat': patch
'@firebase/functions': patch
'@firebase/functions-compat': patch
'@firebase/messaging': patch
'@firebase/messaging-compat': patch
'@firebase/rules-unit-testing': patch
'@firebase/storage': patch
'@firebase/template': patch
'@firebase/util': patch
---

Added browser CJS entry points (expected by Jest when using JSDOM mode).
5 changes: 5 additions & 0 deletions .changeset/slimy-elephants-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@firebase/firestore": patch
---

Reduce memory usage by applying query check sooner in remote document cache.
2 changes: 0 additions & 2 deletions e2e/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ module.exports = function (config) {
resolve: {
directories: ['./node_modules'],
alias: {
'@firebase/messaging/sw':
'node_modules/@firebase/messaging/dist/index.sw.esm2017.js',
'idb': 'node_modules/idb/build/index.js'
}
},
Expand Down
2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"karma-typescript": "5.5.3",
"karma-typescript-es6-transform": "5.5.3",
"mocha": "9.2.2",
"typescript": "4.3.4",
"typescript": "4.7.4",
"webpack": "5.75.0",
"webpack-cli": "4.10.0",
"webpack-dev-server": "4.10.0"
Expand Down
1,354 changes: 796 additions & 558 deletions e2e/yarn.lock

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion packages/auth-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
"require": "./dist/index.node.cjs.js"
},
"esm5": "./dist/index.esm.js",
"default": "./dist/index.esm2017.js"
"default": "./dist/index.esm2017.js",
"browser": {
"require": "./dist/index.cjs.js",
"import": "./dist/index.esm2017.js"
}
},
"./package.json": "./package.json"
},
Expand Down
13 changes: 13 additions & 0 deletions packages/auth-compat/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,19 @@ const browserBuilds = [
treeshake: {
moduleSideEffects: false
}
},
{
input: 'index.ts',
output: {
file: 'dist/index.cjs.js',
format: 'cjs',
sourcemap: true
},
plugins: es2017BuildPlugins,
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
treeshake: {
moduleSideEffects: false
}
}
];

Expand Down
12 changes: 10 additions & 2 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
"default": "./dist/index.webworker.esm5.js"
},
"esm5": "./dist/esm5/index.js",
"default": "./dist/esm2017/index.js"
"default": "./dist/esm2017/index.js",
"browser": {
"require": "./dist/browser-cjs/index.js",
"import": "./dist/esm2017/index.js"
}
},
"./cordova": {
"types": "./dist/cordova/index.cordova.d.ts",
Expand All @@ -57,7 +61,11 @@
"default": "./dist/cordova/internal.js"
},
"esm5": "./dist/esm5/internal.js",
"default": "./dist/esm2017/internal.js"
"default": "./dist/esm2017/internal.js",
"browser": {
"require": "./dist/browser-cjs/internal.js",
"import": "./dist/esm2017/internal.js"
}
},
"./package.json": "./package.json"
},
Expand Down
12 changes: 12 additions & 0 deletions packages/auth/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,18 @@ const browserBuilds = [
replace(generateBuildTargetReplaceConfig('esm', 2017))
],
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
},
{
input: {
index: 'index.ts',
internal: 'internal/index.ts'
},
output: [{ dir: 'dist/browser-cjs', format: 'cjs', sourcemap: true }],
plugins: [
...es2017BuildPlugins,
replace(generateBuildTargetReplaceConfig('cjs', 2017))
],
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
}
];

Expand Down
8 changes: 6 additions & 2 deletions packages/database-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
"require": "./dist/index.js"
},
"esm5": "./dist/index.esm5.js",
"default": "./dist/index.esm2017.js"
"default": "./dist/index.esm2017.js",
"browser": {
"require": "./dist/index.js",
"import": "./dist/index.esm2017.js"
}
},
"./standalone": {
"types": "./dist/database-compat/src/index.standalone.d.ts",
Expand Down Expand Up @@ -64,4 +68,4 @@
"bugs": {
"url": "https://github.com/firebase/firebase-js-sdk/issues"
}
}
}
6 changes: 5 additions & 1 deletion packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
},
"esm5": "./dist/index.esm5.js",
"standalone": "./dist/index.standalone.js",
"default": "./dist/index.esm2017.js"
"default": "./dist/index.esm2017.js",
"browser": {
"require": "./dist/index.cjs.js",
"import": "./dist/index.esm2017.js"
}
},
"./package.json": "./package.json"
},
Expand Down
19 changes: 19 additions & 0 deletions packages/database/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,25 @@ const browserBuilds = [
},
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
onwarn: onWarn
},
{
input: 'src/index.ts',
output: [
{
file: 'dist/index.cjs.js',
format: 'cjs',
sourcemap: true
}
],
plugins: [
...es2017BuildPlugins,
replace(generateBuildTargetReplaceConfig('cjs', 2017))
],
treeshake: {
moduleSideEffects: false
},
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
onwarn: onWarn
}
];

Expand Down
Loading

0 comments on commit c128eaa

Please sign in to comment.