@thi.ng/hiccup-html-parse 0.3.42 → 0.3.44

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-05-08T18:24:32Z
3
+ - **Last updated**: 2024-06-29T09:28:36Z
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
+ ### [0.3.43](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-html-parse@0.3.43) (2024-06-21)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - enforce uniform naming convention of internal functions ([56992b2](https://github.com/thi-ng/umbrella/commit/56992b2))
17
+
12
18
  ### [0.3.5](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-html-parse@0.3.5) (2023-11-09)
13
19
 
14
20
  #### ♻️ Refactoring
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  > [!NOTE]
10
- > This is one of 192 standalone projects, maintained as part
10
+ > This is one of 189 standalone projects, maintained as part
11
11
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
12
12
  > and anti-framework.
13
13
  >
package/index.js CHANGED
@@ -54,7 +54,7 @@ const parseHtml = (src, opts) => {
54
54
  };
55
55
  if (result) {
56
56
  const acc = [];
57
- transformScope(ctx.root, opts, acc);
57
+ __transformScope(ctx.root, opts, acc);
58
58
  return {
59
59
  type: ctx.done ? "success" : "partial",
60
60
  result: acc,
@@ -67,7 +67,7 @@ const parseHtml = (src, opts) => {
67
67
  return { type: "error", err: e };
68
68
  }
69
69
  };
70
- const transformScope = defmulti(
70
+ const __transformScope = defmulti(
71
71
  (x) => x.id,
72
72
  { cdata_el: "el", void_el: "el" },
73
73
  {
@@ -81,10 +81,11 @@ const transformScope = defmulti(
81
81
  if (opts.doctype && children?.[0]) {
82
82
  acc.push(["!DOCTYPE", children[0].result]);
83
83
  }
84
- for (let x of children[1].children) transformScope(x, opts, acc);
84
+ for (let x of children[1].children)
85
+ __transformScope(x, opts, acc);
85
86
  },
86
87
  node: ({ children }, opts, acc) => {
87
- transformScope(children[0], opts, acc);
88
+ __transformScope(children[0], opts, acc);
88
89
  },
89
90
  comment: ({ result }, opts, acc) => {
90
91
  if (opts.comments) acc.push(["__COMMENT__", result.trim()]);
@@ -114,7 +115,7 @@ const transformScope = defmulti(
114
115
  if (body.result) {
115
116
  el.push(body.result.trim());
116
117
  } else if (body.children) {
117
- for (let x of body.children) transformScope(x, opts, el);
118
+ for (let x of body.children) __transformScope(x, opts, el);
118
119
  }
119
120
  }
120
121
  const result = opts.tx ? opts.tx(el) : el;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/hiccup-html-parse",
3
- "version": "0.3.42",
3
+ "version": "0.3.44",
4
4
  "description": "Well-formed HTML parsing and customizable transformation to nested JS arrays in @thi.ng/hiccup format",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -10,7 +10,7 @@
10
10
  "type": "git",
11
11
  "url": "https://github.com/thi-ng/umbrella.git"
12
12
  },
13
- "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html-parse#readme",
13
+ "homepage": "https://thi.ng/hiccup-html-parse",
14
14
  "funding": [
15
15
  {
16
16
  "type": "github",
@@ -36,16 +36,16 @@
36
36
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@thi.ng/api": "^8.11.2",
40
- "@thi.ng/defmulti": "^3.0.39",
41
- "@thi.ng/parse": "^2.4.42",
42
- "@thi.ng/strings": "^3.7.33"
39
+ "@thi.ng/api": "^8.11.4",
40
+ "@thi.ng/defmulti": "^3.0.41",
41
+ "@thi.ng/parse": "^2.4.44",
42
+ "@thi.ng/strings": "^3.7.35"
43
43
  },
44
44
  "devDependencies": {
45
- "@microsoft/api-extractor": "^7.43.2",
46
- "esbuild": "^0.21.1",
45
+ "@microsoft/api-extractor": "^7.47.0",
46
+ "esbuild": "^0.21.5",
47
47
  "typedoc": "^0.25.13",
48
- "typescript": "^5.4.5"
48
+ "typescript": "^5.5.2"
49
49
  },
50
50
  "keywords": [
51
51
  "ast",
@@ -85,5 +85,5 @@
85
85
  "status": "alpha",
86
86
  "year": 2023
87
87
  },
88
- "gitHead": "df34b4a9e650cc7323575356de207d78933bdcf3\n"
88
+ "gitHead": "7b950c112fba0b2e7c450765b15624c3382f1354\n"
89
89
  }