@getmonoceros/workbench 1.5.1 → 1.5.2
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/bin.js +6 -1
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/templates/monoceros-config.sample.yml +39 -39
package/dist/bin.js
CHANGED
|
@@ -1694,6 +1694,11 @@ import { parseDocument as parseDocument2 } from "yaml";
|
|
|
1694
1694
|
var SCHEMA_VERSION = 1;
|
|
1695
1695
|
var MonocerosConfigSchema = z2.object({
|
|
1696
1696
|
schemaVersion: z2.literal(SCHEMA_VERSION),
|
|
1697
|
+
// .nullish() (= .optional().nullable()) on defaults so the shipped
|
|
1698
|
+
// sample yml — where `defaults:` is uncommented but every sub-block
|
|
1699
|
+
// is commented out — parses cleanly. YAML produces `defaults: null`
|
|
1700
|
+
// in that case; without .nullish() the schema would reject it and
|
|
1701
|
+
// we'd be back to forcing builders to comment-juggle three lines.
|
|
1697
1702
|
defaults: z2.object({
|
|
1698
1703
|
git: z2.object({
|
|
1699
1704
|
user: GitUserSchema.optional()
|
|
@@ -1705,7 +1710,7 @@ var MonocerosConfigSchema = z2.object({
|
|
|
1705
1710
|
),
|
|
1706
1711
|
z2.record(z2.string(), FeatureOptionValueSchema)
|
|
1707
1712
|
).optional()
|
|
1708
|
-
}).
|
|
1713
|
+
}).nullish()
|
|
1709
1714
|
});
|
|
1710
1715
|
async function readMonocerosConfig(opts = {}) {
|
|
1711
1716
|
const home = opts.monocerosHome ?? monocerosHome();
|