Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/olive-hoops-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"schema-utils": patch
---

Updated `ajv` to `8.20.0`, `ajv-formats` to `3.0.1` and `@types/json-schema` to `7.0.15`. `ajv-formats` 3 only moves `ajv` to a peer dependency, the formats themselves are unchanged.
15 changes: 8 additions & 7 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ jobs:
run: if [ -n "$(git status declarations --porcelain)" ]; then echo "Missing declarations in git"; exit 1; else echo "All declarations are valid"; fi
- name: Security audit
run: npm run security
- name: Check commit message
uses: wagoid/commitlint-github-action@v4
test:
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}
strategy:
Expand Down Expand Up @@ -74,15 +72,18 @@ jobs:
architecture: ${{ steps.calculate_architecture.outputs.result }}
cache: "npm"
- name: Install dependencies
# Legacy versions do not generate types, so skip scripts that invoke `prepare` and explicitly run the code build without generating types
# The dev dependencies require an active LTS release, so install the versions that still
# run on the version under test. Legacy versions do not generate types either, so skip
# scripts that invoke `prepare` and explicitly run the code build without generating types.
# `--legacy-peer-deps` is what lets npm 7 and above downgrade over the lockfile
run: |
npm i -D typescript@4 del-cli@^3 --ignore-scripts
npm i --ignore-engines --ignore-scripts
npm i -D typescript@4 del-cli@^3 jest@^27 babel-jest@^27 @babel/cli@^7 @babel/core@^7 @babel/preset-env@^7 --ignore-scripts --legacy-peer-deps
npm i --ignore-engines --ignore-scripts --legacy-peer-deps
npm run build:code
if: matrix.node-version == '10.x' || matrix.node-version == '12.x' || matrix.node-version == '14.x' || matrix.node-version == '16.x' || matrix.node-version == '18.x'
if: matrix.node-version == '10.x' || matrix.node-version == '12.x' || matrix.node-version == '14.x' || matrix.node-version == '16.x' || matrix.node-version == '18.x' || matrix.node-version == '20.x'
- name: Install dependencies
run: npm ci
if: matrix.node-version == '20.x' || matrix.node-version == '22.x' || matrix.node-version == '24.x' || matrix.node-version == '26.x'
if: matrix.node-version == '22.x' || matrix.node-version == '24.x' || matrix.node-version == '26.x'
- name: Run tests with coverage
run: npm run test:coverage -- --ci
- uses: codecov/codecov-action@v5
Expand Down
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ Please take a moment to read our contributing guidelines if you haven't yet done

[CONTRIBUTING](https://github.com/webpack/schema-utils?tab=contributing-ov-file#contributing)

The package itself runs on Node.js 10.13.0 and above, but the dev dependencies require an active
LTS release, so use one to work on it. CI installs older ones to run the tests on the older
versions of Node.js the package supports.

## License

[MIT](./LICENSE)
Expand Down
7 changes: 5 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
const MIN_BABEL_VERSION = 7;
const SUPPORTED_BABEL_VERSIONS = "^7.0.0 || ^8.0.0";

module.exports = (api) => {
api.assertVersion(MIN_BABEL_VERSION);
api.assertVersion(SUPPORTED_BABEL_VERSIONS);
api.cache(true);

return {
presets: [
[
"@babel/preset-env",
{
// The package is CommonJS - Babel 8 keeps ECMAScript modules by default when the
// caller does not say what it supports, which `@babel/cli` does not
modules: "commonjs",
targets: {
node: "10.13.0",
},
Expand Down
8 changes: 0 additions & 8 deletions commitlint.config.js

This file was deleted.

7 changes: 6 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
/** @type {import("jest").Config} */
const config = {
prettierPath: require.resolve("prettier-2"),
// Jest 29 changed these defaults, they are set explicitly so the snapshots match the ones the
// older Jest CI installs for the older versions of Node.js writes
snapshotFormat: {
escapeString: false,
printBasicPrototype: false,
},
};

module.exports = config;
Loading
Loading