Skip to content

chore: migration to @bomb.sh/tools - #604

Open
mixto wants to merge 7 commits into
bombshell-dev:mainfrom
mixto:bsh
Open

mixto wants to merge 7 commits into
bombshell-dev:mainfrom
mixto:bsh

Conversation

@mixto

@mixto mixto commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Migration to the organisation’s tooling using @bomb.sh/tools. This pull request updates the repository in relation to this #506 other one, which is very out of date.

  • I have used the tsconfig.json configuration from the tools repository. I have left the compiler options that were not defined in the tools configuration.

  • The deps script uses knip to check dependencies. The bsh lint command in the tools already uses knip when run. As the script is also used in workflows, it should be left as it is. I use pnpm dlx to call the knip binary directly.

@changeset-bot

changeset-bot Bot commented Sep 12, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 168c1c5

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

@socket-security

socket-security Bot commented Sep 12, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedvitest-ansi-serializer@​0.1.2 ⏵ 0.3.174 +510086 +187 +7100
Added@​bomb.sh/​tools@​0.6.1751007699100
Updatedvitest@​3.2.4 ⏵ 5.0.098 +1100 +7579 +198 -1100

View full report

@pkg-pr-new

pkg-pr-new Bot commented Sep 12, 2026

Copy link
Copy Markdown

commit: 168c1c5

@mixto
mixto marked this pull request as ready for review September 13, 2026 18:03
Comment thread package.json
"types": "tsc --noEmit",
"deps": "pnpm exec knip --production",
"test": "pnpm --color -r run test",
"deps": "pnpm dlx knip --production",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

bsh lint already runs knip afaiu. double check but we may be able to remove this script entirely

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There is a workflow that explicitly uses the deps script. It can be removed! Running bsh lint instead at the workflow won't pass due to oxc. A whole host of errors and warnings are being triggered.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

agree it can't be bsh lint yet, it exits 1 here with 59 errors, and its knip findings are warnings that never fail the run, without --production either. but pnpm dlx pulls knip outside the lockfile on every ci run, so the gate's version floats. could we keep knip as pinned devDep and leave the script as pnpm exec kinp --production?

@dreyfus92 dreyfus92 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks for picking this up @mixto! i went a bit ham and down the rabbit hole with this one and there are a couple of loose ends we need to figure out, this will remain blocked until we figure out how to address all the stuff we need before making the shift.

the big one is that the test job is green but the suite is failing. the run on this pr reports 1698 failed | 796 passed and still exits 0, because bsh test never passes vitest's exit code thru. we need to fix this in tools, otherwise nothing catches a broken test once it lands.

once the exit code is honest there are real failures. 17 of the 19 prompt suites fail because the serialaizer bsh uses writes <cyan> style tags where our snopshots have raw escapes. bsh test -u fixes all of them and it's notation only.

the root bsh tes also runs everything 3 to 5 times, since the tools config excludes node_modules/** for some reason instead of **/node_modules/** and vitest walks into examples/*/node_modules/@clack/*. even with that excluded path.test.ts fails from rooth because vi.mock('node:fs') looks for __mocks__ relative to the vitest root. maybe we could keep pnpm -r run test like main had? with regenerated snapshots that passes both packages, though it still needs the tools fix to actually fail on failures.

cc. @43081j

Comment thread package.json
"dev": "pnpm --filter @example/changesets run start",
"format": "biome check --write",
"lint": "biome lint --write --unsafe",
"format": "bsh format",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

heads up that once this merges the format workflow runs bsh format on main and auto-commits the result. bsh format --check flags 67 files here, including src, tests, the workflow yaml and CONTRIBUTING.md. the ignorePatterns in tools' oxfmt config resolve relative to that config's own folder, so they don't cover our md/yml/json. could we run it in this pr so the reformat gets reviewed?

},
"scripts": {
"build": "unbuild",
"build": "bsh build",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

building prompts writes 38 untracked .d.ts and .d.ts.map files into packages/core/src, and since pretest builds, every pnpm test leaves them behind. the dts step picks up packages/prompts/tsconfig.json as its root, and the root paths alias pulls core's sources in from outside it, so their declarations land next to them. dropping packages/prompts/tsconfig.json so it falls back to the root one builds with no stray files. could we try that here?

Comment thread tsconfig.json
"noUnusedParameters": true,
"noUnusedLocals": true,
"noUncheckedIndexedAccess": true,
"lib": ["ES2022"],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the tools config brings lib up to es2024, but our engines is >= 20.12.0. i checked, Promise.withResolvers and Object.groupBy typecheck with this config and neither exists on node 20. could we keep "lib": ["ES2022"] in our override?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants