@savvy-web/changesets 0.4.0 → 0.4.1

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.
@@ -75,10 +75,10 @@ class InitError extends InitErrorBase {
75
75
  return `Init failed at ${this.step}: ${this.reason}`;
76
76
  }
77
77
  }
78
- const forceOption = Options.boolean("force").pipe(Options.withAlias("f"), Options.withDescription("Overwrite existing config files"), Options.withDefault(false));
79
- const quietOption = Options.boolean("quiet").pipe(Options.withAlias("q"), Options.withDescription("Silence warnings, always exit 0"), Options.withDefault(false));
80
- const markdownlintOption = Options.boolean("markdownlint").pipe(Options.withDescription("Register rules in base markdownlint config"), Options.withDefault(true));
81
- const checkOption = Options.boolean("check").pipe(Options.withDescription("Check configuration without writing (for postinstall scripts)"), Options.withDefault(false));
78
+ const forceOption = Options.boolean("force").pipe(Options.withAlias("f"), Options.withDescription("Overwrite existing config files"));
79
+ const quietOption = Options.boolean("quiet").pipe(Options.withAlias("q"), Options.withDescription("Silence warnings, always exit 0"));
80
+ const skipMarkdownlintOption = Options.boolean("skip-markdownlint").pipe(Options.withDescription("Skip registering rules in base markdownlint config"));
81
+ const checkOption = Options.boolean("check").pipe(Options.withDescription("Check configuration without writing (for postinstall scripts)"));
82
82
  function detectGitHubRepo(cwd) {
83
83
  try {
84
84
  const url = execSync("git remote get-url origin", {
@@ -327,9 +327,9 @@ function checkChangesetMarkdownlint(changesetDir) {
327
327
  const initCommand = Command.make("init", {
328
328
  force: forceOption,
329
329
  quiet: quietOption,
330
- markdownlint: markdownlintOption,
330
+ skipMarkdownlint: skipMarkdownlintOption,
331
331
  check: checkOption
332
- }, ({ force, quiet, markdownlint, check })=>Effect.gen(function*() {
332
+ }, ({ force, quiet, skipMarkdownlint, check })=>Effect.gen(function*() {
333
333
  const root = resolveWorkspaceRoot(process.cwd());
334
334
  const repo = detectGitHubRepo(root);
335
335
  if (!repo && !quiet) yield* Effect.log("Warning: could not detect GitHub repo from git remote, using placeholder");
@@ -339,7 +339,7 @@ const initCommand = Command.make("init", {
339
339
  const issues = [
340
340
  ...checkChangesetDir(root),
341
341
  ...checkConfig(changesetDir, repoSlug),
342
- ...markdownlint ? checkBaseMarkdownlint(root) : [],
342
+ ...skipMarkdownlint ? [] : checkBaseMarkdownlint(root),
343
343
  ...checkChangesetMarkdownlint(changesetDir)
344
344
  ];
345
345
  if (0 === issues.length) return void (yield* Effect.log("All @savvy-web/changesets config files are up to date."));
@@ -353,7 +353,7 @@ const initCommand = Command.make("init", {
353
353
  const configResult = yield* handleConfig(changesetDir, repoSlug, force).pipe(Effect.either);
354
354
  if ("Right" === configResult._tag) yield* Effect.log(configResult.right);
355
355
  else errors.push(configResult.left);
356
- if (markdownlint) {
356
+ if (!skipMarkdownlint) {
357
357
  const baseResult = yield* handleBaseMarkdownlint(root).pipe(Effect.either);
358
358
  if ("Right" === baseResult._tag) yield* Effect.log(baseResult.right);
359
359
  else errors.push(baseResult.left);
@@ -785,7 +785,7 @@ const rootCommand = Command.make("savvy-changesets").pipe(Command.withSubcommand
785
785
  ]));
786
786
  const cli = Command.run(rootCommand, {
787
787
  name: "savvy-changesets",
788
- version: "0.4.0"
788
+ version: "0.4.1"
789
789
  });
790
790
  function runCli() {
791
791
  const main = Effect.suspend(()=>cli(process.argv)).pipe(Effect.provide(NodeContext.layer));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvy-web/changesets",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "private": false,
5
5
  "description": "Custom changelog formatter and markdown processing pipeline for the Silk Suite. Provides structured changeset sections, remark-based validation and transformation, and an Effect CLI.",
6
6
  "keywords": [