feat!: ship the editor plugin as its own package - #226
Merged
Conversation
TypeScript 7.0 shipped in July 2026 and is now the latest tag on npm. It carries no public compiler API: the ts.Node / ts.forEachChild / ts.createProgram surface the plugin is built on is gone, and the tsserver protocol that loads plugins has been replaced by LSP. That takes out every editor plugin built the classic way, not just this one, and 7.1's new API will be different enough that reaching it is a rewrite rather than a port. The library is unaffected. It needs no compiler API, type-checks clean on TypeScript 7, and now has a CI job proving it — something the peerDependencies range has claimed since before anyone verified it. That left one package needing two different peer ranges. Narrowing to < 7 would block installs for a library that works fine there; keeping < 8 would ship a subpath that cannot load for a growing share of users. Either way one half of the package is misrepresented, so the plugin moves out. @owlsql/ts-plugin now ships on its own version and stays on 0.x: it is in no position to promise stability while its foundation is upstream's to decide. The library keeps typescript >= 5.4 < 8 and is no longer held to the plugin's range, and a release of one is not gated on the tests of the other. The plugin imported nothing from the library, so this is a move rather than an untangling. The repository becomes an npm workspace; the root npm test deliberately does not run plugin code. The TypeScript 7 job runs test:types:core rather than test:types, because tests/cli-codegen-edge.test.ts uses the compiler API to prove generated schema output parses. That one file moved to its own tsconfig so it can sit out the TypeScript 7 run without being dropped from the others. Also adds a prebuild step to both packages: tsc does not clean its outDir, so a dist/ts-plugin left over from a build predating this split would have been published inside the library's tarball. BREAKING CHANGE: the @owlsql/core/ts-plugin subpath is gone. Install @owlsql/ts-plugin as a dev dependency and change the plugin name in tsconfig.json.
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.
Re-opens #224 against
master. Breaking.#224 was merged into its stack base (
docs/versioning-policy) after #223 had already gone tomaster, so the merge commit landed on a branch nothing pulls from and the content never reachedmaster. GitHub shows #224 as merged, butmastertoday still hassrc/ts-plugin/, the./ts-pluginexport and both plugin tsconfigs. Same commit, rebased onto currentmaster, nothing else changed.TypeScript 7.0 shipped in July 2026 and is already the
latesttag on npm. It carries no public compiler API —ts.Node,ts.forEachChild,ts.createProgramare gone, and the tsserver protocol that loads plugins has been replaced by LSP. That takes out every editor plugin built the classic way. 7.1's new API will be different enough that reaching it is a rewrite, not a port.The library is unaffected. On 7.0.2
tsconfig.jsontype-checks clean, every.test-d.tsand@ts-expect-errorincluded; the two plugin tsconfigs are dead there. A CI job now proves the library half — somethingpeerDependencieshas claimed since before anyone verified it.So one package needed two peer ranges. Narrowing to
< 7blocks installs for a library that works fine there; keeping< 8ships a subpath that can't load for a growing share of users. Either way half the package is misrepresented.@owlsql/ts-pluginnow ships separately on its own version and stays on0.x— it's in no position to promise stability while its foundation is upstream's call. The library keepstypescript >= 5.4 < 8, and neither package's release is gated on the other's tests.The plugin imported nothing from the library, so this was a move, not an untangling. Repo becomes an npm workspace. Test counts are unchanged: 156 + 142 = the same 298.
Migration — install the package and rename the plugin:
{ "compilerOptions": { "plugins": [{ "name": "@owlsql/ts-plugin" }] } }Two smaller things ride along, both consequences of the above:
test:types:core, becausetests/cli-codegen-edge.test.tsuses the compiler API to prove generated schema output parses. It moved to its own tsconfig so it can sit out that run without being dropped from the others.prebuildclean on both packages.tscdoesn't clear itsoutDir, so adist/ts-pluginleft over from a build predating this split would have been published inside the library's tarball.npm pack --dry-runis clean now.