Skip to content

chore: upgrade dependencies, restore the docs typecheck - #301

Merged
paustint merged 2 commits into
mainfrom
chore/dependency-upgrades
Sep 26, 2026
Merged

paustint merged 2 commits into
mainfrom
chore/dependency-upgrades

Conversation

@paustint

Copy link
Copy Markdown
Collaborator

Dependency upgrade for the library and the docs site. No changes to the published library: no src/, cli/ or bin/ files changed, and esbuild and TypeScript stay at the same versions, so the build output is the same.

Two commits:

Commit What
chore: upgrade dependencies Every package npm outdated reported, plus refreshed transitive deps in both lockfiles
fix(docs): restore the docs typecheck under TypeScript 7 npm run typecheck in docs/ had been failing since the TS 7 upgrade

Upgrades

Library: vitest and @vitest/coverage-v8 4.1 → 5.0, oxfmt 0.63 → 0.70, oxlint 1.78 → 1.85, @types/node 25 → 26, plus the latest release-it, @release-it/keep-a-changelog and tsx.

Docs: React and @types/react 19.3, docusaurus-plugin-llms 0.5 → 0.6, and @jetstreamapp/soql-parser-js 8.0.0 → 8.1.0 (the lockfile was behind package.json).

Highlights

Vitest 5 needed no changes. I checked the tests against the migration guide's breaking changes (hoisted vi.mock, toThrow(''), un-awaited .resolves/.rejects, clearMocks defaulting on, benchmark API). None of them are used.

oxlint 1.85 adds import(no-named-as-default). Four test files default-imported testCases from modules that also export it by name. They now use the named import, as lexer.spec.ts and copy-test-cases-to-docs.ts already did. oxfmt 0.70 made no formatting changes.

Lockfiles moved from v2 to v3. That's why the diff shows about 16k deleted lines: v2 kept a duplicate legacy dependencies block. The docs package count actually went up slightly (1355 → 1371). npm update also brought transitive deps up to date, which takes the docs site's npm audit count from 33 to 24; the library is still at 0. The remaining 24 come from versions that Docusaurus and docusaurus-plugin-llms pin themselves, and npm's suggested fix is to downgrade to Docusaurus 3.5.2.

llms-full.txt changed shape. plugin-llms 0.6 now nests each page's headings under that page's title (e.g. ## API › ### Core › #### ParseQuery); before, they sat at the same level as the title. The CSP _headers output is unchanged.

The docs typecheck had been failing without anyone noticing. TypeScript 7 removed baseUrl, but @docusaurus/tsconfig still sets it, so tsc stopped at TS5102 before checking any source. docs/tsconfig.json now clears it and redeclares paths for @site/*. That exposed 11 errors: React 19's removal of the global JSX namespace (so components now return React.JSX.Element), and two strictness errors in the playground's ParsedOutput. CI doesn't run the docs typecheck, which is why it went unnoticed. I didn't add a CI step because ci.yml is shared verbatim with sf-formula-parser.

Worth a look

  • @types/node 26 on a Node 24 CI. The types include APIs the runtime doesn't have. The same mismatch already existed with 25; pin to ^24 if you'd rather have exact types.
  • Install-script warnings in docs. npm says @swc/core and core-js have install scripts not listed in allowScripts. This predates the PR (the older versions warned too), and the build works without those scripts.

Verification

  • Library: format:check, lint, typecheck and build pass, all 2361 tests pass, and the CLI smoke test works.
  • Docs: typecheck and build pass.
  • Changelog: release:increment classifies [Unreleased] as a patch.

Library: vitest and @vitest/coverage-v8 5, oxfmt 0.70, oxlint 1.85,
@types/node 26, and the latest release-it, @release-it/keep-a-changelog
and tsx. Docs: React 19.3, @types/react 19.3, docusaurus-plugin-llms 0.6
and soql-parser-js 8.1.0.

oxlint 1.85 adds import(no-named-as-default), so four test files now
import testCases by name, as the rest of the tests already did.

Both lockfiles move to lockfile v3 with refreshed transitive
dependencies, clearing 9 of the docs site's npm audit findings.
TypeScript 7 removed baseUrl, which @docusaurus/tsconfig still sets, so
`npm run typecheck` in docs/ stopped at TS5102 before reaching the
source. Clear it in docs/tsconfig.json and redeclare `paths` so @site/*
resolves from docs/ rather than from the base config's directory.

That exposed the errors it had been hiding. React 19 removed the global
JSX namespace, so components return React.JSX.Element. The playground's
ParsedOutput narrows the caught error before reading .message, and
renders its output on `code`, which is non-null exactly when the old
`parsedQuery || invalidMessage` condition held.
Copilot AI lite review requested due to automatic review settings September 26, 2026 18:00
@socket-security

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Add the docs typecheck to CI so this regression is detected automatically.

Review effort: Lite
Findings: None

What changed in this PR

Updates library and docs dependencies, refreshes lockfiles, and restores docs TypeScript 7 typechecking without changing published library source.

Changes:

  • Upgraded tooling, React, and docs dependencies.
  • Updated test imports for oxlint compatibility.
  • Fixed docs TypeScript configuration and React JSX typings.
File Description
test/​test.spec.ts Uses the named testCases import.
test/​test-partial-query.spec.ts Uses the named testCases import.
test/​performance-test.spec.ts Uses the named testCases import.
test/​format-roundtrip.spec.ts Uses the named testCases import.
package.json Upgrades library tooling dependencies.
docs/​tsconfig.json Restores TypeScript 7 path resolution.
docs/​src/​pages/​index.tsx Updates React JSX typing.
docs/​src/​components/​Tabs/​index.tsx Updates React JSX typing.
docs/​src/​components/​SoqlList/​index.tsx Updates React JSX typing.
docs/​src/​components/​ParseQueries/​SoqlInput/​index.tsx Updates React JSX typing.
docs/​src/​components/​ParseQueries/​ParsedOutput/​index.tsx Updates JSX types and error handling.
docs/​src/​components/​HomepageFeatures/​index.tsx Updates React JSX typing.
docs/​src/​components/​ComposeQueries/​QueryInput/​index.tsx Updates React JSX typing.
docs/​src/​components/​ComposeQueries/​ParsedOutput/​index.tsx Updates React JSX typing.
docs/​package.json Upgrades docs dependencies.
CHANGELOG.md Documents dependency and typecheck changes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@paustint
paustint merged commit 50d8115 into main Sep 26, 2026
10 checks passed
@paustint
paustint deleted the chore/dependency-upgrades branch September 26, 2026 18:14
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.

2 participants