diff --git a/CHANGELOG.md b/CHANGELOG.md index f914ab6f..c1198ccb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), For a full diff see [`2.50.0...main`][2.50.0...main]. +### Changed + +- Updated `schema.json` ([#1592]), by [@ergebnis-bot] + ## [`2.50.0`][2.50.0] For a full diff see [`2.49.0...2.50.0`][2.49.0...2.50.0]. @@ -1357,6 +1361,7 @@ For a full diff see [`81bc3a8...0.1.0`][81bc3a8...0.1.0]. [#1502]: https://github.com/ergebnis/composer-normalize/pull/1502 [#1507]: https://github.com/ergebnis/composer-normalize/pull/1507 [#1563]: https://github.com/ergebnis/composer-normalize/pull/1563 +[#1592]: https://github.com/ergebnis/composer-normalize/pull/1592 [@AlexSkrypnyk]: https://github.com/AlexSkrypnyk [@andrey-helldar]: https://github.com/andrey-helldar diff --git a/resource/schema.json b/resource/schema.json index a8df0e6a..3966ce5a 100644 --- a/resource/schema.json +++ b/resource/schema.json @@ -603,6 +603,14 @@ ], "description": "Whether abandoned packages should be ignored, reported as problems or cause an audit failure. Applies only to audit reports, not to version blocking." }, + "filtered": { + "enum": [ + "ignore", + "report", + "fail" + ], + "description": "Whether filtered packages should be ignored, reported as problems or cause an audit failure. Applies only to audit reports, not to version blocking." + }, "ignore-severity": { "anyOf": [ { @@ -707,10 +715,55 @@ } } }, + "filter": { + "type": [ + "boolean", + "object" + ], + "description": "Filter list configuration options. Set to true to enable with defaults, to false to fully disable, or configure with an object.", + "properties": { + "ignore-unreachable": { + "type": "boolean", + "description": "Whether filter list sources that are unreachable or return a non-200 status code should be ignored.", + "default": false + }, + "unfiltered-packages": { + "$ref": "#/definitions/unfiltered-packages" + }, + "sources": { + "type": "object", + "description": "Additional sources to fetch filter list data from.", + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "url" + ], + "description": "Source type, currently only 'url' is supported" + }, + "url": { + "type": "string", + "description": "URL to fetch filter list data from" + } + }, + "required": [ + "type", + "url" + ] + } + } + } + }, "notify-on-install": { "type": "boolean", "description": "Composer allows repositories to define a notification URL, so that they get notified whenever a package from that repository is installed. This option allows you to disable that behaviour, defaults to true." }, + "source-fallback": { + "type": "boolean", + "description": "If true (default), Composer will fall back to a different installation source (e.g., from dist to source or vice versa) when a download fails. Set to false to disable this behavior." + }, "github-protocols": { "type": "array", "description": "A list of protocols to use for github.com clones, in priority order, defaults to [\"https\", \"ssh\", \"git\"].", @@ -1405,6 +1458,59 @@ }, "force-lazy-providers": { "type": "boolean" + }, + "filter": { + "type": [ + "boolean", + "object" + ], + "description": "Filter list configuration for this repository. Set to false to disable filter lists from this repository entirely, or configure with an object.", + "properties": { + "lists": { + "type": "array", + "description": "Filter lists to use from this repository. Use 'defaults' to include all default lists advertised by the repository, prefix a name with '!' to exclude it, or provide objects for detailed configuration.", + "default": [ + "defaults" + ], + "items": { + "anyOf": [ + { + "type": "string", + "description": "List name to include (prefix with '!' to exclude, or use 'defaults' for all default lists)" + }, + { + "type": "object", + "required": [ + "name" + ], + "description": "Per-list configuration with optional operation scope", + "properties": { + "name": { + "type": "string", + "description": "Filter list name" + }, + "only": { + "type": "string", + "enum": [ + "block", + "audit", + "all" + ], + "description": "Restrict this list to a specific operation ('block' or 'audit'). If omitted, the list applies to both operations." + }, + "reason": { + "type": "string", + "description": "Optional explanation for why this list is included" + } + } + } + ] + } + }, + "unfiltered-packages": { + "$ref": "#/definitions/unfiltered-packages" + } + } } } }, @@ -1864,6 +1970,57 @@ "type": "array" } } + }, + "unfiltered-packages": { + "type": "array", + "description": "Packages to exempt from filtering. Each item can be a package name string, a {\"vendor/package\": \"constraint\"} object, or a detailed object with package, constraint, reason, and apply fields.", + "items": { + "anyOf": [ + { + "type": "string", + "description": "Package name to exempt from all filtering" + }, + { + "type": "object", + "description": "Package name => version constraint map", + "additionalProperties": { + "type": "string" + } + }, + { + "type": "object", + "description": "Detailed configuration for exempting a package", + "properties": { + "package": { + "type": "string", + "description": "Package name" + }, + "constraint": { + "type": "string", + "description": "Version constraint" + }, + "reason": { + "type": "string", + "description": "Explanation for exempting this package" + }, + "apply": { + "type": "string", + "enum": [ + "audit", + "block", + "all" + ], + "description": "Which operation to exempt from: 'audit', 'block', or 'all'", + "default": "all" + } + }, + "required": [ + "package", + "constraint" + ] + } + ] + } } }, "additionalProperties": true,