Skip to content
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

V11 - Remove functions node bundle #8507

Open
wants to merge 34 commits into
base: v11
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4bdab6f
Removed node-fetch from rules-unit-testing
DellaBitta Sep 10, 2024
45723bb
Draft emulator impl not quite working.
DellaBitta Sep 11, 2024
5ee8eb7
Wrap the emulator download in a promise
DellaBitta Sep 11, 2024
84f0770
Update yarn.lock
DellaBitta Sep 12, 2024
afea52d
emulator.ts reject/resolve fix. formatting.
DellaBitta Sep 12, 2024
79753b2
Update emaultor.ts with chmod operation.
DellaBitta Sep 12, 2024
ba32125
emulator.ts remove setBinaryPath & add comments.
DellaBitta Sep 12, 2024
6fdd758
Remove undici from messaging testing
DellaBitta Sep 12, 2024
0601594
Remove undici from auth source and package.json
DellaBitta Sep 12, 2024
2c4a46e
auth format
DellaBitta Sep 12, 2024
3b93ffe
repo-scripts
DellaBitta Sep 12, 2024
97eb7a3
Auth: remove custom webpack step for undici
DellaBitta Sep 12, 2024
9c010b2
Remove undici from firestore
DellaBitta Sep 13, 2024
69d789c
Lint fix.
DellaBitta Sep 13, 2024
c8c64e7
Remove fetch from functions
DellaBitta Sep 13, 2024
b16903b
fix build
DellaBitta Sep 13, 2024
0c05f70
Fixed build?
DellaBitta Sep 13, 2024
5077ae3
format
DellaBitta Sep 13, 2024
7a6691b
Remove undici from storage
DellaBitta Sep 13, 2024
033c4dc
Remove undici from changelog generator
DellaBitta Sep 13, 2024
9aa1f75
Fix storage test for node
DellaBitta Sep 13, 2024
f35d2a0
Remove no longer required eslint-disable comments.
DellaBitta Sep 16, 2024
1e25ff2
Functions export public-types
DellaBitta Sep 16, 2024
7acb14e
Auth - remove superfluous casting.
DellaBitta Sep 19, 2024
498bc7b
Fix hanging promise in emulator download code
DellaBitta Sep 19, 2024
10a6149
Remove fetch casting in auth-compat
DellaBitta Sep 20, 2024
10e089e
Changeset
DellaBitta Sep 20, 2024
d517b14
Changeset 2
DellaBitta Sep 20, 2024
399efc0
Remove functions node bundle
DellaBitta Sep 20, 2024
8bb819b
Changeset
DellaBitta Sep 20, 2024
49f0618
Change test:node target file
DellaBitta Sep 20, 2024
3f14414
Update functions-compat
DellaBitta Sep 20, 2024
8cb2f4d
Merge branch 'v11' into v11-remove-func-node-bundle
DellaBitta Sep 20, 2024
c055cfe
remove --file src/index.node.ts from functions-compat
DellaBitta Sep 20, 2024
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
6 changes: 6 additions & 0 deletions .changeset/slimy-cups-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@firebase/functions-compat': patch
'@firebase/functions': patch
---

Remove node bundle from the functions SDK as the node-specific fetch code has been removed in favor of using native fetch throughout the SDK.
8 changes: 4 additions & 4 deletions packages/functions-compat/package.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like functions-compat also has a src/index.node.ts, and it's also referenced in this file's test:node npm script.

Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"version": "0.3.12",
"description": "",
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
"main": "dist/index.node.cjs.js",
"main": "dist/index.cjs.js",
"browser": "dist/index.esm2017.js",
"module": "dist/index.esm2017.js",
"esm5": "dist/index.esm5.js",
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"node": {
"import": "./dist/node-esm/index.node.esm.js",
"require": "./dist/index.node.cjs.js"
"require": "./dist/index.cjs.js",
"import": "./dist/index.esm2017.js"
},
"esm5": "./dist/index.esm5.js",
"browser": {
Expand Down Expand Up @@ -57,7 +57,7 @@
"test:all": "run-p --npm-path npm test:browser test:node",
"test:browser": "karma start --single-run",
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'src/{,!(browser)/**/}*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'src/{,!(browser)/**/}*.test.ts' --config ../../config/mocharc.node.js",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you also remove the file itself? It's not showing up as removed in the Github diff for me.

"test:emulator": "env FIREBASE_FUNCTIONS_HOST=http://localhost FIREBASE_FUNCTIONS_PORT=5005 run-p --npm-path npm test:node",
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
"add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../functions/dist/functions-public.d.ts -o dist/src/index.d.ts -a -r Functions:types.FirebaseFunctions -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/functions"
Expand Down
19 changes: 1 addition & 18 deletions packages/functions-compat/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,4 @@ const browserBuilds = [
}
];

const nodeBuilds = [
{
input: 'src/index.node.ts',
output: [{ file: pkg.main, format: 'cjs', sourcemap: true }],
plugins: es5BuildPlugins,
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
},
{
input: 'src/index.node.ts',
output: [
{ file: pkg.exports['.'].node.import, format: 'es', sourcemap: true }
],
plugins: [...es2017BuildPlugins, emitModulePackageFile()],
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
}
];

export default [...browserBuilds, ...nodeBuilds];
export default [...browserBuilds];
8 changes: 4 additions & 4 deletions packages/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"version": "0.11.6",
"description": "",
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
"main": "dist/index.node.cjs.js",
"main": "dist/index.cjs.js",
"browser": "dist/index.esm2017.js",
"module": "dist/index.esm2017.js",
"esm5": "dist/index.esm.js",
"exports": {
".": {
"types": "./dist/functions-public.d.ts",
"node": {
"import": "./dist/esm-node/index.node.esm.js",
"require": "./dist/index.node.cjs.js"
"import": "./dist/index.esm2017.js",
"require": "./dist/index.cjs.js"
},
"esm5": "./dist/index.esm.js",
"browser": {
Expand All @@ -38,7 +38,7 @@
"test:all": "run-p --npm-path npm test:browser test:node",
"test:browser": "karma start --single-run",
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'src/{,!(browser)/**/}*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'src/{,!(browser)/**/}*.test.ts' --file src/index.ts --config ../../config/mocharc.node.js",
"test:emulator": "env FIREBASE_FUNCTIONS_EMULATOR_ORIGIN=http://localhost:5005 run-p --npm-path npm test:node",
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
"api-report": "api-extractor run --local --verbose",
Expand Down
26 changes: 1 addition & 25 deletions packages/functions/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,28 +84,4 @@ const browserBuilds = [
}
];

const nodeBuilds = [
{
input: 'src/index.node.ts',
output: [{ file: pkg.main, format: 'cjs', sourcemap: true }],
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
plugins: [
...es5BuildPlugins,
replace(generateBuildTargetReplaceConfig('cjs', 5))
]
},
{
input: 'src/index.node.ts',
output: [
{ file: pkg.exports['.'].node.import, format: 'es', sourcemap: true }
],
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
plugins: [
...es2017BuildPlugins,
replace(generateBuildTargetReplaceConfig('esm', 2017)),
emitModulePackageFile()
]
}
];

export default [...browserBuilds, ...nodeBuilds];
export default [...browserBuilds];
22 changes: 0 additions & 22 deletions packages/functions/src/index.node.ts

This file was deleted.

Loading