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

Add experimental Bun example #437

Merged
merged 6 commits into from
Jan 29, 2024
Merged

Add experimental Bun example #437

merged 6 commits into from
Jan 29, 2024

Conversation

djfarrelly
Copy link
Member

@djfarrelly djfarrelly commented Dec 18, 2023

Summary

An example using Bun and the existing edge serve handler.

Notes

  • There is a module resolution issue with the default tsconfig.json generated via bun init which can be "fixed" by changing the "moduleResolution" to "node". The inferred type of 'helloWorld' cannot be named without a reference to '../node_modules/inngest/types'. This is likely not portable. A type annotation is necessary.

Checklist

  • Added a docs PR that references this PR
  • Added unit/integration tests
  • Added changesets if applicable

Related

Copy link

changeset-bot bot commented Dec 18, 2023

⚠️ No Changeset found

Latest commit: b554aba

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

"lib": ["ESNext"],
"module": "esnext",
"target": "esnext",
"moduleResolution": "node",
Copy link
Member Author

Choose a reason for hiding this comment

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

By default this is "bundler" which makes all of the exports defined in the ./inngest files have this TS error:

The inferred type of 'functions' cannot be named without a reference to '../node_modules/inngest/types'. This is likely not portable. A type annotation is necessary.ts(2742)

Copy link
Member

Choose a reason for hiding this comment

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

I've moved it back to the default of "bundler" - this is a good test for issues like #384 (also see #385 / #460).

@inngest-release-bot inngest-release-bot added the 📦 inngest Affects the `inngest` package label Jan 29, 2024
@jpwilliams jpwilliams self-assigned this Jan 29, 2024
@jpwilliams jpwilliams marked this pull request as ready for review January 29, 2024 13:04
@jpwilliams jpwilliams merged commit d117510 into main Jan 29, 2024
35 checks passed
@jpwilliams jpwilliams deleted the task/example-bun branch January 29, 2024 13:37
jpwilliams added a commit that referenced this pull request Feb 26, 2024
… issues (#501)

## Summary
<!-- Succinctly describe your change, providing context, what you've
changed, and why. -->

We've seen some issues crop up when `composite: true` is present in
`tsconfig.json` files. This PR adds a `composite: true` project where we
test the Inngest package for compliance for the types that it exports.

We purposefully want to limit the number of types exported from the main
`"inngest"` entrypoint, as each type exported here becomes part of the
public API, where changing those types is a breaking change. Therefore,
the composite check gives us a (albeit inaccurate) test that can stop us
shipping these dangerous changes.

## Checklist
<!-- Tick these items off as you progress. -->
<!-- If an item isn't applicable, ideally please strikeout the item by
wrapping it in "~~"" and suffix it with "N/A My reason for skipping
this." -->
<!-- e.g. "- [ ] ~~Added tests~~ N/A Only touches docs" -->

- [ ] ~Added a [docs PR](https://github.com/inngest/website) that
references this PR~ N/A Bug fix and testing
- [x] Added unit/integration tests
- [x] Added changesets if applicable

## Related
<!-- A space for any related links, issues, or PRs. -->
<!-- Linear issues are autolinked. -->
<!-- e.g. - INN-123 -->
<!-- GitHub issues/PRs can be linked using shorthand. -->
<!-- e.g. "- inngest/inngest#123" -->
<!-- Feel free to remove this section if there are no applicable related
links.-->
- #384
- #385 
- #437
- #460
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 inngest Affects the `inngest` package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants