Skip to content

chore: bump vitest from 4.1.11 to 5.0.5 - #84

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/vitest-5.0.5
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/vitest-5.0.5

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Bumps vitest from 4.1.11 to 5.0.5.

Release notes

Sourced from vitest's releases.

v5.0.5

   🐞 Bug Fixes

    View changes on GitHub

v5.0.4

   🚀 Features

   🐞 Bug Fixes

... (truncated)

Commits

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Oct 19, 2026
@claude

claude Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Claude finished @dependabot[bot]'s task in 1m 40s —— View job


Dependency review — vitest 4.1.11 → 5.0.5

  • Identify the change and whether it crosses a major
  • Check release notes / semver for breaking changes affecting this repo
  • Check how vitest is actually used here (config + test APIs)
  • Re-check the Node-floor finding from the previous review
  • Read CI results

Verdict: safe to merge. The one blocking concern from the previous review is now resolved by the rebase, and CI is green on both matrix legs.


What changed

Major bump, dev-only. package.json moves vitest ^4.1.10 → ^5.0.5; the rest is the lockfile (vite 8.3.4 peer, chai 6, @vitest/mocker/spy 5.0.5, rolldown + lightningcss native bindings).

Node floor — previously flagged, now resolved

vitest 5.0.5 declares engines.node: "^22.12.0 || ^24.0.0 || >=26.0.0" (package-lock.json:2708); 4.x accepted ^20 || ^22 || >=24. My earlier comment on this PR flagged that a contributor on Node 22.0–22.11 would hit EBADENGINE, and that CI's node-version: '22' would never catch it.

That's been fixed on main by #47, and this branch sits directly on top of it:

  • .nvmrc → 22.12
  • ci.yml matrix → ['22.12', '24'], update-catalog.yml → 22.12
  • engines.node stays >=22 (the consumer floor — correct, nothing under devDependencies ships given files: ["dist"])
  • @types/node → ^22.12.0, which satisfies vitest 5's optional peer ^22.0.0 || >=24.0.0

The dev floor is now exactly vitest 5's minimum — zero slack. Worth knowing for the next bump: a vitest minor that raises to e.g. ^22.13 would need .nvmrc, both workflows and CONTRIBUTING.md moved together (CLAUDE.md already lists the set).

Usage check — nothing to migrate

  • No vitest config file at all (no vitest.config.*, no vite.config.*, no test key in package.json). Zero-config means none of vitest 5's config-shape changes — projects, results cache shape, fsModuleCache default, root resolution — can bite here.
  • Only stable APIs in test/: describe/it/expect/beforeEach/afterEach/beforeAll, vi.fn (28×), vi.spyOn, vi.stubGlobal, it.each, expect.objectContaining/stringContaining/anything. No vi.mock, no snapshots, no browser mode, no coverage — which is where most of the 5.0 churn landed.
  • chai 6 comes in transitively, but assertions here go through vitest's expect, not a direct chai import.
  • Vite 8 / rolldown pulls native bindings; the lockfile carries all platform variants (darwin arm64/x64, linux gnu/musl, win32), so npm ci still works off-Linux.

CI

test (node 22.12)  pass  34s   Test Files 11 passed (11)
test (node 24)     pass  24s

Both legs green on cabef1d, including the .mcpb smoke test. No EBADENGINE or deprecation warnings in the 22.12 log — the dev floor genuinely installs clean.

Follow-up checks

Nothing blocking. One thing to keep an eye on: this repo now has two packages gating the dev floor at 22.12 (vitest 5 and Vite 8). If either raises it again, the floor moves as a set — don't let engines.node drift up with it, since that's the published-consumer contract.
· branch dependabot/npm_and_yarn/vitest-5.0.5

Comment thread package.json
"tsx": "^4.19.0",
"typescript": "^5.7.0",
"vitest": "^4.1.10"
"vitest": "^5.0.5"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

vitest 5 narrows its supported runtimes to ^22.12.0 || ^24.0.0 || >=26.0.0 (4.x accepted ^20 || ^22 || >=24). This repo declares engines.node: ">=22", so a contributor on Node 22.0–22.11 now gets EBADENGINE on install and can't run npm test.

CI won't catch it: node-version: '22' in ci.yml resolves to the newest 22.x (this run used v22.23.3), never the bottom of the declared range.

