Skip to content

Size analysis #3265

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 99 commits into from
Jun 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
227941c
Initial submit of auth-next framework (#2851)
sam-gc Apr 3, 2020
372d7c0
Add mock fetch helper (#2878)
sam-gc Apr 7, 2020
b359033
Add core types & error map to auth-exp (#2890)
avolkovi Apr 10, 2020
e0bb970
Add signUp API method for auth-next (#2892)
avolkovi Apr 13, 2020
a852021
Add initial user object implementation (#2896)
sam-gc Apr 14, 2020
0ae5fa5
Consolidate mock auth object, add user object (#2906)
sam-gc Apr 14, 2020
19735c0
Add remaining API methods to auth-next (#2901)
avolkovi Apr 15, 2020
6044bbc
Add support for API timeouts to auth-next (#2915)
avolkovi Apr 16, 2020
22405fd
Add version helpers to auth-next (#2910)
avolkovi Apr 16, 2020
36632e9
Add persistence layer: index db, in memory, and browser{local, sessio…
sam-gc Apr 16, 2020
e6bfb6a
Add fetchSignInMethodsForEmail to auth-next (#2924)
avolkovi Apr 17, 2020
8a178d0
Add sendEmailVerification to auth-next (#2926)
avolkovi Apr 20, 2020
a3a7281
Add a persistence manager class (#2925)
sam-gc Apr 20, 2020
c5174ab
Added react native build target (#2947)
scottcrossen Apr 21, 2020
e43b2cf
Add password reset methods to auth-next (#2928)
avolkovi Apr 21, 2020
7aead1c
use queryString helper in auth-next (#2936)
avolkovi Apr 21, 2020
290d97d
Initial auth object implementation + initializeAuth() (#2932)
sam-gc Apr 22, 2020
1c4734b
use app-exp in the build:deps script
Feiyang1 Apr 22, 2020
6515d58
Add conditional delays to auth-next (#2934)
avolkovi Apr 23, 2020
9342be4
Add sendSignInWithEmail to auth-next (#2960)
avolkovi Apr 23, 2020
deab6e3
Add auth listener implementation, add user.reload() (#2961)
sam-gc Apr 23, 2020
e77959e
Standardize auth-next style (#2983)
avolkovi Apr 24, 2020
30b7dab
Add refresh token endpoint + implementation to token manager (#2975)
sam-gc May 4, 2020
c3a82f6
Add react native persistence class (#2955)
scottcrossen May 4, 2020
9b26963
Add getIdTokenResult implementation (#3014)
sam-gc May 5, 2020
12e7465
Update internal types to work with external types (#3075)
sam-gc May 15, 2020
b278cea
Further refactoring of auth types. Add public exports to src/index.ts…
sam-gc May 19, 2020
7b297c5
user.delete() implementation (#3072)
sam-gc May 19, 2020
e71513a
Use auth impl object instead of mock auth object (#3098)
sam-gc May 21, 2020
06847d8
Add signInWithCredential to auth-next (#2963)
avolkovi May 27, 2020
cb58a66
Refactor so every unit test gets its own Auth object (#3129)
sam-gc May 28, 2020
ab5b7d3
Add updateProfile, updateEmail, updatePassword (#3122)
sam-gc Jun 1, 2020
0843a6e
updateDoc()/deleteDoc() signature fix (#3147)
schmidt-sebastian Jun 2, 2020
0c426c3
Transaction/WriteBatch signature fix (#3151)
schmidt-sebastian Jun 2, 2020
fd0c0a3
Take WriteStream offline when IndexedDB is unavailable (#2995)
schmidt-sebastian Jun 2, 2020
9512b48
Do not build firestore lite in build because it breaks regular releas…
Feiyang1 Jun 3, 2020
b5c7b78
add pre script for build:release (#3161)
Feiyang1 Jun 3, 2020
e10388c
Add setLogLevel() (#3154)
schmidt-sebastian Jun 3, 2020
3ac0fe3
Add DocumentReference (#3123)
schmidt-sebastian Jun 3, 2020
a377c68
issue #2393 fix for analytics module
XuechunHou Jun 4, 2020
5932e87
removed unnecessary sw check within isSupported method for analytics
XuechunHou Jun 4, 2020
c21e817
Add recaptcha implementation (#3166)
sam-gc Jun 5, 2020
541bb0c
resolved merge conflicts
XuechunHou Jun 5, 2020
0090a18
using raw indexDB api to open a dummy database
XuechunHou Jun 8, 2020
8e979a3
Merge branch 'master' of https://github.com/firebase/firebase-js-sdk …
XuechunHou Jun 8, 2020
367a50f
Merge branch 'master' of https://github.com/firebase/firebase-js-sdk …
XuechunHou Jun 8, 2020
8452cf7
Add signInWithPhoneNumber implementation (#3191)
sam-gc Jun 9, 2020
2c14fb1
Merge branch 'master' of https://github.com/firebase/firebase-js-sdk …
XuechunHou Jun 9, 2020
3b1c12c
modified firestore packagejson for testing purpose
XuechunHou Jun 9, 2020
7d419f1
added console log for reading code
XuechunHou Jun 9, 2020
f165c84
Merge branch 'master' of https://github.com/firebase/firebase-js-sdk …
XuechunHou Jun 9, 2020
76ec37b
Merge branch 'issue-2393-analytics' of https://github.com/XuechunHou/…
XuechunHou Jun 9, 2020
2958818
Add signInAnonymously to auth-next (#2986)
avolkovi Jun 9, 2020
ce71342
added debug print
XuechunHou Jun 10, 2020
308e47d
Add signInWithCustomToken implementation (#3136)
sam-gc Jun 10, 2020
13ade39
modular exports binary size analysis - created a dummy exp module und…
XuechunHou Jun 10, 2020
922c80c
Merge branch 'master' of https://github.com/firebase/firebase-js-sdk …
XuechunHou Jun 11, 2020
94af826
added test cases for size analysis, added handler for the case of var…
XuechunHou Jun 12, 2020
e5fb703
Merge branch 'master' of https://github.com/firebase/firebase-js-sdk …
XuechunHou Jun 12, 2020
bbdde9b
add signInWithEmailAndPassword & signInWithEmailLink to auth-next (#3…
avolkovi Jun 12, 2020
e646f24
Merge branch 'master' of https://github.com/firebase/firebase-js-sdk …
XuechunHou Jun 12, 2020
a3f8aac
added a handle for named reexports, encountered file path issue for u…
XuechunHou Jun 13, 2020
b67ec5e
Add linkWithCredential(), linkWithPhoneNumber(), unlink() (#3213)
sam-gc Jun 15, 2020
93a2107
now is able to extract re-exports symbols
XuechunHou Jun 15, 2020
097549b
Add createUserWithEmailAndPassword to auth-next (#3212)
avolkovi Jun 15, 2020
784b9b4
added support for renamed exports
XuechunHou Jun 16, 2020
d237546
Merge branch 'master' of https://github.com/firebase/firebase-js-sdk …
XuechunHou Jun 16, 2020
d6ecc8c
Cleanup public types in auth-next (#3217)
avolkovi Jun 16, 2020
964db88
Add a demo page to auth-exp using the new modular methods (#3197)
sam-gc Jun 16, 2020
5cf64f7
Add custom email flow methods to auth-next (#3223)
avolkovi Jun 16, 2020
60bdff0
Add reauthenticateWithCredential, reauthenticateWithPhoneNumber (#3225)
sam-gc Jun 16, 2020
a575f2d
Add link and reauth implementation to email credential (#3226)
sam-gc Jun 17, 2020
417cb3e
added handle for extracting full path of an external firebase module
XuechunHou Jun 17, 2020
b11a815
Merge branch 'master' of https://github.com/firebase/firebase-js-sdk …
XuechunHou Jun 18, 2020
0591d1d
non-firebase module firebase module differentiation
XuechunHou Jun 19, 2020
423f87e
Merge branch 'master' of https://github.com/firebase/firebase-js-sdk …
XuechunHou Jun 19, 2020
28e71a4
figured a built-in way to resolve module specifier
XuechunHou Jun 19, 2020
3b77a94
Merge branch 'master' of https://github.com/firebase/firebase-js-sdk …
XuechunHou Jun 19, 2020
89acaed
pull from auth-next
XuechunHou Jun 19, 2020
d4a0bb5
Rough implementation
hsubox76 May 6, 2020
a009aed
Address PR comments
hsubox76 May 19, 2020
6a89dbd
Update out-of-sync internal versions
hsubox76 May 20, 2020
d5f161a
Fix build issues.
hsubox76 May 20, 2020
8fa62a5
Add test:ci script to functions-types-exp
hsubox76 May 20, 2020
26b0255
Address PR comments
hsubox76 May 21, 2020
47a1c9b
Address PR comments
hsubox76 May 29, 2020
1b4d1ff
Update package.json versions to fix build
hsubox76 Jun 3, 2020
5ee7d4f
Address PR comments
hsubox76 Jun 11, 2020
2da83d1
Explanatory comments for utility script
hsubox76 Jun 11, 2020
441ac6a
Address PR comments
hsubox76 Jun 18, 2020
ce280e5
Update package.json versions
hsubox76 Jun 19, 2020
211b5b2
changed auth-exp package.json typings field to the appropriate
XuechunHou Jun 19, 2020
eed466e
Merge branch 'ch-functionsnext' of https://github.com/firebase/fireba…
XuechunHou Jun 19, 2020
6b1f381
pulled function exp, auth exp for testing
XuechunHou Jun 20, 2020
d974b64
pulled from master
XuechunHou Jun 22, 2020
6bb0796
rollup seems to be working
XuechunHou Jun 23, 2020
c96e1e1
Merge branch 'master' of https://github.com/firebase/firebase-js-sdk …
XuechunHou Jun 23, 2020
fef87c6
created testing structure
XuechunHou Jun 23, 2020
6c889cb
Merge branch 'master' of https://github.com/firebase/firebase-js-sdk …
XuechunHou Jun 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions common/api-review/dummy-exp.api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## API Report File for "@firebase/dummy-exp"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

// @public (undocumented)
export function bar(): string;

// @public (undocumented)
export function bar1(): string;

// @public (undocumented)
export function bar2(): string;

// @public (undocumented)
export function foo1(): string;


// (No @packageDocumentation comment for this package)

```
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,13 @@
"typescript": "3.8.3",
"watch": "1.0.2",
"webpack": "4.43.0",
"yargs": "15.3.1"
"yargs": "15.3.1",
"@rollup/plugin-commonjs": "13.0.0",
"@rollup/plugin-node-resolve": "8.1.0"
},
"husky": {
"hooks": {
"pre-commit": "node tools/gitHooks/precommit.js"
}
}
}
}
26 changes: 26 additions & 0 deletions packages-exp/auth-compat-exp/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* @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
}
};
5 changes: 5 additions & 0 deletions packages-exp/auth-compat-exp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @firebase/auth-compat-exp

This is a compatability layer to for the Firebase Authentication 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.**
27 changes: 27 additions & 0 deletions packages-exp/auth-compat-exp/index.node.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* @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.
*/

/**
* This is the file that people using Node.js will actually import. You should
* only include this file if you have something specific about your
* implementation that mandates having a separate entrypoint. Otherwise you can
* just use index.ts
*/

import { testFxn } from './src';

testFxn();
29 changes: 29 additions & 0 deletions packages-exp/auth-compat-exp/index.rn.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* @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.
*/

/**
* This is the file that people using React Native will actually import. You
* should only include this file if you have something specific about your
* implementation that mandates having a separate entrypoint. Otherwise you can
* just use index.ts
*/

import { AsyncStorage } from 'react-native';
import { ReactNativePersistence } from '@firebase/auth-exp/src/core/persistence/react_native';

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const reactNativeLocalPersistence = new ReactNativePersistence(AsyncStorage);
20 changes: 20 additions & 0 deletions packages-exp/auth-compat-exp/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* @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.
*/

import { testFxn } from './src';

testFxn();
35 changes: 35 additions & 0 deletions packages-exp/auth-compat-exp/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* @license
* Copyright 2019 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 karmaBase = require('../../config/karma.base');

const files = ['src/**/*.test.ts'];

module.exports = function(config) {
const karmaConfig = Object.assign({}, karmaBase, {
// files to load into karma
files: files,
preprocessors: { '**/*.ts': ['webpack', 'sourcemap'] },
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha']
});

config.set(karmaConfig);
};

module.exports.files = files;
59 changes: 59 additions & 0 deletions packages-exp/auth-compat-exp/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "@firebase/auth-compat-exp",
"version": "0.1.0",
"private": true,
"description": "FirebaseAuth compatibility package that uses API style compatible with Firebase@7 and prior versions",
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
"main": "dist/index.node.cjs.js",
"browser": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"esm2017": "dist/index.esm2017.js",
"react-native": "dist/index.rn.cjs.js",
"files": [
"dist"
],
"scripts": {
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
"build": "rollup -c",
"build:deps": "lerna run --scope @firebase/'{app,auth-compat-exp}' --include-dependencies build",
"dev": "rollup -c -w",
"test": "yarn type-check && run-p lint test:browser test:node",
"test:browser": "karma start --single-run",
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.* --opts ../../config/mocha.node.opts",
"type-check": "tsc -p . --noEmit",
"prepare": "yarn build"
},
"peerDependencies": {
"@firebase/app-exp": "0.x",
"@firebase/app-types-exp": "0.x",
"@firebase/auth-exp": "0.x",
"@firebase/auth-types-exp": "0.x"
},
"dependencies": {
"tslib": "1.11.1"
},
"license": "Apache-2.0",
"devDependencies": {
"rollup": "1.32.1",
"rollup-plugin-json": "4.0.0",
"rollup-plugin-replace": "2.2.0",
"rollup-plugin-typescript2": "0.26.0",
"typescript": "3.8.3"
},
"repository": {
"directory": "packages-exp/auth-compat-exp",
"type": "git",
"url": "https://github.com/firebase/firebase-js-sdk.git"
},
"bugs": {
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"typings": "dist/index.d.ts",
"nyc": {
"extension": [
".ts"
],
"reportDir": "./coverage/node"
}
}
35 changes: 35 additions & 0 deletions packages-exp/auth-compat-exp/react-native.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* @license
* Copyright 2019 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.
*/

/**
* Basic stub for what is expected from the package 'react-native'.
*
* This should be a subset `@types/react-native` which cannot be installed
* because it has conflicting definitions with typescript/dom. If included in
* deps, yarn will attempt to install this in the root directory of the
* monolithic repository which will then be included in the base `tsconfig.json`
* via `typeroots` and then break every other package in this repo.
*/

declare module 'react-native' {
interface ReactNativeAsyncStorage {
setItem(key: string, value: string): Promise<void>;
getItem(key: string): Promise<string | null>;
removeItem(key: string): Promise<void>;
}
export const AsyncStorage: ReactNativeAsyncStorage;
}
101 changes: 101 additions & 0 deletions packages-exp/auth-compat-exp/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/**
* @license
* Copyright 2019 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.
*/

import typescriptPlugin from 'rollup-plugin-typescript2';
import typescript from 'typescript';
import pkg from './package.json';

const deps = Object.keys(
Object.assign({}, pkg.peerDependencies, pkg.dependencies)
);

/**
* ES5 Builds
*/
const es5BuildPlugins = [
typescriptPlugin({
typescript
})
];

const es5Builds = [
/**
* Browser Builds
*/
{
input: 'index.ts',
output: [
{ file: pkg.browser, format: 'cjs', sourcemap: true },
{ file: pkg.module, format: 'es', sourcemap: true }
],
plugins: es5BuildPlugins,
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
},
/**
* Node.js Build
*/
{
input: 'index.node.ts',
output: [{ file: pkg.main, format: 'cjs', sourcemap: true }],
plugins: es5BuildPlugins,
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
},
/**
* React Native Builds
*/
{
input: 'index.rn.ts',
output: [{ file: pkg['react-native'], format: 'cjs', sourcemap: true }],
plugins: es5BuildPlugins,
external: id =>
[...deps, 'react-native'].some(
dep => id === dep || id.startsWith(`${dep}/`)
)
}
];

/**
* ES2017 Builds
*/
const es2017BuildPlugins = [
typescriptPlugin({
typescript,
tsconfigOverride: {
compilerOptions: {
target: 'es2017'
}
}
})
];

const es2017Builds = [
/**
* Browser Builds
*/
{
input: 'index.ts',
output: {
file: pkg.esm2017,
format: 'es',
sourcemap: true
},
plugins: es2017BuildPlugins,
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
}
];

export default [...es5Builds, ...es2017Builds];
Loading