-
Notifications
You must be signed in to change notification settings - Fork 213
Lay the groundwork for v3 #450
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 all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
79f582f
Update dependencies to latest versions
merlinnot 877d2cd
Revert ordering alphabetically
merlinnot 33fd68a
Add `dom` library to `package.json`
merlinnot d7b1d92
Update dependencies once more
merlinnot f947927
Update dependencies again
merlinnot 9161ebd
Sort package.json using sort-package-json
merlinnot b98bb68
Breaking changes to dependencies
merlinnot fa6b65b
Remove upgrade warning
merlinnot 80d29fb
Compile to ES2017
merlinnot 01be3ac
Simplify test scripts
merlinnot 0fb3426
Remove class prototype overrides
merlinnot 822ec67
Drop support for FIREBASE_PROJECT env variable
merlinnot 98c4326
Add changelog entries
merlinnot 065f470
Adjust Travis config to run on Node.js 8 and Node.js 10
merlinnot 7713f06
Remove tests for FIREBASE_PROJECT env variable
merlinnot 73a5b3c
Remove v1 migration entry from the readme
merlinnot 06e0558
Specify keywords in a correct order
merlinnot 3dc0129
Revert adding a newline before an if statement
merlinnot 76ce309
Remove an always truthy condition
merlinnot 8fd948b
Remove DOM library
merlinnot 87dd7ba
Update dependency @types/lodash to ^4.14.133
merlinnot 682e8c8
Add a changelog entry for FIREBASE_PROJECT
merlinnot d9d9fcb
Add typeRoots to tsconfig.release.json
merlinnot 4abe9c0
Require a version of firebase-tools that supports Node.js 10
merlinnot 31b2d9e
Adjust firebase-tools version in changelog entry
merlinnot 68018f8
Remove firebase-tool peer dependency.
merlinnot 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
language: node_js | ||
node_js: | ||
- '6.14.0' | ||
- '8' | ||
- stable | ||
- '8' | ||
- '10' | ||
sudo: false |
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,3 @@ | ||
- important - [breaking change] The Firebase Functions SDK no longer supports Node 6. Developers must use Node 8.13.0 or higher. | ||
- important - [breaking change] The Firebase Functions SDK no longer supports Firebase Tools SDK below version 6.8.0. | ||
- important - [breaking change] FIREBASE_PROJECT environment variable is no longer supported and has been supplanted by FIREBASE_CONFIG. |
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 |
---|---|---|
|
@@ -29,7 +29,6 @@ describe('config()', () => { | |
mockRequire.stopAll(); | ||
delete config.singleton; | ||
delete process.env.FIREBASE_CONFIG; | ||
delete process.env.FIREBASE_PROJECT; | ||
delete process.env.CLOUD_RUNTIME_CONFIG; | ||
}); | ||
|
||
|
@@ -50,16 +49,6 @@ describe('config()', () => { | |
expect(firebaseConfig()).to.be.null; | ||
}); | ||
|
||
it('loads Firebase configs from FIREBASE_PROJECT env variable', () => { | ||
process.env.FIREBASE_PROJECT = JSON.stringify({ | ||
databaseURL: '[email protected]', | ||
}); | ||
expect(firebaseConfig()).to.have.property( | ||
'databaseURL', | ||
'[email protected]' | ||
); | ||
}); | ||
|
||
it('loads Firebase configs from FIREBASE_CONFIG env variable', () => { | ||
process.env.FIREBASE_CONFIG = JSON.stringify({ | ||
databaseURL: '[email protected]', | ||
|
@@ -70,33 +59,6 @@ describe('config()', () => { | |
); | ||
}); | ||
|
||
it('prefers FIREBASE_CONFIG over FIREBASE_PROJECT', () => { | ||
process.env.FIREBASE_CONFIG = JSON.stringify({ | ||
databaseURL: 'firebase_config', | ||
}); | ||
process.env.FIREBASE_PROJECT = JSON.stringify({ | ||
databaseURL: 'firebase_project', | ||
}); | ||
expect(firebaseConfig()).to.have.property('databaseURL', 'firebase_config'); | ||
}); | ||
|
||
it('behaves well when both FIREBASE_PROJECT and .runtimeconfig.json present', () => { | ||
process.env.FIREBASE_PROJECT = JSON.stringify({ | ||
databaseURL: '[email protected]', | ||
}); | ||
mockRequire('../../../.runtimeconfig.json', { | ||
firebase: { | ||
databaseURL: '[email protected]', | ||
}, | ||
foo: 'bar', | ||
}); | ||
expect(firebaseConfig()).to.have.property( | ||
'databaseURL', | ||
'[email protected]' | ||
); | ||
expect(config()).to.have.property('foo', 'bar'); | ||
}); | ||
|
||
it('accepts alternative locations for config file', () => { | ||
process.env.CLOUD_RUNTIME_CONFIG = 'another.json'; | ||
mockRequire('another.json', { foo: 'bar', firebase: {} }); | ||
|
@@ -112,16 +74,4 @@ describe('config()', () => { | |
expect(firebaseConfig()).to.not.be.null; | ||
expect(config()).to.have.property('foo', 'bar'); | ||
}); | ||
|
||
it('behaves well when both env.CLOUD_RUNTIME_CONFIG and env.FIREBASE_PROJECT are set', () => { | ||
process.env.CLOUD_RUNTIME_CONFIG = JSON.stringify({ foo: 'bar' }); | ||
process.env.FIREBASE_PROJECT = JSON.stringify({ | ||
databaseURL: '[email protected]', | ||
}); | ||
expect(firebaseConfig()).to.have.property( | ||
'databaseURL', | ||
'[email protected]' | ||
); | ||
expect(config()).to.have.property('foo', 'bar'); | ||
}); | ||
}); |
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 |
---|---|---|
|
@@ -213,14 +213,14 @@ const expectedResponseHeaders = { | |
* verifying an id token. | ||
*/ | ||
function mockFetchPublicKeys(): nock.Scope { | ||
let mock: nock.Scope = nock('https://www.googleapis.com:443').get( | ||
'/robot/v1/metadata/x509/[email protected]' | ||
); | ||
const mockedResponse = { [mocks.key_id]: mocks.public_key }; | ||
const headers = { | ||
'cache-control': 'public, max-age=1, must-revalidate, no-transform', | ||
}; | ||
return mock.reply(200, mockedResponse, headers); | ||
|
||
return nock('https://www.googleapis.com:443') | ||
.get('/robot/v1/metadata/x509/[email protected]') | ||
.reply(200, mockedResponse, headers); | ||
thechenky marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
/** | ||
|
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 |
---|---|---|
@@ -1,17 +1,12 @@ | ||
{ | ||
"compilerOptions": { | ||
"lib": ["es6"], | ||
"lib": ["es2017"], | ||
"module": "commonjs", | ||
"noImplicitAny": false, | ||
"outDir": ".tmp", | ||
"resolveJsonModule": true, | ||
thechenky marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"sourceMap": true, | ||
"target": "es6", | ||
"typeRoots": [ | ||
"node_modules/@types" | ||
] | ||
"target": "es2017" | ||
}, | ||
"include": [ | ||
"src/**/*.ts", | ||
"spec/**/*.ts" | ||
] | ||
"include": ["src/**/*.ts", "spec/**/*.ts"] | ||
} |
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.
Uh oh!
There was an error while loading. Please reload this page.