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

feat: publish ESM version #473

Merged
merged 2 commits into from
Feb 13, 2024
Merged

feat: publish ESM version #473

merged 2 commits into from
Feb 13, 2024

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Feb 13, 2024

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-line is-promise CJS dependency.

@ascorbic ascorbic requested a review from a team as a code owner February 13, 2024 12:20
Skn0tt
Skn0tt previously approved these changes Feb 13, 2024
@ascorbic
Copy link
Contributor Author

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

Comment on lines +37 to +48
- 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 != '*' }}"
Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

smart!

@ascorbic ascorbic requested a review from Skn0tt February 13, 2024 12:50
@kodiakhq kodiakhq bot merged commit b1b7553 into main Feb 13, 2024
6 checks passed
@kodiakhq kodiakhq bot deleted the publish-esm branch February 13, 2024 13:10
kodiakhq bot pushed a commit that referenced this pull request Feb 13, 2024
🤖 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>
@mrstork mrstork mentioned this pull request May 2, 2024
2 tasks
mrstork added a commit that referenced this pull request May 3, 2024
🎉 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants