gscan 4.28.0 → 4.29.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.
@@ -1,22 +1,13 @@
1
- /**
2
- * Copy of Ghost defaults for https://github.com/TryGhost/Ghost/blob/e25f1df0ae551c447da0d319bae06eadf9665444/core/frontend/services/theme-engine/config/defaults.json
3
- */
4
- const defaultConfig = {
5
- posts_per_page: 5,
6
- card_assets: {
7
- exclude: ['bookmark', 'gallery']
8
- }
9
- };
10
-
11
1
  /**
12
2
  * Extracts the package.json JSON content. Note that this function never throws,
13
3
  * even when there is a JSON parsing error.
14
4
  * This function uses the default `config` property to match Ghost implementation.
15
5
  * @param {Object} theme The theme to extract package.json from.
6
+ * @param {Object} defaultConfig JSON matching the default theme configuration for the checked Ghost version
16
7
  * @returns {Object} The content of the package.json file, or `null` if
17
8
  * something happened (no file, JSON parsing error...).
18
9
  */
19
- function getJSON(theme) {
10
+ function getJSON(theme, defaultConfig) {
20
11
  let packageJSON = theme.files.find(item => item.file === 'package.json');
21
12
  if (packageJSON && packageJSON.content) {
22
13
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gscan",
3
- "version": "4.28.0",
3
+ "version": "4.29.0",
4
4
  "description": "Scans Ghost themes looking for errors, deprecations, features and compatibility",
5
5
  "keywords": [
6
6
  "ghost",
@@ -54,7 +54,7 @@
54
54
  "express": "4.18.1",
55
55
  "express-hbs": "2.4.0",
56
56
  "fs-extra": "10.1.0",
57
- "glob": "7.2.2",
57
+ "glob": "7.2.3",
58
58
  "lodash": "4.17.21",
59
59
  "multer": "1.4.4",
60
60
  "pluralize": "8.0.0",