fix: pre-release 1.6 code polish (L1, L3, N1, N2, N7) #321

Merged
abiwab merged 4 commits from fix/pre-release-1.6-polish into dev/1.6 2026-11-29 21:09:44 +01:00
Owner

Summary

Code polish from the pre-release audit 1.6, all on features new in 1.6 (one commit per finding):

  • L1: gram check --fix on a file it cannot write (read-only) keeps the diagnostics of the file as it stands, counts 0 fixes and says why on stderr (Could not write the fixes to ro.gram: permission denied), in text and JSON, with exit code 1. Test skipped under root and Windows.
  • L3: @use path completion now goes through resolveProjectDir(), a new export of @gram-lang/modules/node sharing confine() with resolveProjectPath(): nothing listed outside the project, for an undeclared alias, or for a path with a backslash or a null byte. Changeset modules-node-path completed.
  • N1 + N2 (same file, one commit): the unused /render route of the preview server is gone (its tests read the first update of /events); the Print button is hidden on a view with no print layout, tab by tab (data-print). The /print 400 guard stays.
  • N7: engines: { node: ">=22" } in @gram-lang/language-server, a sub-bullet in lsp-universal.

Type of change

  • Bug fix (non-breaking change fixing an issue)

Quality checklist

  • Code formatted with Biome (bun run lint:fix)
  • TypeScript types validated (bun run typecheck)
  • Package tests passing (bun test)
  • If changing a published package, a changeset is included (bun run change)
  • Rebuilt packages before testing downstream packages (bun run build)
## Summary Code polish from the pre-release audit 1.6, all on features new in 1.6 (one commit per finding): - **L1**: `gram check --fix` on a file it cannot write (read-only) keeps the diagnostics of the file as it stands, counts 0 fixes and says why on stderr (`Could not write the fixes to ro.gram: permission denied`), in text and JSON, with exit code 1. Test skipped under root and Windows. - **L3**: `@use` path completion now goes through `resolveProjectDir()`, a new export of `@gram-lang/modules/node` sharing `confine()` with `resolveProjectPath()`: nothing listed outside the project, for an undeclared alias, or for a path with a backslash or a null byte. Changeset `modules-node-path` completed. - **N1 + N2** (same file, one commit): the unused `/render` route of the preview server is gone (its tests read the first `update` of `/events`); the Print button is hidden on a view with no print layout, tab by tab (`data-print`). The `/print` 400 guard stays. - **N7**: `engines: { node: ">=22" }` in `@gram-lang/language-server`, a sub-bullet in `lsp-universal`. ## Type of change - [x] Bug fix (non-breaking change fixing an issue) ## Quality checklist - [x] Code formatted with Biome (`bun run lint:fix`) - [x] TypeScript types validated (`bun run typecheck`) - [x] Package tests passing (`bun test`) - [x] If changing a published package, a changeset is included (`bun run change`) - [x] Rebuilt packages before testing downstream packages (`bun run build`)
abiwab merged commit e8dd0b86a7 into dev/1.6 2026-11-29 21:09:44 +01:00
Sign in to join this conversation.
No description provided.