Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: publish to JSR #55

Closed
wants to merge 12 commits into from
Closed

refactor: publish to JSR #55

wants to merge 12 commits into from

Conversation

iuioiua
Copy link
Contributor

@iuioiua iuioiua commented Oct 23, 2024

This PR makes this package publishable on JSR. This means that the module will no longer be available on https://deno.land/x and the corresponding workflow should be removed.

Further reading: https://jsr.io/docs/publishing-packages

Copy link
Contributor Author

@iuioiua iuioiua Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will run on every commit to master. However, it'll only ever actually publish to JSR when the value of the version field in the deno.json file changes. In other words, it'll do nothing if that value doesn't change.

deno.json Outdated
@@ -1,9 +1,17 @@
{
"name": "@cmd-johnson/deno-oauth2-client",
"version": "1.0.3",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be 2.0.0 as this PR makes the package no longer available via HTTP import specifiers.

"https://deno.land/x/oauth2_client/": "./"
},
"tasks": {
"check:types": "deno check **/*.ts",
"test": "deno test --parallel --trace-leaks --doc"
}
},
"exports": "./mod.ts"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means @cmd-johnson/deno-oauth2-client is the only entry point. Alternatively, we could also include more specific modules. E.g.:

  • @cmd-johnson/deno-oauth2-client/errors
  • @cmd-johnson/deno-oauth2-client/pkce
  • @cmd-johnson/deno-oauth2-client/refresh-token-grant

examples/oak.ts Outdated Show resolved Hide resolved
deno.json Outdated Show resolved Hide resolved
@iuioiua iuioiua marked this pull request as ready for review October 31, 2024 07:37
@cmd-johnson
Copy link
Owner

@iuioiua I rebased the PR onto the updated master branch after merging #57 and added a few updates to the examples ( they're now all using jsr: imports instead of the import map) and updated a few links in the README.md to point to jsr.io instead of deno.land.
Apparently GitHub doesn't recognize this as a successful merge of your PR, so I'll just close it manually instead.

The package is now available at JSR!

I'll also try to find some time to test the package with some other runtimes to see if I can get that JSR score closer towards 100% :)

@cmd-johnson
Copy link
Owner

Ah, this also resolves #52

@iuioiua iuioiua deleted the jsr branch November 20, 2024 23:47
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.

3 participants