@thi.ng/parse 2.6.29 → 2.6.34

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.
Files changed (2) hide show
  1. package/package.json +249 -249
  2. package/CHANGELOG.md +0 -110
package/package.json CHANGED
@@ -1,250 +1,250 @@
1
1
  {
2
- "name": "@thi.ng/parse",
3
- "version": "2.6.29",
4
- "description": "Purely functional parser combinators & AST generation for generic inputs",
5
- "type": "module",
6
- "module": "./index.js",
7
- "typings": "./index.d.ts",
8
- "sideEffects": false,
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/thi-ng/umbrella.git"
12
- },
13
- "homepage": "https://thi.ng/parse",
14
- "funding": [
15
- {
16
- "type": "github",
17
- "url": "https://github.com/sponsors/postspectacular"
18
- },
19
- {
20
- "type": "patreon",
21
- "url": "https://patreon.com/thing_umbrella"
22
- },
23
- {
24
- "type": "liberapay",
25
- "url": "https://liberapay.com/thi.ng"
26
- }
27
- ],
28
- "author": "Karsten Schmidt (https://thi.ng)",
29
- "license": "Apache-2.0",
30
- "scripts": {
31
- "build": "yarn build:esbuild && yarn build:decl",
32
- "build:decl": "tsc --declaration --emitDeclarationOnly",
33
- "build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
34
- "clean": "bun ../../tools/src/clean-package.ts combinators presets prims readers xform",
35
- "doc": "typedoc --options ../../typedoc.json --out doc src/index.ts",
36
- "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
37
- "pub": "yarn npm publish --access public",
38
- "test": "bun test",
39
- "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
- },
41
- "dependencies": {
42
- "@thi.ng/api": "^8.12.2",
43
- "@thi.ng/checks": "^3.7.18",
44
- "@thi.ng/defmulti": "^3.0.77",
45
- "@thi.ng/errors": "^2.5.42",
46
- "@thi.ng/strings": "^3.9.22"
47
- },
48
- "devDependencies": {
49
- "esbuild": "^0.25.9",
50
- "typedoc": "^0.28.12",
51
- "typescript": "^5.9.2"
52
- },
53
- "keywords": [
54
- "ast",
55
- "combinator",
56
- "compiler",
57
- "composition",
58
- "datastructure",
59
- "dsl",
60
- "functional",
61
- "grammar",
62
- "parser",
63
- "peg",
64
- "recursion",
65
- "regexp",
66
- "string",
67
- "text",
68
- "tree",
69
- "typescript"
70
- ],
71
- "publishConfig": {
72
- "access": "public"
73
- },
74
- "engines": {
75
- "node": ">=18"
76
- },
77
- "files": [
78
- "./*.js",
79
- "./*.d.ts",
80
- "combinators",
81
- "presets",
82
- "prims",
83
- "readers",
84
- "xform"
85
- ],
86
- "exports": {
87
- ".": {
88
- "default": "./index.js"
89
- },
90
- "./api": {
91
- "default": "./api.js"
92
- },
93
- "./combinators/alt": {
94
- "default": "./combinators/alt.js"
95
- },
96
- "./combinators/boundary": {
97
- "default": "./combinators/boundary.js"
98
- },
99
- "./combinators/check": {
100
- "default": "./combinators/check.js"
101
- },
102
- "./combinators/dynamic": {
103
- "default": "./combinators/dynamic.js"
104
- },
105
- "./combinators/expect": {
106
- "default": "./combinators/expect.js"
107
- },
108
- "./combinators/lookahead": {
109
- "default": "./combinators/lookahead.js"
110
- },
111
- "./combinators/maybe": {
112
- "default": "./combinators/maybe.js"
113
- },
114
- "./combinators/not": {
115
- "default": "./combinators/not.js"
116
- },
117
- "./combinators/repeat": {
118
- "default": "./combinators/repeat.js"
119
- },
120
- "./combinators/seq": {
121
- "default": "./combinators/seq.js"
122
- },
123
- "./combinators/wrap": {
124
- "default": "./combinators/wrap.js"
125
- },
126
- "./combinators/xform": {
127
- "default": "./combinators/xform.js"
128
- },
129
- "./context": {
130
- "default": "./context.js"
131
- },
132
- "./error": {
133
- "default": "./error.js"
134
- },
135
- "./grammar": {
136
- "default": "./grammar.js"
137
- },
138
- "./presets/alpha": {
139
- "default": "./presets/alpha.js"
140
- },
141
- "./presets/bits": {
142
- "default": "./presets/bits.js"
143
- },
144
- "./presets/digits": {
145
- "default": "./presets/digits.js"
146
- },
147
- "./presets/escape": {
148
- "default": "./presets/escape.js"
149
- },
150
- "./presets/hex": {
151
- "default": "./presets/hex.js"
152
- },
153
- "./presets/numbers": {
154
- "default": "./presets/numbers.js"
155
- },
156
- "./presets/string": {
157
- "default": "./presets/string.js"
158
- },
159
- "./presets/whitespace": {
160
- "default": "./presets/whitespace.js"
161
- },
162
- "./prims/always": {
163
- "default": "./prims/always.js"
164
- },
165
- "./prims/anchor": {
166
- "default": "./prims/anchor.js"
167
- },
168
- "./prims/fail": {
169
- "default": "./prims/fail.js"
170
- },
171
- "./prims/lit": {
172
- "default": "./prims/lit.js"
173
- },
174
- "./prims/none-of": {
175
- "default": "./prims/none-of.js"
176
- },
177
- "./prims/one-of": {
178
- "default": "./prims/one-of.js"
179
- },
180
- "./prims/pass": {
181
- "default": "./prims/pass.js"
182
- },
183
- "./prims/range": {
184
- "default": "./prims/range.js"
185
- },
186
- "./prims/satisfy": {
187
- "default": "./prims/satisfy.js"
188
- },
189
- "./prims/skip": {
190
- "default": "./prims/skip.js"
191
- },
192
- "./prims/string": {
193
- "default": "./prims/string.js"
194
- },
195
- "./readers/array-reader": {
196
- "default": "./readers/array-reader.js"
197
- },
198
- "./readers/string-reader": {
199
- "default": "./readers/string-reader.js"
200
- },
201
- "./xform/collect": {
202
- "default": "./xform/collect.js"
203
- },
204
- "./xform/comp": {
205
- "default": "./xform/comp.js"
206
- },
207
- "./xform/count": {
208
- "default": "./xform/count.js"
209
- },
210
- "./xform/discard": {
211
- "default": "./xform/discard.js"
212
- },
213
- "./xform/hoist": {
214
- "default": "./xform/hoist.js"
215
- },
216
- "./xform/join": {
217
- "default": "./xform/join.js"
218
- },
219
- "./xform/json": {
220
- "default": "./xform/json.js"
221
- },
222
- "./xform/nest": {
223
- "default": "./xform/nest.js"
224
- },
225
- "./xform/number": {
226
- "default": "./xform/number.js"
227
- },
228
- "./xform/print": {
229
- "default": "./xform/print.js"
230
- },
231
- "./xform/replace": {
232
- "default": "./xform/replace.js"
233
- },
234
- "./xform/trim": {
235
- "default": "./xform/trim.js"
236
- },
237
- "./xform/with-id": {
238
- "default": "./xform/with-id.js"
239
- }
240
- },
241
- "thi.ng": {
242
- "related": [
243
- "hiccup-markdown",
244
- "proctext",
245
- "transducers-fsm"
246
- ],
247
- "year": 2020
248
- },
249
- "gitHead": "3c3531350eec56011982583c694aeb1a2e0d0ff4\n"
250
- }
2
+ "name": "@thi.ng/parse",
3
+ "version": "2.6.34",
4
+ "description": "Purely functional parser combinators & AST generation for generic inputs",
5
+ "type": "module",
6
+ "module": "./index.js",
7
+ "typings": "./index.d.ts",
8
+ "sideEffects": false,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/thi-ng/umbrella.git"
12
+ },
13
+ "homepage": "https://thi.ng/parse",
14
+ "funding": [
15
+ {
16
+ "type": "github",
17
+ "url": "https://github.com/sponsors/postspectacular"
18
+ },
19
+ {
20
+ "type": "patreon",
21
+ "url": "https://patreon.com/thing_umbrella"
22
+ },
23
+ {
24
+ "type": "liberapay",
25
+ "url": "https://liberapay.com/thi.ng"
26
+ }
27
+ ],
28
+ "author": "Karsten Schmidt (https://thi.ng)",
29
+ "license": "Apache-2.0",
30
+ "scripts": {
31
+ "build": "yarn build:esbuild && yarn build:decl",
32
+ "build:decl": "tsc --declaration --emitDeclarationOnly",
33
+ "build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
34
+ "clean": "bun ../../tools/src/clean-package.ts combinators presets prims readers xform",
35
+ "doc": "typedoc --options ../../typedoc.json --out doc src/index.ts",
36
+ "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
37
+ "pub": "npm publish --access public",
38
+ "test": "bun test",
39
+ "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
+ },
41
+ "dependencies": {
42
+ "@thi.ng/api": "^8.12.6",
43
+ "@thi.ng/checks": "^3.7.22",
44
+ "@thi.ng/defmulti": "^3.0.82",
45
+ "@thi.ng/errors": "^2.5.46",
46
+ "@thi.ng/strings": "^3.9.26"
47
+ },
48
+ "devDependencies": {
49
+ "esbuild": "^0.25.11",
50
+ "typedoc": "^0.28.14",
51
+ "typescript": "^5.9.3"
52
+ },
53
+ "keywords": [
54
+ "ast",
55
+ "combinator",
56
+ "compiler",
57
+ "composition",
58
+ "datastructure",
59
+ "dsl",
60
+ "functional",
61
+ "grammar",
62
+ "parser",
63
+ "peg",
64
+ "recursion",
65
+ "regexp",
66
+ "string",
67
+ "text",
68
+ "tree",
69
+ "typescript"
70
+ ],
71
+ "publishConfig": {
72
+ "access": "public"
73
+ },
74
+ "engines": {
75
+ "node": ">=18"
76
+ },
77
+ "files": [
78
+ "./*.js",
79
+ "./*.d.ts",
80
+ "combinators",
81
+ "presets",
82
+ "prims",
83
+ "readers",
84
+ "xform"
85
+ ],
86
+ "exports": {
87
+ ".": {
88
+ "default": "./index.js"
89
+ },
90
+ "./api": {
91
+ "default": "./api.js"
92
+ },
93
+ "./combinators/alt": {
94
+ "default": "./combinators/alt.js"
95
+ },
96
+ "./combinators/boundary": {
97
+ "default": "./combinators/boundary.js"
98
+ },
99
+ "./combinators/check": {
100
+ "default": "./combinators/check.js"
101
+ },
102
+ "./combinators/dynamic": {
103
+ "default": "./combinators/dynamic.js"
104
+ },
105
+ "./combinators/expect": {
106
+ "default": "./combinators/expect.js"
107
+ },
108
+ "./combinators/lookahead": {
109
+ "default": "./combinators/lookahead.js"
110
+ },
111
+ "./combinators/maybe": {
112
+ "default": "./combinators/maybe.js"
113
+ },
114
+ "./combinators/not": {
115
+ "default": "./combinators/not.js"
116
+ },
117
+ "./combinators/repeat": {
118
+ "default": "./combinators/repeat.js"
119
+ },
120
+ "./combinators/seq": {
121
+ "default": "./combinators/seq.js"
122
+ },
123
+ "./combinators/wrap": {
124
+ "default": "./combinators/wrap.js"
125
+ },
126
+ "./combinators/xform": {
127
+ "default": "./combinators/xform.js"
128
+ },
129
+ "./context": {
130
+ "default": "./context.js"
131
+ },
132
+ "./error": {
133
+ "default": "./error.js"
134
+ },
135
+ "./grammar": {
136
+ "default": "./grammar.js"
137
+ },
138
+ "./presets/alpha": {
139
+ "default": "./presets/alpha.js"
140
+ },
141
+ "./presets/bits": {
142
+ "default": "./presets/bits.js"
143
+ },
144
+ "./presets/digits": {
145
+ "default": "./presets/digits.js"
146
+ },
147
+ "./presets/escape": {
148
+ "default": "./presets/escape.js"
149
+ },
150
+ "./presets/hex": {
151
+ "default": "./presets/hex.js"
152
+ },
153
+ "./presets/numbers": {
154
+ "default": "./presets/numbers.js"
155
+ },
156
+ "./presets/string": {
157
+ "default": "./presets/string.js"
158
+ },
159
+ "./presets/whitespace": {
160
+ "default": "./presets/whitespace.js"
161
+ },
162
+ "./prims/always": {
163
+ "default": "./prims/always.js"
164
+ },
165
+ "./prims/anchor": {
166
+ "default": "./prims/anchor.js"
167
+ },
168
+ "./prims/fail": {
169
+ "default": "./prims/fail.js"
170
+ },
171
+ "./prims/lit": {
172
+ "default": "./prims/lit.js"
173
+ },
174
+ "./prims/none-of": {
175
+ "default": "./prims/none-of.js"
176
+ },
177
+ "./prims/one-of": {
178
+ "default": "./prims/one-of.js"
179
+ },
180
+ "./prims/pass": {
181
+ "default": "./prims/pass.js"
182
+ },
183
+ "./prims/range": {
184
+ "default": "./prims/range.js"
185
+ },
186
+ "./prims/satisfy": {
187
+ "default": "./prims/satisfy.js"
188
+ },
189
+ "./prims/skip": {
190
+ "default": "./prims/skip.js"
191
+ },
192
+ "./prims/string": {
193
+ "default": "./prims/string.js"
194
+ },
195
+ "./readers/array-reader": {
196
+ "default": "./readers/array-reader.js"
197
+ },
198
+ "./readers/string-reader": {
199
+ "default": "./readers/string-reader.js"
200
+ },
201
+ "./xform/collect": {
202
+ "default": "./xform/collect.js"
203
+ },
204
+ "./xform/comp": {
205
+ "default": "./xform/comp.js"
206
+ },
207
+ "./xform/count": {
208
+ "default": "./xform/count.js"
209
+ },
210
+ "./xform/discard": {
211
+ "default": "./xform/discard.js"
212
+ },
213
+ "./xform/hoist": {
214
+ "default": "./xform/hoist.js"
215
+ },
216
+ "./xform/join": {
217
+ "default": "./xform/join.js"
218
+ },
219
+ "./xform/json": {
220
+ "default": "./xform/json.js"
221
+ },
222
+ "./xform/nest": {
223
+ "default": "./xform/nest.js"
224
+ },
225
+ "./xform/number": {
226
+ "default": "./xform/number.js"
227
+ },
228
+ "./xform/print": {
229
+ "default": "./xform/print.js"
230
+ },
231
+ "./xform/replace": {
232
+ "default": "./xform/replace.js"
233
+ },
234
+ "./xform/trim": {
235
+ "default": "./xform/trim.js"
236
+ },
237
+ "./xform/with-id": {
238
+ "default": "./xform/with-id.js"
239
+ }
240
+ },
241
+ "thi.ng": {
242
+ "related": [
243
+ "hiccup-markdown",
244
+ "proctext",
245
+ "transducers-fsm"
246
+ ],
247
+ "year": 2020
248
+ },
249
+ "gitHead": "136a5e5ef0b69e82329db00d806c3c4e8f1aa063\n"
250
+ }
package/CHANGELOG.md DELETED
@@ -1,110 +0,0 @@
1
- # Change Log
2
-
3
- - **Last updated**: 2025-09-25T11:10:32Z
4
- - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
-
6
- All notable changes to this project will be documented in this file.
7
- Only versions published since **2022-01-01** are listed here.
8
- Please consult the Git history for older version information.
9
- See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
10
-
11
- **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
12
- and/or version bumps of transitive dependencies.
13
-
14
- ## [2.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@2.6.0) (2025-01-21)
15
-
16
- #### 🚀 Features
17
-
18
- - expose more built-in grammar presets ([6e5a057](https://github.com/thi-ng/umbrella/commit/6e5a057))
19
- - expose as new builtins:
20
- - `BINARY_UINT`
21
- - `HEX_UINT`
22
- - `SPACE`
23
- - `UINT`
24
-
25
- #### ⏱ Performance improvements
26
-
27
- - optimize char selection grammar compilation ([0476baa](https://github.com/thi-ng/umbrella/commit/0476baa))
28
- - check if char selection only contains characters (no ranges)
29
- - if so, compile using `oneOf()` instead of `alt()` (avoiding extra level of iteration)
30
- - update grammar rule compilation ([8341af6](https://github.com/thi-ng/umbrella/commit/8341af6))
31
- - avoid `dynamic()` wrapper for grammar rules which don't require it (to avoid extraneous indirection)
32
-
33
- ## [2.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@2.5.0) (2025-01-17)
34
-
35
- #### 🚀 Features
36
-
37
- - update `DynamicParser`, add `IDeref` support ([cf0d51c](https://github.com/thi-ng/umbrella/commit/cf0d51c))
38
-
39
- #### ♻️ Refactoring
40
-
41
- - remove `ParseState.last`, update `IReader` & impls ([20fc5cf](https://github.com/thi-ng/umbrella/commit/20fc5cf))
42
- - remove `ParseState.last` to lower RAM usage
43
- - add `IReader.prev()` to obtain previous char, add docs
44
- - update reader impls
45
- - update anchor parsers
46
- - update tests
47
- - minor internal updates ([ef97aee](https://github.com/thi-ng/umbrella/commit/ef97aee))
48
- - update `ParseContext.start()`
49
- - update `check()` combinator impl
50
-
51
- ### [2.4.64](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@2.4.64) (2025-01-14)
52
-
53
- #### ♻️ Refactoring
54
-
55
- - various minor updates ([42ce3f6](https://github.com/thi-ng/umbrella/commit/42ce3f6))
56
-
57
- ### [2.4.52](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@2.4.52) (2024-08-29)
58
-
59
- #### ⏱ Performance improvements
60
-
61
- - update ParseState & ParseScope handling (result: 1.2-1.6x faster) ([c94b5cf](https://github.com/thi-ng/umbrella/commit/c94b5cf))
62
- - refactor ParseState/Scope as data classes (keep same structure)
63
- - minor update scope transforms
64
- - update tests
65
-
66
- ### [2.4.43](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@2.4.43) (2024-06-21)
67
-
68
- #### ♻️ Refactoring
69
-
70
- - rename various rest args to be more semantically meaningful ([8088a56](https://github.com/thi-ng/umbrella/commit/8088a56))
71
- - enforce uniform naming convention of internal functions ([56992b2](https://github.com/thi-ng/umbrella/commit/56992b2))
72
-
73
- ### [2.4.5](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@2.4.5) (2023-11-09)
74
-
75
- #### ♻️ Refactoring
76
-
77
- - update all tests (packages A-S) ([e3085e4](https://github.com/thi-ng/umbrella/commit/e3085e4))
78
-
79
- ## [2.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@2.4.0) (2023-09-19)
80
-
81
- #### 🚀 Features
82
-
83
- - add ParseContext.peakDepth, update recursion limit ([0a2b7db](https://github.com/thi-ng/umbrella/commit/0a2b7db))
84
-
85
- ## [2.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@2.3.0) (2023-09-06)
86
-
87
- #### 🚀 Features
88
-
89
- - add altS() combinator ([52c76ca](https://github.com/thi-ng/umbrella/commit/52c76ca))
90
-
91
- ## [2.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@2.2.0) (2022-06-15)
92
-
93
- #### 🚀 Features
94
-
95
- - add new transformers (json, numbers) ([2087131](https://github.com/thi-ng/umbrella/commit/2087131))
96
- - add xfJson(), json() transform
97
- - add int(), hexInt(), float() transform syntax sugar
98
- - add `json` as built-in tx for grammar
99
-
100
- ### [2.1.8](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@2.1.8) (2022-06-09)
101
-
102
- #### ♻️ Refactoring
103
-
104
- - various (minor) TS4.7 related updates/fixes ([9d9ecae](https://github.com/thi-ng/umbrella/commit/9d9ecae))
105
-
106
- ### [2.1.5](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@2.1.5) (2022-03-11)
107
-
108
- #### ♻️ Refactoring
109
-
110
- - add type hint (TS4.6) ([6cd42e8](https://github.com/thi-ng/umbrella/commit/6cd42e8))