chore: drop bunfig keys Bun ignores and fix broken npm scripts - #91
Merged
Conversation
Bun does not warn about unknown bunfig keys, so several plausible-looking
options had read as working configuration for a long time. Each removal below
was verified, not assumed:
[build] Set minify/sourcemap, then ran `bun build` with no CLI
flags: no .js.map was emitted and the output kept its
original identifiers. Not a bunfig section at all.
[test] timeout Set timeout=100 and ran a 300ms test: it passed.
[test] bail Set bail=true with a failing first file: the second file
still ran.
[install] frozen The real key is `frozenLockfile`.
[install] auto Real key, but it takes "auto"|"force"|"disable"|
"fallback", not a boolean — and it governs runtime
auto-install of missing packages, not peer deps as the
comment claimed.
[install] parallel No such option.
[install.scopes] Both scopes pointed at the default registry.
`registry` is kept even though it matches the default: stating it explicitly
stops a user-level .npmrc or bunfig from silently redirecting installs for this
project. The file header now records what was removed and why, so the same
keys don't get re-added.
Three npm scripts were broken and errored on every run: `bun --shell '<cmd>'`
misuses --shell, which takes "bun" or "system", not a command. Scripts already
run under Bun's shell via [run] shell, so the wrapper was only ever wrong.
`bun run clean` now actually deletes its targets.
dev:extension needed more than the syntax fix. Without `--mode development`,
Vite defaults to production, setupDevEnvironment() is never registered (it is
gated on !isProduction) and output lands in dist/ — making the script identical
to `bun run build` despite its name. With the flag it produces dev/, which is
what .gitignore's `dev/*` expects. No regression risk: the script never ran at
all before.
Also dropped ./tests/example.test.ts from the four test scripts; that file does
not exist and Bun was silently ignoring it.
Verified: build succeeds, 495 unit pass, svelte-check 4053 files 0 errors,
biome clean (2 pre-existing warnings), 54 e2e pass in real Chrome, and
`bun run clean` / `dev:extension` confirmed working by direct execution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cleanup of tooling config that does not do what it says.
bunfig.toml — keys Bun silently ignores
Bun does not warn about unknown bunfig keys, so these had read as working configuration for a long time. Each removal was verified, not assumed:
[build](whole section)minify/sourcemap, ranbun buildwith no CLI flags → no.js.map, output kept original identifiers. Not a bunfig section at all.[test] timeout = 5000timeout = 100, ran a 300ms test → passed.[test] bail = falsebail = truewith a failing first file → second file still ran.[install] frozenfrozenLockfile.[install] auto = true"auto"|"force"|"disable"|"fallback"— not a boolean. It also governs runtime auto-install of missing packages, not "peer dependencies" as the comment claimed.[install] parallel[install.scopes]registryis kept despite matching the default: stating it explicitly stops a user-level.npmrcor bunfig from silently redirecting installs for this project.The file header now records what was removed and why, so the same keys don't get re-added.
Three npm scripts were broken
bun --shell '<command>'misuses--shell, which takesbunorsystem, not a command.clean,clean:allanddev:extensionerrored on every invocation:Confirmed pre-existing (same failure with this branch's bunfig change stashed). Scripts already run under Bun's shell via
[run] shell, so the wrapper was only ever wrong.bun run cleannow actually deletes its targets.One judgement call worth reviewing
dev:extensionneeded more than the syntax fix. Without--mode development, Vite defaults to production,setupDevEnvironment()is never registered (it's gated on!isProduction), and output lands indist/— making the script identical tobun run builddespite its name. With the flag it producesdev/, which is what.gitignore'sdev/*expects.No regression risk, since the script never ran at all before — but this is a behaviour choice rather than a mechanical fix, so it's the bit to push back on if you disagree.
Also dropped
./tests/example.test.tsfrom the four test scripts; that file doesn't exist and Bun was silently ignoring it.Verification
svelte-check4053 files, 0 errors;biome ciclean (2 pre-existing warnings)bun run cleananddev:extensionconfirmed working by direct executionAn earlier local e2e run on this branch showed 2
beforeAllChrome-launch timeouts; that was machine load average 49, and the suite passes 54/54 once load dropped.