Upgrade to Deno 2.7 and prepare for JSR publishing on Deno 2.x#3
Open
Upgrade to Deno 2.7 and prepare for JSR publishing on Deno 2.x#3
Conversation
- Update deno.json: pin @std deps with semver ranges, use zod ^3.21.4 - Update CI workflow: use denoland/setup-deno@v2 with deno-version v2.x, switch from `npx jsr publish` to native `deno publish` - Fix verbatim-module-syntax lint errors: use `import type` for type-only imports - Fix unused vars, prefer-const, and require-await lint warnings - Configure lint rules to exclude ban-types and no-explicit-any (inherent to DI container design) - Regenerate deno.lock in v5 format for Deno 2.7 All 23 tests pass, lint is clean, and `deno publish --dry-run` succeeds. https://claude.ai/code/session_01MkeiNESK1jizrxX4rRE8vi
There was a problem hiding this comment.
Pull request overview
Updates the project to be compatible with Deno 2.x / Deno 2.7 and streamlines publishing to JSR using deno publish, along with related dependency and linting adjustments.
Changes:
- Switch type-only Zod imports to
import typeand adjust runtime Zod error/type checks. - Update
deno.jsonimport specifiers and lint rule exclusions; regeneratedeno.lockin v5 format. - Update GitHub Actions publishing workflow to Deno 2.x and native
deno publish.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
types.ts |
Converts Zod import to type-only import for verbatim-module-syntax compliance. |
errors.ts |
Separates type-only Zod usage from runtime checks (ZodType). |
container.ts |
Uses type-only Zod import and runtime ZodError; fixes minor lint warnings (unused var / prefer-const). |
container.test.ts |
Cleans up lint warnings (unused imports/vars, require-await). |
deno.json |
Pins imports with semver ranges and configures lint rule exclusions. |
deno.lock |
Updates lockfile to Deno lock v5 format. |
.github/workflows/publish.yaml |
Upgrades CI to setup-deno@v2, runs tests, and publishes via deno publish. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
|
||
| - name: Run tests | ||
| run: deno test | ||
| run: deno test --allow-all |
|
|
||
| class AsyncService { | ||
| async getValue() { | ||
| getValue() { |
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.
switch from
npx jsr publishto nativedeno publishimport typefor type-only importsAll 23 tests pass, lint is clean, and
deno publish --dry-runsucceeds.https://claude.ai/code/session_01MkeiNESK1jizrxX4rRE8vi