Skip to content

Use project version of ajv-cli in all validation tasks #589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 12, 2025

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Jun 12, 2025

The ajv-cli command line tool is used for validating data files against their JSON schema. The tool is used to validate the project's Dependabot, ESLint, and npm configuration files.

In general, it is preferable (and for some schemas even mandatory) to use the modern versions of ajv-cli. However, support for the "Draft-04" schema specification was dropped in ajv-cli version 4.0.0. So when working with JSON schemas that specify that draft, it is necessary to use ajv-cli 3.3.0, the last compatible version.

Previously, the Dependabot, ESLint, and npm schemas specified the "Draft-04" specification. For this reason, the dependabot:validate, eslint:validate, and npm:validate tasks were configured to use ajv-cli@3.3.0.

The schemas have now been updated to use "Draft-07" (SchemaStore/schemastore@11e62f6). So the code for using ajv-cli@3.3.0 is removed from these tasks, and they will now use the standard project level version of ajv-cli.

per1234 added 2 commits June 12, 2025 01:08
The "ajv-cli" command line tool is used for validating data files against their JSON schema. The tool is used to
validate the project's npm package.json configuration file.

In general, it is preferable (and for some schemas even mandatory) to use the latest version of ajv-cli. However,
support for the "Draft-04" schema specification was dropped in ajv-cli version 4.0.0. So when working with JSON schemas
that specify that draft, it is necessary to use ajv-cli 3.3.0, the last compatible version.

Previously, the package.json schema specified the "Draft-04" specification. For this reason, the `npm:validate` task was
configured to use ajv-cli@3.3.0.

The package.json schema has now been updated to use the "Draft-07" schema specification. So the code for using
ajv-cli@3.3.0 is removed from the task, and it will now instead use the standard project level version of ajv-cli.
The "ajv-cli" command line tool is used for validating data files against their JSON schema. The tool is used to
validate the project's Dependabot and ESLint configuration files.

In general, it is preferable (and for some schemas even mandatory) to use the modern versions of ajv-cli. However,
support for the "Draft-04" schema specification was dropped in ajv-cli version 4.0.0. So when working with JSON schemas
that specify that draft, it is necessary to use ajv-cli 3.3.0, the last compatible version.

Previously, the Dependabot and ESLint schema specified the "Draft-04" specification. For this reason, the
`dependabot:validate` and `eslint:validate` tasks were configured to use ajv-cli@3.3.0.

The schemas have now been updated to use "Draft-07". So the code for using ajv-cli@3.3.0 is removed from these tasks,
and they will now use the standard project level version of ajv-cli.
@per1234 per1234 self-assigned this Jun 12, 2025
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself topic: infrastructure Related to project infrastructure labels Jun 12, 2025
@per1234 per1234 merged commit 7b07ace into arduino:main Jun 12, 2025
47 checks passed
@per1234 per1234 deleted the npm-validate-task-ajv-version branch June 18, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant