FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

More v19 enhancements by jamesdaniels · Pull Request #3586 · angular/angularfire · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .js  (1) .json  (9) .ts  (47) dotfile  (1) All 4 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
18 changes: 17 additions & 1 deletion firebase.json
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
Expand Up @@ -28,5 +28,21 @@
"ui": {
"enabled": false
}
}
},
"functions": [
{
"source": "test/functions",
"codebase": "default",
"ignore": [
"node_modules",
".git",
"firebase-debug.log",
"firebase-debug.*.log",
"*.local"
],
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run build"
]
}
]
}
26 changes: 24 additions & 2 deletions karma.conf.js
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
Expand Up @@ -3,7 +3,22 @@ const dns = require('node:dns');
// The emulator suite fails in CI, only on Node 18.
// This apparently fixes it.
// https://github.com/firebase/firebase-tools/issues/5755#issuecomment-1535445383
dns.setDefaultResultOrder('ipv4first')
dns.setDefaultResultOrder('ipv4first');

let firestoreEmulatorPort, storageEmulatorPort, authEmulatorPort, databaseEmulatorPort, functionsEmulatorPort;
if (process.env.FIRESTORE_EMULATOR_HOST &&
process.env.STORAGE_EMULATOR_HOST &&
process.env.FIREBASE_AUTH_EMULATOR_HOST &&
process.env.FIREBASE_DATABASE_EMULATOR_HOST) {
firestoreEmulatorPort = parseInt(process.env.FIRESTORE_EMULATOR_HOST.split(":")[1], 10); // '127.0.0.1:9098'
storageEmulatorPort = parseInt(process.env.STORAGE_EMULATOR_HOST.split(":")[2], 10); // 'http://127.0.0.1:9199'
authEmulatorPort = parseInt(process.env.FIREBASE_AUTH_EMULATOR_HOST.split(":")[1], 10); // '127.0.0.1:9098'
databaseEmulatorPort = parseInt(process.env.FIREBASE_DATABASE_EMULATOR_HOST.split(":")[1], 10); // '127.0.0.1:9002'
functionsEmulatorPort = 5001; // TODO figure out why this env variable isn't present
} else {
console.error("Missing emulator environments variables");
process.exit(1);
}

// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
Expand All @@ -21,7 +36,14 @@ module.exports = function (config) {
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
clearContext: false, // leave Jasmine Spec Runner output visible in browser
args: [
["FIRESTORE_EMULATOR_PORT", firestoreEmulatorPort],
["DATABASE_EMULATOR_PORT", databaseEmulatorPort],
["STORAGE_EMULATOR_PORT", storageEmulatorPort],
["AUTH_EMULATOR_PORT", authEmulatorPort],
["FUNCTIONS_EMULATOR_PORT", functionsEmulatorPort],
],
},
coverageIstanbulReporter: {
dir: `${process.cwd()}/coverage`,
Expand Down
38 changes: 21 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions package.json
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
Expand Up @@ -5,12 +5,12 @@
"private": true,
"scripts": {
"test": "npm run build:jasmine && npm run test:node-esm && npm run test:chrome-headless",
"test:watch": "npx --yes firebase-tools@latest emulators:exec --project=demo123 \"ng test --watch=true --browsers=Chrome\"",
"test:chrome": "npx --yes firebase-tools@latest emulators:exec --project=demo123 \"ng test --watch=false --browsers=Chrome\"",
"test:firefox": "npx --yes firebase-tools@latest emulators:exec --project=demo123 \"ng test --watch=false --browsers=Firefox\"",
"test:safari": "npx --yes firebase-tools@latest emulators:exec --project=demo123 \"ng test --watch=false --browsers=SafariNative\"",
"test:chrome-headless": "npx --yes firebase-tools@latest emulators:exec --project=demo123 \"ng test --watch=false --browsers=ChromeHeadless\"",
"test:firefox-headless": "npx --yes firebase-tools@latest emulators:exec --project=demo123 \"ng test --watch=false --browsers=FirefoxHeadless\"",
"test:watch": "npx --yes firebase-tools@latest emulators:exec --project=demo-123 \"ng test --watch=true --browsers=Chrome\"",
"test:chrome": "npx --yes firebase-tools@latest emulators:exec --project=demo-123 \"ng test --watch=false --browsers=Chrome\"",
"test:firefox": "npx --yes firebase-tools@latest emulators:exec --project=demo-123 \"ng test --watch=false --browsers=Firefox\"",
"test:safari": "npx --yes firebase-tools@latest emulators:exec --project=demo-123 \"ng test --watch=false --browsers=SafariNative\"",
"test:chrome-headless": "npx --yes firebase-tools@latest emulators:exec --project=demo-123 \"ng test --watch=false --browsers=ChromeHeadless\"",
"test:firefox-headless": "npx --yes firebase-tools@latest emulators:exec --project=demo-123 \"ng test --watch=false --browsers=FirefoxHeadless\"",
"lint": "ng lint",
"test:node": "node -r tsconfig-paths/register ./dist/out-tsc/jasmine/tools/jasmine.mjs --input-type=commonjs",
"test:node-esm": "node -r tsconfig-paths/register ./dist/out-tsc/jasmine/tools/jasmine.mjs",
Expand Down Expand Up @@ -75,8 +75,8 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "^19.0.0",
"@angular-eslint/builder": "19.0.0-alpha.0",
"@angular-eslint/eslint-plugin": "19.0.0-alpha.0",
"@angular-eslint/builder": "^19.0.0",
"@angular-eslint/eslint-plugin": "^19.0.0",
"@angular/animations": "^19.0.0",
"@angular/cli": "^19.0.0",
"@angular/compiler-cli": "^19.0.0",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions samples/advanced/src/app/upboats/lazyFirestore.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/auth/auth.spec.ts
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,7 +1,7 @@
import { TestBed } from '@angular/core/testing';
import { FirebaseApp, getApp, initializeApp, provideFirebaseApp } from '@angular/fire/app';
import { Auth, connectAuthEmulator, getAuth, provideAuth } from '@angular/fire/auth';
import { COMMON_CONFIG } from '../test-config';
import { COMMON_CONFIG, authEmulatorPort } from '../test-config';
import { rando } from '../utils';

describe('Auth', () => {
Expand All @@ -19,7 +19,7 @@ describe('Auth', () => {
provideFirebaseApp(() => initializeApp(COMMON_CONFIG, appName)),
provideAuth(() => {
providedAuth = getAuth(getApp(appName));
connectAuthEmulator(providedAuth, 'http://localhost:9099');
connectAuthEmulator(providedAuth, `http://localhost:${authEmulatorPort}`);
return providedAuth;
}),
],
Expand Down
Loading

Back | FazBrowse Home | New Git URL