@adobe/helix-html-pipeline 5.6.0 → 5.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [5.6.2](https://github.com/adobe/helix-html-pipeline/compare/v5.6.1...v5.6.2) (2024-01-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update dependency @adobe/mdast-util-gridtables to v4 ([#520](https://github.com/adobe/helix-html-pipeline/issues/520)) ([5615ba9](https://github.com/adobe/helix-html-pipeline/commit/5615ba96f7eea16d123829c976aa8ac7c4a01baa))
7
+
8
+ ## [5.6.1](https://github.com/adobe/helix-html-pipeline/compare/v5.6.0...v5.6.1) (2024-01-29)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * allow static html with selectors ([#510](https://github.com/adobe/helix-html-pipeline/issues/510)) ([26533a2](https://github.com/adobe/helix-html-pipeline/commit/26533a2da5153062a642bddc4f68aed0015336a4)), closes [#481](https://github.com/adobe/helix-html-pipeline/issues/481)
14
+
1
15
  # [5.6.0](https://github.com/adobe/helix-html-pipeline/compare/v5.5.2...v5.6.0) (2024-01-25)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "5.6.0",
3
+ "version": "5.6.2",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -44,11 +44,11 @@
44
44
  "dependencies": {
45
45
  "@adobe/helix-markdown-support": "7.1.0",
46
46
  "@adobe/helix-shared-utils": "3.0.1",
47
- "@adobe/mdast-util-gridtables": "3.0.2",
47
+ "@adobe/mdast-util-gridtables": "4.0.0",
48
48
  "@adobe/remark-gridtables": "2.0.2",
49
49
  "cookie": "0.6.0",
50
50
  "github-slugger": "2.0.0",
51
- "hast-util-raw": "9.0.1",
51
+ "hast-util-raw": "9.0.2",
52
52
  "hast-util-select": "6.0.2",
53
53
  "hast-util-to-html": "9.0.0",
54
54
  "hast-util-to-string": "3.0.0",
@@ -80,8 +80,8 @@
80
80
  "eslint-import-resolver-exports": "1.0.0-beta.5",
81
81
  "eslint-plugin-header": "3.1.1",
82
82
  "eslint-plugin-import": "2.29.1",
83
- "esmock": "2.6.2",
84
- "husky": "8.0.3",
83
+ "esmock": "2.6.3",
84
+ "husky": "9.0.6",
85
85
  "js-yaml": "4.1.0",
86
86
  "jsdom": "24.0.0",
87
87
  "junit-report-builder": "3.1.0",
package/src/utils/path.js CHANGED
@@ -67,15 +67,18 @@ export function getPathInfo(path) {
67
67
  }
68
68
  let resExt = info.extension;
69
69
  if (info.selector) {
70
- if (resExt === '.html') {
71
- // force .plain.html as markdown resources
70
+ if (info.selector === 'plain' && resExt === '.html') {
71
+ // force .plain.html as markdown resources and remove selector from path
72
72
  resExt = '.md';
73
+ fileName = `${baseName}${resExt}`;
74
+ } else {
75
+ fileName = `${baseName}.${info.selector}${resExt}`;
73
76
  }
74
77
  segs.push(`${baseName}.${info.selector}${info.extension}`);
75
78
  } else {
76
79
  segs.push(`${baseName}${resExt}`);
80
+ fileName = `${baseName}${resExt}`;
77
81
  }
78
- fileName = `${baseName}${resExt}`;
79
82
  }
80
83
 
81
84
  info.path = `/${segs.join('/')}`;
@@ -94,14 +97,8 @@ export function validatePathInfo(info) {
94
97
  return false;
95
98
  }
96
99
 
97
- // only support empty selector or plain with html
98
- if (info.selector) {
99
- if (info.selector !== 'plain') {
100
- return false;
101
- }
102
- return info.extension === '.html';
103
- }
104
- return true;
100
+ // only support selector for html
101
+ return info.selector === '' || info.extension === '.html';
105
102
  }
106
103
 
107
104
  /**