@wrnrlr/prelude 0.2.10 → 0.2.14

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.
@@ -0,0 +1,32 @@
1
+ name: Prelude CI/CD
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - release
7
+
8
+ permissions:
9
+ contents: read
10
+ id-token: write
11
+
12
+ jobs:
13
+ test:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - uses: denoland/setup-deno@v2
18
+ with:
19
+ deno-version: v2.x
20
+ - run: deno install
21
+ # - name: Lint
22
+ # run: deno lint
23
+ - run: deno task test
24
+ publish-jsr:
25
+ needs: test
26
+ runs-on: ubuntu-latest
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+ - uses: denoland/setup-deno@v2
30
+ with:
31
+ deno-version: v2.x
32
+ - run: deno publish --allow-slow-types --allow-dirty
@@ -0,0 +1,32 @@
1
+ name: Prelude CI/CD
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - release
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: denoland/setup-deno@v2
15
+ with:
16
+ deno-version: v2.x
17
+ - run: deno install
18
+ # - run: deno lint
19
+ - run: deno task test
20
+
21
+ # Moving artifacts, website and docs into their own project...
22
+ # - name: Setup Pages
23
+ # uses: actions/configure-pages@v5
24
+
25
+ # - name: Upload artifact
26
+ # uses: actions/upload-pages-artifact@v3
27
+ # with:
28
+ # path: './www/dist'
29
+
30
+ # - name: Deploy to GitHub Pages
31
+ # id: deployment
32
+ # uses: actions/deploy-pages@v4
@@ -0,0 +1,23 @@
1
+ # name: Prelude CI/CD
2
+
3
+ # on:
4
+ # push:
5
+ # branches:
6
+ # - release
7
+
8
+ # permissions:
9
+ # contents: read
10
+ # id-token: write
11
+
12
+ # jobs:
13
+ # publish-npm:
14
+ # runs-on: ubuntu-latest
15
+ # steps:
16
+ # - uses: actions/checkout@v4
17
+ # - uses: actions/setup-node@v4
18
+ # with:
19
+ # node-version: 20
20
+ # registry-url: 'https://registry.npmjs.org/'
21
+ # - run: npm publish
22
+ # env:
23
+ # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/deno.jsonc CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrnrlr/prelude",
3
- "version": "0.2.10",
3
+ "version": "0.2.14",
4
4
  "exports": "./src/mod.ts",
5
5
  "compilerOptions": {
6
6
  "strict": true,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wrnrlr/prelude",
3
3
  "type": "module",
4
- "version": "0.2.10",
4
+ "version": "0.2.14",
5
5
  "author": "Werner Laurensse",
6
6
  "description": "A signal based frontend library with fine-grained reactivity",
7
7
  "main": "./src/mod.ts",
package/src/resource.js CHANGED
@@ -53,9 +53,9 @@ export function resource(pSource,pFetcher,pOptions) {
53
53
  }, false)
54
54
  }
55
55
 
56
- function read() {
57
- const v = value(),
58
- err = error();
56
+ function read(...a) {
57
+ const v = a.length===0 ? value() : value(a[0])
58
+ const err = error();
59
59
  if (err !== undefined && !pr) throw err;
60
60
  return v;
61
61
  }
@@ -1,67 +0,0 @@
1
- name: Prelude CI/CD
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- - release
8
-
9
- jobs:
10
- test:
11
- runs-on: ubuntu-latest
12
- # if: github.ref == 'refs/heads/main'
13
- steps:
14
- - name: Checkout the repository
15
- uses: actions/checkout@v4
16
- - name: Setup Deno
17
- uses: denoland/setup-deno@v2
18
- with:
19
- deno-version: v2.x
20
- - name: Deno install
21
- run: deno install
22
- # - name: Lint
23
- # run: deno lint
24
- - name: Run tests
25
- run: deno task test
26
- publish:
27
- needs: test
28
- if: github.ref == 'refs/heads/release'
29
- runs-on: ubuntu-latest
30
- permissions:
31
- contents: read
32
- id-token: write
33
- steps:
34
- - name: Checkout repository
35
- uses: actions/checkout@v4
36
-
37
- - name: Setup Deno
38
- uses: denoland/setup-deno@v2
39
- with:
40
- deno-version: v2.x
41
-
42
- - name: Publish to JSR
43
- run: deno publish --allow-slow-types --allow-dirty
44
-
45
- - name: Setup Node
46
- uses: actions/setup-node@v4
47
- with:
48
- node-version: 20
49
- registry-url: 'https://registry.npmjs.org/'
50
-
51
- - name: Publish to NPM
52
- run: npm publish --access public
53
- env:
54
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
55
-
56
- # Moving artifacts, website and docs into their own project...
57
- # - name: Setup Pages
58
- # uses: actions/configure-pages@v5
59
-
60
- # - name: Upload artifact
61
- # uses: actions/upload-pages-artifact@v3
62
- # with:
63
- # path: './www/dist'
64
-
65
- # - name: Deploy to GitHub Pages
66
- # id: deployment
67
- # uses: actions/deploy-pages@v4