diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 245bc25..524c2e2 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -51,7 +51,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [22, 24] + node-version: [20, 22, 24] os: [ubuntu-latest] steps: diff --git a/README.md b/README.md index 8aa06ae..15f493e 100644 --- a/README.md +++ b/README.md @@ -158,11 +158,11 @@ const json = db.toJSON(); ### __WORK IN PROGRESS__ --> ### __WORK IN PROGRESS__ -* BREAKING: Drop support for Node.js versions older than v22 (#529) +* BREAKING: Drop support for Node.js versions older than v20 * BREAKING: Removed `exportJson` method in favor of `toJSON` * BREAKING: Renamed `importJson` method to `importJSON`. Importing from a file is no longer supported. Read the file yourself if you need this functionality. * Filesystem access is now done using the native `fs.promises` instead of `fs-extra` -* The package is now a hybrid ESM/CJS package (#529) +* The package is now a hybrid ESM/CJS package ### 3.1.1 (2024-01-25) * Reduced CPU load while idle (#475) diff --git a/package-lock.json b/package-lock.json index 36282a0..bb62394 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@alcalzone/release-script-plugin-license": "~3.7.0", "@commitlint/cli": "^20.1.0", "@commitlint/config-conventional": "^20.0.0", - "@tsconfig/node22": "^22.0.2", + "@tsconfig/node20": "^20.1.6", "@types/node": "^22.18.8", "@types/proper-lockfile": "^4.1.2", "@vitest/coverage-istanbul": "^3.2.4", @@ -2688,10 +2688,10 @@ "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", "dev": true }, - "node_modules/@tsconfig/node22": { - "version": "22.0.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node22/-/node22-22.0.2.tgz", - "integrity": "sha512-Kmwj4u8sDRDrMYRoN9FDEcXD8UpBSaPQQ24Gz+Gamqfm7xxn+GBR7ge/Z7pK8OXNGyUzbSwJj+TH6B+DS/epyA==", + "node_modules/@tsconfig/node20": { + "version": "20.1.6", + "resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.6.tgz", + "integrity": "sha512-sz+Hqx9zwZDpZIV871WSbUzSqNIsXzghZydypnfgzPKLltVJfkINfUeTct31n/tTSa9ZE1ZOfKdRre1uHHquYQ==", "dev": true, "license": "MIT" }, @@ -9643,10 +9643,10 @@ "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", "dev": true }, - "@tsconfig/node22": { - "version": "22.0.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node22/-/node22-22.0.2.tgz", - "integrity": "sha512-Kmwj4u8sDRDrMYRoN9FDEcXD8UpBSaPQQ24Gz+Gamqfm7xxn+GBR7ge/Z7pK8OXNGyUzbSwJj+TH6B+DS/epyA==", + "@tsconfig/node20": { + "version": "20.1.6", + "resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.6.tgz", + "integrity": "sha512-sz+Hqx9zwZDpZIV871WSbUzSqNIsXzghZydypnfgzPKLltVJfkINfUeTct31n/tTSa9ZE1ZOfKdRre1uHHquYQ==", "dev": true }, "@types/chai": { diff --git a/package.json b/package.json index e528f67..9cdf3e6 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@alcalzone/release-script-plugin-license": "~3.7.0", "@commitlint/cli": "^20.1.0", "@commitlint/config-conventional": "^20.0.0", - "@tsconfig/node22": "^22.0.2", + "@tsconfig/node20": "^20.1.6", "@types/node": "^22.18.8", "@types/proper-lockfile": "^4.1.2", "@vitest/coverage-istanbul": "^3.2.4", @@ -70,7 +70,7 @@ }, "scripts": { "build": "tsc", - "postbuild": "esm2cjs --in ./build/esm --out ./build/cjs -l error -t node22", + "postbuild": "esm2cjs --in ./build/esm --out ./build/cjs -l error -t node20", "watch": "npm run build -- --watch", "test:ts": "vitest", "test:watch": "npm run test:ts -- --watch", diff --git a/tsconfig.json b/tsconfig.json index e76e5a9..22e6b5a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@tsconfig/node22/tsconfig.json", + "extends": "@tsconfig/node20/tsconfig.json", "compilerOptions": { "rootDir": "src", "outDir": "build/esm",