From b557abbd7593d6efa552c1491021eab8a5113951 Mon Sep 17 00:00:00 2001 From: Gregor Adams <1148334+pixelass@users.noreply.github.com> Date: Fri, 15 Mar 2024 18:12:42 +0100 Subject: [PATCH 1/7] Fix typo in docs (#192) --- source/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/index.ts b/source/index.ts index 6938de9..cce876f 100644 --- a/source/index.ts +++ b/source/index.ts @@ -281,7 +281,7 @@ export default class Conf = Record Date: Fri, 14 Jun 2024 19:04:00 +0200 Subject: [PATCH 2/7] Update dependencies --- .github/workflows/main.yml | 4 ++-- package.json | 38 ++++++++++++++++++++------------------ source/index.ts | 7 ++++++- 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 359989d..dbe8299 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,8 +15,8 @@ jobs: - ubuntu-latest - macos-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: npm install diff --git a/package.json b/package.json index 38bf9c6..2462bb5 100644 --- a/package.json +++ b/package.json @@ -15,10 +15,10 @@ "types": "./dist/source/index.d.ts", "default": "./dist/source/index.js" }, + "sideEffects": false, "engines": { "node": ">=18" }, - "sideEffects": false, "scripts": { "test": "xo && npm run build && ava", "build": "del-cli dist && tsc", @@ -47,30 +47,30 @@ "cache" ], "dependencies": { - "ajv": "^8.12.0", - "ajv-formats": "^2.1.1", - "atomically": "^2.0.2", - "debounce-fn": "^5.1.2", - "dot-prop": "^8.0.2", + "ajv": "^8.16.0", + "ajv-formats": "^3.0.1", + "atomically": "^2.0.3", + "debounce-fn": "^6.0.0", + "dot-prop": "^9.0.0", "env-paths": "^3.0.0", "json-schema-typed": "^8.0.1", - "semver": "^7.5.4", - "uint8array-extras": "^0.3.0" + "semver": "^7.6.2", + "uint8array-extras": "^1.1.0" }, "devDependencies": { "@sindresorhus/tsconfig": "^5.0.0", - "@types/node": "^20.8.8", - "@types/semver": "^7.5.4", - "ava": "^5.3.1", + "@types/node": "^20.14.2", + "@types/semver": "^7.5.8", + "ava": "^6.1.3", "del": "^7.1.0", "del-cli": "^5.1.0", "delay": "^6.0.0", - "p-event": "^6.0.0", + "p-event": "^6.0.1", "tempy": "^3.1.0", - "ts-node": "^10.9.1", - "tsd": "^0.29.0", - "typescript": "^5.2.2", - "xo": "^0.56.0" + "ts-node": "^10.9.2", + "tsd": "^0.31.0", + "typescript": "^5.4.5", + "xo": "^0.58.0" }, "ava": { "files": [ @@ -83,11 +83,13 @@ }, "nodeArguments": [ "--loader=ts-node/esm" - ] + ], + "workerThreads": false }, "xo": { "rules": { - "@typescript-eslint/ban-ts-comment": "off" + "@typescript-eslint/ban-ts-comment": "off", + "unicorn/prevent-abbreviations": "off" } } } diff --git a/source/index.ts b/source/index.ts index cce876f..33e390f 100644 --- a/source/index.ts +++ b/source/index.ts @@ -5,7 +5,12 @@ import fs from 'node:fs'; import path from 'node:path'; import crypto from 'node:crypto'; import assert from 'node:assert'; -import {getProperty, hasProperty, setProperty, deleteProperty} from 'dot-prop'; +import { + getProperty, + hasProperty, + setProperty, + deleteProperty, +} from 'dot-prop'; import envPaths from 'env-paths'; import {writeFileSync as atomicWriteFileSync} from 'atomically'; import AjvModule, {type ValidateFunction as AjvValidateFunction} from 'ajv'; From 3fae6f2510813a9de36b0a8a2431995a96eba30f Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Fri, 14 Jun 2024 19:22:29 +0200 Subject: [PATCH 3/7] Switch from JSON Schema draft-07 to draft-2020-12 --- source/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/index.ts b/source/index.ts index 33e390f..7b5b62c 100644 --- a/source/index.ts +++ b/source/index.ts @@ -13,7 +13,7 @@ import { } from 'dot-prop'; import envPaths from 'env-paths'; import {writeFileSync as atomicWriteFileSync} from 'atomically'; -import AjvModule, {type ValidateFunction as AjvValidateFunction} from 'ajv'; +import {Ajv2020 as Ajv, type ValidateFunction as AjvValidateFunction} from 'ajv/dist/2020.js'; import ajvFormatsModule from 'ajv-formats'; import debounceFn from 'debounce-fn'; import semver from 'semver'; @@ -35,7 +35,6 @@ import { } from './types.js'; // FIXME: https://github.com/ajv-validator/ajv/issues/2047 -const Ajv = AjvModule.default; const ajvFormats = ajvFormatsModule.default; const encryptionAlgorithm = 'aes-256-cbc'; From 8904e973e8fe16b0517e4c02df5f697b9baebf11 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Fri, 14 Jun 2024 19:24:51 +0200 Subject: [PATCH 4/7] 13.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2462bb5..3f5dfd4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "conf", - "version": "12.0.0", + "version": "13.0.0", "description": "Simple config handling for your app or module", "license": "MIT", "repository": "sindresorhus/conf", From a3c288b5a7fea1c93d74cd66d11105e19f04b9e9 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Fri, 14 Jun 2024 19:31:27 +0200 Subject: [PATCH 5/7] Fix broken links --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 6669b43..2af0d54 100644 --- a/readme.md +++ b/readme.md @@ -64,7 +64,7 @@ Type: `object` [JSON Schema](https://json-schema.org) to validate your config data. -Under the hood, the JSON Schema validator [ajv](https://github.com/epoberezkin/ajv) is used to validate your config. We use [JSON Schema draft-07](https://json-schema.org/latest/json-schema-validation.html) and support all [validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md) and [formats](https://github.com/epoberezkin/ajv#formats). +Under the hood, the JSON Schema validator [ajv](https://ajv.js.org/json-schema.html) is used to validate your config. We use [JSON Schema draft-2020-12](https://json-schema.org/draft/2020-12/release-notes) and support all validation keywords and formats. You should define your schema as an object where each key is the name of your data's property and each value is a JSON schema used to validate that property. See more [here](https://json-schema.org/understanding-json-schema/reference/object.html#properties). From 529e7623b026ca2577f73c000c81e348b8f16057 Mon Sep 17 00:00:00 2001 From: Darrel O'Pry Date: Sat, 22 Jun 2024 06:05:40 -0400 Subject: [PATCH 6/7] Fix validation being incorrectly run before schema change (#194) Co-authored-by: Sindre Sorhus --- source/index.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/source/index.ts b/source/index.ts index 7b5b62c..692815a 100644 --- a/source/index.ts +++ b/source/index.ts @@ -137,6 +137,16 @@ export default class Conf = Record = Record Date: Sat, 22 Jun 2024 12:07:49 +0200 Subject: [PATCH 7/7] 13.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3f5dfd4..2153c3c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "conf", - "version": "13.0.0", + "version": "13.0.1", "description": "Simple config handling for your app or module", "license": "MIT", "repository": "sindresorhus/conf",