npm-package-json-lint 10.3.0 → 10.4.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.
@@ -0,0 +1,9 @@
1
+ import { n as Severity, t as LintIssue } from "./lint-issue.js";
2
+ import { PackageJson } from "type-fest";
3
+
4
+ //#region src/rules/prefer-provenance.d.ts
5
+ declare const ruleType = RuleType.Standard;
6
+ declare const lint: (packageJsonData: PackageJson | any, severity: Severity) => LintIssue | null;
7
+ //#endregion
8
+ export { lint, ruleType };
9
+ //# sourceMappingURL=prefer-provenance.d.ts.map
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./lint-issue.js`),t=(t,n)=>t.private===!0||t.publishConfig?.provenance===!0?null:new e.t(`prefer-provenance`,n,`publishConfig.provenance`,`publishConfig.provenance should be true unless private is true`);exports.lint=t,exports.ruleType=`standard`;
2
+ //# sourceMappingURL=prefer-provenance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefer-provenance.js","names":["LintIssue"],"sources":["../../src/rules/prefer-provenance.ts"],"sourcesContent":["import type {PackageJson} from 'type-fest';\nimport {LintIssue} from '../lint-issue';\nimport {RuleType} from '../types/rule-type';\nimport {Severity} from '../types/severity';\n\nconst lintId = 'prefer-provenance';\nconst nodeName = 'publishConfig.provenance';\nconst message = 'publishConfig.provenance should be true unless private is true';\n\nexport const ruleType = RuleType.Standard;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const lint = (packageJsonData: PackageJson | any, severity: Severity): LintIssue | null => {\n if (packageJsonData.private === true) {\n return null;\n }\n\n if (packageJsonData.publishConfig?.provenance !== true) {\n return new LintIssue(lintId, severity, nodeName, message);\n }\n\n return null;\n};\n"],"mappings":"sGAYa,GAAQ,EAAoC,IACnD,EAAgB,UAAY,IAI5B,EAAgB,eAAe,aAAe,GAHzC,KAIA,IAAIA,EAAAA,EAAU,oBAAQ,EAAU,2BAAU,iEAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-package-json-lint",
3
- "version": "10.3.0",
3
+ "version": "10.4.0",
4
4
  "description": "Configurable linter for package.json files.",
5
5
  "keywords": [
6
6
  "lint",