Repository navigation
build: typecheck CI and pin plugin range - #2
Merged
Merged
Conversation
The package ships TypeScript sources that OpenCode compiles at load time, so nothing on a pull request ever checked the types; publish.yml only runs on a release, after a mistake can reach users. - add `typescript` to devDependencies and a `typecheck` script - add `ci.yml`: `npm ci` + `npm run typecheck` on pull_request and on push to main - track `package-lock.json`: `npm ci` refuses to run without it, and the lock is what makes the install reproducible
The dependency was declared as "latest", so an install could pull a new plugin major without a code change. The lockfile already resolves 2.1.1; pin the major so a breaking release cannot arrive unnoticed. Stacked on the lockfile commit because main has no committed package-lock.json, and `npm ci` cannot run without one. The lock's root specifier moves to ^2.1.1 as well so the recorded tree matches package.json; `npm ci` tolerates the stale specifier, but the next `npm install` would rewrite it anyway.
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.
Adds the missing typecheck gate and pins the plugin dependency range. No
runtime code changes.
Commits
build: add typescript and a typecheck CI gatetypescriptindevDependencies,typecheckscript (tsc --noEmit)ci.yml:npm ci+npm run typecheckonpull_requestand on pushto
mainpackage-lock.jsonis now tracked:npm cirefuses to run without it,so the ignore line had to go with it
build: pin @opencode/plugin to ^2.1.1@opencode/pluginwas declared aslatest; the lockfile alreadyresolves 2.1.1
package.jsonpublish.ymlis untouched.Why the package lock is new
The repository had no committed lockfile, so there was no reproducible
install for CI to run against.
Local verification before opening
npm run typecheck→ exit 0npm ci+npm run typecheckin a clean copy → 374 packages, exit 0@opencode/pluginafternpm ci→ 2.1.1ci.ymlruns on this PR, so the same two commands run again here.