@data-visuals/create 7.4.1 → 7.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-visuals/create",
3
- "version": "7.4.1",
3
+ "version": "7.4.3",
4
4
  "description": "Create graphics and features the Data Visuals way.",
5
5
  "scripts": {
6
6
  "build:docs": "doctoc README.md --github",
@@ -4,15 +4,16 @@
4
4
  "scripts": {
5
5
  "assets:pull": "node ./utils/deployment/pull-assets.js",
6
6
  "assets:push": "node ./utils/deployment/push-assets.js",
7
- "build": "NODE_ENV=production node ./config/scripts/build.js && npm run parse",
7
+ "build": "NODE_OPTIONS=$npm_package_config_NODE_OPTIONS NODE_ENV=production node ./config/scripts/build.js && npm run parse",
8
8
  "deploy": "node ./utils/deployment/deploy.js",
9
9
  "data:fetch": "node ./utils/fetch/get-data.js",
10
10
  "git-pre-commit": "precise-commits",
11
- "parse": "NODE_ENV=development node config/scripts/parse.js",
11
+ "parse": "npm run set-node-options && NODE_OPTIONS=$npm_package_config_NODE_OPTIONS NODE_ENV=development node config/scripts/parse.js",
12
12
  "predeploy": "npm run build && npm run assets:push && npm run workspace:push",
13
13
  "preinstall": "node ./config/build/yarn-check.js",
14
14
  "serve": "npm start",
15
- "start": "NODE_ENV=development node ./config/scripts/develop.js",
15
+ "set-node-options": "node ./config/tasks/set-node-options.js",
16
+ "start": "npm run set-node-options && NODE_OPTIONS=$npm_package_config_NODE_OPTIONS NODE_ENV=development node ./config/scripts/develop.js",
16
17
  "workspace:pull": "node ./utils/deployment/pull-workspace.js",
17
18
  "workspace:push": "node ./utils/deployment/push-workspace.js"
18
19
  },
@@ -182,13 +182,14 @@ const parseGraphic = async (
182
182
  const note = await getText({ key: 'note', page });
183
183
  let source = await getText({ key: 'source', page });
184
184
 
185
- // create array from source
186
- if (source.length > 0) {
187
- // separate by commas or and
188
- source = source.split(/, *| and */g);
189
- } else {
190
- source = [];
191
- }
185
+ // commenting this out as a hot fix in December 2022 for issue #158
186
+ // // create array from source
187
+ // if (source.length > 0) {
188
+ // // separate by commas or and
189
+ // source = source.split(/, *| and */g);
190
+ // } else {
191
+ // source = [];
192
+ // }
192
193
 
193
194
  const links = await page.$$eval('a', links =>
194
195
  links.map(link => {
@@ -0,0 +1,16 @@
1
+ // package
2
+ const fs = require('fs');
3
+
4
+ // internal
5
+ const packageJson = require('../../package.json');
6
+
7
+ // set package.json config object
8
+ packageJson.config = {};
9
+
10
+ // get node version in order to update NODE_OPTIONS environment variable
11
+ const version = Number(process.versions.node.split('.')[0]);
12
+ packageJson.config.NODE_OPTIONS =
13
+ version <= 16 ? '' : '--openssl-legacy-provider';
14
+
15
+ // update package.json file
16
+ fs.writeFileSync('package.json', JSON.stringify(packageJson, null, 2));
@@ -1,7 +1,7 @@
1
1
  <script type="application/ld+json">
2
2
  {
3
3
  "@context": "http://schema.org",
4
- "@type": "NewsArticle",
4
+ "@type": "Webpage",
5
5
  "mainEntityOfPage": {
6
6
  "@type": "WebPage",
7
7
  "@id": "{{ CURRENT_PAGE_URL }}"