@adobe/helix-html-pipeline 4.1.5 → 4.1.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 CHANGED
@@ -1,3 +1,10 @@
1
+ ## [4.1.6](https://github.com/adobe/helix-html-pipeline/compare/v4.1.5...v4.1.6) (2023-09-26)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update unified dependencies ([#411](https://github.com/adobe/helix-html-pipeline/issues/411)) ([f9a81f3](https://github.com/adobe/helix-html-pipeline/commit/f9a81f3cc37d0f06c8707f0d3823d558ae3b64ed))
7
+
1
8
  ## [4.1.5](https://github.com/adobe/helix-html-pipeline/compare/v4.1.4...v4.1.5) (2023-09-02)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "4.1.5",
3
+ "version": "4.1.6",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -39,26 +39,26 @@
39
39
  "node": ">=16.x"
40
40
  },
41
41
  "dependencies": {
42
- "@adobe/helix-markdown-support": "6.3.1",
42
+ "@adobe/helix-markdown-support": "7.0.0",
43
43
  "@adobe/helix-shared-utils": "3.0.0",
44
- "@adobe/mdast-util-gridtables": "2.0.2",
45
- "@adobe/remark-gridtables": "1.0.4",
44
+ "@adobe/mdast-util-gridtables": "3.0.1",
45
+ "@adobe/remark-gridtables": "2.0.1",
46
46
  "cookie": "0.5.0",
47
47
  "github-slugger": "2.0.0",
48
- "hast-util-raw": "8.0.0",
49
- "hast-util-select": "5.0.5",
50
- "hast-util-to-html": "8.0.4",
51
- "hast-util-to-string": "2.0.0",
52
- "hastscript": "7.2.0",
53
- "jose": "4.14.5",
54
- "mdast-util-to-hast": "12.3.0",
48
+ "hast-util-raw": "9.0.1",
49
+ "hast-util-select": "6.0.1",
50
+ "hast-util-to-html": "9.0.0",
51
+ "hast-util-to-string": "3.0.0",
52
+ "hastscript": "8.0.0",
53
+ "jose": "4.14.6",
54
+ "mdast-util-to-hast": "13.0.2",
55
55
  "mdast-util-to-string": "4.0.0",
56
56
  "mime": "3.0.0",
57
- "rehype-format": "4.0.1",
58
- "rehype-parse": "8.0.5",
59
- "remark-parse": "10.0.2",
57
+ "rehype-format": "5.0.0",
58
+ "rehype-parse": "9.0.0",
59
+ "remark-parse": "11.0.0",
60
60
  "strip-markdown": "5.0.1",
61
- "unified": "10.1.2",
61
+ "unified": "11.0.3",
62
62
  "unist-util-map": "4.0.0",
63
63
  "unist-util-remove": "4.0.0",
64
64
  "unist-util-remove-position": "5.0.0",
@@ -71,13 +71,13 @@
71
71
  "@markedjs/html-differ": "4.0.2",
72
72
  "@semantic-release/changelog": "6.0.3",
73
73
  "@semantic-release/git": "10.0.1",
74
- "@semantic-release/npm": "10.0.5",
74
+ "@semantic-release/npm": "11.0.0",
75
75
  "c8": "8.0.1",
76
- "eslint": "8.48.0",
76
+ "eslint": "8.50.0",
77
77
  "eslint-import-resolver-exports": "1.0.0-beta.5",
78
78
  "eslint-plugin-header": "3.1.1",
79
79
  "eslint-plugin-import": "2.28.1",
80
- "esmock": "2.3.8",
80
+ "esmock": "2.5.1",
81
81
  "husky": "8.0.3",
82
82
  "js-yaml": "4.1.0",
83
83
  "jsdom": "22.1.0",
@@ -85,7 +85,8 @@
85
85
  "lint-staged": "13.3.0",
86
86
  "mocha": "10.2.0",
87
87
  "mocha-multi-reporters": "1.5.1",
88
- "semantic-release": "21.1.1"
88
+ "mocha-suppress-logs": "0.3.1",
89
+ "semantic-release": "22.0.5"
89
90
  },
90
91
  "lint-staged": {
91
92
  "*.js": "eslint",
@@ -45,6 +45,9 @@ function tableToDivs($table) {
45
45
 
46
46
  // get columns names
47
47
  $cards.properties.className = toBlockCSSClassNames(toString($headerCols[0]));
48
+ if ($cards.properties.className.length === 0) {
49
+ delete $cards.properties.className;
50
+ }
48
51
 
49
52
  // construct page block
50
53
  for (const $row of $rows) {
@@ -9,8 +9,6 @@
9
9
  * OF ANY KIND, either express or implied. See the License for the specific language
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
- import { all } from 'mdast-util-to-hast';
13
-
14
12
  const HELIX_NAMESPACE = 'hlx-';
15
13
  const DEFAULT_SECTION_TAG = 'div';
16
14
  const DEFAULT_SECTION_CLASS = `${HELIX_NAMESPACE}section`;
@@ -55,17 +53,22 @@ function getAttributes(section) {
55
53
  }
56
54
 
57
55
  export default function sectionHandler() {
58
- return function handler(h, node) {
56
+ return function handler(state, node) {
59
57
  const n = { ...node };
60
58
 
61
59
  const tagName = getTagName(n);
62
- const props = getAttributes(n);
63
- props.className = [DEFAULT_SECTION_CLASS];
64
- if (props.class) {
65
- props.className.push(...props.class.split(/\s+/));
60
+ const properties = getAttributes(n);
61
+ properties.className = [DEFAULT_SECTION_CLASS];
62
+ if (properties.class) {
63
+ properties.className.push(...properties.class.split(/\s+/));
66
64
  }
67
- delete props.class;
68
- const children = all(h, n);
69
- return h(node, tagName, props, children);
65
+ delete properties.class;
66
+ const children = state.all(n);
67
+ return {
68
+ type: 'element',
69
+ tagName,
70
+ properties,
71
+ children,
72
+ };
70
73
  };
71
74
  }