@quintype/framework 7.4.1-test-amp.0 → 7.4.1
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
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [7.4.1](https://github.com/quintype/quintype-node-framework/compare/v7.4.0...v7.4.1) (2022-06-02)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **amp:** Incorrect localised content displayed across publishers ([#304](https://github.com/quintype/quintype-node-framework/issues/304)) ([c47d929](https://github.com/quintype/quintype-node-framework/commit/c47d9294c022100a95ba5ca1d755dd4731b6b580))
|
|
11
|
+
|
|
5
12
|
## [7.4.0](https://github.com/quintype/quintype-node-framework/compare/v7.2.0...v7.4.0) (2022-05-23)
|
|
6
13
|
|
|
7
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quintype/framework",
|
|
3
|
-
"version": "7.4.1
|
|
3
|
+
"version": "7.4.1",
|
|
4
4
|
"description": "Libraries to help build Quintype Node.js apps",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"engines": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"homepage": "https://github.com/quintype/quintype-node-framework#readme",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@ampproject/toolbox-optimizer": "2.8.3",
|
|
34
|
-
"@quintype/amp": "^2.4.
|
|
34
|
+
"@quintype/amp": "^2.4.21",
|
|
35
35
|
"@quintype/backend": "^2.3.1",
|
|
36
36
|
"@quintype/components": "^3.0.0",
|
|
37
37
|
"@quintype/prerender-node": "^3.2.24",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const urlLib = require("url");
|
|
2
2
|
const set = require("lodash/set");
|
|
3
3
|
const get = require("lodash/get");
|
|
4
|
+
const isEmpty = require("lodash/isEmpty");
|
|
4
5
|
const cloneDeep = require("lodash/cloneDeep");
|
|
5
6
|
const merge = require("lodash/merge");
|
|
6
7
|
const { Story, AmpConfig } = require("../../impl/api-client-impl");
|
|
@@ -103,6 +104,7 @@ async function ampStoryPageHandler(
|
|
|
103
104
|
infiniteScrollInlineConfig
|
|
104
105
|
);
|
|
105
106
|
}
|
|
107
|
+
const mergedAdditionalConfig = {};
|
|
106
108
|
if (opts.getAdditionalConfig && opts.getAdditionalConfig instanceof Function) {
|
|
107
109
|
const fetchedAdditionalConfig = await opts.getAdditionalConfig({
|
|
108
110
|
story,
|
|
@@ -110,14 +112,14 @@ async function ampStoryPageHandler(
|
|
|
110
112
|
ampApiConfig: ampConfig.ampConfig,
|
|
111
113
|
publisherConfig: additionalConfig,
|
|
112
114
|
});
|
|
113
|
-
merge(additionalConfig, fetchedAdditionalConfig);
|
|
115
|
+
merge(mergedAdditionalConfig, additionalConfig, fetchedAdditionalConfig);
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
const ampHtml = ampifyStory({
|
|
117
119
|
story,
|
|
118
120
|
publisherConfig: config.config,
|
|
119
121
|
ampConfig: ampConfig.ampConfig,
|
|
120
|
-
additionalConfig,
|
|
122
|
+
additionalConfig: isEmpty(mergedAdditionalConfig) ? additionalConfig : mergedAdditionalConfig,
|
|
121
123
|
opts: { ...domainSpecificOpts, domainSlug },
|
|
122
124
|
seo: seoTags ? seoTags.toString() : "",
|
|
123
125
|
});
|