npm-package-json-lint 5.2.4 → 5.4.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-package-json-lint",
3
- "version": "5.2.4",
3
+ "version": "5.4.2",
4
4
  "description": "Configurable linter for package.json files.",
5
5
  "keywords": [
6
6
  "lint",
@@ -40,12 +40,12 @@
40
40
  "ajv": "^6.12.6",
41
41
  "ajv-errors": "^1.0.1",
42
42
  "chalk": "^4.1.2",
43
- "cosmiconfig": "^6.0.0",
43
+ "cosmiconfig": "^7.0.1",
44
44
  "debug": "^4.3.2",
45
45
  "globby": "^11.0.4",
46
- "ignore": "^5.1.8",
46
+ "ignore": "^5.1.9",
47
47
  "is-plain-obj": "^3.0.0",
48
- "jsonc-parser": "^2.3.1",
48
+ "jsonc-parser": "^3.0.0",
49
49
  "log-symbols": "^4.1.0",
50
50
  "meow": "^6.1.1",
51
51
  "plur": "^4.0.0",
@@ -58,14 +58,14 @@
58
58
  "eslint-config-tc": "^15.0.0",
59
59
  "eslint-formatter-pretty": "^4.1.0",
60
60
  "eslint-plugin-eslint-comments": "^3.2.0",
61
- "eslint-plugin-import": "^2.24.0",
62
- "eslint-plugin-jest": "^24.4.0",
63
- "eslint-plugin-prettier": "^3.4.0",
61
+ "eslint-plugin-import": "^2.25.3",
62
+ "eslint-plugin-jest": "^24.6.0",
63
+ "eslint-plugin-prettier": "^3.4.1",
64
64
  "figures": "^3.2.0",
65
- "jest": "^27.0.6",
65
+ "jest": "^27.3.1",
66
66
  "npm-package-json-lint-config-default": "^3.0.0",
67
67
  "npm-package-json-lint-config-tc": "^4.1.0",
68
- "prettier": "^2.3.2"
68
+ "prettier": "^2.4.1"
69
69
  },
70
70
  "engines": {
71
71
  "node": ">=10.0.0",
@@ -25,6 +25,7 @@ const applyOverrides = (cwd, filePath, rules, overrides) => {
25
25
  });
26
26
 
27
27
  const globFiles = globby.sync(transformedPatterns, {
28
+ cwd,
28
29
  gitignore: true,
29
30
  });
30
31
 
@@ -0,0 +1,20 @@
1
+ const {exists} = require('../validators/property');
2
+ const LintIssue = require('../LintIssue');
3
+
4
+ const lintId = 'prefer-no-contributors';
5
+ const nodeName = 'contributors';
6
+ const message = 'contributors should not be defined';
7
+ const ruleType = 'standard';
8
+
9
+ const lint = (packageJsonData, severity) => {
10
+ if (exists(packageJsonData, nodeName)) {
11
+ return new LintIssue(lintId, severity, nodeName, message);
12
+ }
13
+
14
+ return true;
15
+ };
16
+
17
+ module.exports = {
18
+ lint,
19
+ ruleType,
20
+ };
@@ -242,7 +242,7 @@ const isGithubRepositoryShortcut = (version) => {
242
242
  * @return {boolean} True if the version is url to archive
243
243
  */
244
244
  const isArchiveUrl = (version) => {
245
- return version.endsWith('.tar.gz') || version.endsWith('.zip');
245
+ return version.endsWith('.tgz') || version.endsWith('.tar.gz') || version.endsWith('.zip');
246
246
  };
247
247
 
248
248
  /**