patroon 1.5.2 → 1.5.4

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,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,22 @@ 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.4](https://github.com/bas080/patroon/compare/v1.5.3...v1.5.4)
8
+
9
+ - Update tape to version 5.9.0 [`8535ee8`](https://github.com/bas080/patroon/commit/8535ee8cd5b94e7565bd9a2e556978bac72a043d)
10
+ - Update tape to 5.9.9 [`2960b63`](https://github.com/bas080/patroon/commit/2960b633fb96ea56c5f50e25ac7d6bb9256ac5d8)
11
+ - Setup publish github workflow [`4496eaf`](https://github.com/bas080/patroon/commit/4496eaf05b3af9c221aaabf09c6c60b812b69d70)
12
+
13
+ #### [v1.5.3](https://github.com/bas080/patroon/compare/v1.5.2...v1.5.3)
14
+
15
+ > 10 October 2023
16
+
17
+ - Remove snyk badge [`63aa85e`](https://github.com/bas080/patroon/commit/63aa85ed19b7bb728b80038196a7554de4763f52)
18
+
7
19
  #### [v1.5.2](https://github.com/bas080/patroon/compare/v1.5.1...v1.5.2)
8
20
 
21
+ > 8 October 2023
22
+
9
23
  - Update tape dev dependency [`841b1fb`](https://github.com/bas080/patroon/commit/841b1fb54c8d0197389a9649471dc9114a103b4f)
10
24
  - Update tape package to 5.7.0 [`afd1c5c`](https://github.com/bas080/patroon/commit/afd1c5cb3762d0cd6f624c4b76de6bdc1813dfcb)
11
25
 
@@ -229,8 +243,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
229
243
 
230
244
  - Fix spelling mistakes [`1bd9975`](https://github.com/bas080/patroon/commit/1bd9975a02d97603ccbda0c96f8da5968beabb09)
231
245
 
232
- #### v0.0.1
246
+ #### [v0.0.1](https://github.com/bas080/patroon/compare/v0.0.0...v0.0.1)
233
247
 
234
248
  > 1 October 2021
235
249
 
236
250
  - Initiate project [`0da801e`](https://github.com/bas080/patroon/commit/0da801e15901036022bc3af4ef2232c98e7cf851)
251
+
252
+ #### v0.0.0
253
+
254
+ > 1 October 2021
255
+
256
+ - 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 [memplate][7].
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 memplate.
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
- added 1 package, and audited 3 packages in 660ms
45
+ up to date, audited 3 packages in 587ms
46
46
 
47
47
  found 0 vulnerabilities
48
48
 
49
- added 1 package, and audited 95 packages in 811ms
49
+ added 1 package, and audited 127 packages in 794ms
50
50
 
51
- 65 packages are looking for funding
51
+ 85 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 memplate to template the README. Then we run [markatzea][6] to run
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
- memplate < README.mz | markatzea > README.md
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/memplate
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 [memplate][7].
24
+ We generate the contributors list using node and store it in [woven][7].
25
25
 
26
- ```js node -p | memplate contributors
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 memplate.
31
+ We also generate the table of contents and store it in woven.
32
32
 
33
- ```bash bash | memplate toc
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 memplate to template the README. Then we run [markatzea][6] to run
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
- memplate < README.mz | markatzea > README.md
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/memplate
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
@@ -5,7 +5,6 @@ Pattern matching in JavaScript without additional syntax.
5
5
  [![NPM](https://img.shields.io/npm/v/patroon?color=blue&style=flat-square)](https://www.npmjs.com/package/patroon)
6
6
  [![NPM Downloads](https://img.shields.io/npm/dm/patroon?style=flat-square)](https://www.npmjs.com/package/patroon)
7
7
  [![100% Code Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen?style=flat-square)](#tests)
8
- [![Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/patroon?style=flat-square)](https://snyk.io/vuln/npm:patroon)
9
8
  [![Standard Code Style](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](https://standardjs.com)
10
9
  [![License](https://img.shields.io/npm/l/patroon?color=brightgreen&style=flat-square)](./LICENSE)
11
10
 
@@ -570,12 +569,12 @@ const oneIsTwo = patroon(1, 2)
570
569
  oneIsTwo(3)
571
570
  ```
572
571
  ```
573
- /home/ant/projects/patroon/src/index.js:96
572
+ /home/blue/project/patroon/src/index.js:96
574
573
  throw error
575
574
  ^
576
575
 
577
576
  NoMatchError: Not able to match any pattern for arguments
578
- at /home/ant/projects/patroon/src/index.js:90:21
577
+ at /home/blue/project/patroon/src/index.js:90:21
579
578
  ```
580
579
 
581
580
  #### UnevenArgumentCountError
@@ -586,12 +585,12 @@ Another error that occurs is when the patroon function is not used correctly.
586
585
  patroon(1)
587
586
  ```
588
587
  ```
589
- /home/ant/projects/patroon/src/index.js:82
588
+ /home/blue/project/patroon/src/index.js:82
590
589
  if (!isEven(list.length)) { throw new UnevenArgumentCountError('Patroon should have an even amount of arguments.') }
591
590
  ^
592
591
 
593
592
  UnevenArgumentCountError: Patroon should have an even amount of arguments.
594
- at patroon (/home/ant/projects/patroon/src/index.js:82:37)
593
+ at patroon (/home/blue/project/patroon/src/index.js:82:37)
595
594
  ```
596
595
 
597
596
  #### PatroonError
@@ -635,7 +634,7 @@ npx nyc npm t | npx tap-nyc
635
634
  npx nyc check-coverage
636
635
  ```
637
636
  ```
638
- > patroon@1.5.2 test
637
+ > patroon@1.5.4 test
639
638
  > tape ./src/index.test.js
640
639
  -------------|---------|----------|---------|---------|-------------------
641
640
  File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
@@ -649,7 +648,7 @@ npx nyc check-coverage
649
648
  total: 31
650
649
  passing: 31
651
650
 
652
- duration: 9.2s
651
+ duration: 8.2s
653
652
 
654
653
  ```
655
654
 
@@ -678,4 +677,4 @@ polite and read the [CONTRIBUTING.md][10].
678
677
  [9]:https://www.npmjs.com/package/patroon
679
678
  [10]:./CONTRIBUTING.md
680
679
  [changelog]:./CHANGELOG.md
681
- [runkit]:https://npm.runkit.com/patroon
680
+ [runkit]:https://runkit.com/npm/patroon
package/README.mz CHANGED
@@ -5,11 +5,10 @@ Pattern matching in JavaScript without additional syntax.
5
5
  [![NPM](https://img.shields.io/npm/v/patroon?color=blue&style=flat-square)](https://www.npmjs.com/package/patroon)
6
6
  [![NPM Downloads](https://img.shields.io/npm/dm/patroon?style=flat-square)](https://www.npmjs.com/package/patroon)
7
7
  [![100% Code Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen?style=flat-square)](#tests)
8
- [![Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/patroon?style=flat-square)](https://snyk.io/vuln/npm:patroon)
9
8
  [![Standard Code Style](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](https://standardjs.com)
10
9
  [![License](https://img.shields.io/npm/l/patroon?color=brightgreen&style=flat-square)](./LICENSE)
11
10
 
12
- <toc
11
+ <<toc
13
12
 
14
13
  ## Installation
15
14
 
@@ -330,7 +329,7 @@ A helper that makes it easy to check if a value passes all patterns.
330
329
 
331
330
  ```js ./tape-test
332
331
  const gte200 = x => x >= 200
333
- const lt300 = x => x \< 300
332
+ const lt300 = x => x < 300
334
333
 
335
334
  patroon(
336
335
  every(gte200, lt300), 'Is a 200 status code'
@@ -511,7 +510,7 @@ polite and read the [CONTRIBUTING.md][10].
511
510
 
512
511
  ### Contributors
513
512
 
514
- <contributors
513
+ <<contributors
515
514
 
516
515
  [1]:https://developer.mozilla.org/en-US/docs/Glossary/Primitive
517
516
  [2]:https://en.wikipedia.org/wiki/Multiple_dispatch
@@ -522,4 +521,4 @@ polite and read the [CONTRIBUTING.md][10].
522
521
  [9]:https://www.npmjs.com/package/patroon
523
522
  [10]:./CONTRIBUTING.md
524
523
  [changelog]:./CHANGELOG.md
525
- [runkit]:https://npm.runkit.com/patroon
524
+ [runkit]:https://runkit.com/npm/patroon
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "patroon",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
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.6.3",
31
+ "tape": "^5.9.0",
32
32
  "tape-check": "^1.0.0-rc.0"
33
33
  },
34
34
  "contributors": [