Zaubrik / djwt

Create and verify JSON Web Tokens (JWT) with Deno or the browser.
MIT License
228 stars 23 forks source link

Can you publish djwt to npmjs ? #82

Closed UrielCh closed 3 months ago

UrielCh commented 1 year ago

Hi, I have to convert one of my deno project to nodeJS, and your project is not available for it.

I use jsonwebtoken instead, but its interface is different, so I have to change my code.

I used Deno dnt in multiple projects in the past if that can help.

timonson commented 1 year ago

Hi,

I personally won't do that. But I am considering adding a bundled JS file here. Would it help you?

UrielCh commented 1 year ago

I can add some dnt build script, but a custom bundler script takes longer.

timonson commented 1 year ago

Interesting, could I implement it as an Github action somehow so that I won't have to do anything?

UrielCh commented 1 year ago

this is an example of my recent dnt integration:

or an other one:

the publish is triggered by tagging a version number, the script will extract the version number from the tag name.

hansSchall commented 3 months ago

Once djwt has been published to JSR (#85) it can be installed using the JSR NPM compat layer

timonson commented 3 months ago

Does this PR work for our use case here?

timonson commented 3 months ago

Something went wrong. Can anybody help?

@emrahcom something went wrong with CI. Would you mind taking a look into it?

https://github.com/Zaubrik/djwt/actions/runs/10150942921/job/28069171066

error: Import 'https://registry-staging.deno.com/@std/encoding/meta.json' failed: error sending request for url (https://registry-staging.deno.com/@std/encoding/meta.json): error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known at file:///Users/runner/work/djwt/djwt/deps.ts:4:8

timonson commented 3 months ago

I did it with deno publish manually now.

https://jsr.io/@zaubrik/djwt@3.0.2

emrahcom commented 3 months ago

Hi @timonson, looks like there is a problem with DNS record of registry-staging.deno.com. So, test.yml failed while running deno test -A.

But if I run the same command (deno test -A) in my local, it works. I'm not sure if this is a temporary problem or not.

emrahcom commented 3 months ago

Looks like test.yml fails with old deno.

timonson commented 3 months ago

Looks like test.yml fails with old deno.

You are right. It works now. Can I close this issue now or is anything still missing for npm?

emrahcom commented 3 months ago

Hi @timonson,

The branch name in my PR was wrong. It should be master, not main... https://github.com/Zaubrik/djwt/blob/master/.github/workflows/publish.yml#L4-L5

I can send a new PR for fixing or you can check @hansSchall's PR which will fix the branch name too. What do you think?

timonson commented 3 months ago

Thanks @emrahcom , I just changed main to master.