Skip to content

chore: update sql-parser and sqlint dependencies (peggy 5, ajv 8, js-yaml 4) - #260

Merged
joe-re merged 2 commits into
releasefrom
chore/update-parser-sqlint-deps
Sep 25, 2026
Merged

joe-re merged 2 commits into
releasefrom
chore/update-parser-sqlint-deps

Conversation

@joe-re

@joe-re joe-re commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Summary

Phase 3 of the maintenance plan: update the dependencies of @joe-re/sql-parser and sqlint.

sql-parser

  • peggy 3 -> 5, moved to devDependencies (only used to generate base/*.js)
  • Regenerated base/parser.js and base/fromClauseParser.js. The committed files were confirmed to be identical to a fresh peggy 3 build, so the diff is purely the generator change. fromClauseParser.js shrinks because peggy 5 no longer emits rules unreachable from the allowed start rule.
  • Errors are still named SyntaxError with the same expected / location shape, which createDiagnostics and completion rely on

sqlint

  • ajv 6 -> 8, js-yaml 3 -> 4 (safeLoad -> load)
  • chalk -> node:util styleText (one less dependency)
  • Bug fix: config validation errors printed the value of a key literally named invalidProp (only matched the test fixture) and undefined for other error kinds. They now print the unexpected property name / ajv message.
  • yargs stays on 17: 18 is ESM-only and removes the singleton API used by bin/cli.js
  • js-yaml stays on 4: 5 is a recent rewrite with behavior changes (throws on empty input, YAML 1.2 core schema)

Packaging

  • engines.node: "^22.13.0 || >=24" on the root and published packages (styleText is stable from 22.13 / 23.5)
  • Added a major changeset for the three published packages

Test plan

  • build / lint / typecheck / vsc-compile / all tests on Node 22 (server 119 passed, parser 68, sqlint 36)
  • sqlint --stdin with a YAML config applies the configured rules
  • invalid config reports Unexpected property "rulez"
  • stylish output is colored with FORCE_COLOR=1

peggy is only needed to generate base/*.js at build time. The generated
parsers keep throwing errors named 'SyntaxError' with the same expected /
location shape, which the server relies on.
- ajv 6 -> 8: remove options that no longer exist (schemaId, missingRefs)
- js-yaml 3 -> 4: safeLoad was removed; load is safe by default
- Replace chalk with node:util styleText
- Report the unexpected property name in config validation errors. It used
  to read error.data.invalidProp, which only matched the test fixture, and
  printed "undefined" for other kinds of errors
- Declare engines.node (^22.13.0 || >=24) on published packages
@joe-re
joe-re merged commit 9f1bd1e into release Sep 25, 2026
2 checks passed
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.

1 participant