@adobe/helix-html-pipeline 1.3.1 → 1.3.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,10 @@
1
+ ## [1.3.2](https://github.com/adobe/helix-html-pipeline/compare/v1.3.1...v1.3.2) (2022-03-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * expect spec-compliant URL ([d65428a](https://github.com/adobe/helix-html-pipeline/commit/d65428a2f0e68471f8eed785706766744a7f168b))
7
+
1
8
  ## [1.3.1](https://github.com/adobe/helix-html-pipeline/compare/v1.3.0...v1.3.1) (2022-03-18)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -125,8 +125,9 @@ export function optimizeImageURL(src, width, format = 'webply', optimize = 'medi
125
125
  * @returns {string} resolved url
126
126
  */
127
127
  export function resolveUrl(from, to) {
128
- const resolvedUrl = new URL(to, new URL(from, 'resolve://'));
129
- if (resolvedUrl.protocol === 'resolve:') {
128
+ const DUMMY_BASE = 'https://__dummmy__';
129
+ const resolvedUrl = new URL(to, new URL(from, DUMMY_BASE));
130
+ if (resolvedUrl.origin === DUMMY_BASE) {
130
131
  // `from` is a relative URL.
131
132
  const { pathname, search, hash } = resolvedUrl;
132
133
  return pathname + search + hash;