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

Merged
merged 36 commits into from
Sep 23, 2024
Merged

Conversation

DellaBitta
Copy link
Contributor

Discussion

With the removal of fetch we no long need to create a node bundle for functions. Instead the sourcebase may become isomorphic, so long as we remove the older node sources. And that's what the PR does!

Testing

  • ts-node scripts/ci-test/check-paths.ts
  • CI.

API Changes

N/A

Copy link

changeset-bot bot commented Sep 20, 2024

🦋 Changeset detected

Latest commit: 9da8f06

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@firebase/functions-compat Patch
@firebase/functions Patch
firebase Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Sep 20, 2024

Size Report 1

Affected Products

  • @firebase/functions

    TypeBase (7194d9c)Merge (09f226f)Diff
    main12.6 kB10.1 kB-2.45 kB (-19.4%)
  • @firebase/functions-compat

    TypeBase (7194d9c)Merge (09f226f)Diff
    main2.34 kB2.12 kB-212 B (-9.1%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/gevOj3k14M.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Sep 20, 2024

Base automatically changed from v11-fetch-changes to v11 September 20, 2024 19:53
@DellaBitta DellaBitta marked this pull request as ready for review September 20, 2024 19:59
@DellaBitta DellaBitta requested review from a team as code owners September 20, 2024 19:59
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

@@ -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.

Copy link
Contributor Author

@DellaBitta DellaBitta Sep 23, 2024

Choose a reason for hiding this comment

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

Done! Sorry about that.

"import": "./dist/node-esm/index.node.esm.js",
"require": "./dist/index.node.cjs.js"
"require": "./dist/index.cjs.js",
"import": "./dist/index.esm2017.js"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know this order is swapped, but now it matches the order of the browser's settings below. :)

@DellaBitta DellaBitta requested a review from hsubox76 September 23, 2024 14:18
@DellaBitta DellaBitta merged commit d253484 into v11 Sep 23, 2024
40 checks passed
@DellaBitta DellaBitta deleted the v11-remove-func-node-bundle branch September 23, 2024 19:07
hsubox76 added a commit that referenced this pull request Oct 17, 2024
* Add node engines fields specifying a minimum of 18 (#8457)

* Make memory lru gc the default (#8110)

* Make memory lru gc the default

* undo yarn.lock

* Make memory lru gc the default

* Fix tests

* V11 release removal of node-fetch and undici dependencies (#8492)

Our v11 release will require node 18+. Since fetch has been introduced in these node versions, we can remove our dependency on third party fetch implementations.

This change removes our usage of fetch variants undici and node-fetch for our node target builds and our CI tools.

* V11 - Remove functions node bundle (#8507)

With the removal of fetch we no long need to create a node bundle for functions. Instead the sourcebase may become isomorphic, so long as we remove the older node sources. And that's what the PR does!

* Initial changes for Vertex GA packaging (#8498)

* [Vertex GA] Rewrite Schema (#8479)

* [Vertex GA] Add new endpoint and error message. (#8497)

* [Vertex GA] Miscellaneous breaking changes for Vertex GA (#8514)

* Remove ES5 Support (#8509)

* Emit a module package file for functions ESM builds (#8517)

* Update API_NOT_ENABLED error for Vertex (#8549)

* Upgrade cjs bundles for storage and performance (#8557)

These should have been part of the bigger PR, but I missed these.

* Rollup JS files with rollup-typescript-plugin (#8503)

The rollup-typescript-plugin does not transpile JS files using the TS
compiler by default. This means that external dependencies that provide
JS bundles will not be transpiled to the target ES version specified in
the TypeScript config used by the plugin.

This resulted in one of our dependencies (https://github.com/jakearchibald/idb)
being included in the CDN bundles without being transpiled to
ES5 (the target ES version). Since this dependencies bundle uses
ES2018 syntax (object spread operator `{ ...x }`), this upgraded our CDN
bundles' minimum ES version requirement to ES2018 which isn't compatible with older browser versions.
To see the ES2018 syntax in one of the CDN bundles, see
https://www.gstatic.com/firebasejs/10.13.1/firebase-app.js and search for `...oldTraps`.

* Fix tsc errors in vertex tests (#8562)

* Make SafetySettings.method optional (#8567)

* Make SafetySettings.method optional

* Update API reports

---------

Co-authored-by: hsubox76 <[email protected]>

* [Vertex GA] Regenerate docs after Vertex GA changes (#8505)

* Close emulator file after download is complete (#8572)

* close file

* Add test:ci to end of test command in CI

* revert workflow file changes

* format

* rename vertexai package reference in a changeset (#8573)

* Missed one doc change from a PR (#8575)

* Overwrite undefined candidate index (#8577)

* Overwrite undefined candidate index

* Fix index overwrite condition to only be true when index is not a property

* Upgrade Vertex Mock Responses to V5 (#8579)

* Upgrade to mock responses v4

* Upgrade from v4 to v5 mock responses

---------

Co-authored-by: wu-hui <[email protected]>
Co-authored-by: DellaBitta <[email protected]>
Co-authored-by: Daniel La Rocque <[email protected]>
Co-authored-by: hsubox76 <[email protected]>
@firebase firebase locked and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants