Repository navigation
chore: modernize toolchain (pnpm, TypeScript 6, Vitest, ESLint 9) - #259
Merged
Merged
Conversation
- Replace yarn workspaces / lerna with pnpm workspaces (Node >= 22) - Use workspace: protocol for internal dependencies - Declare dependencies that were only resolvable through yarn hoisting - Rename prepublish hooks to prepublishOnly so dist is built on publish - Manage releases of sql-parser / sqlint / server with changesets (fixed group) - Bump @types/node to 22 and esbuild to 0.28 - Pin pg / pg-protocol to previously locked versions until TypeScript is upgraded - Update CI to actions v4 with Node 22/24 matrix, and Docker image to node:22
- Run tests with Vitest 5 (globals mode) instead of jest 26 / ts-jest - Remove jest from sql-language-server runtime dependencies - Fix FOREIGN KEY ON option cases in sql-parser tests that ran as describe bodies without it(), so they were never reported as tests - Upgrade TypeScript to 6.0 and @types/node to 22.x - Replace deprecated baseUrl / moduleResolution=node with node16 resolution and target ES2022 - Declare types: ["node"] explicitly since TypeScript 6 no longer loads all @types packages by default - Type-check tests with tsc (pnpm typecheck), which ts-jest used to do - Require Node >= 22.13 (needed by Vitest 5 and unflagged node:sqlite)
- Replace .eslintrc.js / .eslintignore with eslint.config.mjs - typescript-eslint 5 -> 8, eslint-plugin-node -> eslint-plugin-n - Prettier 2 -> 3, keeping trailingComma "es5" to avoid reformatting - Disable n/no-missing-import for TypeScript files; tsc already reports unresolved imports and the plugin cannot resolve directory imports - Rename no-var-requires disable comments to no-require-imports
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.
Summary
First step of modernizing the toolchain (phases 1–2 of the maintenance plan). No runtime behavior change is intended.
Package manager / release
pnpm-workspace.yaml,packageManager: pnpm@11)workspace:^protocol (rewritten to^x.y.zon publish — verified withpnpm pack)log4jsin sqlint,vscode-languageserver-types/vscode-jsonrpcin server, etc.)prepublish→prepublishOnlysodistis actually built on publish@joe-re/sql-parser/sqlint/sql-language-serverin one fixed groupTooling
.nvmrc,engines)pnpm typecheckmoduleResolution: node16, target ES2022trailingComma: es5kept to avoid reformatting)@types/node14 → 22releaseand on pull requestsFixes found along the way
FOREIGN KEY ... ON DELETE/UPDATEcases in sql-parser tests weredescribeblocks withoutit, so they never counted as tests. They are now real tests (parser: 58 → 68 tests).Temporary pins (to be removed when DB drivers are upgraded)
pg ~8.10.0,@types/pg ~8.6.6, and apg-protocol ~1.6.0overrideTest plan
pnpm npm:prepublish,lint,typecheck,vsc-compile:client,vsc-compile:server, all tests on Node 22 and Node 24initializeover stdio responds with both the esbuild CLI bundle andnpm_bin/cli.jssqlint --stdinreports lint errors as beforevsceis not verified yet under pnpm; do not publish the extension until the sqlite3 →node:sqlitemigration lands