@adobe/helix-html-pipeline 1.5.0 → 1.5.3
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 +21 -0
- package/package.json +3 -3
- package/src/forms-pipe.js +2 -0
- package/src/json-pipe.js +2 -2
- package/src/steps/fetch-metadata.js +2 -2
- package/src/utils/last-modified.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [1.5.3](https://github.com/adobe/helix-html-pipeline/compare/v1.5.2...v1.5.3) (2022-05-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Reverts
|
|
5
|
+
|
|
6
|
+
* Revert "ci(release): tag releases in Coralogix (#49)" ([9a47ac1](https://github.com/adobe/helix-html-pipeline/commit/9a47ac19ea86752e1a56bd7d953f8e331cd448a4)), closes [#49](https://github.com/adobe/helix-html-pipeline/issues/49)
|
|
7
|
+
|
|
8
|
+
## [1.5.2](https://github.com/adobe/helix-html-pipeline/compare/v1.5.1...v1.5.2) (2022-05-08)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* respect x-source-last-modified for json ([#51](https://github.com/adobe/helix-html-pipeline/issues/51)) ([094f22b](https://github.com/adobe/helix-html-pipeline/commit/094f22b4bc86306a3727472bdb1f03c65fe67012))
|
|
14
|
+
|
|
15
|
+
## [1.5.1](https://github.com/adobe/helix-html-pipeline/compare/v1.5.0...v1.5.1) (2022-05-06)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* include owner and repo to forms message ([#48](https://github.com/adobe/helix-html-pipeline/issues/48)) ([aabb52f](https://github.com/adobe/helix-html-pipeline/commit/aabb52f96fbdba74d73c4e6e24c3ad710a18442d))
|
|
21
|
+
|
|
1
22
|
# [1.5.0](https://github.com/adobe/helix-html-pipeline/compare/v1.4.2...v1.5.0) (2022-05-04)
|
|
2
23
|
|
|
3
24
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-html-pipeline",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"description": "Helix HTML Pipeline",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"remark-parse": "10.0.1",
|
|
60
60
|
"strip-markdown": "5.0.0",
|
|
61
61
|
"unified": "10.1.2",
|
|
62
|
-
"unist-util-map": "3.
|
|
62
|
+
"unist-util-map": "3.1.1",
|
|
63
63
|
"unist-util-remove": "3.1.0",
|
|
64
64
|
"unist-util-remove-position": "4.0.1",
|
|
65
65
|
"unist-util-select": "4.0.1",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"codecov": "3.8.3",
|
|
77
77
|
"commitizen": "4.2.4",
|
|
78
78
|
"cz-conventional-changelog": "3.3.0",
|
|
79
|
-
"eslint": "8.
|
|
79
|
+
"eslint": "8.15.0",
|
|
80
80
|
"eslint-plugin-header": "3.1.1",
|
|
81
81
|
"eslint-plugin-import": "2.26.0",
|
|
82
82
|
"esmock": "1.7.5",
|
package/src/forms-pipe.js
CHANGED
package/src/json-pipe.js
CHANGED
|
@@ -13,7 +13,7 @@ import fetchMetadata from './steps/fetch-metadata.js';
|
|
|
13
13
|
import setCustomResponseHeaders from './steps/set-custom-response-headers.js';
|
|
14
14
|
import { PipelineResponse } from './PipelineResponse.js';
|
|
15
15
|
import jsonFilter from './utils/json-filter.js';
|
|
16
|
-
import { updateLastModified } from './utils/last-modified.js';
|
|
16
|
+
import { extractLastModified, updateLastModified } from './utils/last-modified.js';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Runs the default pipeline and returns the response.
|
|
@@ -73,7 +73,7 @@ export async function jsonPipe(state, req) {
|
|
|
73
73
|
});
|
|
74
74
|
|
|
75
75
|
// set last-modified
|
|
76
|
-
updateLastModified(state, response, dataResponse.headers
|
|
76
|
+
updateLastModified(state, response, extractLastModified(dataResponse.headers));
|
|
77
77
|
|
|
78
78
|
// set surrogate key
|
|
79
79
|
response.headers.set('x-surrogate-key', `${contentBusId}${path}`.replace(/\//g, '_'));
|
|
@@ -39,8 +39,8 @@ export default async function fetchMetadata(state, req, res) {
|
|
|
39
39
|
}
|
|
40
40
|
state.metadata = data;
|
|
41
41
|
|
|
42
|
-
if (state.type === 'html') {
|
|
43
|
-
// also update last-modified (only for html pipeline)
|
|
42
|
+
if (state.type === 'html' && state.info.selector !== 'plain') {
|
|
43
|
+
// also update last-modified (only for extensionless html pipeline)
|
|
44
44
|
updateLastModified(state, res, extractLastModified(ret.headers));
|
|
45
45
|
}
|
|
46
46
|
return;
|
|
@@ -41,7 +41,8 @@ export function updateLastModified(state, res, httpDate) {
|
|
|
41
41
|
/**
|
|
42
42
|
* Returns the last modified date from response headers, giving 'x-amz-meta-x-source-last-modified'
|
|
43
43
|
* preference.
|
|
44
|
-
* @param {
|
|
44
|
+
* @param {Map<string, string>} headers
|
|
45
|
+
* @return {string} the last modified date
|
|
45
46
|
*/
|
|
46
47
|
export function extractLastModified(headers) {
|
|
47
48
|
return headers.get('x-amz-meta-x-source-last-modified') ?? headers.get('last-modified');
|