@adobe/helix-html-pipeline 3.4.4 → 3.4.5

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,12 @@
1
+ ## [3.4.5](https://github.com/adobe/helix-html-pipeline/compare/v3.4.4...v3.4.5) (2022-10-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **utils:** do not rewrite links to www or admin ([5239749](https://github.com/adobe/helix-html-pipeline/commit/5239749bda4032aa452d103d7490efa9f0ae9905)), closes [#145](https://github.com/adobe/helix-html-pipeline/issues/145)
7
+ * **utils:** fix undefined reference in rewriteLinks ([a6b5dd0](https://github.com/adobe/helix-html-pipeline/commit/a6b5dd0ded6181284016e8ef57c1b85d3e760274))
8
+ * **utils:** rewrite helix links without a trailing slash ([8dc1e35](https://github.com/adobe/helix-html-pipeline/commit/8dc1e35fe12049e918055e955f4627381f277ee9)), closes [#161](https://github.com/adobe/helix-html-pipeline/issues/161)
9
+
1
10
  ## [3.4.4](https://github.com/adobe/helix-html-pipeline/compare/v3.4.3...v3.4.4) (2022-10-06)
2
11
 
3
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "3.4.4",
3
+ "version": "3.4.5",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -47,7 +47,7 @@
47
47
  "hast-util-select": "5.0.2",
48
48
  "hast-util-to-html": "8.0.3",
49
49
  "hast-util-to-string": "2.0.0",
50
- "hastscript": "7.0.2",
50
+ "hastscript": "7.1.0",
51
51
  "jose": "4.10.0",
52
52
  "mdast-util-gfm-footnote": "1.0.1",
53
53
  "mdast-util-gfm-strikethrough": "1.0.1",
@@ -81,14 +81,14 @@
81
81
  "@semantic-release/git": "10.0.1",
82
82
  "@semantic-release/npm": "9.0.1",
83
83
  "c8": "7.12.0",
84
- "eslint": "8.24.0",
84
+ "eslint": "8.25.0",
85
85
  "eslint-import-resolver-exports": "1.0.0-beta.3",
86
86
  "eslint-plugin-header": "3.1.1",
87
87
  "eslint-plugin-import": "2.26.0",
88
- "esmock": "2.0.4",
88
+ "esmock": "2.0.6",
89
89
  "husky": "8.0.1",
90
90
  "js-yaml": "4.1.0",
91
- "jsdom": "20.0.0",
91
+ "jsdom": "20.0.1",
92
92
  "junit-report-builder": "3.0.1",
93
93
  "lint-staged": "13.0.3",
94
94
  "mocha": "10.0.0",
@@ -14,7 +14,7 @@ const AZURE_BLOB_REGEXP = /^https:\/\/hlx\.blob\.core\.windows\.net\/external\//
14
14
 
15
15
  const MEDIA_BLOB_REGEXP = /^https:\/\/.*\.hlx3?\.(live|page)\/media_.*/;
16
16
 
17
- const HELIX_URL_REGEXP = /^https:\/\/.*\.hlx3?\.(live|page)\/.*/;
17
+ const HELIX_URL_REGEXP = /^https:\/\/(?!admin\.|www\.)[^.]+\.hlx3?\.(live|page)\/?.*/;
18
18
 
19
19
  /**
20
20
  * Returns the original host name from the request to the outer CDN.
@@ -221,7 +221,7 @@ export function rewriteUrl(state, url) {
221
221
  return `${pathname}${search}${hash}`;
222
222
  }
223
223
 
224
- if (host === state.config.host && matchAny(state.config.routes, pathname)) {
224
+ if (host === state.config?.host && matchAny(state.config.routes, pathname)) {
225
225
  if (hash && pathname === state.info?.path) {
226
226
  return hash;
227
227
  }