Impact Score: 5/10
Bun v0.0.27
Source available โ automated, not human-reviewed
Component: bun ยท Channel: stable. Automated analysis, not a compatibility certification. How this works.
Analysis updated: 2026-11-01.
โก Executive Summary (TL;DR)
Bun bun-v0.0.27. Source highlight: Relay GraphQL client
Who Does This Impact? (Role-Based Analysis)
๐ป Software Engineers & Devs
Check the source notes against the package and APIs you use before upgrading.
๐ Product & Engineering Leads
Use the documented changes to assess relevance to your product; release frequency alone is not a quality measure.
โ๏ธ DevOps & Security
Verify the target version, runtime requirements and rollback procedure in the official documentation.
โจ New Features & Capabilities (3)
- `<import>` lets you inject an import statement into a module. It accepts `default`, which is the default import alias and you can pass a `namespace` object where the object maps the import names to their names in the current file
- `<id>` lets you reference an import (and eventually, other symbols too)
- `<inject>` will insert each child element to the module scope. This currently only works with `<import>`, but it will work with other statements eventually.
๐ง Bug Fixes & Patches (5)
- Fix edgecase with cjs -> esm interop runtime code when the ESM export was marked as not extensible
- Fix potential infinite loop on calling macros
- Fix incorrect jsxDEV transform when `source` feature flag is off and a runtime error occurs in a component being rendered
- Fix dead-code elimination edgecase with call expressions
- Fix edgecase with parsing .env containing very short strings
๐ View Raw Release Notes (Original Developer Log)
## Features
### Relay GraphQL client
You can now use Facebook's [Relay](https://relay.dev) GraphQL framework with Bun via [`bun-macro-relay`](https://github.com/Jarred-Sumner/bun/tree/main/packages/bun-macro-relay).
`bun-macro-relay` implements the Bun equivalent of `babel-plugin-relay`.
Input:
```ts
const query = graphql`
query Bacon {
}
`;
```
Output:
```ts
import Bacon from '__generated__/Bacon.graphql';
const query = Bacon;
```
This macro is implemented entirely in TypeScript - not in native code. For install instructions, head over to [`bun-macro-relay`](https://github.com/Jarred-Sumner/bun/tree/main/packages/bun-macro-relay).
### Automatically remap macros
```js
// Instead of having to change every import like this:
import { css } from "@emotion/react";
// To this:
import { css } from "macro:bun-macro-emotion-react";
// Now you don't have to change your code
import { css } from "@emotion/react";
```
<sup>note: @emotion/react is not implemented yet!</sup>
To use this, add this to your package.json (and remove the comments):
```js
"bun": {
"macros": {
// "react-relay" is the import path to rewrite
"react-relay": {
// rewrite the "graphql" import to instead point to "bun-macro-relay/bun-macro-relay.tsx"
"graphql": "bun-macro-relay/bun-macro-relay.tsx"
}
}
},
```
Remapping this way only applies to macros. To rewrite imports otherwise, Bun will read `paths` from `tsconfig.json` or `jsconfig.json`.
### Bug fixes
- Fix edgecase with cjs -> esm interop runtime code when the ESM export was marked as not extensible
- Fix potential infinite loop on calling macros
- Fix incorrect jsxDEV transform when `source` feature flag is off and a runtime error occurs in a component being rendered
- Fix dead-code elimination edgecase with call expressions
- Fix edgecase with parsing .env containing very short strings
### More macro features
- `<import>` lets you inject an import statement into a module. It accepts `default`, which is the default import alias and you can pass a `namespace` object where the object maps the import names to their names in the current file
- `<id>` lets you reference an import (and eventually, other symbols too)
- `<inject>` will insert each child element to the module scope. This currently only works with `<import>`, but it will work with other statements eventually.
Here's an example:
```tsx
const importStmt = (
<import default="MyImportName" path="foo/bar" />
);
return (
<>
<inject>{importStmt}</inject>
<id to={importStmt.namespace.MyImportName} />
</>
);
```