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

jsr build #35

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ jobs:
- run: npm publish --provenance --access public --tag=next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npx jsr publish


30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,34 @@ The nkeys.js library works in Deno, Node.js, and the browser!

## Installation

For your Deno projects:
The nkeys library is available on both
[npm](https://www.npmjs.com/package/nkeys.js) and
[jsr.io](https://jsr.io/@nats-io/nkeys)

In Deno:

```bash
deno add @nats-io/nkeys
```

```javascript
import {
createUser,
fromPublic,
fromSeed,
} from "https://deno.land/x/nkeys.js/modules/esm/mod.ts";
import { createUser, fromPublic, fromSeed } from "@nats-io/nkeys";
```

On node, and browsers you can get a build from npm:
In Node:

```bash
npm install nkeys.js
```

In your node projects:

```javascript
const { createUser, fromSeed, fromPublic } = require("nkeys.js");
// or
import { createUser, fromPublic, fromSeed } from "nkeys.js";
```

On your browser projects, make available the `node/nkeys.js/nkeys.mjs`, and then
On your browser projects copy `node_modules/nkeys.js/nkeys.mjs` to your document
root, and then

```javascript
import { createUser, fromPublic, fromSeed } from "https://host/path/nkeys.mjs";
Expand Down Expand Up @@ -103,6 +108,11 @@ Our support policy for Nodejs versions follows
[Nodejs release support](https://github.com/nodejs/Release). We will support and
build nkeys.js on even-numbered Nodejs versions that are current or in LTS.

Note that this library no longer shims `atob`, `btoa`, `TextEncoder`, nor
`TextDecoder`. These should be available in fairly old node builds going as far
back as Node 16. If you need to run on an older environment, use one of the
older versions on npm.

## License

Unless otherwise noted, the NATS source files are distributed under the Apache
Expand Down
18 changes: 8 additions & 10 deletions dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

This file lists the dependencies used in this repository.

| Dependency | License |
| -------------------------------------------- | ----------- |
| @types/node - 14.0.26 | MIT |
| tweetnacl@1.0.3 | Unilicense |
| https://deno.land/std@0.75.0 | MIT License |
| https://github.com/dr-useless/tweetnacl-deno | Unilicense |
| Dev Dependencies Fanout (267) | |
| ava@3.12.1 | MIT |
| typedoc@0.19.1 | Apache-2.0 |
| typescript@4.0.2 | Apache-2.0 |
| Dependency | License |
| ------------------------------------ | ----------- |
| tweetnacl | Unilicense |
| CI and build dependencies | |
| https://github.com/denoland/deno_std | MIT License |
| typedoc | Apache-2.0 |
| typescript | Apache-2.0 |
| @types/node | MIT |
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nats-io/nkeys",
"version": "1.2.0-1",
"version": "1.2.0-2",
"exports": {
".": "./modules/esm/mod.ts"
},
Expand Down
Loading
Loading