Since vitest is dev-only and files: ["dist"] ships no test code, the runtime floor for consumers is unaffected — so this is a contributor-experience gap, not a published-package break. Worth a deliberate decision rather than a silent drift.

Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 4.1.11 to 5.0.5.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v5.0.5/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-version: 5.0.5
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/vitest-5.0.5 branch from 34c0d65 to cabef1d Compare October 22, 2026 12:31
dangrondahl added a commit that referenced this pull request Oct 22, 2026
…pendabot (#87)

Gives more confidence before the next release by adding checks for
things that so far were only tested by unit tests, or not at all. The
new checks immediately turned up two bugs that were already on `main`,
and both are fixed here: a mistyped test, and a `.mcpb` bundle that
doesn't start on Node 22.0–22.6.

## Fix: the `.mcpb` bundle didn't start on Node 22.0–22.6

`pack-mcpb.sh` deleted `package.json` from the bundle, so nothing
declared `dist/` as ESM. Node 22.7+ detects ESM from the syntax and
prints a warning. Earlier versions parse the file as CommonJS and fail
with `Cannot use import statement outside a module`. Both `engines` and
`manifest.json` allow those versions.

The bundle now ships a one-line `package.json` with `{ "type": "module"
}`, and nothing from the repo's own `package.json`. I reproduced the
failure on the official Node 22.6.0 binary, and confirmed the fixed
bundle starts on 22.0.0, 22.6.0 and 22.7.0.

## Type-check tests and scripts

`tsconfig.json` is `src`-only because it emits `dist/`, and vitest
strips types without checking them. So a type error in `test/` or
`scripts/` never failed anything. One had already slipped through: the
fetch mock in `test/client/kosli-client.test.ts` was typed
`ReturnType<typeof vi.fn>`, which doesn't match `KosliClient`'s
`fetchFn`. That is fixed here.

`tsconfig.test.json` and `npm run typecheck` cover the TypeScript in
`src`, `test` and `scripts`. `scripts/sync-version.mjs` is plain JS and
isn't covered. CI runs the typecheck after the build.

## Stdio smoke test

`scripts/smoke.ts` (`npm run smoke`) starts a built server over real
stdio and checks three things:

- the version it advertises matches `package.json`
- it lists exactly the three tools
- the tools carry the right safety hints: `execute_write_action` is
marked `destructiveHint` and not read-only, and `execute_read_action`
and `search_actions` are marked `readOnlyHint`. These hints are what
make an MCP client ask before a write, and no other test checks them.
- `search_actions` finds `list_environments`

A failed tool call reports the server's own error message rather than a
JSON parse error.

This covers what `test/server.test.ts` can't, because that test runs in
memory: whether the bin starts, whether the JSON imports load, and
whether a bundle's `node_modules` resolve.

The test is offline by default. It does one live read only when
`KOSLI_API_TOKEN` and `KOSLI_SMOKE_ORG` are both set, and CI never sets
them, so it's fork-safe.

CI now runs:

1. build
2. **typecheck**
3. test
4. **smoke `dist/`**
5. pack
6. **unzip the `.mcpb`, run `mcpb validate` on its manifest, and
smoke-test it**
7. **on the leg that sets `consumer-floor` in the matrix: switch to
exactly Node 22.0.0 and smoke-test the bundle again**

There's also a **negative check**: the smoke test must fail against a
missing entry point. That way a later refactor can't turn the smoke
steps into checks that always pass.

Some notes on those steps:

- Validating the bundled manifest, not the repo's copy, matters: the
repo's `manifest.json` holds a placeholder version, and the real one is
only injected at pack time.
- The 22.0.0 step exists because the matrix floor is the *dev* floor
(vitest needs a newer 22.x, see #47), so nothing tested the version
users are promised. The smoke test doesn't need vitest, so it can run
there. I rehearsed it locally on the real 22.0.0 binary: it fails on the
old bundle and passes on the fixed one.
- `@anthropic-ai/mcpb` is now a devDependency rather than an `npx` pin,
so Dependabot keeps it up to date. It adds 49 dev-only packages. None of
them ship (`files: ["dist"]`), and the server's own `zod` is unchanged
at 4.3.6.

## Release workflow: publish only after every check

`release.yml` used to run only build and test, then `npm publish`, and
only then build the bundle. So a failed pack could leave a version on
npm with no GitHub Release. It now runs the same checks as CI:

1. build, typecheck, test
2. smoke `dist/`
3. pack, `mcpb validate`, smoke the bundle
4. only then `npm publish` and the GitHub Release

`npm publish` can't be undone, so it stays last. This also checks the
bundle under the `npm@latest` that the release job installs, which CI
never uses.

Both jobs now have a `timeout-minutes` (15 for CI, 20 for release)
instead of the 6-hour default.

## Dependabot grouping and cooldown

- **Actions:** all SHA bumps go in one group. They edit the same lines,
so as separate PRs they conflict (#80 and #82 do today).
- **npm dev dependencies:** minor and patch bumps are grouped.
- **`@modelcontextprotocol/sdk`:** its minor and patch bumps get their
own group, because it's the only runtime dependency.
- **Majors** stay one PR each.
- **Cooldown:** new releases wait 7 days before being proposed. Security
updates aren't affected.

## Docs

`CONTRIBUTING.md` gets a "Testing locally" section covering typecheck,
smoke (offline and live), MCP Inspector, Claude Code against a checkout,
and installing the `.mcpb`. `README.md` and `CLAUDE.md` are updated to
match.

## Verification

On Node 24 locally:

- `build`, `typecheck` and `npm test` (110 tests) pass.
- The smoke test passes against `dist/` and against the unzipped bundle.
- The smoke test exits 1 when the server fails to start.
- `mcpb validate` passes on the bundled manifest, which carries version
`0.5.0`.
- The live-API smoke test passed against a real org (with SDK 1.30.1).
- The bundle smoke test passes on Node 22.0.0, 22.6.0 and 22.7.0.

Not run locally: the Node 22 matrix leg, which CI covers.

Not run: `release.yml` itself, which only runs on a tag. Its new steps
are the same commands CI runs.

After merge, check the next Dependabot run is still green. `cooldown`
support varies by ecosystem, and an unsupported key invalidates the
whole config, not just that block.

## Merge order for the open PRs

Suggested order once this lands: #47, then this PR, then #80 → #82 → #83
→ #74 → #79 → #84 → #45. Before #79 (SDK), rerun the live smoke test on
its branch. #47 conflicts with this PR on the matrix line: when
resolving, change the `include:` entry to `node-version: '22.12'` as
well. Merge #45 (TypeScript 7) last, after diffing `dist/` output
against 5.9.
@dependabot @github

dependabot Bot commented on behalf of github Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #93.

@dependabot dependabot Bot closed this Oct 22, 2026
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/vitest-5.0.5 branch October 22, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants