gscan 4.37.0 → 4.37.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.
package/lib/checker.js CHANGED
@@ -1,6 +1,8 @@
1
1
  const Promise = require('bluebird');
2
2
  const _ = require('lodash');
3
3
  const requireDir = require('require-dir');
4
+ const debug = require('@tryghost/debug')('checker');
5
+
4
6
  const errors = require('@tryghost/errors');
5
7
  const versions = require('./utils').versions;
6
8
 
@@ -48,8 +50,11 @@ const check = function checkAll(themePath, options = {}) {
48
50
  // set the major version to check
49
51
  theme.checkedVersion = versions[version].major;
50
52
 
51
- return Promise.reduce(_.values(checks), function (themeToCheck, checkFunction) {
52
- return checkFunction(themeToCheck, options, themePath);
53
+ return Promise.reduce(_.values(checks), async function (themeToCheck, checkFunction) {
54
+ const now = Date.now();
55
+ const result = await checkFunction(themeToCheck, options, themePath);
56
+ debug(checkFunction.name, 'took', Date.now() - now, 'ms');
57
+ return result;
53
58
  }, theme);
54
59
  })
55
60
  .catch((error) => {
@@ -104,7 +104,7 @@ _private.validatePackageJSONFields = function validatePackageJSONFields(packageJ
104
104
  markFailed('nameIsLowerCase');
105
105
  }
106
106
 
107
- if (packageJSON.name && !packageJSON.name.match(/^[a-z0-9]+(-?[a-z0-9]+)*$/gi)) {
107
+ if (packageJSON.name && !packageJSON.name.match(/^([a-z0-9]+-)*[a-z0-9]+$/gi)) {
108
108
  markFailed('nameIsHyphenated');
109
109
  }
110
110
 
@@ -48,7 +48,7 @@ function getCustomThemeSettings(theme) {
48
48
  return customThemeSettingsConfig;
49
49
  }
50
50
 
51
- const checkTemplatesCompile = function checkTemplatesCompile(theme, options) {
51
+ const checkTemplateSyntax = function checkTemplateSyntax(theme, options) {
52
52
  const checkVersion = _.get(options, 'checkVersion', versions.default);
53
53
  const ruleSet = spec.get([checkVersion]);
54
54
  const customThemeSettings = getCustomThemeSettings(theme);
@@ -95,4 +95,4 @@ const checkTemplatesCompile = function checkTemplatesCompile(theme, options) {
95
95
  return theme;
96
96
  };
97
97
 
98
- module.exports = checkTemplatesCompile;
98
+ module.exports = checkTemplateSyntax;
@@ -8,7 +8,7 @@ module.exports = {
8
8
  version = 'canary';
9
9
  }
10
10
 
11
- debug('Checking against version: ', version);
11
+ debug('Checking against version:', version);
12
12
 
13
13
  return require(`./${[version]}`);
14
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gscan",
3
- "version": "4.37.0",
3
+ "version": "4.37.1",
4
4
  "description": "Scans Ghost themes looking for errors, deprecations, features and compatibility",
5
5
  "keywords": [
6
6
  "ghost",
@@ -40,7 +40,7 @@
40
40
  "gscan": "./bin/cli.js"
41
41
  },
42
42
  "dependencies": {
43
- "@sentry/node": "7.55.2",
43
+ "@sentry/node": "7.56.0",
44
44
  "@tryghost/config": "0.2.17",
45
45
  "@tryghost/debug": "0.1.25",
46
46
  "@tryghost/errors": "1.2.25",
@@ -59,7 +59,7 @@
59
59
  "multer": "1.4.4",
60
60
  "pluralize": "8.0.0",
61
61
  "require-dir": "1.2.0",
62
- "semver": "7.5.2",
62
+ "semver": "7.5.3",
63
63
  "uuid": "9.0.0",
64
64
  "validator": "13.0.0"
65
65
  },