-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: publish ESM version #473
Conversation
5028b28
to
c8a71ed
Compare
Oh, the tests are failing because rollup doesn't support Node 14! I may need to change how the test is run, to build with latest then test with 14 |
- name: Build | ||
run: npm run build | ||
- name: Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
if: "${{ matrix.node-version != '*' }}" | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
check-latest: true | ||
- name: Install dependencies ${{ matrix.node-version }} | ||
run: npm ci | ||
if: "${{ matrix.node-version != '*' }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing to always build on latest node, but still run tests on 14 if specified. This is because latest rollup doesn't work on 14.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
smart!
🤖 I have created a release *beep* *boop* --- ## [2.6.0](v2.5.1...v2.6.0) (2024-02-13) ### Features * publish ESM version ([#473](#473)) ([b1b7553](b1b7553)) ### Bug Fixes * **deps:** update dependency @netlify/serverless-functions-api to v1.13.1 ([#462](#462)) ([29b33ae](29b33ae)) * **deps:** update dependency @netlify/serverless-functions-api to v1.14.0 ([#470](#470)) ([c77eb33](c77eb33)) * skip purgeCache in local dev ([#472](#472)) ([9236053](9236053)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com>
🎉 Thanks for sending this pull request! 🎉 Please make sure the title is clear and descriptive. If you are fixing a typo or documentation, please skip these instructions. Otherwise please fill in the sections below. **Which problem is this pull request solving?** Adding `@netlify/functions/internal` to export paths **List other issues or pull requests related to this problem** Follow-up to changes in #473 **Checklist** Please add a `x` inside each checkbox: - [x] I have read the [contribution guidelines](../blob/master/CONTRIBUTING.md). - [ ] The status checks are successful (continuous integration). Those can be seen below.
Which problem is this pull request solving?
This module doesn't currently publish an ESM version. It's hard to use this in ES modules, because it needs to be dynamically imported, but it imports node builtins that can't be dynamically imported.
Describe the solution you've chosen
This PR uses
tsup
to build both cjs and esm. It also adds publint and arethetypeswrong to check the output, and removes the one-lineis-promise
CJS dependency.