nostr-tools 1.0.0-alpha → 1.0.0-alpha2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/npm-publish.yml +6 -4
- package/.github/workflows/test.yml +4 -2
- package/README.md +1 -1
- package/{build.cjs → build.js} +13 -3
- package/event.test.js +1 -1
- package/filter.test.js +1 -1
- package/keys.test.js +1 -1
- package/lib/nostr.bundle.js +18864 -0
- package/lib/nostr.bundle.js.map +7 -0
- package/{cjs/index.js → lib/nostr.cjs.js} +0 -0
- package/lib/nostr.cjs.js.map +7 -0
- package/lib/nostr.esm.js +464 -0
- package/lib/nostr.esm.js.map +7 -0
- package/lib/nostr.js.map +7 -0
- package/nip04.test.js +1 -1
- package/package.json +5 -5
- package/relay.test.js +2 -2
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
name: publish npm package
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
4
|
+
push:
|
|
5
|
+
tags: [v*]
|
|
5
6
|
|
|
6
7
|
jobs:
|
|
7
8
|
publish-npm:
|
|
@@ -10,8 +11,9 @@ jobs:
|
|
|
10
11
|
- uses: actions/checkout@v3
|
|
11
12
|
- uses: actions/setup-node@v3
|
|
12
13
|
with:
|
|
13
|
-
node-version:
|
|
14
|
-
|
|
14
|
+
node-version: 18
|
|
15
|
+
- run: yarn --ignore-engines
|
|
16
|
+
- run: node build.js
|
|
15
17
|
- run: npm publish
|
|
16
18
|
env:
|
|
17
|
-
NODE_AUTH_TOKEN: ${{secrets.
|
|
19
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
package/README.md
CHANGED
|
@@ -153,7 +153,7 @@ Please consult the tests or [the source code](https://github.com/fiatjaf/nostr-t
|
|
|
153
153
|
### Using from the browser (if you don't want to use a bundler)
|
|
154
154
|
|
|
155
155
|
```html
|
|
156
|
-
<script src="https://unpkg.com/nostr-tools/
|
|
156
|
+
<script src="https://unpkg.com/nostr-tools/nostr.bundle.js"></script>
|
|
157
157
|
<script>
|
|
158
158
|
window.NostrTools.generatePrivateKey('...') // and so on
|
|
159
159
|
</script>
|
package/{build.cjs → build.js}
RENAMED
|
@@ -15,17 +15,27 @@ let common = {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
esbuild
|
|
18
|
-
.build({
|
|
18
|
+
.build({
|
|
19
|
+
...common,
|
|
20
|
+
outfile: 'lib/nostr.esm.js',
|
|
21
|
+
format: 'esm',
|
|
22
|
+
packages: 'external'
|
|
23
|
+
})
|
|
19
24
|
.then(() => console.log('esm build success.'))
|
|
20
25
|
|
|
21
26
|
esbuild
|
|
22
|
-
.build({
|
|
27
|
+
.build({
|
|
28
|
+
...common,
|
|
29
|
+
outfile: 'lib/nostr.cjs.js',
|
|
30
|
+
format: 'cjs',
|
|
31
|
+
packages: 'external'
|
|
32
|
+
})
|
|
23
33
|
.then(() => console.log('cjs build success.'))
|
|
24
34
|
|
|
25
35
|
esbuild
|
|
26
36
|
.build({
|
|
27
37
|
...common,
|
|
28
|
-
|
|
38
|
+
outfile: 'lib/nostr.bundle.js',
|
|
29
39
|
format: 'iife',
|
|
30
40
|
globalName: 'NostrTools',
|
|
31
41
|
define: {
|
package/event.test.js
CHANGED
package/filter.test.js
CHANGED
package/keys.test.js
CHANGED