gscan 4.37.4 → 4.37.6

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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013-2022 Ghost Foundation
1
+ Copyright (c) 2013-2023 Ghost Foundation
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person
4
4
  obtaining a copy of this software and associated documentation
package/README.md CHANGED
@@ -115,4 +115,4 @@ gscan.checkZip({
115
115
 
116
116
  # Copyright & License
117
117
 
118
- Copyright (c) 2013-2022 Ghost Foundation - Released under the [MIT license](LICENSE). Ghost and the Ghost Logo are trademarks of Ghost Foundation Ltd. Please see our [trademark policy](https://ghost.org/trademark/) for info on acceptable usage.
118
+ Copyright (c) 2013-2023 Ghost Foundation - Released under the [MIT license](LICENSE). Ghost and the Ghost Logo are trademarks of Ghost Foundation Ltd. Please see our [trademark policy](https://ghost.org/trademark/) for info on acceptable usage.
@@ -44,8 +44,8 @@ const v4PackageJSONValidationRules = _.extend({},
44
44
  {isPresentEngineGhostAPI: 'GS010-PJ-GHOST-API-PRESENT'},
45
45
  {hasTooManyCustomThemeSettings: 'GS010-PJ-CUST-THEME-TOTAL-SETTINGS'},
46
46
  {customThemeSettingsMustBeSnakecased: 'GS010-PJ-CUST-THEME-SETTINGS-CASE'},
47
- {unkownCustomThemeSettingsType: 'GS010-PJ-CUST-THEME-SETTINGS-TYPE'},
48
- {unkownCustomThemeSettingsGroup: 'GS010-PJ-CUST-THEME-SETTINGS-GROUP'},
47
+ {unknownCustomThemeSettingsType: 'GS010-PJ-CUST-THEME-SETTINGS-TYPE'},
48
+ {unknownCustomThemeSettingsGroup: 'GS010-PJ-CUST-THEME-SETTINGS-GROUP'},
49
49
  {missingCustomThemeSettingsSelectOptions: 'GS010-PJ-CUST-THEME-SETTINGS-SELECT-OPTIONS'},
50
50
  {missingCustomThemeSettingsSelectDefault: 'GS010-PJ-CUST-THEME-SETTINGS-SELECT-DEFAULT'},
51
51
  {invalidCustomThemeSetingBooleanDefault: 'GS010-PJ-CUST-THEME-SETTINGS-BOOLEAN-DEFAULT'},
@@ -160,14 +160,14 @@ _private.validatePackageJSONFields = function validatePackageJSONFields(packageJ
160
160
 
161
161
  const knownSettingsTypes = new Set(['select', 'boolean', 'color', 'image', 'text']);
162
162
  if (customSettingsKeys.some(key => !knownSettingsTypes.has(packageJSON.config.custom[key].type))) {
163
- markFailed('unkownCustomThemeSettingsType');
163
+ markFailed('unknownCustomThemeSettingsType');
164
164
  }
165
165
 
166
166
  const knownSettingsGroups = new Set(['post', 'homepage']);
167
167
  // Ignore undefined values as "groups" is an optional property
168
168
  if (customSettingsKeys.some(key => typeof packageJSON.config.custom[key].group !== 'undefined'
169
169
  && !knownSettingsGroups.has(packageJSON.config.custom[key].group))) {
170
- markFailed('unkownCustomThemeSettingsGroup');
170
+ markFailed('unknownCustomThemeSettingsGroup');
171
171
  }
172
172
 
173
173
  for (const key of customSettingsKeys) {
@@ -95,7 +95,8 @@ function parseWithAST({theme, log, file, rules, callback}) {
95
95
 
96
96
  if (astResults.length) {
97
97
  log.failure({
98
- message: astResults[0].message
98
+ message: astResults[0].message,
99
+ ref: themeFile.file
99
100
  });
100
101
  }
101
102
 
package/lib/read-zip.js CHANGED
@@ -1,6 +1,5 @@
1
1
  const debug = require('@tryghost/debug')('zip');
2
2
  const path = require('path');
3
- const Promise = require('bluebird');
4
3
  const os = require('os');
5
4
  const glob = require('glob');
6
5
  const {extract} = require('@tryghost/zip');
@@ -714,21 +714,21 @@ let rules = {
714
714
  Check the <a href="${docsBaseUrl}custom-settings" target=_blank><code>config.custom</code> documentation</a> for further information.`
715
715
  },
716
716
  'GS110-NO-MISSING-PAGE-BUILDER-USAGE': {
717
- level: 'warning',
717
+ level: 'error',
718
718
  rule: 'Not all page features are being used',
719
- details: oneLineTrim`Some page features used by Ghost via the <code>{{@page}}</code> global are not implemented in this theme.&nbsp;
719
+ details: oneLineTrim`<b>This error only applies to pages created with the Beta editor.</b> Some page features used by Ghost via the <code>{{@page}}</code> global are not implemented in this theme.&nbsp;
720
720
  Find more information about the <code>{{@page}}</code> global <a href="${docsBaseUrl}helpers/page/" target=_blank>here</a>.`
721
721
  },
722
722
  'GS110-NO-UNKNOWN-PAGE-BUILDER-USAGE': {
723
723
  level: 'error',
724
724
  fatal: true,
725
725
  rule: 'Unsupported page builder feature used',
726
- details: oneLineTrim`A page feature used via the <code>{{@page}}</code> global was detected but it's not supported by this version of Ghost.&nbsp;
727
- Find more information about the <code>{{@page}}</code> global <a href="${docsBaseUrl}helpers/page/" target=_blank>here</a>.`
726
+ details: oneLineTrim`A page feature used via the <code>{{@page}}</code> global was detected but is not supported by this version of Ghost. Please upgrade to the latest version for full access.&nbsp;
727
+ You can find more information about the <code>{{@page}}</code> global <a href="${docsBaseUrl}helpers/page/" target=_blank>here</a>.`
728
728
  },
729
729
  'GS120-NO-UNKNOWN-GLOBALS': {
730
730
  level: 'error',
731
- rule: 'Unknown global helper used',
731
+ rule: 'No unknown global helper used',
732
732
  details: oneLineTrim`A global helper was detected that is not supported by this version of Ghost. Check the
733
733
  <a href="${docsBaseUrl}helpers/" target=_blank>helpers documentation</a> for further information.`
734
734
  }
package/lib/specs/v4.js CHANGED
@@ -172,7 +172,7 @@ let rules = {
172
172
  },
173
173
  'GS090-NO-UNKNOWN-CUSTOM-THEME-SETTINGS': {
174
174
  level: 'error',
175
- rule: 'An unkown custom theme setting has been used.',
175
+ rule: 'An unknown custom theme setting has been used.',
176
176
  fatal: false,
177
177
  details: oneLineTrim`The custom theme setting should all be defined in the package.json <code>config.custom</code> object.`
178
178
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gscan",
3
- "version": "4.37.4",
3
+ "version": "4.37.6",
4
4
  "description": "Scans Ghost themes looking for errors, deprecations, features and compatibility",
5
5
  "keywords": [
6
6
  "ghost",
@@ -40,19 +40,19 @@
40
40
  "gscan": "./bin/cli.js"
41
41
  },
42
42
  "dependencies": {
43
- "@sentry/node": "7.60.1",
44
- "@tryghost/config": "0.2.17",
43
+ "@sentry/node": "7.64.0",
44
+ "@tryghost/config": "0.2.18",
45
45
  "@tryghost/debug": "0.1.25",
46
- "@tryghost/errors": "1.2.25",
47
- "@tryghost/logging": "2.4.5",
48
- "@tryghost/pretty-cli": "1.2.37",
49
- "@tryghost/server": "0.1.35",
50
- "@tryghost/zip": "1.1.35",
46
+ "@tryghost/errors": "1.2.26",
47
+ "@tryghost/logging": "2.4.6",
48
+ "@tryghost/pretty-cli": "1.2.38",
49
+ "@tryghost/server": "0.1.36",
50
+ "@tryghost/zip": "1.1.37",
51
51
  "bluebird": "3.7.2",
52
52
  "chalk": "4.1.2",
53
53
  "common-tags": "1.8.2",
54
54
  "express": "4.18.2",
55
- "express-hbs": "2.4.0",
55
+ "express-hbs": "2.4.1",
56
56
  "fs-extra": "11.1.1",
57
57
  "glob": "8.1.0",
58
58
  "lodash": "4.17.21",