Skip to content

Commit

Permalink
Monorepo Refactor (#171)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jshcrowthe authored Oct 7, 2017
1 parent 8bbbece commit 73a586c
Show file tree
Hide file tree
Showing 551 changed files with 10,952 additions and 9,658 deletions.
40 changes: 0 additions & 40 deletions .cz-config.js

This file was deleted.

22 changes: 5 additions & 17 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,17 @@
# These owners will be the default owners for everything in the repo.
* @jshcrowthe

# Order is important. The last matching pattern has the most precedence.
# So if a pull request only touches javascript files, only these owners
# will be requested to review.
*.js @jshcrowthe

# You can also use email addresses if you prefer.

# Database Code
src/database @mikelehen @schmidt-sebastian
tests/database @mikelehen @schmidt-sebastian
packages/database @mikelehen @schmidt-sebastian

# Firestore Code
src/firestore @mikelehen @schmidt-sebastian
tests/firestore @mikelehen @schmidt-sebastian
integration/firestore @mikelehen @schmidt-sebastian
packages/firestore @mikelehen @schmidt-sebastian @wilhuff

# Storage Code
src/storage @sphippen
tests/storage @sphippen
packages/storage @sphippen

# Messaging Code
src/messaging @gauntface
tests/messaging @gauntface
packages/messaging @gauntface

# Auth Code
src/auth.build.js @bojeil-google
packages/auth @bojeil-google @wti806
25 changes: 14 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Build/Dependencies
node_modules
dist
.awcache
/config/project.json

# Misc
*.log

# OS Specific Files
.DS_Store
node_modules/
/dist
npm-debug.log
/coverage
/.nyc_output
/tests/config
temp/
/.vscode
/.ts-node
/.idea
/.awcache

# Editor Configs
.idea
.vscode
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This file is pre-built and need not be formatted
packages/auth/src/auth.js
dist
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
singleQuote: true,
printWidth: 80
}
22 changes: 3 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,20 @@
language: node_js
node_js:
- 6
- stable
cache: yarn

# Define global C++ compiler version
env:
global:
- CXX=g++-4.8
matrix:
- TEST_ENV=node
- TEST_ENV=browser
before_install:
# Yarn defaults to an old version, make sure we
# get an up to date version
- npm install -g yarn
before_script:
- export PATH=$PATH:./node_modules/.bin
- mkdir -p tests/config && echo "$PROJECT_CONFIG" > tests/config/project.json
- npm run test:setup -- --token $FIREBASE_TOKEN --projectId $FIREBASE_PROJECT
script:
gulp test --env="$TEST_ENV"

# Integration Test suite
jobs:
include:
- stage: Integration Tests
script: ./integration/webpack/runner.sh
- script: ./integration/browserify/runner.sh
- script: ./integration/typescript/runner.sh
- script: ./integration/serviceWorker/runner.sh
- script: ./integration/quickstart/runner.sh
- script: ./integration/messaging/runner.sh
- script: ./integration/firestore/runner.sh
- xvfb-run npm test

# Misc Addons/Configs
dist: trusty
Expand Down
33 changes: 26 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,43 @@
"type": "node",
"request": "launch",
"name": "Firestore Unit Tests (Node)",
"program": "${workspaceRoot}/node_modules/gulp/bin/gulp.js",
"args": ["test", "--suite=firestore/unit/", "--env=node"],
"port": 9229,
"program": "${workspaceRoot}/packages/firestore/node_modules/.bin/_mocha",
"cwd": "${workspaceRoot}/packages/firestore",
"args": [
"--compilers", "ts:ts-node/register",
"-r", "src/platform_node/node_init.ts",
"--retries", "5",
"--timeout", "5000",
"test/{,!(integration|browser)/**/}*.test.ts"
],
"sourceMaps": true,
"protocol": "inspector"
},
{
"type": "node",
"request": "launch",
"name": "Firestore Unit Tests (Browser)",
"program": "${workspaceRoot}/node_modules/gulp/bin/gulp.js",
"args": ["test", "--suite=firestore/unit/", "--env=browser", "--debug"]
"program": "${workspaceRoot}/packages/firestore/node_modules/.bin/karma",
"cwd": "${workspaceRoot}/packages/firestore",
"args": [
"start",
"--auto-watch",
"--testFiles", "test/unit/bootstrap.ts",
"--browsers", "Chrome"
]
},
{
"type": "node",
"request": "launch",
"name": "Firestore Integration Tests (Browser)",
"program": "${workspaceRoot}/node_modules/gulp/bin/gulp.js",
"args": ["test", "--suite=firestore/integration", "--env=browser", "--debug"]
"program": "${workspaceRoot}/packages/firestore/node_modules/.bin/karma",
"cwd": "${workspaceRoot}/packages/firestore",
"args": [
"start",
"--auto-watch",
"--testFiles", "test/integration/bootstrap.ts",
"--browsers", "Chrome"
]
}
]
}
12 changes: 1 addition & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,6 @@ Before you start working on a larger contribution, you should get in touch with

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

0 comments on commit 73a586c

Please sign in to comment.