@thi.ng/parse 2.6.0 → 2.6.2

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/CHANGELOG.md +3 -257
  2. package/package.json +8 -9
package/CHANGELOG.md CHANGED
@@ -1,9 +1,11 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2025-01-21T11:16:50Z
3
+ - **Last updated**: 2025-01-23T13:39:11Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
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.
7
9
  See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
8
10
 
9
11
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
@@ -106,259 +108,3 @@ and/or version bumps of transitive dependencies.
106
108
  #### ♻️ Refactoring
107
109
 
108
110
  - add type hint (TS4.6) ([6cd42e8](https://github.com/thi-ng/umbrella/commit/6cd42e8))
109
-
110
- ## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@2.1.0) (2021-11-17)
111
-
112
- #### 🚀 Features
113
-
114
- - Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404))
115
- Improving the overall build ergonomics
116
- - introduced a tools workspaces
117
- - imported it in all needed packages/examples
118
- - inclusive project root
119
-
120
- #### ♻️ Refactoring
121
-
122
- - testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2))
123
- this commit reverts (partly) changes made in:
124
- ef346d7a8753590dc9094108a3d861a8dbd5dd2c
125
- overall purpose is better testament ergonomics:
126
- instead of having to pass NODE_OPTIONS with every invocation
127
- having a binary to handle this for us.
128
-
129
- ### [2.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@2.0.1) (2021-10-13)
130
-
131
- #### ♻️ Refactoring
132
-
133
- - update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
134
- - add .js suffix for all relative imports
135
- - update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
136
-
137
- # [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@2.0.0) (2021-10-12)
138
-
139
- #### 🛑 Breaking changes
140
-
141
- - major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
142
- - BREAKING CHANGE: discontinue CommonJS & UMD versions
143
- - only ESM modules will be published from now on
144
- - CJS obsolete due to ESM support in recent versions of node:
145
- - i.e. launch NodeJS via:
146
- - `node --experimental-specifier-resolution=node --experimental-repl-await`
147
- - in the node REPL use `await import(...)` instead of `require()`
148
- - UMD obsolete due to widespread browser support for ESM
149
- Also:
150
- - normalize/restructure/reorg all package.json files
151
- - cleanup all build scripts, remove obsolete
152
- - switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
153
-
154
- #### ♻️ Refactoring
155
-
156
- - update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
157
- - update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
158
- - update imports ([138571a](https://github.com/thi-ng/umbrella/commit/138571a))
159
- - update deps & imports in various pkgs ([e1cf29e](https://github.com/thi-ng/umbrella/commit/e1cf29e))
160
- - largely related to recent updates/restructuring of these packages:
161
- - api
162
- - defmulti
163
- - errors
164
- - logger
165
- - update defmulti impls ([0303769](https://github.com/thi-ng/umbrella/commit/0303769))
166
-
167
- ### [0.9.7](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@0.9.7) (2020-12-07)
168
-
169
- #### ♻️ Refactoring
170
-
171
- - update type-only imports ([85874bc](https://github.com/thi-ng/umbrella/commit/85874bc))
172
-
173
- ### [0.9.4](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@0.9.4) (2020-09-22)
174
-
175
- #### ♻️ Refactoring
176
-
177
- - update ESC parse preset ([ec94064](https://github.com/thi-ng/umbrella/commit/ec94064))
178
- - re-use ESCAPES LUT from strings pkgs
179
-
180
- ### [0.9.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@0.9.3) (2020-09-13)
181
-
182
- #### ♻️ Refactoring
183
-
184
- - update imports ([b600b00](https://github.com/thi-ng/umbrella/commit/b600b00))
185
-
186
- ## [0.9.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@0.9.0) (2020-08-17)
187
-
188
- #### 🚀 Features
189
-
190
- - add replace/xfReplace() xform ([7291181](https://github.com/thi-ng/umbrella/commit/7291181))
191
- - enable replacement rule transforms ([ca22432](https://github.com/thi-ng/umbrella/commit/ca22432))
192
- - allow strings as rule transform in grammar
193
-
194
- ## [0.8.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@0.8.0) (2020-07-19)
195
-
196
- #### 🚀 Features
197
-
198
- - add nest()/xfNest() transform ([af9c97b](https://github.com/thi-ng/umbrella/commit/af9c97b))
199
- - update grammar (xform rule refs) ([22188a4](https://github.com/thi-ng/umbrella/commit/22188a4))
200
- - allow other parse rules as rule xform (via `xfNest()`)
201
- - add tests
202
- - update repeat grammar ([7aae9ac](https://github.com/thi-ng/umbrella/commit/7aae9ac))
203
- - support specifying min repeat count only (max: infinity), e.g. `{3,}`
204
-
205
- ### [0.7.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@0.7.2) (2020-07-18)
206
-
207
- #### 🩹 Bug fixes
208
-
209
- - export ContextOpts, move to api.ts ([2dfc445](https://github.com/thi-ng/umbrella/commit/2dfc445))
210
-
211
- ### [0.7.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@0.7.1) (2020-07-17)
212
-
213
- #### ⏱ Performance improvements
214
-
215
- - update grammar, use discarding parsers where possible ([d269a8a](https://github.com/thi-ng/umbrella/commit/d269a8a))
216
- - update compile() impls w/ CompileFlags and use `D` versions if poss
217
- - refactor/add compileRD(), compileRDL() helpers
218
- - expose DNL preset rule in defGrammar()
219
- - add alwaysD()
220
- - add tests
221
-
222
- ## [0.7.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@0.7.0) (2020-07-08)
223
-
224
- #### 🚀 Features
225
-
226
- - add lookahead() combinator, add tests ([ee35038](https://github.com/thi-ng/umbrella/commit/ee35038))
227
- - update lookahead ([51a8dc5](https://github.com/thi-ng/umbrella/commit/51a8dc5))
228
- - add pass flag and only succeed if main parser passed at least once
229
- - update grammar DSL ([accacf9](https://github.com/thi-ng/umbrella/commit/accacf9))
230
- - add `.` catch-all term
231
- - add `(?=...)` suffix form for lookahead
232
- - update TERM/TERM_BODY
233
- - lookahead w/ configurable capture ([542c066](https://github.com/thi-ng/umbrella/commit/542c066))
234
- - update/fix grammar DSL, add trim ([f82ba1f](https://github.com/thi-ng/umbrella/commit/f82ba1f))
235
- - update lookahead (cap, non-cap versions)
236
- - add lookahead for alt terms
237
- - update `compileLookahead()`
238
- - add line comment support
239
- - fix `{n}` repeat modifier handling
240
- - add `trim()`/`xfTrim()` xforms
241
- - turn xfPrint() into HOF xform ([d86fa53](https://github.com/thi-ng/umbrella/commit/d86fa53))
242
- - add opt support for custom print fns (other than console)
243
-
244
- ## [0.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@0.6.0) (2020-06-28)
245
-
246
- #### 🚀 Features
247
-
248
- - add `!` discard modifier to grammar ([456efdc](https://github.com/thi-ng/umbrella/commit/456efdc))
249
- - add count/xfCount transform ([056ae08](https://github.com/thi-ng/umbrella/commit/056ae08))
250
-
251
- ## [0.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@0.5.0) (2020-04-23)
252
-
253
- #### 🚀 Features
254
-
255
- - add built-ins, extract STRING, minor updates ([458f5b3](https://github.com/thi-ng/umbrella/commit/458f5b3))
256
- - add anchors to built-in grammar rules
257
- - extract STRING preset parser
258
- - add doc strings
259
- - add s-expr parser test
260
- - update imports
261
- - update readme
262
-
263
- ## [0.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@0.4.0) (2020-04-21)
264
-
265
- #### 🚀 Features
266
-
267
- - update grammar DSL, hoist xforms ([861e7f3](https://github.com/thi-ng/umbrella/commit/861e7f3))
268
- - allow esc sequences in grammar string literals
269
- - expose various preset parser for re-use in grammar DSL
270
- - rename xfHoist => hoistResult
271
- - add new xfHoist to hoist entire child node
272
- - add doc strings
273
-
274
- #### 🩹 Bug fixes
275
-
276
- - update not() behavior, add passD() ([1d0f4c4](https://github.com/thi-ng/umbrella/commit/1d0f4c4))
277
-
278
- #### ♻️ Refactoring
279
-
280
- - update wrap() combinator ([a3dae6e](https://github.com/thi-ng/umbrella/commit/a3dae6e))
281
-
282
- ## [0.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@0.3.0) (2020-04-20)
283
-
284
- #### 🚀 Features
285
-
286
- - add skipWhile(), more discarded wrappers ([832c0b7](https://github.com/thi-ng/umbrella/commit/832c0b7))
287
- - add skipWhile()
288
- - add dalt(), dseq() wrappers
289
- - add NL, DNL presets
290
- - add ParseContext .state setter
291
- - add more whitespace presets ([1398e2b](https://github.com/thi-ng/umbrella/commit/1398e2b))
292
- - add dynamic() & DynamicParser ([b914267](https://github.com/thi-ng/umbrella/commit/b914267))
293
- - initial checkin grammar compiler ([38e9c66](https://github.com/thi-ng/umbrella/commit/38e9c66))
294
- - add ParseContext.reset(), update addChild() ([d47c0a2](https://github.com/thi-ng/umbrella/commit/d47c0a2))
295
- - add/update/rename parser primitives ([328103f](https://github.com/thi-ng/umbrella/commit/328103f))
296
- - add LitParser type to annotate single-char parsers
297
- - add satisfyD()
298
- - add stringOf() for predicated strings
299
- - add wordBoundary anchor
300
- - add/update/rename discarding parser prims:
301
- - litD(), stringD(), noneOfD(), oneOfD(), rangeD()
302
- - export predicate versions:
303
- - litP(), noneOfP(), oneOfP(), rangeP()
304
- - update skipWhile() behavior
305
- - add/update combinators ([e4eab03](https://github.com/thi-ng/umbrella/commit/e4eab03))
306
- - add startsWith, endsWith, entireLine, entirely
307
- - add wrap()
308
- - rename dalt/dseq => altD/seqD
309
- - add withID() xform, add doc strings ([e16426b](https://github.com/thi-ng/umbrella/commit/e16426b))
310
- - add/update/rename parser presets ([12f2499](https://github.com/thi-ng/umbrella/commit/12f2499))
311
- - update grammar parser & compiler ([822fcba](https://github.com/thi-ng/umbrella/commit/822fcba))
312
- - add GrammarOpts
313
- - update rules to enable repetition of all terms
314
- - add string term
315
- - make debug output optional
316
- - add discarding combinators, move discard ([e09a2c4](https://github.com/thi-ng/umbrella/commit/e09a2c4))
317
- - add repeatD, oneOrMoreD, zeroOrMoreD
318
- - update ESC & whitespace parsers ([069a6ef](https://github.com/thi-ng/umbrella/commit/069a6ef))
319
- - add grammar default transforms, update/fix rules ([03ed965](https://github.com/thi-ng/umbrella/commit/03ed965))
320
-
321
- #### ♻️ Refactoring
322
-
323
- - update grammar & pkg re-exports ([3ba8973](https://github.com/thi-ng/umbrella/commit/3ba8973))
324
-
325
- ## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@0.2.0) (2020-04-17)
326
-
327
- #### 🚀 Features
328
-
329
- - add/rename/reorg parsers, xforms, ctx ([ee537f4](https://github.com/thi-ng/umbrella/commit/ee537f4))
330
- - add dlit(), dstring()
331
- - add fail()
332
- - rename lift() => pass(), Lift<T> => PassValue<T>
333
- - rename merge()/xfMerge() => join()/xfJoin()
334
- - add hoist()/xfHoist()
335
- - migrate xform syntax sugars to /xform
336
- - add indent() util for ParseContext & print()
337
-
338
- #### ⏱ Performance improvements
339
-
340
- - major speedup satisfy() (~1.6x faster) ([8ca5c7f](https://github.com/thi-ng/umbrella/commit/8ca5c7f))
341
- - update ParseContext.addChild() to optionally progress reader
342
- - update call sites in satisfy(), lift(), repeat()
343
-
344
- ## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@0.1.0) (2020-04-16)
345
-
346
- #### 🚀 Features
347
-
348
- - import as new package ([151e50c](https://github.com/thi-ng/umbrella/commit/151e50c))
349
- - update repeat ops, reader, initial state ([c5cfabe](https://github.com/thi-ng/umbrella/commit/c5cfabe))
350
- - add collect/xfCollect, update xfPrint ([43f3368](https://github.com/thi-ng/umbrella/commit/43f3368))
351
- - update ParseContext, repeat & lift ([bef1d4f](https://github.com/thi-ng/umbrella/commit/bef1d4f))
352
- - add context debug option / tracing
353
- - add .addChild()
354
- - update repeat zero-match handling
355
- - simplify lift()
356
- - add ctx getters, add presets, update maybe ([02597bf](https://github.com/thi-ng/umbrella/commit/02597bf))
357
- - add ArrayReader, update pkg info ([3bec0db](https://github.com/thi-ng/umbrella/commit/3bec0db))
358
- - make retained state info optional ([a89ee87](https://github.com/thi-ng/umbrella/commit/a89ee87))
359
- - update defContext, add basic array test ([cd7363d](https://github.com/thi-ng/umbrella/commit/cd7363d))
360
-
361
- #### ♻️ Refactoring
362
-
363
- - update context, rename ops, remove arrays dep ([a913c96](https://github.com/thi-ng/umbrella/commit/a913c96))
364
- - split presets into sep files ([43f62c5](https://github.com/thi-ng/umbrella/commit/43f62c5))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/parse",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "description": "Purely functional parser combinators & AST generation for generic inputs",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -40,17 +40,16 @@
40
40
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
41
41
  },
42
42
  "dependencies": {
43
- "@thi.ng/api": "^8.11.16",
44
- "@thi.ng/checks": "^3.6.19",
45
- "@thi.ng/defmulti": "^3.0.55",
46
- "@thi.ng/errors": "^2.5.22",
47
- "@thi.ng/strings": "^3.9.1"
43
+ "@thi.ng/api": "^8.11.18",
44
+ "@thi.ng/checks": "^3.6.21",
45
+ "@thi.ng/defmulti": "^3.0.57",
46
+ "@thi.ng/errors": "^2.5.24",
47
+ "@thi.ng/strings": "^3.9.3"
48
48
  },
49
49
  "devDependencies": {
50
- "@microsoft/api-extractor": "^7.48.1",
51
50
  "esbuild": "^0.24.2",
52
51
  "typedoc": "^0.27.6",
53
- "typescript": "^5.7.2"
52
+ "typescript": "^5.7.3"
54
53
  },
55
54
  "keywords": [
56
55
  "ast",
@@ -246,5 +245,5 @@
246
245
  ],
247
246
  "year": 2020
248
247
  },
249
- "gitHead": "56e7a1724e7b0cb5c41119f60320b6ff0e8a3c1c\n"
248
+ "gitHead": "b92b48abda9941d608be8a2e1c83447e679a6f79\n"
250
249
  }