Skip to content

Commit 73a586c

Browse files
authored
Monorepo Refactor (#171)
* Refactor monorepo to use yarn workspaces and lerna WIP: testing Refactor folder structure to use lerna WIP: more testing feat(util): add deferred class Publish - @firebase/[email protected] - @firebase/[email protected] WIP: asdoifj WIP: build artifact WIP: asdf Cleaning up from .gitignore Add prepublish script Isolate base configs Making top level scripts parallel Adding storage Add messaging Adding database code TODO: Fix all of the broken issues and import the rest of the utils Adding type info add database Adding firebase package Generating ES Module builds Attaching firebase.js to the global scope Adding lint-staged to the build Removing commitizen dependency Updating metafiles Working on devx Add react-native package Move packages/firebase -> packages/core Fix issues with package.json Bump core version testing a thing Add more entries to the .npmignore * Refactor to better separate ESM/CJS builds * Adding test:setup script * Fix breaking test (sourcemaps loaded in the test breaks the regex) * Remove commitizen message from CONTRIBUTING.md * WIP: Migrate integration tests * Adding namespace integration tests * Add messaging integration tests * Fix issue with indv-module builds * Committing yarn.lock * Import 4.4.0 Changes * Add dev scripts, move core -> firebase * Add missing dependencies, flesh out dev experience * Add top level repl for test/debugging * Make the REPL pretty * Refactor to scope prepublish execution * Add @firebase/auth * Fixing broken int tests * Picking up missing changes from edad44d * Adding comment to .prettierignore * Fixed issue where firebase didn't exist on reset * Update yarn.lock for lint-staged * Refactor test setup script and .travis.yml * Fix firebase package dep versions * Refactor precommit hook -> prepush hook * [AUTOMATED]: Format Styling * Update prettier and prettierrc * [AUTOMATED]: Format Styling * Adding dist to .prettierignore * Fixing some oddities in yarn.lock * Refactor hooks prepublish -> prepare * Updating top-level scripts * Add pretest validation/checking * [AUTOMATED]: Prettier Code Styling * Running travis tests w/ xvfb-run * Add a spinner instead of the prettier stdio * update yarn.lock * [AUTOMATED]: Prettier Code Styling * Fixing child process STDOUT * [AUTOMATED]: Prettier Code Styling * Switch to using stopAndPersist() * Moving file gitHooks/index.js -> gitHooks/prepush.js * Remove legacy .lintstagedrc * Add typinngs file for those only including fiebase/app * Add initial stub for @firebase/polyfill * Adding new clean yarn.lock * Refactor const -> var (no transpiling) * Add automated license header validation * [AUTOMATED]: Prettier Code Styling * [AUTOMATED]: License Headers * Aesthetic prepush validation things * [AUTOMATED]: Prettier Code Styling * Add karma-sauce-launcher * Attempt 1: Try to get saucelabs browser testing working * Attempt 2: Adding sauceLabs config prop to karma.base * [AUTOMATED]: Prettier Code Styling * Attempt 3: Getting rid of the connectOptions * [AUTOMATED]: Prettier Code Styling * Fix CODEOWNERS * Add module boilerplate for @firebase/firestore * Refactor Firestore source to standalone package * Remove unneeded typings * Remove unneeded promise dependency * Fix top level paths * Bump firebase package version * Fix firestore source paths * Fix @firebase/app reference * Refactor to fix TSC errors * Refactor to make node unit tests work * Publish - @firebase/[email protected] - @firebase/[email protected] - @firebase/[email protected] - [email protected] - @firebase/[email protected] - @firebase/[email protected] - @firebase/[email protected] - @firebase/[email protected] - @firebase/[email protected] * Add firestore to main firebase binary * Pin firebase package to strict versions * Fix browser firestore tests * [AUTOMATED]: Prettier Code Styling * [AUTOMATED]: License Headers * Changing base karma browsers * Disabling cross-browser karma tests * [AUTOMATED]: Prettier Code Styling * Removing sauce_connect addon from .travis.yml * Refactor messaging test script * Refactor the browserNoActivityTimeout * [AUTOMATED]: Prettier Code Styling * Adding polyfills to the main browser bundles * Add firestore/README.md TODO(jshcrowthe): Fix these tests per the comments in this file * Fix firestore VSCode scripts * Fix regex for firestore __data__ prop * [AUTOMATED]: Prettier Code Styling * Initial Commit * Add a brief README.md * Add *.tgz to .npmignore * Publish: v0.1.1 * Turn on advanced optimizations for this code * Leverage "ADVANCED_OPTIMIZATIONS" mode in closure compilation * 0.2.0 * Add XhrIo prototype overrides * 0.2.1 * Remove unneeded lockfile * Fixing dependency versions * [AUTOMATED]: Prettier Code Styling * [AUTOMATED]: License Headers * TEMP: Remove saucelabs reporter * Fix prettier styling bug (fights with closure) * Update firebase/app typings * Leverage default exports * Updating top-level README.md * Refactor mocha timeout to be 20 seconds for firestore * Addressing some review comments from @mikelehen * temp * Fixing license header spacing issues * Refactor license header check * [AUTOMATED]: Prettier Code Styling * [AUTOMATED]: License Headers * Revert "[AUTOMATED]: License Headers" This reverts commit 559068c. * Revert "Refactor license header check" This reverts commit 34c671a. * Fixing more license headers * Add @wilhuff and @wti806 to CODEOWNERS * Adding one more --auto-watch flag * Add 3 retries to firestore tests * Bumping browserNoActiityTimeout * @firebase/app - package.json housekeeping * @firebase/auth - README.md housekeeping * @firebase/database - README.md housekeeping * @firebase/firestore - README.md housekeeping * Updating auth readme * @firebase/messaging - README.md housekeeping * Updating database readme * Fixing issue with messaging/package.json (copy-paste fail) * @firebase/polyfill - README.md housekeeping * @firebase/storage - README.md housekeeping * @firebase/util - README.md housekeeping * Fixing package.json repo links * Refactor from PromiseLike -> Promise * Add firebase externs * [AUTOMATED]: Prettier Code Styling * Fix license values in package.json
1 parent 8bbbece commit 73a586c

File tree

551 files changed

+10952
-9658
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

551 files changed

+10952
-9658
lines changed

.cz-config.js

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/CODEOWNERS

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,17 @@
44
# These owners will be the default owners for everything in the repo.
55
* @jshcrowthe
66

7-
# Order is important. The last matching pattern has the most precedence.
8-
# So if a pull request only touches javascript files, only these owners
9-
# will be requested to review.
10-
*.js @jshcrowthe
11-
12-
# You can also use email addresses if you prefer.
13-
147
# Database Code
15-
src/database @mikelehen @schmidt-sebastian
16-
tests/database @mikelehen @schmidt-sebastian
8+
packages/database @mikelehen @schmidt-sebastian
179

1810
# Firestore Code
19-
src/firestore @mikelehen @schmidt-sebastian
20-
tests/firestore @mikelehen @schmidt-sebastian
21-
integration/firestore @mikelehen @schmidt-sebastian
11+
packages/firestore @mikelehen @schmidt-sebastian @wilhuff
2212

2313
# Storage Code
24-
src/storage @sphippen
25-
tests/storage @sphippen
14+
packages/storage @sphippen
2615

2716
# Messaging Code
28-
src/messaging @gauntface
29-
tests/messaging @gauntface
17+
packages/messaging @gauntface
3018

3119
# Auth Code
32-
src/auth.build.js @bojeil-google
20+
packages/auth @bojeil-google @wti806

.gitignore

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1+
# Build/Dependencies
2+
node_modules
3+
dist
4+
.awcache
5+
/config/project.json
6+
7+
# Misc
8+
*.log
9+
10+
# OS Specific Files
111
.DS_Store
2-
node_modules/
3-
/dist
4-
npm-debug.log
5-
/coverage
6-
/.nyc_output
7-
/tests/config
8-
temp/
9-
/.vscode
10-
/.ts-node
11-
/.idea
12-
/.awcache
12+
13+
# Editor Configs
14+
.idea
15+
.vscode

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This file is pre-built and need not be formatted
2+
packages/auth/src/auth.js
3+
dist

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
singleQuote: true,
3+
printWidth: 80
4+
}

.travis.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,20 @@
11
language: node_js
22
node_js:
3-
- 6
3+
- stable
44
cache: yarn
55

66
# Define global C++ compiler version
77
env:
88
global:
99
- CXX=g++-4.8
10-
matrix:
11-
- TEST_ENV=node
12-
- TEST_ENV=browser
1310
before_install:
1411
# Yarn defaults to an old version, make sure we
1512
# get an up to date version
1613
- npm install -g yarn
1714
before_script:
18-
- export PATH=$PATH:./node_modules/.bin
19-
- mkdir -p tests/config && echo "$PROJECT_CONFIG" > tests/config/project.json
15+
- npm run test:setup -- --token $FIREBASE_TOKEN --projectId $FIREBASE_PROJECT
2016
script:
21-
gulp test --env="$TEST_ENV"
22-
23-
# Integration Test suite
24-
jobs:
25-
include:
26-
- stage: Integration Tests
27-
script: ./integration/webpack/runner.sh
28-
- script: ./integration/browserify/runner.sh
29-
- script: ./integration/typescript/runner.sh
30-
- script: ./integration/serviceWorker/runner.sh
31-
- script: ./integration/quickstart/runner.sh
32-
- script: ./integration/messaging/runner.sh
33-
- script: ./integration/firestore/runner.sh
17+
- xvfb-run npm test
3418

