-
Notifications
You must be signed in to change notification settings - Fork 37
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
Conversation
|
examples/framework-bun/tsconfig.json
Outdated
"lib": ["ESNext"], | ||
"module": "esnext", | ||
"target": "esnext", | ||
"moduleResolution": "node", |
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.
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)
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.
We can have multiple suffixes for this.
… 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
Summary
An example using Bun and the existing
edge
serve handler.Notes
tsconfig.json
generated viabun 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
Related
Bun.serve()
repo and serve examples website#666