@thi.ng/parse 2.4.3 → 2.4.6
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 +7 -1
- package/README.md +2 -1
- package/context.js +8 -0
- package/package.json +12 -13
- package/readers/array-reader.js +1 -0
- package/readers/string-reader.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2023-
|
|
3
|
+
- **Last updated**: 2023-11-09T10:28:19Z
|
|
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.
|
|
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
### [2.4.5](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@2.4.5) (2023-11-09)
|
|
13
|
+
|
|
14
|
+
#### ♻️ Refactoring
|
|
15
|
+
|
|
16
|
+
- update all tests (packages A-S) ([e3085e4](https://github.com/thi-ng/umbrella/commit/e3085e4))
|
|
17
|
+
|
|
12
18
|
## [2.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/parse@2.4.0) (2023-09-19)
|
|
13
19
|
|
|
14
20
|
#### 🚀 Features
|
package/README.md
CHANGED
|
@@ -90,7 +90,7 @@ For Node.js REPL:
|
|
|
90
90
|
const parse = await import("@thi.ng/parse");
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 5.
|
|
93
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 5.23 KB
|
|
94
94
|
|
|
95
95
|
## Dependencies
|
|
96
96
|
|
|
@@ -111,6 +111,7 @@ directory are using this package:
|
|
|
111
111
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/markdown-parser.jpg" width="240"/> | Markdown to Hiccup to HTML parser / transformer | [Demo](https://demo.thi.ng/umbrella/markdown/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/markdown) |
|
|
112
112
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/mastodon-feed.jpg" width="240"/> | Mastodon API feed reader with support for different media types, fullscreen media modal, HTML rewriting | [Demo](https://demo.thi.ng/umbrella/mastodon-feed/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/mastodon-feed) |
|
|
113
113
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/parse-playground.png" width="240"/> | Parser grammar livecoding editor/playground & codegen | [Demo](https://demo.thi.ng/umbrella/parse-playground/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/parse-playground) |
|
|
114
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/procedural-text.jpg" width="240"/> | Procedural stochastic text generation via custom DSL, parse grammar & AST transformation | [Demo](https://demo.thi.ng/umbrella/procedural-text/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/procedural-text) |
|
|
114
115
|
|
|
115
116
|
**Note:** Please also see the [dedicated wiki
|
|
116
117
|
page](https://github.com/thi-ng/umbrella/wiki/Parser-grammars) collecting
|
package/context.js
CHANGED
|
@@ -5,6 +5,14 @@ import { defArrayReader } from "./readers/array-reader.js";
|
|
|
5
5
|
import { defStringReader } from "./readers/string-reader.js";
|
|
6
6
|
import { indent } from "./utils.js";
|
|
7
7
|
export class ParseContext {
|
|
8
|
+
reader;
|
|
9
|
+
opts;
|
|
10
|
+
_scopes;
|
|
11
|
+
_curr;
|
|
12
|
+
_maxDepth;
|
|
13
|
+
_peakDepth;
|
|
14
|
+
_debug;
|
|
15
|
+
_retain;
|
|
8
16
|
constructor(reader, opts) {
|
|
9
17
|
this.reader = reader;
|
|
10
18
|
this.opts = { maxDepth: 64, debug: false, retain: false, ...opts };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/parse",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.6",
|
|
4
4
|
"description": "Purely functional parser combinators & AST generation for generic inputs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -28,24 +28,23 @@
|
|
|
28
28
|
"clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc combinators presets prims readers xform",
|
|
29
29
|
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
30
30
|
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
31
|
-
"doc:readme": "
|
|
32
|
-
"doc:stats": "tools:module-stats",
|
|
31
|
+
"doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
|
|
33
32
|
"pub": "yarn npm publish --access public",
|
|
34
|
-
"test": "
|
|
33
|
+
"test": "bun test"
|
|
35
34
|
},
|
|
36
35
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.9.
|
|
38
|
-
"@thi.ng/checks": "^3.4.
|
|
39
|
-
"@thi.ng/defmulti": "^3.0.
|
|
40
|
-
"@thi.ng/errors": "^2.4.
|
|
41
|
-
"@thi.ng/strings": "^3.6.
|
|
36
|
+
"@thi.ng/api": "^8.9.8",
|
|
37
|
+
"@thi.ng/checks": "^3.4.8",
|
|
38
|
+
"@thi.ng/defmulti": "^3.0.6",
|
|
39
|
+
"@thi.ng/errors": "^2.4.2",
|
|
40
|
+
"@thi.ng/strings": "^3.6.6"
|
|
42
41
|
},
|
|
43
42
|
"devDependencies": {
|
|
44
|
-
"@microsoft/api-extractor": "^7.38.
|
|
45
|
-
"@thi.ng/testament": "^0.
|
|
43
|
+
"@microsoft/api-extractor": "^7.38.2",
|
|
44
|
+
"@thi.ng/testament": "^0.4.1",
|
|
46
45
|
"rimraf": "^5.0.5",
|
|
47
46
|
"tools": "^0.0.1",
|
|
48
|
-
"typedoc": "^0.25.
|
|
47
|
+
"typedoc": "^0.25.3",
|
|
49
48
|
"typescript": "^5.2.2"
|
|
50
49
|
},
|
|
51
50
|
"keywords": [
|
|
@@ -241,5 +240,5 @@
|
|
|
241
240
|
],
|
|
242
241
|
"year": 2020
|
|
243
242
|
},
|
|
244
|
-
"gitHead": "
|
|
243
|
+
"gitHead": "669a3151e4302480244fe3e60eff5e732ea5b7a7\n"
|
|
245
244
|
}
|
package/readers/array-reader.js
CHANGED