gscan 5.4.1 → 5.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/README.md CHANGED
@@ -96,9 +96,12 @@ gscan.checkZip({
96
96
 
97
97
  ### Publish
98
98
 
99
- (Core team only)
99
+ Ghost core team only
100
100
 
101
- - `yarn ship`
101
+ 1. run `yarn ship` - this bumps the version, commits, tags and pushes to `main`
102
+ 2. npm publishing is handled by GitHub Actions in `.github/workflows/publish.yml`
103
+
104
+ Manual preview is available via workflow dispatch with `dry-run: true`
102
105
 
103
106
  ### Tools
104
107
  When developing new rules or testing gscan following tools are great to have in the toolbelt:
@@ -147,7 +147,11 @@ class Frame {
147
147
  throw new Error('fileName must be passed as an option when constructing a template-level Frame');
148
148
  }
149
149
 
150
- const {context, locals} = getTemplateContext(options.fileName);
150
+ const templateContext = getTemplateContext(options.fileName);
151
+ if (!templateContext) {
152
+ throw new Error(`No template context found for template: ${options.fileName}`);
153
+ }
154
+ const {context, locals} = templateContext;
151
155
  this.context = context;
152
156
  this.locals = locals; // eg. {post: {...postContext}}
153
157
  return;
package/lib/checker.js CHANGED
@@ -121,8 +121,8 @@ const checkZip = async function checkZip(path, options) {
121
121
  throw error;
122
122
  } finally {
123
123
  if (!options.keepExtractedDir && zip.origPath) {
124
- const fs = require('fs-extra');
125
- await fs.remove(zip.origPath);
124
+ const fs = require('fs/promises');
125
+ await fs.rm(zip.origPath, {recursive: true, force: true});
126
126
  }
127
127
  }
128
128
  };
package/lib/read-theme.js CHANGED
@@ -1,4 +1,4 @@
1
- const fs = require('fs-extra');
1
+ const fs = require('fs/promises');
2
2
  const _ = require('lodash');
3
3
  const os = require('os');
4
4
  const path = require('path');
@@ -59,7 +59,7 @@ const readThemeStructure = function readThemeFiles(themePath, subPath, arr) {
59
59
  */
60
60
  if (ignore.indexOf(file) > -1) {
61
61
  return inTmp
62
- ? fs.remove(newPath)
62
+ ? fs.rm(newPath, {recursive: true, force: true})
63
63
  .then(function () {
64
64
  return result;
65
65
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gscan",
3
- "version": "5.4.1",
3
+ "version": "5.4.3",
4
4
  "description": "Scans Ghost themes looking for errors, deprecations, features and compatibility",
5
5
  "keywords": [
6
6
  "ghost",
@@ -37,13 +37,13 @@
37
37
  "posttest": "yarn lint",
38
38
  "preship": "yarn test",
39
39
  "ship": "pro-ship",
40
- "postship": "npm publish"
40
+ "ship:ci": "npm publish"
41
41
  },
42
42
  "bin": {
43
43
  "gscan": "./bin/cli.js"
44
44
  },
45
45
  "dependencies": {
46
- "@sentry/node": "10.46.0",
46
+ "@sentry/node": "10.47.0",
47
47
  "@tryghost/config": "2.0.3",
48
48
  "@tryghost/debug": "2.0.3",
49
49
  "@tryghost/errors": "3.0.3",
@@ -55,9 +55,8 @@
55
55
  "chalk": "5.6.2",
56
56
  "express": "5.2.1",
57
57
  "express-handlebars": "7.1.3",
58
- "fs-extra": "11.3.4",
59
58
  "glob": "13.0.6",
60
- "lodash": "4.17.23",
59
+ "lodash": "4.18.1",
61
60
  "multer": "2.1.1",
62
61
  "semver": "7.7.4",
63
62
  "validator": "^13.0.0"
@@ -66,18 +65,16 @@
66
65
  "@eslint/compat": "2.0.3",
67
66
  "@eslint/eslintrc": "3.3.5",
68
67
  "@eslint/js": "10.0.1",
69
- "@tryghost/pro-ship": "1.0.7",
68
+ "@tryghost/pro-ship": "1.0.8",
70
69
  "@vitest/coverage-v8": "4.1.2",
71
70
  "eslint": "10.1.0",
72
71
  "eslint-plugin-ghost": "3.5.0",
73
72
  "nodemon": "3.1.14",
74
- "should": "13.2.3",
75
- "sinon": "21.0.3",
76
73
  "vitest": "4.1.2"
77
74
  },
78
75
  "resolutions": {
79
76
  "node-loggly-bulk": "4.0.2",
80
- "node-loggly-bulk/axios": "1.13.6"
77
+ "node-loggly-bulk/axios": "1.14.0"
81
78
  },
82
79
  "files": [
83
80
  "lib",