-
Notifications
You must be signed in to change notification settings - Fork 926
Roll bundle with prebuilt #4128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
wu-hui
merged 18 commits into
wuandy/ReleaseBundles
from
wuandy/RollBundlesAsPatchedModule
Dec 4, 2020
Merged
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e11f1fe
Add bundles to d.ts and rearrange bundles source code for building it…
wu-hui 79b1ed2
Address comments minus revert refactoring.
wu-hui 6000ea1
Address comments and restore some code structure.
wu-hui 326bb02
Keep bundle_types.ts, otherwise minified test breaks.
wu-hui 210fbf4
Checkin for comparison
wu-hui d4254db
WIP: manually copy prebuilt change.
wu-hui 76efda2
Add missing config.ts change. Now minified tests pass.
wu-hui 99a0ce0
Fix comment.
wu-hui 983296e
Make building firebase-*.js work
wu-hui 66428e0
revert yarn.lock change.
wu-hui fe8ac37
Update packages/firestore/index.bundle.ts
wu-hui 0b1a4c7
Move functions back to sync_engine and local_store.ts
wu-hui 686d333
Remove exports
wu-hui 0c8a1f2
Merge branch 'wuandy/BundleSourceRearrange' into wuandy/RollBundlesAs…
wu-hui 26c021d
Enable mangling.
wu-hui 68f162a
Separate memory build further. (#4143)
wu-hui 259abea
Merge branch 'wuandy/ReleaseBundles' into wuandy/RollBundlesAsPatched…
wu-hui 32b86c7
Add comments dropped from bad merge.
wu-hui File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ | |
*/ | ||
|
||
import '@firebase/firestore'; | ||
import '@firebase/firestore/bundle'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ | |
*/ | ||
|
||
import '@firebase/firestore/memory'; | ||
import '@firebase/firestore/memory-bundle'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "@firebase/firestore/bundle", | ||
"description": "Firestore bundle", | ||
"main": "../dist/node-cjs/bundle.js", | ||
"main-esm2017": "../dist/node-esm2017/bundle.js", | ||
"react-native": "../dist/rn/bundle.js", | ||
"browser": "../dist/esm5/bundle.js", | ||
"module": "../dist/esm5/bundle.js", | ||
"esm2017": "../dist/esm2017/bundle.js" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* @license | ||
* Copyright 2020 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
export { Blob } from './src/api/blob'; | ||
export { | ||
CollectionReference, | ||
DocumentReference, | ||
DocumentSnapshot, | ||
Firestore, | ||
Query, | ||
QueryDocumentSnapshot, | ||
QuerySnapshot, | ||
IndexedDbPersistenceProvider, | ||
MemoryPersistenceProvider, | ||
Transaction, | ||
WriteBatch, | ||
setLogLevel, | ||
CACHE_SIZE_UNLIMITED | ||
} from './src/api/database'; | ||
export { GeoPoint } from './src/api/geo_point'; | ||
export { FieldPath } from './src/api/field_path'; | ||
export { FieldValue } from './src/compat/field_value'; | ||
export { Timestamp } from './src/api/timestamp'; | ||
export { FirebaseFirestore as ExpFirebaseFirestore } from './exp/src/api/database'; | ||
export { loadBundle, namedQuery } from './src/api/bundle'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "@firebase/firestore/memory-bundle", | ||
"description": "Firestore bundle", | ||
"main": "../dist/memory/node-cjs/bundle.js", | ||
"main-esm2017": "../dist/memory/node-esm2017/bundle.js", | ||
"react-native": "../dist/memory/rn/bundle.js", | ||
"browser": "../dist/memory/esm5/bundle.js", | ||
"module": "../dist/memory/esm5/bundle.js", | ||
"esm2017": "../dist/memory/esm2017/bundle.js" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"name": "@firebase/firestore/memory", | ||
"description": "A memory-only build of the Cloud Firestore JS SDK.", | ||
"main": "../dist/index.memory.node.cjs.js", | ||
"main-esm2017": "../dist/index.memory.node.esm2017.js", | ||
"react-native": "../dist/index.memory.rn.esm2017.js", | ||
"browser": "../dist/index.memory.esm.js", | ||
"module": "../dist/index.memory.esm.js", | ||
"esm2017": "../dist/index.memory.esm2017.js", | ||
"main": "../dist/memory/node-cjs/index.js", | ||
"main-esm2017": "../dist/memory/node-esm2017/index.js", | ||
"react-native": "../dist/memory/rn/index.js", | ||
"browser": "../dist/memory/esm5/index.js", | ||
"module": "../dist/memory/esm5/index.js", | ||
"esm2017": "../dist/memory/esm2017/index.js", | ||
"typings": "../dist/index.d.ts" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,14 +8,15 @@ | |
"author": "Firebase <[email protected]> (https://firebase.google.com/)", | ||
"scripts": { | ||
"bundle": "rollup -c", | ||
"build": "run-p 'bundle rollup.config.browser.js' 'bundle rollup.config.browser.memory.js' 'bundle rollup.config.node.js' 'bundle rollup.config.node.memory.js' 'bundle rollup.config.rn.js' 'bundle rollup.config.rn.memory.js' build:lite build:exp", | ||
"build": "run-p 'bundle rollup.config.browser.js' 'bundle rollup.config.node.js' 'bundle rollup.config.rn.js' build:lite build:exp", | ||
"build:scripts": "tsc -moduleResolution node --module commonjs scripts/*.ts && ls scripts/*.js | xargs -I % sh -c 'terser % -o %'", | ||
"build:release": "run-p 'bundle rollup.config.browser.js' 'bundle rollup.config.browser.memory.js' 'bundle rollup.config.node.js' 'bundle rollup.config.node.memory.js' 'bundle rollup.config.rn.js' 'bundle rollup.config.rn.memory.js'", | ||
"build:release": "run-p 'bundle rollup.config.browser.js' 'bundle rollup.config.node.js' 'bundle rollup.config.rn.js'", | ||
"build:deps": "lerna run --scope @firebase/firestore --include-dependencies build", | ||
"build:console": "node tools/console.build.js", | ||
"build:exp": "rollup -c rollup.config.exp.js", | ||
"build:lite": "rollup -c rollup.config.lite.js", | ||
"build:exp:release": "yarn build:exp && yarn build:lite", | ||
"build:browser": "rollup -c rollup.config.browser.js", | ||
"predev": "yarn prebuild", | ||
"dev": "rollup -c -w", | ||
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'", | ||
|
@@ -45,16 +46,17 @@ | |
"predoc": "node ../../scripts/exp/remove-exp.js temp", | ||
"doc": "api-documenter markdown --input temp --output docs" | ||
}, | ||
"main": "dist/index.node.cjs.js", | ||
"main-esm2017": "dist/index.node.esm2017.js", | ||
"react-native": "dist/index.rn.esm2017.js", | ||
"browser": "dist/index.esm.js", | ||
"module": "dist/index.esm.js", | ||
"esm2017": "dist/index.esm2017.js", | ||
"main": "dist/node-cjs/index.js", | ||
"main-esm2017": "dist/node-esm2017/index.js", | ||
"react-native": "dist/rn/index.js", | ||
"browser": "dist/esm5/index.js", | ||
"module": "dist/esm5/index.js", | ||
"esm2017": "dist/esm2017/index.js", | ||
"license": "Apache-2.0", | ||
"files": [ | ||
"dist", | ||
"memory/package.json" | ||
"memory/package.json", | ||
"bundle/package.json" | ||
], | ||
"dependencies": { | ||
"@firebase/component": "0.1.21", | ||
|
@@ -80,7 +82,8 @@ | |
"json-stable-stringify": "1.0.1", | ||
"protobufjs": "6.10.2", | ||
"rollup": "2.33.2", | ||
"rollup-plugin-copy-assets": "1.1.0", | ||
"rollup-plugin-copy": "3.3.0", | ||
"rollup-plugin-copy-assets": "2.0.3", | ||
"rollup-plugin-replace": "2.2.0", | ||
"rollup-plugin-sourcemaps": "0.6.3", | ||
"rollup-plugin-terser": "7.0.2", | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be mangled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline, this should be false.