@moritakaaz/markflow 0.4.4 → 0.4.5

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/package.json CHANGED
@@ -19,5 +19,5 @@
19
19
  "test": "node --test"
20
20
  },
21
21
  "type": "module",
22
- "version": "0.4.4"
22
+ "version": "0.4.5"
23
23
  }
package/src/doctor.js CHANGED
@@ -286,7 +286,12 @@ export async function runDoctor(options) {
286
286
  "utf8"
287
287
  );
288
288
  const language = sectionLines(prdText, "Language");
289
- if (language !== null && language.some(languageUnanswered)) {
289
+ const languageMissing =
290
+ language === null ||
291
+ !language.some((line) => line.includes("Conversation language")) ||
292
+ !language.some((line) => line.includes("Docs language")) ||
293
+ language.some(languageUnanswered);
294
+ if (languageMissing) {
290
295
  console.log("Warning Language not answered in markflow/docs/PRD.md");
291
296
  warnings.push("markflow/docs/PRD.md");
292
297
  }
package/src/versions.js CHANGED
@@ -2,5 +2,5 @@
2
2
  // Bump methodology when the docs in docs change.
3
3
  // Bump template when the files in templates change.
4
4
  // The CLI version comes from package.json.
5
- export const METHODOLOGY_VERSION = "0.4.4";
6
- export const TEMPLATE_VERSION = "0.4.4";
5
+ export const METHODOLOGY_VERSION = "0.4.5";
6
+ export const TEMPLATE_VERSION = "0.4.5";
package/test/cli.test.js CHANGED
@@ -638,6 +638,28 @@ describe("doctor", () => {
638
638
  assert.ok(result.warnings.includes("markflow/docs/PRD.md"));
639
639
  });
640
640
 
641
+ it("warns when a language line is deleted", async (t) => {
642
+ const dir = await tempDir(t);
643
+ await runInit({ target: dir });
644
+ await write(
645
+ dir,
646
+ "markflow/docs/PRD.md",
647
+ "Our own product.\n\n## Language\n\n- Conversation language. Indonesian\n"
648
+ );
649
+ const result = await runDoctor({ target: dir });
650
+ assert.equal(result.ok, true);
651
+ assert.ok(result.warnings.includes("markflow/docs/PRD.md"));
652
+ });
653
+
654
+ it("warns when the Language section is deleted", async (t) => {
655
+ const dir = await tempDir(t);
656
+ await runInit({ target: dir });
657
+ await write(dir, "markflow/docs/PRD.md", "Our own product.\n");
658
+ const result = await runDoctor({ target: dir });
659
+ assert.equal(result.ok, true);
660
+ assert.ok(result.warnings.includes("markflow/docs/PRD.md"));
661
+ });
662
+
641
663
  it("no language warning when both languages are answered", async (t) => {
642
664
  const dir = await tempDir(t);
643
665
  await runInit({ target: dir });
@@ -754,7 +776,11 @@ describe("doctor", () => {
754
776
  it("no template warnings when all three are filled", async (t) => {
755
777
  const dir = await tempDir(t);
756
778
  await runInit({ target: dir });
757
- await write(dir, "markflow/docs/PRD.md", "Our own product.\n");
779
+ await write(
780
+ dir,
781
+ "markflow/docs/PRD.md",
782
+ "Our own product.\n\n## Language\n\n- Conversation language. Indonesian\n- Docs language. Indonesian\n"
783
+ );
758
784
  await write(dir, "markflow/docs/ARCHITECTURE.md", "Our own stack.\n");
759
785
  await write(dir, "markflow/TASKS.md", "Our own tasks.\n");
760
786
  const result = await runDoctor({ target: dir });
@@ -767,7 +793,11 @@ describe("doctor", () => {
767
793
  it("no PRD warning when PRD is filled", async (t) => {
768
794
  const dir = await tempDir(t);
769
795
  await runInit({ target: dir });
770
- await write(dir, "markflow/docs/PRD.md", "Our own product.\n");
796
+ await write(
797
+ dir,
798
+ "markflow/docs/PRD.md",
799
+ "Our own product.\n\n## Language\n\n- Conversation language. Indonesian\n- Docs language. Indonesian\n"
800
+ );
771
801
  const result = await runDoctor({ target: dir });
772
802
  assert.equal(result.ok, true);
773
803
  assert.ok(!result.warnings.includes("markflow/docs/PRD.md"));
@@ -974,7 +1004,7 @@ describe("parser", () => {
974
1004
  const dir = await tempDir(t);
975
1005
  const result = runCli(["--version"], dir);
976
1006
  assert.equal(result.status, 0);
977
- assert.equal(result.stdout.trim(), "0.4.4");
1007
+ assert.equal(result.stdout.trim(), "0.4.5");
978
1008
  });
979
1009
  });
980
1010