Skip to content

Conversation

@amyssnippet
Copy link

@amyssnippet amyssnippet commented Jan 17, 2026

This PR updates the getDntVersion function in utils.ts to correctly extract version numbers from JSR URLs, as mentioned in the issue #481 , in addition to the existing Deno Land URLs. The regex has been modified to match both /dnt@version/ (legacy) and /@deno/dnt/version/ (JSR) patterns.

Previously, when dnt was imported from JSR, getDntVersion() would always return "dev" because the URL format wasn't recognized. Now it properly extracts the version (e.g., "1.2.3") from JSR URLs like https://jsr.io/@deno/dnt/1.2.3/mod.ts.

Testing:

  • All existing tests pass
  • New test validates JSR URL version extraction
  • Full test suite runs successfully (except for unrelated yarn dependency test as i havent downloaded yarn, still if issues came up, i will check that too.)

@CLAassistant
Copy link

CLAassistant commented Jan 17, 2026

CLA assistant check
All committers have signed the CLA.

@amyssnippet
Copy link
Author

@dsherret i have fixed the issue #484 . and thats only the regex issue, i have solved that. even after that some linting errors popped up, i solved by changing deno.jsonc file, and all errors were solved.

check my code updates from your side, if (any issue) then update me on that, else lets merge;

@amyssnippet
Copy link
Author

after that issue, i have tried to solve the issue #454 too. you may check the updates, any recommendation, or updates, then let me know

@amyssnippet
Copy link
Author

Hi @dsherret , following up on this.

I realized I bundled two distinct changes here: the JSR URL fix (#481 ) and the globalThis/shim options (#454 ).

If you prefer, I can strictly revert this PR to just the JSR fix and open a separate PR for the shim options to keep the history clean. Just let me know your preference!

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.

2 participants