patroon 1.2.3 → 1.2.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/CHANGELOG.md ADDED
@@ -0,0 +1,188 @@
1
+ ### Changelog
2
+
3
+ All notable changes to this project will be documented in this file. Dates are displayed in UTC.
4
+
5
+ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
+
7
+ #### [v1.2.4](https://github.com/bas080/patroon/compare/v1.2.4...v1.2.4)
8
+
9
+ - Generate changelog as part of versioning [`8dade29`](https://github.com/bas080/patroon/commit/8dade29d52bb6c019498fadb9514154a1a4bf90c)
10
+ - Add preversion script for documentation update [`16aac82`](https://github.com/bas080/patroon/commit/16aac82ede2286a907e4d9b3269c860e42237e7b)
11
+
12
+ #### [v1.2.4](https://github.com/bas080/patroon/compare/v1.2.3...v1.2.4)
13
+
14
+ > 25 September 2022
15
+
16
+ - Update tape and readme [`df1478e`](https://github.com/bas080/patroon/commit/df1478e0f59fd59de87a50488006cd7f7fba9d08)
17
+
18
+ #### [v1.2.3](https://github.com/bas080/patroon/compare/v1.2.2...v1.2.3)
19
+
20
+ > 20 September 2022
21
+
22
+ - Fix bug when trying to use in on primitive [`b109b85`](https://github.com/bas080/patroon/commit/b109b8515a41e035deb479594a1a5c9850d9f05e)
23
+
24
+ #### [v1.2.2](https://github.com/bas080/patroon/compare/v1.2.1...v1.2.2)
25
+
26
+ > 16 July 2022
27
+
28
+ - Update tape 2022-07-16 [`11b5059`](https://github.com/bas080/patroon/commit/11b50590e75504673605194e3d459a05ce3f3245)
29
+
30
+ #### [v1.2.1](https://github.com/bas080/patroon/compare/v1.2.0...v1.2.1)
31
+
32
+ > 3 April 2022
33
+
34
+ - Fix vulnerable minimist dep [`465ba2c`](https://github.com/bas080/patroon/commit/465ba2c8e0ec5ec283dd0a50225fd2e840635300)
35
+ - Add some more keywords [`f2943d0`](https://github.com/bas080/patroon/commit/f2943d0f86ddc1ec9e6f81789e9e4d00fee7314a)
36
+
37
+ #### [v1.2.0](https://github.com/bas080/patroon/compare/v1.1.2...v1.2.0)
38
+
39
+ > 6 December 2021
40
+
41
+ - Manage empty values and allow circular patterns [`edf911a`](https://github.com/bas080/patroon/commit/edf911a61a4e5fe55920b502f5ba41fbf0751ac3)
42
+ - Add test for functions to be deprecated in v2 [`938f061`](https://github.com/bas080/patroon/commit/938f0614cc479ce8ed64fc5deacf7964db4adfe2)
43
+ - Use npm ci instead of install and prune [`d5dfa71`](https://github.com/bas080/patroon/commit/d5dfa712e763d72329e2cc013f33bc648c42ea21)
44
+
45
+ #### [v1.1.2](https://github.com/bas080/patroon/compare/v1.1.1...v1.1.2)
46
+
47
+ > 3 December 2021
48
+
49
+ - Fix printing recursive value or pattern [`b9f58e4`](https://github.com/bas080/patroon/commit/b9f58e44e3e1b697171ccdbcb4b5002fbb6d8d51)
50
+
51
+ #### [v1.1.1](https://github.com/bas080/patroon/compare/v1.1.0...v1.1.1)
52
+
53
+ > 2 December 2021
54
+
55
+ - Fix nested RegEx not working [`0821196`](https://github.com/bas080/patroon/commit/0821196cd65d636940c19b324da9f6b98e29eff5)
56
+
57
+ #### [v1.1.0](https://github.com/bas080/patroon/compare/v1.0.0...v1.1.0)
58
+
59
+ > 1 December 2021
60
+
61
+ ### [v1.0.0](https://github.com/bas080/patroon/compare/v0.4.3...v1.0.0)
62
+
63
+ > 1 December 2021
64
+
65
+ - Remove the constructor detection [`a417db9`](https://github.com/bas080/patroon/commit/a417db9ca27ca859cf951534014734c22e73b9b0)
66
+ - Document valid and less usual patterns [`b78f721`](https://github.com/bas080/patroon/commit/b78f72105a891ac4d3e8ec6817395e5273a8d1ad)
67
+ - Report better on circular structures [`3323651`](https://github.com/bas080/patroon/commit/33236514946f65ba2b3a35f557967487f1fe8385)
68
+
69
+ #### [v0.4.3](https://github.com/bas080/patroon/compare/v0.4.2...v0.4.3)
70
+
71
+ > 18 November 2021
72
+
73
+ - Add a count example for arrays [`7c97d89`](https://github.com/bas080/patroon/commit/7c97d898ff20fc7e958089d2a8edde70fe7980d9)
74
+ - Have walkable throw error with useful information [`514d3ab`](https://github.com/bas080/patroon/commit/514d3abd5123a14b8c9d50af32ec639c396ce440)
75
+
76
+ #### [v0.4.2](https://github.com/bas080/patroon/compare/v0.4.1...v0.4.2)
77
+
78
+ > 11 November 2021
79
+
80
+ - Improve the deprecated functions test [`d5a9beb`](https://github.com/bas080/patroon/commit/d5a9bebe37d338498dc54b5f8a170fbce7c10f7d)
81
+ - Add runkit link [`ab8abb7`](https://github.com/bas080/patroon/commit/ab8abb708d529054f77ccd95204f65d5e1fa4057)
82
+ - Improve the deprecated message [`237d812`](https://github.com/bas080/patroon/commit/237d81259fc2aedc8f07bc81359fd145a4975c13)
83
+
84
+ #### [v0.4.1](https://github.com/bas080/patroon/compare/v0.4.0...v0.4.1)
85
+
86
+ > 8 November 2021
87
+
88
+ - Use memplate to add contributors list [`c7ed1fd`](https://github.com/bas080/patroon/commit/c7ed1fd48d240f6d595d6e171482ed46a79fee8d)
89
+ - Fix deprecated helper mistake [`01ebe7f`](https://github.com/bas080/patroon/commit/01ebe7f0d748fa5624947290f1d6c6441b5907be)
90
+
91
+ #### [v0.4.0](https://github.com/bas080/patroon/compare/v0.3.0...v0.4.0)
92
+
93
+ > 8 November 2021
94
+
95
+ - Add some and every helpers [`4dd5d02`](https://github.com/bas080/patroon/commit/4dd5d022c56242c76cb1ca60034ac7346c60047e)
96
+ - Replace deps status shield with snyk shield [`9c3a3ee`](https://github.com/bas080/patroon/commit/9c3a3eef73316dcefe9c4edeb75d940265656e96)
97
+
98
+ #### [v0.3.0](https://github.com/bas080/patroon/compare/v0.2.0...v0.3.0)
99
+
100
+ > 20 October 2021
101
+
102
+ - Improve PatroonError example [`6810218`](https://github.com/bas080/patroon/commit/68102188f70a8f3cb95383cc883e5d151c177b89)
103
+ - Add contributors to package.json [`304bed5`](https://github.com/bas080/patroon/commit/304bed532cefa2fc17427d89869b3c3c2ec8dc14)
104
+ - Also show patroon errors in TOC [`dfbf191`](https://github.com/bas080/patroon/commit/dfbf1912de73ce0ba8b06042d9c01ca947a5c819)
105
+
106
+ #### [v0.2.0](https://github.com/bas080/patroon/compare/v0.1.5...v0.2.0)
107
+
108
+ > 20 October 2021
109
+
110
+ - Document patroon errors [`0648365`](https://github.com/bas080/patroon/commit/06483651b3bd7abc711502c2da3b74c5ec8d0529)
111
+ - Add patroon error [`1d4b8cf`](https://github.com/bas080/patroon/commit/1d4b8cfbb84611555fba4ebb32f8a1c20b6d1f89)
112
+ - Add a TOC to readme [`b48c678`](https://github.com/bas080/patroon/commit/b48c6788e0abba415df64560df5dc1384f901776)
113
+
114
+ #### [v0.1.5](https://github.com/bas080/patroon/compare/v0.1.4...v0.1.5)
115
+
116
+ > 18 October 2021
117
+
118
+ - Make the introduction in the README gentler [`856c9de`](https://github.com/bas080/patroon/commit/856c9de9aba3da12eda504b51d3536f11d5ebada)
119
+ - Fix the shield styles [`19ca422`](https://github.com/bas080/patroon/commit/19ca422f6b55430982368258917640c588e2c832)
120
+
121
+ #### [v0.1.4](https://github.com/bas080/patroon/compare/v0.1.3...v0.1.4)
122
+
123
+ > 8 October 2021
124
+
125
+ - Better document the code coverage [`d6fe277`](https://github.com/bas080/patroon/commit/d6fe27737f9dc075d3d74a31d206507574bbe9fa)
126
+ - Simplify array example [`9eb57e6`](https://github.com/bas080/patroon/commit/9eb57e66688fb0afbd34292653ac353c8c40b313)
127
+ - Publish documentation changes to NPM [`b1f2d0b`](https://github.com/bas080/patroon/commit/b1f2d0bc991cd892ce6f1011410a4d1602763de4)
128
+
129
+ #### [v0.1.3](https://github.com/bas080/patroon/compare/v0.1.2...v0.1.3)
130
+
131
+ > 8 October 2021
132
+
133
+ - Redirect to npm on npm badge click [`081e206`](https://github.com/bas080/patroon/commit/081e206df4cb0ad0c9ec86c7f0d8d124e78880e1)
134
+
135
+ #### [v0.1.2](https://github.com/bas080/patroon/compare/v0.1.1...v0.1.2)
136
+
137
+ > 8 October 2021
138
+
139
+ - Mention the npm page [`fe47c92`](https://github.com/bas080/patroon/commit/fe47c92ea5ef5e3671d60e11a776c23e20116633)
140
+
141
+ #### [v0.1.1](https://github.com/bas080/patroon/compare/v0.1.0...v0.1.1)
142
+
143
+ > 8 October 2021
144
+
145
+ - Add code coverage [`3497cc8`](https://github.com/bas080/patroon/commit/3497cc8b23a195fa63f73dab31cfdd2de231b9e2)
146
+
147
+ #### [v0.1.0](https://github.com/bas080/patroon/compare/v0.0.6...v0.1.0)
148
+
149
+ > 6 October 2021
150
+
151
+ - Add regex support [`29f6730`](https://github.com/bas080/patroon/commit/29f6730598875d13ade1985f6aa302eaf8f1758f)
152
+ - Add an example with default argument values [`4078b43`](https://github.com/bas080/patroon/commit/4078b4366225276a48d20403dab15697f0b8f472)
153
+
154
+ #### [v0.0.6](https://github.com/bas080/patroon/compare/v0.0.5...v0.0.6)
155
+
156
+ > 5 October 2021
157
+
158
+ - Define some more keywords [`c6ce598`](https://github.com/bas080/patroon/commit/c6ce5982b3864987cafa1c23e90cbd78570f13c4)
159
+
160
+ #### [v0.0.5](https://github.com/bas080/patroon/compare/v0.0.4...v0.0.5)
161
+
162
+ > 4 October 2021
163
+
164
+ - Define license in package.json [`c142f6d`](https://github.com/bas080/patroon/commit/c142f6d3e4261e3264858351f5bd4f1ae3c4daab)
165
+
166
+ #### [v0.0.4](https://github.com/bas080/patroon/compare/v0.0.3...v0.0.4)
167
+
168
+ > 4 October 2021
169
+
170
+ - Define repository in package json [`f6048c1`](https://github.com/bas080/patroon/commit/f6048c14ebe5baf26fdbbd1f212bc85ac8561c78)
171
+
172
+ #### [v0.0.3](https://github.com/bas080/patroon/compare/v0.0.2...v0.0.3)
173
+
174
+ > 4 October 2021
175
+
176
+ - Add contributing section to README [`b79f9e2`](https://github.com/bas080/patroon/commit/b79f9e27eb75d58e249ae0c5ecb892c28903402e)
177
+
178
+ #### [v0.0.2](https://github.com/bas080/patroon/compare/v0.0.1...v0.0.2)
179
+
180
+ > 3 October 2021
181
+
182
+ - Fix spelling mistakes [`1bd9975`](https://github.com/bas080/patroon/commit/1bd9975a02d97603ccbda0c96f8da5968beabb09)
183
+
184
+ #### v0.0.1
185
+
186
+ > 1 October 2021
187
+
188
+ - Initiate project [`0da801e`](https://github.com/bas080/patroon/commit/0da801e15901036022bc3af4ef2232c98e7cf851)
package/CONTRIBUTING.md CHANGED
@@ -32,7 +32,26 @@ We also generate the table of contents and store it in memplate.
32
32
 
33
33
  ```bash bash | memplate toc
34
34
  npx markdown-toc --no-firsth1 --maxdepth 4 README.mz
35
+ ```
36
+
37
+ For the tests in the README.mz to work we also need to install patroon.
38
+
39
+ ```bash bash
40
+ npm link
41
+ npm link patroon
42
+ ```
43
+ ```
44
+
45
+ up to date, audited 3 packages in 872ms
35
46
 
47
+ found 0 vulnerabilities
48
+
49
+ added 1 package, and audited 78 packages in 934ms
50
+
51
+ 51 packages are looking for funding
52
+ run `npm fund` for details
53
+
54
+ found 0 vulnerabilities
36
55
  ```
37
56
 
38
57
  We then use memplate to template the README. Then we run [markatzea][6] to run
@@ -43,9 +62,20 @@ memplate < README.mz | markatzea > README.md
43
62
  echo 'Documentation generated successfully.' 1>&2
44
63
  ```
45
64
 
65
+ ## Changelog
66
+
67
+ The [changelog][changelog] is generated using the useful [auto-changelog][auto-changelog]
68
+ project.
69
+
70
+ ```bash bash > /dev/null
71
+ npx auto-changelog -p
72
+ ```
73
+
46
74
  [1]:https://en.wikipedia.org/wiki/Tree_traversal
47
75
  [2]:https://github.com/bas080/patroon/blob/master/src/walkable.js
48
76
  [3]:https://github.com/bas080/patroon/blob/master/src/index.js
49
77
  [4]:https://github.com/bas080/patroon/blob/master/src/helpers.js
50
78
  [6]:https://github.com/bas080/markatzea
51
79
  [7]:https://github.com/bas080/memplate
80
+ [changelog]:./CHANGELOG.md
81
+ [auto-changelog]:https://www.npmjs.com/package/auto-changelog
package/CONTRIBUTING.mz CHANGED
@@ -32,7 +32,13 @@ We also generate the table of contents and store it in memplate.
32
32
 
33
33
  ```bash bash | memplate toc
34
34
  npx markdown-toc --no-firsth1 --maxdepth 4 README.mz
35
+ ```
36
+
37
+ For the tests in the README.mz to work we also need to install patroon.
35
38
 
39
+ ```bash bash
40
+ npm link
41
+ npm link patroon
36
42
  ```
37
43
 
38
44
  We then use memplate to template the README. Then we run [markatzea][6] to run
@@ -43,9 +49,20 @@ memplate < README.mz | markatzea > README.md
43
49
  echo 'Documentation generated successfully.' 1>&2
44
50
  ```
45
51
 
52
+ ## Changelog
53
+
54
+ The [changelog][changelog] is generated using the useful [auto-changelog][auto-changelog]
55
+ project.
56
+
57
+ ```bash bash > /dev/null
58
+ npx auto-changelog -p
59
+ ```
60
+
46
61
  [1]:https://en.wikipedia.org/wiki/Tree_traversal
47
62
  [2]:https://github.com/bas080/patroon/blob/master/src/walkable.js
48
63
  [3]:https://github.com/bas080/patroon/blob/master/src/index.js
49
64
  [4]:https://github.com/bas080/patroon/blob/master/src/helpers.js
50
65
  [6]:https://github.com/bas080/markatzea
51
66
  [7]:https://github.com/bas080/memplate
67
+ [changelog]:./CHANGELOG.md
68
+ [auto-changelog]:https://www.npmjs.com/package/auto-changelog
package/README.md CHANGED
@@ -29,6 +29,7 @@ Pattern matching in JavaScript without additional syntax.
29
29
  + [PatroonError](#patroonerror)
30
30
  - [Examples](#examples)
31
31
  - [Tests](#tests)
32
+ - [Changelog](#changelog)
32
33
  - [Contribute](#contribute)
33
34
  * [Contributors](#contributors)
34
35
 
@@ -42,6 +43,26 @@ npm install patroon
42
43
 
43
44
  ## Usage
44
45
 
46
+ ```js node -
47
+ const {
48
+
49
+ patroon,
50
+
51
+ // Pattern Helpers
52
+ every,
53
+ some,
54
+ multi,
55
+ reference,
56
+ instanceOf,
57
+ _,
58
+
59
+ // Errors
60
+ NoMatchError,
61
+ UnevenArgumentCountError,
62
+ PatroonError,
63
+ } = require('patroon')
64
+ ```
65
+
45
66
  Let's see what valid and less valid uses of patroon are.
46
67
 
47
68
  > You can try out patroon over at [RunKit][runkit].
@@ -583,7 +604,7 @@ npx nyc npm t | npx tap-nyc
583
604
  npx nyc check-coverage
584
605
  ```
585
606
  ```
586
- > patroon@1.2.1 test
607
+ > patroon@1.2.4 test
587
608
  > tape ./src/index.test.js
588
609
  -------------|---------|----------|---------|---------|-------------------
589
610
  File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
@@ -597,10 +618,15 @@ npx nyc check-coverage
597
618
  total: 28
598
619
  passing: 28
599
620
 
600
- duration: 9s
621
+ duration: 11.6s
601
622
 
602
623
  ```
603
624
 
625
+ ## Changelog
626
+
627
+ See the [CHANGELOG.md][changelog] to know what changes are introduced for each
628
+ version release.
629
+
604
630
  ## Contribute
605
631
 
606
632
  You may contribute in whatever manner you see fit. Do try to be helpful and
@@ -620,4 +646,5 @@ polite and read the [CONTRIBUTING.md][10].
620
646
  [8]:https://github.com/istanbuljs/nyc
621
647
  [9]:https://www.npmjs.com/package/patroon
622
648
  [10]:./CONTRIBUTING.md
649
+ [changelog]:./CHANGELOG.md
623
650
  [runkit]:https://npm.runkit.com/patroon
package/README.mz CHANGED
@@ -21,6 +21,26 @@ npm install patroon
21
21
 
22
22
  ## Usage
23
23
 
24
+ ```js node -
25
+ const {
26
+
27
+ patroon,
28
+
29
+ // Pattern Helpers
30
+ every,
31
+ some,
32
+ multi,
33
+ reference,
34
+ instanceOf,
35
+ _,
36
+
37
+ // Errors
38
+ NoMatchError,
39
+ UnevenArgumentCountError,
40
+ PatroonError,
41
+ } = require('patroon')
42
+ ```
43
+
24
44
  Let's see what valid and less valid uses of patroon are.
25
45
 
26
46
  > You can try out patroon over at [RunKit][runkit].
@@ -452,6 +472,11 @@ npx nyc npm t | npx tap-nyc
452
472
  npx nyc check-coverage
453
473
  ```
454
474
 
475
+ ## Changelog
476
+
477
+ See the [CHANGELOG.md][changelog] to know what changes are introduced for each
478
+ version release.
479
+
455
480
  ## Contribute
456
481
 
457
482
  You may contribute in whatever manner you see fit. Do try to be helpful and
@@ -469,4 +494,5 @@ polite and read the [CONTRIBUTING.md][10].
469
494
  [8]:https://github.com/istanbuljs/nyc
470
495
  [9]:https://www.npmjs.com/package/patroon
471
496
  [10]:./CONTRIBUTING.md
497
+ [changelog]:./CHANGELOG.md
472
498
  [runkit]:https://npm.runkit.com/patroon
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "patroon",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "Pattern matching library",
5
5
  "repository": "github:bas080/patroon",
6
6
  "main": "./src/index.js",
7
7
  "scripts": {
8
- "test": "tape ./src/index.test.js"
8
+ "test": "tape ./src/index.test.js",
9
+ "preversion": "markatzea CONTRIBUTING.mz | tee CONTRIBUTING.md && git add *.mz *.md"
9
10
  },
10
11
  "keywords": [
11
12
  "array",