Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ resolver = "2"
members = [
"src/opaque",
"src/analytics",
"src/api",
"src/base64",
"src/bundler",
"src/collections",
Expand Down Expand Up @@ -360,7 +359,6 @@ itoa = "1"
lol_html = { path = "vendor/lolhtml" }
bun_opaque = { path = "src/opaque" }
bun_analytics = { path = "src/analytics" }
bun_api = { path = "src/api" }
bun_base64 = { path = "src/base64" }
bun_bundler = { path = "src/bundler" }
bun_collections = { path = "src/collections" }
Expand Down
4 changes: 2 additions & 2 deletions docs/runtime/bunfig.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ smol = true

### `logLevel`

Set the log level: `"debug"`, `"warn"`, or `"error"`.
Set the log level: `"debug"`, `"info"`, `"warn"`, or `"error"`.

```toml title="bunfig.toml" icon="settings"
logLevel = "debug" # "debug" | "warn" | "error"
logLevel = "debug" # "debug" | "info" | "warn" | "error"
```

### `define`
Expand Down
18 changes: 12 additions & 6 deletions packages/bun-native-bundler-plugin-api/bundler_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,20 @@ typedef enum {
BUN_LOADER_CSS = 4,
BUN_LOADER_FILE = 5,
BUN_LOADER_JSON = 6,
BUN_LOADER_TOML = 7,
BUN_LOADER_WASM = 8,
BUN_LOADER_NAPI = 9,
BUN_LOADER_BASE64 = 10,
BUN_LOADER_DATAURL = 11,
BUN_LOADER_TEXT = 12,
BUN_LOADER_JSONC = 7,
BUN_LOADER_TOML = 8,
BUN_LOADER_WASM = 9,
BUN_LOADER_NAPI = 10,
BUN_LOADER_BASE64 = 11,
BUN_LOADER_DATAURL = 12,
BUN_LOADER_TEXT = 13,
BUN_LOADER_BUNSH = 14,
BUN_LOADER_SQLITE = 15,
BUN_LOADER_SQLITE_EMBEDDED = 16,
BUN_LOADER_HTML = 17,
BUN_LOADER_YAML = 18,
BUN_LOADER_JSON5 = 19,
BUN_LOADER_MD = 20,
Comment on lines +15 to +28

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate native-plugin ABI version checks and loader-byte decoding paths.
rg -n -C 4 'ABI_VERSION|BUN_LOADER_|BunLoader|default_loader|OnBeforeParseResult|loader.*from_repr' \
  src packages

Repository: oven-sh/bun

Length of output: 50370


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- changed files and enum diff ---'
git diff --stat
git diff -- packages/bun-native-bundler-plugin-api/bundler_plugin.h \
  packages/bun-native-plugin-rs/headers/bun-native-bundler-plugin-api/bundler_plugin.h \
  packages/bun-native-plugin-rs/src/sys.rs

printf '%s\n' '--- native plugin loading and loader conversion sites ---'
rg -n -C 5 \
  'native plugin|NativePlugin|native_plugin|OnBeforeParseResult|default_loader|loader as u8|transmute.*loader|BunLoader::' \
  src packages/bun-native-plugin-rs packages/bun-native-bundler-plugin-api \
  -g '*.rs' -g '*.zig' -g '*.cpp' -g '*.h' -g '*.ts' \
  | rg -n -m 250 'ABI|version|loader|OnBeforeParse|native.plugin|NativePlugin'

printf '%s\n' '--- likely ABI/version declarations ---'
rg -n -i -C 4 \
  'abi|version|compatible|incompatible|struct_size|plugin.*load|load.*plugin' \
  packages/bun-native-plugin-rs packages/bun-native-bundler-plugin-api src/bundler src \
  -g '*.rs' -g '*.zig' -g '*.cpp' -g '*.h' -g '*.ts' \
  | head -n 500

Repository: oven-sh/bun

Length of output: 50369


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
import re

files = [
    Path("packages/bun-native-bundler-plugin-api/bundler_plugin.h"),
    Path("packages/bun-native-plugin-rs/headers/bun-native-bundler-plugin-api/bundler_plugin.h"),
    Path("packages/bun-native-plugin-rs/src/sys.rs"),
]
for path in files:
    text = path.read_text()
    pairs = re.findall(r'\b(BUN_LOADER_[A-Z0-9_]+)\s*=\s*(\d+)', text)
    print(path)
    print("  enum:", pairs)
    print("  loader fields:", [
        (i + 1, line.strip())
        for i, line in enumerate(text.splitlines())
        if re.search(r'\b(default_loader|loader)\b', line)
    ])

print("loader conversion candidates:")
for path in Path(".").rglob("*"):
    if not path.is_file() or path.suffix not in {".rs", ".zig", ".cpp", ".cc", ".c", ".h", ".ts"}:
        continue
    try:
        lines = path.read_text(errors="replace").splitlines()
    except OSError:
        continue
    for i, line in enumerate(lines):
        if re.search(r'(transmute|from_repr|try_from|default_loader|result\.loader|loader\s*=)', line, re.I):
            context = "\n".join(f"{j+1}:{lines[j]}" for j in range(max(0, i-2), min(len(lines), i+3)))
            if any(x in context.lower() for x in ("native", "plugin", "onbeforeparse", "loader")):
                print(f"{path}:{i+1}\n{context}")
PY

Repository: oven-sh/bun

Length of output: 50367


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- repository revision context ---'
git status --short
git rev-parse HEAD
git rev-list --parents -n 3 HEAD

printf '%s\n' '--- loader enums in recent revisions ---'
for rev in HEAD HEAD^ HEAD^^; do
  printf '\n[%s]\n' "$rev"
  for file in \
    packages/bun-native-bundler-plugin-api/bundler_plugin.h \
    packages/bun-native-plugin-rs/headers/bun-native-bundler-plugin-api/bundler_plugin.h \
    packages/bun-native-plugin-rs/src/sys.rs \
    src/ast/loader.rs
  do
    if git cat-file -e "$rev:$file" 2>/dev/null; then
      printf '%s\n' "$file"
      git show "$rev:$file" | rg -n \
        'BUN_LOADER_|enum Loader|pub enum Loader|JSONC|TOML|XML|from_repr|repr\(' \
        | head -n 100
    fi
  done
done

Repository: oven-sh/bun

Length of output: 6394


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- native plugin FFI call graph ---'
rg -n -C 8 \
  'JSBundlerPlugin__onBeforeParse|on_before_parse|OnBeforeParseResult|default_loader.*as u8|result.*loader|\.loader.*from_repr|BunLoaderTypeXML|BunLoaderTypeTOML|BunLoaderTypeJSONC' \
  src/bundler src/jsc packages \
  -g '*.rs' -g '*.cpp' -g '*.h' -g '*.zig' \
  | head -n 1200

printf '%s\n' '--- loader representation and conversion definitions ---'
rg -n -C 12 \
  'pub enum Loader|enum Loader|BunLoaderType|from_repr|BUN_LOADER_MAX|assert_ffi_layout' \
  src/ast/loader.rs src/ast src/bundler/ParseTask.rs src/bundler/bundle_v2.rs \
  -g '*.rs' -g '*.h' -g '*.cpp' \
  | head -n 1200

Repository: oven-sh/bun

Length of output: 50367


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- canonical loader representation ---'
cat -n src/ast/loader.rs | sed -n '1,90p'

printf '%s\n' '--- native-plugin result construction and consumption ---'
cat -n src/bundler/ParseTask.rs | sed -n '1828,1870p;2028,2060p;2128,2165p'
cat -n src/bundler/bundle_v2.rs | sed -n '770,795p'

printf '%s\n' '--- exact revision differences for the loader enum ---'
git diff --no-ext-diff --unified=3 HEAD^ HEAD -- \
  packages/bun-native-bundler-plugin-api/bundler_plugin.h \
  packages/bun-native-plugin-rs/headers/bun-native-bundler-plugin-api/bundler_plugin.h \
  packages/bun-native-plugin-rs/src/sys.rs \
  src/ast/loader.rs \
  src/jsc/bindings/headers-handwritten.h

Repository: oven-sh/bun

Length of output: 20040


Preserve the native-plugin loader ABI.

HEAD^ assigned BUN_LOADER_TOML = 7 and BUN_LOADER_WASM = 8. The new enum inserts BUN_LOADER_JSONC = 7, so older native plugins select the wrong loaders when Bun consumes their raw uint8_t values.

Keep existing numeric assignments and append new loaders, or add and enforce an ABI version before decoding loader values. Align packages/bun-native-bundler-plugin-api/bundler_plugin.h, packages/bun-native-plugin-rs/headers/bun-native-bundler-plugin-api/bundler_plugin.h, packages/bun-native-plugin-rs/src/sys.rs, and src/jsc/bindings/headers-handwritten.h.

📍 Affects 3 files
  • packages/bun-native-bundler-plugin-api/bundler_plugin.h#L15-L28 (this comment)
  • packages/bun-native-plugin-rs/headers/bun-native-bundler-plugin-api/bundler_plugin.h#L15-L32
  • packages/bun-native-plugin-rs/src/sys.rs#L111-L125
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/bun-native-bundler-plugin-api/bundler_plugin.h` around lines 15 -
28, Preserve the existing native-plugin loader numeric ABI by keeping
BUN_LOADER_TOML and BUN_LOADER_WASM at their prior values and appending
BUN_LOADER_JSONC and later loaders after the existing assignments. Apply the
same enum/value ordering in
packages/bun-native-bundler-plugin-api/bundler_plugin.h (anchor, lines 15-28),
packages/bun-native-plugin-rs/headers/bun-native-bundler-plugin-api/bundler_plugin.h
(lines 15-32), and packages/bun-native-plugin-rs/src/sys.rs (lines 111-125);
keep src/jsc/bindings/headers-handwritten.h aligned as well.

BUN_LOADER_XML = 21,
} BunLoader;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,24 @@ typedef enum {
BUN_LOADER_CSS = 4,
BUN_LOADER_FILE = 5,
BUN_LOADER_JSON = 6,
BUN_LOADER_TOML = 7,
BUN_LOADER_WASM = 8,
BUN_LOADER_NAPI = 9,
BUN_LOADER_BASE64 = 10,
BUN_LOADER_DATAURL = 11,
BUN_LOADER_TEXT = 12,
BUN_LOADER_JSONC = 7,
BUN_LOADER_TOML = 8,
BUN_LOADER_WASM = 9,
BUN_LOADER_NAPI = 10,
BUN_LOADER_BASE64 = 11,
BUN_LOADER_DATAURL = 12,
BUN_LOADER_TEXT = 13,
BUN_LOADER_BUNSH = 14,
BUN_LOADER_SQLITE = 15,
BUN_LOADER_SQLITE_EMBEDDED = 16,
BUN_LOADER_HTML = 17,
BUN_LOADER_YAML = 18,
BUN_LOADER_JSON5 = 19,
BUN_LOADER_MD = 20,
BUN_LOADER_XML = 21,
} BunLoader;

const BunLoader BUN_LOADER_MAX = BUN_LOADER_TEXT;
const BunLoader BUN_LOADER_MAX = BUN_LOADER_XML;

typedef struct BunLogOptions {
size_t __struct_size;
Expand Down
21 changes: 15 additions & 6 deletions packages/bun-native-plugin-rs/src/sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,21 @@ pub enum BunLoader {
BUN_LOADER_CSS = 4,
BUN_LOADER_FILE = 5,
BUN_LOADER_JSON = 6,
BUN_LOADER_TOML = 7,
BUN_LOADER_WASM = 8,
BUN_LOADER_NAPI = 9,
BUN_LOADER_BASE64 = 10,
BUN_LOADER_DATAURL = 11,
BUN_LOADER_TEXT = 12,
BUN_LOADER_JSONC = 7,
BUN_LOADER_TOML = 8,
BUN_LOADER_WASM = 9,
BUN_LOADER_NAPI = 10,
BUN_LOADER_BASE64 = 11,
BUN_LOADER_DATAURL = 12,
BUN_LOADER_TEXT = 13,
BUN_LOADER_BUNSH = 14,
BUN_LOADER_SQLITE = 15,
BUN_LOADER_SQLITE_EMBEDDED = 16,
BUN_LOADER_HTML = 17,
BUN_LOADER_YAML = 18,
BUN_LOADER_JSON5 = 19,
BUN_LOADER_MD = 20,
BUN_LOADER_XML = 21,
}
extern "C" {
pub static BUN_LOADER_MAX: BunLoader;
Expand Down
2 changes: 2 additions & 0 deletions packages/bun-types/bun.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5547,9 +5547,11 @@ declare module "bun" {
| "tsx"
| "json"
| "jsonc"
| "json5"
| "toml"
| "yaml"
| "xml"
| "md"
Comment on lines +5550 to +5554

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 type ImportKind in this file (line 2745) wasn't updated even though $ImportKindIdToLabel now derives all 12 bun_ast::ImportKind labels — onResolve plugins and metafile imports can now surface "composes" and "html_manifest", which the union doesn't include. The new comment at src/ast/lib.rs:79 says to keep this type in sync by hand, and type Loader was updated here, so this looks like an oversight.

Extended reasoning...

What changed

Before this PR, src/codegen/replacements.ts had a hand-written 9-entry ImportKind array feeding $ImportKindIdToLabel. This PR replaces it with rustEnumLabels("../ast/lib.rs", "ImportKind", importKindLabel), which reads all 12 discriminants of bun_ast::ImportKind and looks up each variant's string in ImportKind::label(). The generated $ImportKindIdToLabel array therefore grows from 9 to 12 entries, adding index 7 → "" (AtConditional), index 9 → "composes", and index 10 → "html_manifest" (index 8 → "url-token" was already present but at the wrong index — the PR description calls that out as a fix).

At the same time, the PR rewrote the comment above ImportKind::label() in src/ast/lib.rs to say:

src/codegen/replacements.ts derives the JS builtins' $ImportKindIdToLabel from the discriminants above and label() below; keep ImportKind in packages/bun-types/bun.d.ts in sync by hand.

And the PR did update type Loader in packages/bun-types/bun.d.ts (adding "json5" and "md"), showing the .d.ts file was in scope.

What's stale

packages/bun-types/bun.d.ts:2745 still reads:

type ImportKind =
  | "import-statement"
  | "require-call"
  | "require-resolve"
  | "dynamic-import"
  | "import-rule"
  | "url-token"
  | "internal"
  | "entry-point-run"
  | "entry-point-build";

Missing "composes" and "html_manifest". This type feeds OnResolveArgs.kind (line ~5684) and the metafile imports[].kind field (lines ~3873/3902).

Step-by-step: how the new values reach user code

  1. bun_ast::ImportKind::Composes has discriminant 9 and label() returns b"composes".
  2. replacements.ts rustEnumLabels() iterates pub enum ImportKind { ... Composes = 9, ... }, calls importKindLabel("Composes"), which regexes ImportKind::Composes => b"composes" out of label() and returns "composes".
  3. $ImportKindIdToLabel[9] in the JS builtins is now "composes" (previously undefined — the old array had length 9).
  4. When the bundler resolves a CSS Modules composes: foo from './x.module.css' reference, it creates an import record with ImportKind::Composes and passes the discriminant (9) to runOnResolvePlugins in src/js/builtins/BundlerPlugin.ts:402, which does args.kind = $ImportKindIdToLabel[kindId].
  5. A user's onResolve callback receives args.kind === "composes", but TypeScript's OnResolveArgs['kind'] doesn't include it.

The same holds for ImportKind::HtmlManifest (discriminant 10, label "html_manifest") which is emitted for <link rel="manifest"> in HTML entrypoints. Both also flow into the metafile's imports[].kind field, which is typed as ImportKind.

Why this is same-PR, not pre-existing

Before this PR, ids 9–11 were out of bounds on the 9-element hand-written array, so $ImportKindIdToLabel[9] was undefined — the strings "composes" / "html_manifest" never reached JS. The .d.ts type and the runtime table had the same 9-string set. This PR is what makes them diverge.

Impact & fix

Types-only; no runtime effect. A TypeScript user switching on args.kind won't get exhaustiveness for the new values, and args.kind === "composes" will error under --strict as comparing to a value not in the union. Fix: add | "composes" | "html_manifest" to type ImportKind at bun.d.ts:2745. (The empty-string label for AtConditional is internal and probably shouldn't be added to the public type.)

Anchoring on the type Loader hunk since type ImportKind itself is unmodified in the diff.

| "file"
| "napi"
| "wasm"
Expand Down
4 changes: 3 additions & 1 deletion scripts/build/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,8 @@ function emitJsModules({ n, cfg, sources, o, dirStamp }: Ctx): void {
// ($makeErrorWithCode(N, ...)); without this dep an ErrorCode.ts edit leaves
// stale error numbers in the JS bundles while the C++ enum regenerates.
const errorCodeInput = resolve(cfg.cwd, "src", "jsc", "bindings", "ErrorCode.ts");
// replacements.ts derives the $Loader*/$ImportKind* id tables from these Rust enums.
const rustEnumInputs = [resolve(cfg.cwd, "src", "ast", "loader.rs"), resolve(cfg.cwd, "src", "ast", "lib.rs")];

const outputs = [
resolve(cfg.codegenDir, "WebCoreJSBuiltins.cpp"),
Expand All @@ -733,7 +735,7 @@ function emitJsModules({ n, cfg, sources, o, dirStamp }: Ctx): void {
n.build({
outputs,
rule: "codegen",
inputs: [script, ...sources.js, ...sources.jsCodegen, extraInput, errorCodeInput],
inputs: [script, ...sources.js, ...sources.jsCodegen, extraInput, errorCodeInput, ...rustEnumInputs],
orderOnlyInputs: [dirStamp],
vars: {
cwd: cfg.cwd,
Expand Down
15 changes: 0 additions & 15 deletions src/api/Cargo.toml

This file was deleted.

61 changes: 0 additions & 61 deletions src/api/lib.rs

This file was deleted.

10 changes: 3 additions & 7 deletions src/ast/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,9 @@ pub enum ImportKind {
Internal = 11,
}

// E0015: EnumMap indexing isn't const; the lookup table is folded into match
// arms inside label()/error_label() below — zero runtime init (PORTING.md §Concurrency: prefer no-lock over OnceLock
// when the data is pure const).
//
// If these are changed, make sure to update
// - src/js/builtins/codegen/replacements.ts
// - packages/bun-types/bun.d.ts
// src/codegen/replacements.ts derives the JS builtins' `$ImportKindIdToLabel`
// from the discriminants above and `label()` below; keep `ImportKind` in
// packages/bun-types/bun.d.ts in sync by hand.

impl ImportKind {
#[inline]
Expand Down
24 changes: 13 additions & 11 deletions src/ast/loader.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
//! `Loader` + `SideEffects`.
//!
//! Data-only enum + pure predicates. `to_api()` / `from_api()` / `API_NAMES`
//! live in `bun_options_types::LoaderExt` (would back-edge into the schema
//! crate). `to_mime_type` / `from_mime_type` live in `bun_http_types` (would
//! back-edge into `bun_http::MimeType`).
//! Data-only enum + pure predicates. `to_mime_type` / `from_mime_type` live in
//! `bun_http_types` (would back-edge into `bun_http::MimeType`).

use enum_map::Enum;

/// The max integer value in this enum can only be appended to.
/// It has dependencies in several places:
/// - bun-native-bundler-plugin-api/bundler_plugin.h
/// - src/jsc/bindings/headers-handwritten.h
/// The discriminants are the one loader numbering used everywhere a loader
/// crosses a language boundary; values can only be appended. Kept in sync
/// (see test/internal/source-lints/loader-numbering.test.ts) with:
/// - packages/bun-native-bundler-plugin-api/bundler_plugin.h (`BUN_LOADER_*`, public)
/// - packages/bun-native-plugin-rs/src/sys.rs (`BunLoader`)
/// - src/jsc/bindings/headers-handwritten.h (`BunLoaderType*`)
/// - `$LoaderLabelToId` / `$LoaderIdToLabel` in the JS builtins, which
/// src/codegen/replacements.ts derives from this file.
#[repr(u8)]
#[derive(
Copy,
Expand All @@ -23,6 +25,7 @@ use enum_map::Enum;
Enum,
strum::IntoStaticStr,
strum::VariantNames,
strum::FromRepr,
)]
// The lower_snake names are exposed to JS (HTMLImportManifest
// `"loader":`, BuildArtifact.loader) so the strum serialization must match exactly.
Expand Down Expand Up @@ -55,9 +58,7 @@ pub enum Loader {

// Crosses FFI as `uint8_t default_loader` / `uint8_t loader` in
// `OnBeforeParseArguments` / `OnBeforeParseResult` (`bundler_plugin.h`); lock
// the discriminant width and the values native plugins observe. NB: the C
// header's `BUN_LOADER_TOML = 7` etc. predate `Jsonc`'s insertion at 7 and are
// known-stale — this enum is the source of truth.
// the discriminant width and the values native plugins observe.
bun_core::assert_ffi_discr!(
Loader, u8;
Jsx = 0, Js = 1, Ts = 2, Tsx = 3, Css = 4, File = 5, Json = 6,
Expand Down Expand Up @@ -95,6 +96,7 @@ bun_core::comptime_string_map! {
b"txt" => Loader::Text,
b"text" => Loader::Text,
b"sh" => Loader::Bunsh,
b"bunsh" => Loader::Bunsh,
b"sqlite" => Loader::Sqlite,
b"sqlite_embedded" => Loader::SqliteEmbedded,
b"html" => Loader::Html,
Expand Down
6 changes: 2 additions & 4 deletions src/ast/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
// REFACTOR_BUN_AST: this module holds only the data-shaped runtime pieces
// that the AST crate (and `bun_js_printer::Options`) need:
// `Runtime::source_code`, `Imports`, `ReplaceableExport*`, `ServerComponentsMode`.
// The `Features` struct (carries `&mut RuntimeTranspilerCache`) and
// `Fallback` HTML rendering (needs `bun_options_types::schema`, `bun_io`,
// `bun_base64`) live in `bun_js_parser::parser::Runtime` to avoid the
// `bun_options_types → bun_ast → bun_options_types` cycle.
// The `Features` struct (carries `&mut RuntimeTranspilerCache`) lives in
// `bun_js_parser::parser::Runtime`.

use bun_collections::StringArrayHashMap;

Expand Down
4 changes: 0 additions & 4 deletions src/ast/target.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
//! Bundle target platform.
//!
//! Data-only enum + pure predicates. `to_api()` / `from(api::Target)` live in
//! `bun_options_types::TargetExt` (would back-edge into the schema crate).

use enum_map::Enum;

Expand Down Expand Up @@ -34,7 +31,6 @@ impl Target {
pub const MAP: __ComptimeStringMap_TARGET_MAP = __ComptimeStringMap_TARGET_MAP(());

// `from_js` lives in bundler_jsc as an extension trait — see PORTING.md.
// `to_api`/`from(api)` live in `bun_options_types::TargetExt`.

#[inline]
pub fn is_server_side(self) -> bool {
Expand Down
Loading