gscan 4.42.0 → 4.43.0

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/README.md CHANGED
@@ -10,29 +10,26 @@ It is actively capable of dealing with the current and last major versions of Gh
10
10
 
11
11
  GScan works on a system of rules. Each rule has a way to check whether it passes or fails and has help content which describes how to fix it. Each rule is also marked with an error level:
12
12
 
13
- - **recommendation** = these are things the dev might want to know about
14
- - **warning** = usually used for deprecations, things that will be errors in the next version
15
- - **error** = anything that makes the theme invalid or incompatible with the current version of Ghost
13
+ - Errors: issues that will cause your theme to not work properly. These must be fixed.
14
+ - Warnings: these are usually related to deprecated features. These should be fixed.
15
+ - Recommendations: these are advisories about best practice. Fixing these will improve your theme.
16
+ - Features: detected features which may impact on compatibility. Nothing to do!
16
17
 
17
18
  In addition, an **error** can be marked as **fatal**. A **fatal error** means, left unchecked a Ghost publication would throw 500 errors on certain pages because of the detected out-of-date or erroneous code.
18
19
 
19
- In Ghost, we call GScan on boot. If any fatal errors are detected in Ghost(Pro) and in Ghost-CLI we call GScan as part of major upgrades. The upgrade will not be allowed to continue if any fatal errors are detected.
20
-
21
- Errors are only marked as **fatal errors** if they would cause errors, and therefore should block a boot or an upgrade.
20
+ ## Usage
22
21
 
23
- ### Tooling
24
- When developing new rules or testing gscan following tools are great to have in the toolbelt:
25
- - [astexplorer](https://astexplorer.net) - absolutely awesome Handlebars AST fiddler, helpful when testing out new ideas and exploring what's possible through AST parser;
22
+ There are 4 ways to use gscan to validate your theme:
26
23
 
27
- ## Usage
24
+ ### 1. Inside Ghost
28
25
 
29
- There are 3 ways to use gscan to validate your theme:
26
+ Gscan is pre-installed in Ghost. If there are theme errors, Ghost will show them on boot in the console logs and in the UI (Ghost Admin).
30
27
 
31
- ### 1. Web usage
28
+ ### 2. Web usage
32
29
 
33
30
  Visit https://gscan.ghost.org and upload your zip to our online version of Gscan.
34
31
 
35
- ### 2. CLI usage
32
+ ### 3. CLI usage
36
33
 
37
34
  Install using yarn / npm:
38
35
 
@@ -48,21 +45,21 @@ To run a local zip file through the checks:
48
45
 
49
46
  By default, GScan scans themes for the latest Ghost version compatibility. You can also specify a Ghost version by using the following parameters (for Ghost 1.0, 2.0, 3.0, 4.0 and 5.0):
50
47
 
51
- `--v1` or `-1`
52
- `--v2` or `-2`
53
- `--v3` or `-3`
48
+ `--v1` or `-1`
49
+ `--v2` or `-2`
50
+ `--v3` or `-3`
54
51
  `--v4` or `-4` or `--canary`
55
- `--v5` or `-5`
52
+ `--v5` or `-5`
56
53
 
57
54
  Use the `--canary` parameter to check for the upcoming Ghost version.
58
55
 
59
56
  Examples:
60
57
 
61
- `gscan /path/to/theme.zip -z1` - scan a theme in a zip file for Ghost 1.0 compatibility
62
- `gscan /path/to/theme/directory --v2` - can a theme in a directory for Ghost 2.0 compatibility
63
- `gscan /path/to/theme/directory --canary` - scan a theme for the upcoming version of Ghost
58
+ `gscan /path/to/theme.zip -z1` - scan a theme in a zip file for Ghost 1.0 compatibility
59
+ `gscan /path/to/theme/directory --v2` - can a theme in a directory for Ghost 2.0 compatibility
60
+ `gscan /path/to/theme/directory --canary` - scan a theme for the upcoming version of Ghost
64
61
 
65
- ### 3. Lib usage
62
+ ### 4. Lib usage
66
63
 
67
64
  Install using yarn/npm and then:
68
65
 
@@ -98,14 +95,11 @@ gscan.checkZip({
98
95
 
99
96
  - `yarn ship`
100
97
 
101
- ## Result types:
102
-
103
- - Errors: these are issues which will cause your theme to not work properly. These must be fixed.
104
- - Warnings: these are usually related to deprecated features. These should be fixed.
105
- - Recommendations: these are advisories about best practice. Fixing these will improve your theme.
106
- - Features: detected features which may impact on compatibility. Nothing to do :)
98
+ ### Tools
99
+ When developing new rules or testing gscan following tools are great to have in the toolbelt:
100
+ - [astexplorer](https://astexplorer.net) - absolutely awesome Handlebars AST fiddler, helpful when testing out new ideas and exploring what's possible through AST parser;
107
101
 
108
- ## Still To Do:
102
+ ## To Do
109
103
 
110
104
  - Support for running the checks against a GitHub repository
111
105
  - Many, many more checks
package/lib/specs/v4.js CHANGED
@@ -54,7 +54,7 @@ let rules = {
54
54
  'GS010-PJ-CUST-THEME-TOTAL-SETTINGS': {
55
55
  level: 'error',
56
56
  rule: '<code>package.json</code> property <code>"config.custom"</code> contains too many settings',
57
- details: oneLineTrim`Remove key from <code>"config.custom"</code> in your <code>package.json</code> to have less than or exactly 15 settings.<br>
57
+ details: oneLineTrim`Remove key from <code>"config.custom"</code> in your <code>package.json</code> to have less than or exactly 20 settings.<br>
58
58
  Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
59
59
  },
60
60
  'GS010-PJ-CUST-THEME-SETTINGS-CASE': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gscan",
3
- "version": "4.42.0",
3
+ "version": "4.43.0",
4
4
  "description": "Scans Ghost themes looking for errors, deprecations, features and compatibility",
5
5
  "keywords": [
6
6
  "ghost",
@@ -17,7 +17,7 @@
17
17
  "registry": "https://registry.npmjs.org/"
18
18
  },
19
19
  "engines": {
20
- "node": "^14.18.0 || ^16.13.0 || ^18.12.1"
20
+ "node": "^14.18.0 || ^16.13.0 || ^18.12.1 || ^20.11.1"
21
21
  },
22
22
  "bugs": {
23
23
  "url": "https://github.com/TryGhost/gscan/issues"
@@ -83,5 +83,14 @@
83
83
  "lib",
84
84
  "bin",
85
85
  "app"
86
- ]
86
+ ],
87
+ "renovate": {
88
+ "extends": [
89
+ "@tryghost:quietJS",
90
+ "@tryghost:automergeDevDependencies"
91
+ ],
92
+ "ignoreDeps": [
93
+ "validator"
94
+ ]
95
+ }
87
96
  }