@naturalcycles/dev-lib 20.35.3 → 20.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.js +3 -5
- package/package.json +1 -1
package/dist/config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j } from '@naturalcycles/nodejs-lib/ajv';
|
|
2
2
|
import { fs2 } from '@naturalcycles/nodejs-lib/fs2';
|
|
3
3
|
/**
|
|
4
4
|
* Returns an empty config if the file is absent.
|
|
@@ -10,15 +10,13 @@ export async function readDevLibConfigIfPresent(cwd = process.cwd()) {
|
|
|
10
10
|
cfg = (await import(devLibConfigPath)).default;
|
|
11
11
|
console.log(`read ${devLibConfigPath}`);
|
|
12
12
|
}
|
|
13
|
-
return devLibConfigSchema.validate(cfg);
|
|
13
|
+
return devLibConfigSchema.validate(cfg, { inputName: 'dev-lib.config.js' });
|
|
14
14
|
}
|
|
15
|
-
const devLibConfigSchema =
|
|
15
|
+
const devLibConfigSchema = j.object({
|
|
16
16
|
commitlint: j.object
|
|
17
17
|
.infer({
|
|
18
18
|
requireScope: j.boolean().optional(),
|
|
19
19
|
allowedScopes: j.array(j.string()).optional(),
|
|
20
20
|
})
|
|
21
21
|
.optional(),
|
|
22
|
-
}), {
|
|
23
|
-
inputName: 'dev-lib.config.js',
|
|
24
22
|
});
|