3519
# Misc Addons/Configs
3620
dist: trusty

.vscode/launch.json

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,43 @@
88
"type": "node",
99
"request": "launch",
1010
"name": "Firestore Unit Tests (Node)",
11-
"program": "${workspaceRoot}/node_modules/gulp/bin/gulp.js",
12-
"args": ["test", "--suite=firestore/unit/", "--env=node"],
13-
"port": 9229,
11+
"program": "${workspaceRoot}/packages/firestore/node_modules/.bin/_mocha",
12+
"cwd": "${workspaceRoot}/packages/firestore",
13+
"args": [
14+
"--compilers", "ts:ts-node/register",
15+
"-r", "src/platform_node/node_init.ts",
16+
"--retries", "5",
17+
"--timeout", "5000",
18+
"test/{,!(integration|browser)/**/}*.test.ts"
19+
],
20+
"sourceMaps": true,
1421
"protocol": "inspector"
1522
},
1623
{
1724
"type": "node",
1825
"request": "launch",
1926
"name": "Firestore Unit Tests (Browser)",
20-
"program": "${workspaceRoot}/node_modules/gulp/bin/gulp.js",
21-
"args": ["test", "--suite=firestore/unit/", "--env=browser", "--debug"]
27+
"program": "${workspaceRoot}/packages/firestore/node_modules/.bin/karma",
28+
"cwd": "${workspaceRoot}/packages/firestore",
29+
"args": [
30+
"start",
31+
"--auto-watch",
32+
"--testFiles", "test/unit/bootstrap.ts",
33+
"--browsers", "Chrome"
34+
]
2235
},
2336
{
2437
"type": "node",
2538
"request": "launch",
2639
"name": "Firestore Integration Tests (Browser)",
27-
"program": "${workspaceRoot}/node_modules/gulp/bin/gulp.js",
28-
"args": ["test", "--suite=firestore/integration", "--env=browser", "--debug"]
40+
"program": "${workspaceRoot}/packages/firestore/node_modules/.bin/karma",
41+
"cwd": "${workspaceRoot}/packages/firestore",
42+
"args": [
43+
"start",
44+
"--auto-watch",
45+
"--testFiles", "test/integration/bootstrap.ts",
46+
"--browsers", "Chrome"
47+
]
2948
}
3049
]
3150
}

CONTRIBUTING.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,6 @@ Before you start working on a larger contribution, you should get in touch with
102102

103103
That's it! Thank you for your contribution!
104104
105-
## <a name="commit-message-guidelines"></a> Commit Message Guidelines
106-
107-
This repository follows the commit message format defined by the
108-
[validate-commit-msg](https://npm.im/validate-commit-msg) package on NPM. This is
109-
to make the git history easy to follow, and make it easier to identify which
110-
commits are associated with features, bugfixes, etc.
111-
112-
We are also Commitizen friendly! If you have the [Commitizen CLI](https://npm.im/commitizen) installed
113-
you can simply use `git cz` to create properly formatted commit messages.
114-
115105
[archive]: https://github.com/firebase/firebase-js-sdk/issues?utf8=%E2%9C%93&q=is%3Aissue
116106
[file-an-issue]: https://github.com/firebase/firebase-js-sdk/issues/new
117107
[firebase-google-group]: https://groups.google.com/forum/#!forum/firebase-talk
@@ -123,4 +113,4 @@ you can simply use `git cz` to create properly formatted commit messages.
123113
[jsbin]: http://jsbin.com/rinilu/edit?js,console
124114
[slack]: https://firebase-community.appspot.com/
125115
[stackoverflow]: http://stackoverflow.com/questions/tagged/firebase
126-
[support]: https://firebase.google.com/support/
116+
[support]: https://firebase.google.com/support/

0 commit comments

Comments
 (0)