Comparing version 13.0.0 to 13.0.1
@@ -96,2 +96,9 @@ /* eslint-disable @typescript-eslint/naming-convention, @typescript-eslint/no-unsafe-return */ | ||
const store = Object.assign(createPlainObject(), options.defaults, fileStore); | ||
if (options.migrations) { | ||
if (!options.projectVersion) { | ||
throw new Error('Please specify the `projectVersion` option.'); | ||
} | ||
this._migrate(options.migrations, options.projectVersion, options.beforeEachMigration); | ||
} | ||
// We defer validation until after migrations are applied so that the store can be updated to the current schema. | ||
this._validate(store); | ||
@@ -107,8 +114,2 @@ try { | ||
} | ||
if (options.migrations) { | ||
if (!options.projectVersion) { | ||
throw new Error('Please specify the `projectVersion` option.'); | ||
} | ||
this._migrate(options.migrations, options.projectVersion, options.beforeEachMigration); | ||
} | ||
} | ||
@@ -115,0 +116,0 @@ get(key, defaultValue) { |
{ | ||
"name": "conf", | ||
"version": "13.0.0", | ||
"version": "13.0.1", | ||
"description": "Simple config handling for your app or module", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -67,3 +67,3 @@ # conf | ||
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. | ||
@@ -70,0 +70,0 @@ 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). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45760
698