patroon 1.5.3 → 1.5.5
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/publish.yml +25 -0
- package/CHANGELOG.md +22 -1
- package/CONTRIBUTING.md +8 -8
- package/CONTRIBUTING.mz +7 -7
- package/README.md +8 -7
- package/README.mz +5 -4
- package/package.json +3 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Publish Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write # Required for OIDC
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v6
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-node@v6
|
|
19
|
+
with:
|
|
20
|
+
node-version: '24'
|
|
21
|
+
registry-url: 'https://registry.npmjs.org'
|
|
22
|
+
- run: npm ci
|
|
23
|
+
- run: npm run build --if-present
|
|
24
|
+
- run: npm test
|
|
25
|
+
- run: npm publish
|
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,23 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [v1.5.5](https://github.com/bas080/patroon/compare/v1.5.4...v1.5.5)
|
|
8
|
+
|
|
9
|
+
- Update tape to 5.10.2 [`b3054b4`](https://github.com/bas080/patroon/commit/b3054b499c99839bdccde7b51aa77fe01faf86d2)
|
|
10
|
+
- Express support for Palestine [`c4248bd`](https://github.com/bas080/patroon/commit/c4248bd752734ca571a6dcc45681f142c856817d)
|
|
11
|
+
|
|
12
|
+
#### [v1.5.4](https://github.com/bas080/patroon/compare/v1.5.3...v1.5.4)
|
|
13
|
+
|
|
14
|
+
> 5 April 2026
|
|
15
|
+
|
|
16
|
+
- Update tape to version 5.9.0 [`8535ee8`](https://github.com/bas080/patroon/commit/8535ee8cd5b94e7565bd9a2e556978bac72a043d)
|
|
17
|
+
- Update tape to 5.9.9 [`2960b63`](https://github.com/bas080/patroon/commit/2960b633fb96ea56c5f50e25ac7d6bb9256ac5d8)
|
|
18
|
+
- Setup publish github workflow [`4496eaf`](https://github.com/bas080/patroon/commit/4496eaf05b3af9c221aaabf09c6c60b812b69d70)
|
|
19
|
+
|
|
7
20
|
#### [v1.5.3](https://github.com/bas080/patroon/compare/v1.5.2...v1.5.3)
|
|
8
21
|
|
|
22
|
+
> 10 October 2023
|
|
23
|
+
|
|
9
24
|
- Remove snyk badge [`63aa85e`](https://github.com/bas080/patroon/commit/63aa85ed19b7bb728b80038196a7554de4763f52)
|
|
10
25
|
|
|
11
26
|
#### [v1.5.2](https://github.com/bas080/patroon/compare/v1.5.1...v1.5.2)
|
|
@@ -235,8 +250,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
235
250
|
|
|
236
251
|
- Fix spelling mistakes [`1bd9975`](https://github.com/bas080/patroon/commit/1bd9975a02d97603ccbda0c96f8da5968beabb09)
|
|
237
252
|
|
|
238
|
-
#### v0.0.1
|
|
253
|
+
#### [v0.0.1](https://github.com/bas080/patroon/compare/v0.0.0...v0.0.1)
|
|
239
254
|
|
|
240
255
|
> 1 October 2021
|
|
241
256
|
|
|
242
257
|
- Initiate project [`0da801e`](https://github.com/bas080/patroon/commit/0da801e15901036022bc3af4ef2232c98e7cf851)
|
|
258
|
+
|
|
259
|
+
#### v0.0.0
|
|
260
|
+
|
|
261
|
+
> 1 October 2021
|
|
262
|
+
|
|
263
|
+
- Initiate project [`fe55348`](https://github.com/bas080/patroon/commit/fe55348033f102c489a2a86f8e11708334007299)
|
package/CONTRIBUTING.md
CHANGED
|
@@ -21,14 +21,14 @@ npx standard
|
|
|
21
21
|
|
|
22
22
|
## Documentation
|
|
23
23
|
|
|
24
|
-
We generate the contributors list using node and store it in [
|
|
24
|
+
We generate the contributors list using node and store it in [woven][7].
|
|
25
25
|
|
|
26
26
|
```js
|
|
27
27
|
require('./package.json').contributors.reduce((acc, {name, url, email}) =>
|
|
28
28
|
`${acc}- **${name}** *${url}*\n`, '')
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
We also generate the table of contents and store it in
|
|
31
|
+
We also generate the table of contents and store it in woven.
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
34
|
npx markdown-toc --no-firsth1 --maxdepth 4 README.mz
|
|
@@ -42,23 +42,23 @@ npm link patroon
|
|
|
42
42
|
```
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
up to date, audited 3 packages in
|
|
45
|
+
up to date, audited 3 packages in 572ms
|
|
46
46
|
|
|
47
47
|
found 0 vulnerabilities
|
|
48
48
|
|
|
49
|
-
added 1 package, and audited
|
|
49
|
+
added 1 package, and audited 130 packages in 830ms
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
88 packages are looking for funding
|
|
52
52
|
run `npm fund` for details
|
|
53
53
|
|
|
54
54
|
found 0 vulnerabilities
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
We then use
|
|
57
|
+
We then use woven to template the README. Then we run [markatzea][6] to run
|
|
58
58
|
the examples and show the output of those.
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
|
|
61
|
+
woven < README.mz | markatzea > README.md
|
|
62
62
|
echo 'Documentation generated successfully.' 1>&2
|
|
63
63
|
```
|
|
64
64
|
|
|
@@ -76,6 +76,6 @@ npx auto-changelog -p
|
|
|
76
76
|
[3]:https://github.com/bas080/patroon/blob/master/src/index.js
|
|
77
77
|
[4]:https://github.com/bas080/patroon/blob/master/src/helpers.js
|
|
78
78
|
[6]:https://github.com/bas080/markatzea
|
|
79
|
-
[7]:https://github.com/bas080/
|
|
79
|
+
[7]:https://github.com/bas080/woven
|
|
80
80
|
[changelog]:./CHANGELOG.md
|
|
81
81
|
[auto-changelog]:https://www.npmjs.com/package/auto-changelog
|
package/CONTRIBUTING.mz
CHANGED
|
@@ -21,16 +21,16 @@ npx standard
|
|
|
21
21
|
|
|
22
22
|
## Documentation
|
|
23
23
|
|
|
24
|
-
We generate the contributors list using node and store it in [
|
|
24
|
+
We generate the contributors list using node and store it in [woven][7].
|
|
25
25
|
|
|
26
|
-
```js node -p |
|
|
26
|
+
```js node -p | woven contributors
|
|
27
27
|
require('./package.json').contributors.reduce((acc, {name, url, email}) =>
|
|
28
28
|
`${acc}- **${name}** *${url}*\n`, '')
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
We also generate the table of contents and store it in
|
|
31
|
+
We also generate the table of contents and store it in woven.
|
|
32
32
|
|
|
33
|
-
```bash bash |
|
|
33
|
+
```bash bash | woven toc
|
|
34
34
|
npx markdown-toc --no-firsth1 --maxdepth 4 README.mz
|
|
35
35
|
```
|
|
36
36
|
|
|
@@ -41,11 +41,11 @@ npm link
|
|
|
41
41
|
npm link patroon
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
We then use
|
|
44
|
+
We then use woven to template the README. Then we run [markatzea][6] to run
|
|
45
45
|
the examples and show the output of those.
|
|
46
46
|
|
|
47
47
|
```bash bash
|
|
48
|
-
|
|
48
|
+
woven < README.mz | markatzea > README.md
|
|
49
49
|
echo 'Documentation generated successfully.' 1>&2
|
|
50
50
|
```
|
|
51
51
|
|
|
@@ -63,6 +63,6 @@ npx auto-changelog -p
|
|
|
63
63
|
[3]:https://github.com/bas080/patroon/blob/master/src/index.js
|
|
64
64
|
[4]:https://github.com/bas080/patroon/blob/master/src/helpers.js
|
|
65
65
|
[6]:https://github.com/bas080/markatzea
|
|
66
|
-
[7]:https://github.com/bas080/
|
|
66
|
+
[7]:https://github.com/bas080/woven
|
|
67
67
|
[changelog]:./CHANGELOG.md
|
|
68
68
|
[auto-changelog]:https://www.npmjs.com/package/auto-changelog
|
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@ Pattern matching in JavaScript without additional syntax.
|
|
|
7
7
|
[](#tests)
|
|
8
8
|
[](https://standardjs.com)
|
|
9
9
|
[](./LICENSE)
|
|
10
|
+
[](https://www.islamic-relief.org.uk/giving/appeals/palestine/)
|
|
10
11
|
|
|
11
12
|
- [Installation](#installation)
|
|
12
13
|
- [Usage](#usage)
|
|
@@ -569,12 +570,12 @@ const oneIsTwo = patroon(1, 2)
|
|
|
569
570
|
oneIsTwo(3)
|
|
570
571
|
```
|
|
571
572
|
```
|
|
572
|
-
/home/
|
|
573
|
+
/home/blue/project/patroon/src/index.js:96
|
|
573
574
|
throw error
|
|
574
575
|
^
|
|
575
576
|
|
|
576
577
|
NoMatchError: Not able to match any pattern for arguments
|
|
577
|
-
at /home/
|
|
578
|
+
at /home/blue/project/patroon/src/index.js:90:21
|
|
578
579
|
```
|
|
579
580
|
|
|
580
581
|
#### UnevenArgumentCountError
|
|
@@ -585,12 +586,12 @@ Another error that occurs is when the patroon function is not used correctly.
|
|
|
585
586
|
patroon(1)
|
|
586
587
|
```
|
|
587
588
|
```
|
|
588
|
-
/home/
|
|
589
|
+
/home/blue/project/patroon/src/index.js:82
|
|
589
590
|
if (!isEven(list.length)) { throw new UnevenArgumentCountError('Patroon should have an even amount of arguments.') }
|
|
590
591
|
^
|
|
591
592
|
|
|
592
593
|
UnevenArgumentCountError: Patroon should have an even amount of arguments.
|
|
593
|
-
at patroon (/home/
|
|
594
|
+
at patroon (/home/blue/project/patroon/src/index.js:82:37)
|
|
594
595
|
```
|
|
595
596
|
|
|
596
597
|
#### PatroonError
|
|
@@ -634,7 +635,7 @@ npx nyc npm t | npx tap-nyc
|
|
|
634
635
|
npx nyc check-coverage
|
|
635
636
|
```
|
|
636
637
|
```
|
|
637
|
-
> patroon@1.5.
|
|
638
|
+
> patroon@1.5.5 test
|
|
638
639
|
> tape ./src/index.test.js
|
|
639
640
|
-------------|---------|----------|---------|---------|-------------------
|
|
640
641
|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
|
|
@@ -648,7 +649,7 @@ npx nyc check-coverage
|
|
|
648
649
|
total: 31
|
|
649
650
|
passing: 31
|
|
650
651
|
|
|
651
|
-
duration:
|
|
652
|
+
duration: 8s
|
|
652
653
|
|
|
653
654
|
```
|
|
654
655
|
|
|
@@ -677,4 +678,4 @@ polite and read the [CONTRIBUTING.md][10].
|
|
|
677
678
|
[9]:https://www.npmjs.com/package/patroon
|
|
678
679
|
[10]:./CONTRIBUTING.md
|
|
679
680
|
[changelog]:./CHANGELOG.md
|
|
680
|
-
[runkit]:https://
|
|
681
|
+
[runkit]:https://runkit.com/npm/patroon
|
package/README.mz
CHANGED
|
@@ -7,8 +7,9 @@ Pattern matching in JavaScript without additional syntax.
|
|
|
7
7
|
[](#tests)
|
|
8
8
|
[](https://standardjs.com)
|
|
9
9
|
[](./LICENSE)
|
|
10
|
+
[](https://www.islamic-relief.org.uk/giving/appeals/palestine/)
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
<<toc
|
|
12
13
|
|
|
13
14
|
## Installation
|
|
14
15
|
|
|
@@ -329,7 +330,7 @@ A helper that makes it easy to check if a value passes all patterns.
|
|
|
329
330
|
|
|
330
331
|
```js ./tape-test
|
|
331
332
|
const gte200 = x => x >= 200
|
|
332
|
-
const lt300 = x => x
|
|
333
|
+
const lt300 = x => x < 300
|
|
333
334
|
|
|
334
335
|
patroon(
|
|
335
336
|
every(gte200, lt300), 'Is a 200 status code'
|
|
@@ -510,7 +511,7 @@ polite and read the [CONTRIBUTING.md][10].
|
|
|
510
511
|
|
|
511
512
|
### Contributors
|
|
512
513
|
|
|
513
|
-
|
|
514
|
+
<<contributors
|
|
514
515
|
|
|
515
516
|
[1]:https://developer.mozilla.org/en-US/docs/Glossary/Primitive
|
|
516
517
|
[2]:https://en.wikipedia.org/wiki/Multiple_dispatch
|
|
@@ -521,4 +522,4 @@ polite and read the [CONTRIBUTING.md][10].
|
|
|
521
522
|
[9]:https://www.npmjs.com/package/patroon
|
|
522
523
|
[10]:./CONTRIBUTING.md
|
|
523
524
|
[changelog]:./CHANGELOG.md
|
|
524
|
-
[runkit]:https://
|
|
525
|
+
[runkit]:https://runkit.com/npm/patroon
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "patroon",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.5",
|
|
4
4
|
"description": "Pattern matching library",
|
|
5
5
|
"repository": "github:bas080/patroon",
|
|
6
6
|
"main": "./src/index.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "tape ./src/index.test.js",
|
|
9
|
-
"version": "markatzea CONTRIBUTING.mz | tee CONTRIBUTING.md && git add *.md"
|
|
9
|
+
"version": "WOVEN_PREFIX='<<' markatzea CONTRIBUTING.mz | tee CONTRIBUTING.md && git add *.md"
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
12
12
|
"array",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"author": "Bassim Huis",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"tape": "^5.
|
|
31
|
+
"tape": "^5.9.0",
|
|
32
32
|
"tape-check": "^1.0.0-rc.0"
|
|
33
33
|
},
|
|
34
34
|
"contributors": [
|