gscan 4.26.0 → 4.26.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.
@@ -613,6 +613,25 @@ let rules = {
613
613
  Find more information about the <code>{{get}}</code> helper <a href="${docsBaseUrl}helpers/get/" target=_blank>here</a>.`,
614
614
  regex: /{{\s*?#get ("|')\s*users("|')\s*/g,
615
615
  helper: '{{#get "users"}}'
616
+ },
617
+ 'GS001-DEPR-ESC': {
618
+ level: 'error',
619
+ fatal: true,
620
+ rule: 'Replace <code>{{error.code}}</code> with <code>{{error.statusCode}}</code>',
621
+ details: oneLineTrim`The usage of <code>{{error.code}}</code> is deprecated and should be replaced with <code>{{error.statusCode}}</code>.<br>
622
+ When in <code>error</code> context, e. g. in the <code>error.hbs</code> template, replace <code>{{code}}</code> with <code>{{statusCode}}</code>.<br>
623
+ Find more information about the <code>error.hbs</code> template <a href="${docsBaseUrl}structure/#errorhbs" target=_blank>here</a>.`,
624
+ regex: /{{\s*?(?:error\.)?(code)\s*?}}/g,
625
+ helper: '{{error.code}}'
626
+ },
627
+ 'GS001-DEPR-CURR-SYM': {
628
+ level: 'error',
629
+ fatal: true,
630
+ rule: 'Replace <code>{{[#].currency_symbol}}</code> with <code>{{price currency=currency}}</code>.',
631
+ details: oneLineTrim`The hardcoded <code>currency_symbol</code> attribute was removed in favour of passing the currency to updated <code>{{price}}</code> helper.
632
+ Find more information about the updated <code>{{price}}</code> helper <a href="${docsBaseUrl}members/#the-price-helper" target=_blank>here</a>.`,
633
+ helper: '{{[#].currency_symbol}}',
634
+ regex: /currency_symbol/g
616
635
  }
617
636
  };
618
637
 
@@ -623,6 +642,8 @@ templates = _.union(previousTemplates, templates);
623
642
  // as well as adding any new rule to the spec.
624
643
  // Furthermore, replace the usage of the old doc URLs that we're linking to, with the
625
644
  // new version.
645
+ delete previousRules['GS010-PJ-GHOST-API-V01'];
646
+
626
647
  rules = _.each(_.merge({}, previousRules, rules), function replaceDocsUrl(value) {
627
648
  value.details = value.details.replace(prevDocsBaseUrlRegEx, docsBaseUrl);
628
649
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gscan",
3
- "version": "4.26.0",
3
+ "version": "4.26.1",
4
4
  "description": "Scans Ghost themes looking for errors, deprecations, features and compatibility",
5
5
  "keywords": [
6
6
  "ghost",
@@ -44,7 +44,7 @@
44
44
  "@tryghost/config": "0.2.2",
45
45
  "@tryghost/debug": "0.1.11",
46
46
  "@tryghost/errors": "1.2.7",
47
- "@tryghost/logging": "2.1.1",
47
+ "@tryghost/logging": "2.1.2",
48
48
  "@tryghost/pretty-cli": "1.2.24",
49
49
  "@tryghost/server": "0.1.4",
50
50
  "@tryghost/zip": "1.1.22",