-
Notifications
You must be signed in to change notification settings - Fork 927
Split database and database-compat #5276
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
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
315c05d
compile database
Feiyang1 366343b
pass database tests
Feiyang1 c508e13
compile and test database-compat
Feiyang1 9fdd123
pass all tests
Feiyang1 45426f1
prettier
Feiyang1 f4f00e5
cleanup
Feiyang1 89bf1e4
fix lint
Feiyang1 0281847
address comments
Feiyang1 609eea9
what is going on with ci
Feiyang1 772cbca
use correct case in import path
Feiyang1 ec5b724
uppercase
Feiyang1 97b1644
rename
Feiyang1 40daa09
Merge branch 'master' into fei-v9-main-database
Feiyang1 5af6928
Merge branch 'master' into fei-v9-main-database
Feiyang1 93425fe
fix component name
Feiyang1 661e276
Merge branch 'master' into fei-v9-main-database
Feiyang1 267e9d9
Merge branch 'master' into fei-v9-main-database
Feiyang1 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/** | ||
* @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. | ||
*/ | ||
|
||
module.exports = { | ||
extends: '../../config/.eslintrc.js', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
// to make vscode-eslint work with monorepo | ||
// https://github.com/typescript-eslint/typescript-eslint/issues/251#issuecomment-463943250 | ||
tsconfigRootDir: __dirname | ||
}, | ||
rules: { | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'@typescript-eslint/no-floating-promises': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'no-restricted-properties': 'off', | ||
'no-restricted-globals': 'off', | ||
'no-throw-literal': 'off', | ||
'id-blacklist': 'off', | ||
'import/order': [ | ||
'error', | ||
{ | ||
'groups': [ | ||
'builtin', | ||
'external', | ||
'internal', | ||
'parent', | ||
'sibling', | ||
'index' | ||
], | ||
'newlines-between': 'always', | ||
'alphabetize': { 'order': 'asc', 'caseInsensitive': true } | ||
} | ||
] | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/*.d.ts'], | ||
rules: { | ||
'@typescript-eslint/no-explicit-any': 'off' | ||
} | ||
}, | ||
{ | ||
files: ['scripts/*.ts'], | ||
rules: { | ||
'import/no-extraneous-dependencies': 'off' | ||
} | ||
} | ||
] | ||
}; |
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,5 @@ | ||
# @firebase/database | ||
|
||
This is the Firebase Realtime Database component of the Firebase JS SDK. | ||
|
||
**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.** |
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,36 @@ | ||
/** | ||
* @license | ||
* Copyright 2017 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. | ||
*/ | ||
|
||
const karma = require('karma'); | ||
const path = require('path'); | ||
const karmaBase = require('../../config/karma.base'); | ||
|
||
const files = [`test/**/*.test.ts`]; | ||
|
||
module.exports = function (config) { | ||
const karmaConfig = Object.assign({}, karmaBase, { | ||
// files to load into karma | ||
files: files, | ||
// frameworks to use | ||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter | ||
frameworks: ['mocha'] | ||
}); | ||
|
||
config.set(karmaConfig); | ||
}; | ||
|
||
module.exports.files = files; |
File renamed without changes.
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
File renamed without changes.
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,11 @@ | ||
{ | ||
"extends": "../../config/tsconfig.base.json", | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"strict": false, | ||
"downlevelIteration": true | ||
}, | ||
"exclude": [ | ||
"dist/**/*" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
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,5 +1,11 @@ | ||
{ | ||
"extends": "../../config/api-extractor.json", | ||
// Point it to your entry point d.ts file. | ||
"mainEntryPointFilePath": "<projectFolder>/dist/exp/index.d.ts" | ||
"mainEntryPointFilePath": "<projectFolder>/dist/src/index.d.ts", | ||
"apiReport": { | ||
/** | ||
* apiReport is handled by repo-scripts/prune-dts/extract-public-api.ts | ||
*/ | ||
"enabled": false | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -4,19 +4,17 @@ | |
"description": "", | ||
"author": "Firebase <[email protected]> (https://firebase.google.com/)", | ||
"main": "dist/index.node.cjs.js", | ||
"browser": "dist/index.esm.js", | ||
"module": "dist/index.esm.js", | ||
"esm2017": "dist/index.esm2017.js", | ||
"browser": "dist/index.esm2017.js", | ||
"module": "dist/index.esm2017.js", | ||
"esm5": "dist/index.esm5.js", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'", | ||
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'", | ||
"prettier": "prettier --write '*.js' '*.ts' '@(exp|src|test)/**/*.ts'", | ||
"build": "run-p build:classic build:exp && yarn build:compat", | ||
"build:classic": "rollup -c rollup.config.js", | ||
"build:exp": "rollup -c rollup.config.exp.js && yarn api-report", | ||
"build": "rollup -c rollup.config.js && yarn api-report", | ||
"build:compat": "rollup -c rollup.config.compat.js && yarn add-compat-overloads", | ||
"build:exp:release": "yarn build:exp && yarn build:compat", | ||
"build:deps": "lerna run --scope @firebase/'{app,database}' --include-dependencies build", | ||
|
@@ -27,7 +25,7 @@ | |
"test:browser": "karma start --single-run", | ||
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file index.node.ts --config ../../config/mocharc.node.js", | ||
"test:emulator": "ts-node --compiler-options='{\"module\":\"commonjs\"}' ../../scripts/emulator-testing/database-test-runner.ts", | ||
"api-report": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node ../../repo-scripts/prune-dts/extract-public-api.ts --package database --packageRoot . --typescriptDts ./dist/exp/exp/index.d.ts --rollupDts ./dist/exp/private.d.ts --untrimmedRollupDts ./dist/exp/internal.d.ts --publicDts ./dist/exp/index.d.ts && yarn api-report:api-json", | ||
"api-report": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node ../../repo-scripts/prune-dts/extract-public-api.ts --package database --packageRoot . --typescriptDts ./dist/src/index.d.ts --rollupDts ./dist/private.d.ts --untrimmedRollupDts ./dist/internal.d.ts --publicDts ./dist/index.d.ts && yarn api-report:api-json", | ||
"api-report:api-json": "rm -rf temp && api-extractor run --local --verbose", | ||
"predoc": "node ../../scripts/exp/remove-exp.js temp", | ||
"doc": "api-documenter markdown --input temp --output docs", | ||
|
This file was deleted.
Oops, something went wrong.
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.
Nit: This can be simplified.