mdat 3.6.5 → 3.6.6

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/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { S as version, a as expand, b as setLogger$1, d as templates_default, f as ensureArray, l as createReadme, r as collapse, s as strip, t as check, u as createReadmeInteractive, x as name, y as log } from "../lib-D3Fabg1J.js";
2
+ import { S as version, a as expand, b as setLogger$1, d as templates_default, f as ensureArray, l as createReadme, r as collapse, s as strip, t as check, u as createReadmeInteractive, x as name, y as log } from "../lib-CyzOc08c.js";
3
3
  import { createLogger } from "lognow";
4
4
  import picocolors from "picocolors";
5
5
  import prettyMilliseconds from "pretty-ms";
@@ -8,7 +8,7 @@ import { write } from "to-vfile";
8
8
  import yargs from "yargs";
9
9
  import { hideBin } from "yargs/helpers";
10
10
 
11
- //#region src/bin/options.ts
11
+ // src/bin/options.ts
12
12
  const nameOption = { name: {
13
13
  alias: "n",
14
14
  defaultDescription: "Same name as input file. Overwrites the input file.",
@@ -77,8 +77,7 @@ const compoundOption = { compound: {
77
77
  type: "boolean"
78
78
  } };
79
79
 
80
- //#endregion
81
- //#region src/bin/cli.ts
80
+ // src/bin/cli.ts
82
81
  const startTime = performance.now();
83
82
  const yargsInstance = yargs(hideBin(process.argv));
84
83
  try {
@@ -173,5 +172,4 @@ function getExitCode(results) {
173
172
  return getMdatReports(results).reduce((count, report) => count + report.errors.length, 0) > 0 ? 1 : 0;
174
173
  }
175
174
 
176
- //#endregion
177
175
  export { };
@@ -2,7 +2,6 @@ import { ILogBasic, ILogLayer } from "lognow";
2
2
  import { Rule, Rule as Rule$1 } from "remark-mdat";
3
3
  import { MetadataContext } from "metascope";
4
4
  import { VFile } from "vfile";
5
- //#region src/lib/config.d.ts
6
5
  /**
7
6
  * An mdat configuration is a record of expansion rules. Keys become comment
8
7
  * keywords, values define the expansion content.
@@ -47,8 +46,6 @@ export declare function mergeConfig(a: Config, b: Config): Config;
47
46
  * Identity function providing type inference for mdat configuration files.
48
47
  */
49
48
  export declare function defineConfig(config: Config): Config;
50
- //#endregion
51
- //#region src/lib/readme/create.d.ts
52
49
  type MdatReadmeCreateOptions = {
53
50
  compound: boolean;
54
51
  expand: boolean;
@@ -68,8 +65,6 @@ declare function createReadmeInteractive(): Promise<string>;
68
65
  * @returns Path to the created readme file.
69
66
  */
70
67
  declare function createReadme(options?: Partial<MdatReadmeCreateOptions>): Promise<string>;
71
- //#endregion
72
- //#region src/lib/api.d.ts
73
68
  /**
74
69
  * Expand MDAT comments in one or more Markdown files. If no files are provided,
75
70
  * auto-finds the closest readme.md. Writing is the responsibility of the caller
@@ -141,8 +136,6 @@ export declare function checkString(markdown: string, config?: ConfigToLoad, opt
141
136
  inSync: boolean;
142
137
  result: VFile;
143
138
  }>;
144
- //#endregion
145
- //#region src/lib/context.d.ts
146
139
  /**
147
140
  * Get a bunch of platform-agnostic local metadata via metascope, exposed
148
141
  * primarily for plugin developers. Result is memoized the result.
@@ -247,8 +240,6 @@ export declare function getReadmeMetadata(): Promise<{
247
240
  * files may have changed on disk.
248
241
  */
249
242
  export declare function resetMetadataCaches(): void;
250
- //#endregion
251
- //#region src/lib/log.d.ts
252
243
  /**
253
244
  * Set the logger instance for the module. Export this for library consumers to
254
245
  * inject their own logger.
@@ -257,5 +248,4 @@ export declare function resetMetadataCaches(): void;
257
248
  * Stream-like log target
258
249
  */
259
250
  export declare function setLogger(logger?: ILogBasic | ILogLayer<unknown>): void;
260
- //#endregion
261
251
  export { type Config, type ReadmeMetadata, type Rule, createReadme as create, createReadmeInteractive as createInteractive };
package/dist/lib/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { _ as getReadmeMetadata, a as expand, b as setLogger, c as stripString, g as getContextMetadata, h as mergeConfig, i as collapseString, l as createReadme, m as loadConfig, n as checkString, o as expandString, p as defineConfig, r as collapse, s as strip, t as check, u as createReadmeInteractive, v as resetMetadataCaches } from "../lib-D3Fabg1J.js";
1
+ import { _ as getReadmeMetadata, a as expand, b as setLogger, c as stripString, g as getContextMetadata, h as mergeConfig, i as collapseString, l as createReadme, m as loadConfig, n as checkString, o as expandString, p as defineConfig, r as collapse, s as strip, t as check, u as createReadmeInteractive, v as resetMetadataCaches } from "../lib-CyzOc08c.js";
2
2
 
3
3
  export { check, checkString, collapse, collapseString, createReadme as create, createReadmeInteractive as createInteractive, defineConfig, expand, expandString, getContextMetadata, getReadmeMetadata, loadConfig, mergeConfig, resetMetadataCaches, setLogger, strip, stripString };
@@ -24,12 +24,11 @@ import { Configuration } from "unified-engine";
24
24
  import untildify from "untildify";
25
25
  import { confirm, group, intro, note, outro, select } from "@clack/prompts";
26
26
 
27
- //#region package.json
27
+ // package.json
28
28
  var name = "mdat";
29
- var version = "3.6.5";
29
+ var version = "3.6.6";
30
30
 
31
- //#endregion
32
- //#region src/lib/deep-merge-defined.ts
31
+ // src/lib/deep-merge-defined.ts
33
32
  const deepmerge = deepmergeCustom({ mergeArrays: false });
34
33
  function stripUndefinedDeep(object) {
35
34
  return Array.isArray(object) ? object.map((v) => v !== null && typeof v === "object" ? stripUndefinedDeep(v) : v).filter((v) => v !== void 0) : Object.entries(object).map(([k, v]) => [k, v !== null && typeof v === "object" ? stripUndefinedDeep(v) : v]).reduce((acc, [k, v]) => v === void 0 ? acc : {
@@ -42,8 +41,7 @@ function deepMergeDefined(...objects) {
42
41
  return deepmerge(...stripped);
43
42
  }
44
43
 
45
- //#endregion
46
- //#region src/lib/log.ts
44
+ // src/lib/log.ts
47
45
  /**
48
46
  * The default logger instance for the library.
49
47
  */
@@ -66,8 +64,7 @@ function setLogger$2(logger) {
66
64
  setLogger$1(getChildLogger(log, "metascope"));
67
65
  }
68
66
 
69
- //#endregion
70
- //#region src/lib/mdat-json-loader.ts
67
+ // src/lib/mdat-json-loader.ts
71
68
  /**
72
69
  * Lets arbitrary JSON objects (like from package.json) become reasonably good
73
70
  * mdat rule sets HOWEVER cosmiconfig treats package.json as a special case and
@@ -88,8 +85,7 @@ function flattenJson(jsonObject, parentKey = "", result = {}) {
88
85
  return result;
89
86
  }
90
87
 
91
- //#endregion
92
- //#region src/lib/context.ts
88
+ // src/lib/context.ts
93
89
  let metascopeMetadata;
94
90
  /**
95
91
  * Get a bunch of platform-agnostic local metadata via metascope, exposed
@@ -355,8 +351,7 @@ function resetMetadataCaches() {
355
351
  resetReadmeMetadata();
356
352
  }
357
353
 
358
- //#endregion
359
- //#region src/lib/readme/rules/badges.ts
354
+ // src/lib/readme/rules/badges.ts
360
355
  const HOMEBREW_FORMULA_REGEX = /^(?<owner>[^\/]+)\/(?<tap>[^\/]+)\/(?<formula>[^\/]+)$/v;
361
356
  const GITHUB_REPOSITORY_REGEX$1 = /^https:\/\/github\.com\/(?<owner>[^\/]+)\/(?<repo>[^\/]+)$/v;
362
357
  const NO_NPM_PACKAGE = "no public npm package was found. Remove \"private\": true from package.json if the package is published, or list packages explicitly, e.g. badges({ npm: [\"package-name\"] })";
@@ -513,8 +508,7 @@ var badges_default = { badges: { async content(options) {
513
508
  return badges.join("\n");
514
509
  } } };
515
510
 
516
- //#endregion
517
- //#region src/lib/readme/rules/banner.ts
511
+ // src/lib/readme/rules/banner.ts
518
512
  var banner_default = { banner: { async content(options) {
519
513
  const validOptions = z.object({
520
514
  alt: z.string().optional(),
@@ -578,8 +572,7 @@ function isUrl(text, lenient = true) {
578
572
  return !text.includes(" ") && (URL.canParse(text) || lenient && URL.canParse(`https://${text}`));
579
573
  }
580
574
 
581
- //#endregion
582
- //#region src/lib/readme/rules/code.ts
575
+ // src/lib/readme/rules/code.ts
583
576
  const LEADING_DOT_REGEX = /^\./v;
584
577
  var code_default = { code: { async content(options) {
585
578
  const validOptions = z.object({
@@ -592,8 +585,7 @@ var code_default = { code: { async content(options) {
592
585
  return `\`\`\`${lang}\n${validOptions.trim ? exampleCode.trim() : exampleCode}\n\`\`\``;
593
586
  } } };
594
587
 
595
- //#endregion
596
- //#region src/lib/readme/rules/utilities/heading.ts
588
+ // src/lib/readme/rules/utilities/heading.ts
597
589
  const MAX_HEADING_LEVEL = 6;
598
590
  /**
599
591
  * Option schema for the Markdown heading level (1-6) at which a rule emits its
@@ -628,8 +620,7 @@ function getHeadingLines(heading, level, defaultText) {
628
620
  return [`${getHeadingPrefix(level)} ${text}`, ""];
629
621
  }
630
622
 
631
- //#endregion
632
- //#region src/lib/readme/rules/contributing.ts
623
+ // src/lib/readme/rules/contributing.ts
633
624
  var contributing_default = { contributing: { async content(options) {
634
625
  const validOptions = z.object({
635
626
  heading: headingSchema,
@@ -648,8 +639,7 @@ var contributing_default = { contributing: { async content(options) {
648
639
  ].join("\n");
649
640
  } } };
650
641
 
651
- //#endregion
652
- //#region src/lib/readme/rules/utilities/version-range.ts
642
+ // src/lib/readme/rules/utilities/version-range.ts
653
643
  const BARE_VERSION_REGEX = /^v?\d+(?:\.\d+){0,2}$/v;
654
644
  const MINIMUM_ONLY_REGEX = /^>=\s*v?(?<version>\d+(?:\.\d+){0,2})$/v;
655
645
  const LOWER_BOUND_REGEX = /(?:^|[\s\|\(^~]|>=)\s*v?(?<version>\d+(?:\.\d+){0,2})/gv;
@@ -679,8 +669,7 @@ function describeVersionRange(range) {
679
669
  return floor === void 0 ? `\`${trimmed}\`` : `${floor} or newer (specifically \`${trimmed}\`)`;
680
670
  }
681
671
 
682
- //#endregion
683
- //#region src/lib/readme/rules/dependencies.ts
672
+ // src/lib/readme/rules/dependencies.ts
684
673
  const PLATFORM_INFO = {
685
674
  bun: {
686
675
  display: "Bun",
@@ -756,8 +745,7 @@ var dependencies_default = { dependencies: { async content(options) {
756
745
  return [...getHeadingLines(validOptions?.heading, validOptions?.headingLevel ?? 3, "Dependencies"), ...items].join("\n");
757
746
  } } };
758
747
 
759
- //#endregion
760
- //#region src/lib/readme/rules/description.ts
748
+ // src/lib/readme/rules/description.ts
761
749
  /**
762
750
  * Simple alias for short-description
763
751
  */
@@ -767,8 +755,7 @@ var description_default = { description: { async content() {
767
755
  return `**${description}**`;
768
756
  } } };
769
757
 
770
- //#endregion
771
- //#region src/lib/readme/rules/development-dependencies.ts
758
+ // src/lib/readme/rules/development-dependencies.ts
772
759
  const TOOL_INFO = {
773
760
  bun: {
774
761
  display: "Bun",
@@ -812,15 +799,13 @@ var development_dependencies_default = { "development-dependencies": { async con
812
799
  return [...getHeadingLines(validOptions?.heading, validOptions?.headingLevel ?? 3, "Development dependencies"), ...items].join("\n");
813
800
  } } };
814
801
 
815
- //#endregion
816
- //#region src/lib/readme/rules/dev-dependencies.ts
802
+ // src/lib/readme/rules/dev-dependencies.ts
817
803
  /**
818
804
  * Simple alias for `development-dependencies`
819
805
  */
820
806
  var dev_dependencies_default = { "dev-dependencies": getSoleRule(development_dependencies_default) };
821
807
 
822
- //#endregion
823
- //#region src/lib/readme/rules/license.ts
808
+ // src/lib/readme/rules/license.ts
824
809
  var license_default = { license: { async content(options) {
825
810
  const validOptions = z.object({
826
811
  heading: headingSchema,
@@ -833,12 +818,10 @@ var license_default = { license: { async content(options) {
833
818
  return [...getHeadingLines(validOptions?.heading, validOptions?.headingLevel ?? 2, "License"), `[${license}](${licenseFilePath}) © ${authorDisplay}`].join("\n");
834
819
  } } };
835
820
 
836
- //#endregion
837
- //#region src/lib/readme/rules/footer.ts
821
+ // src/lib/readme/rules/footer.ts
838
822
  var footer_default = { footer: { content: [getSoleRule(contributing_default), getSoleRule(license_default)] } };
839
823
 
840
- //#endregion
841
- //#region src/lib/readme/rules/short-description.ts
824
+ // src/lib/readme/rules/short-description.ts
842
825
  /**
843
826
  * Simple alias for `description` rule, to match nomenclature in
844
827
  * [standard-readme](https://github.com/RichardLitt/standard-readme/blob/main/spec.md#short-description)
@@ -846,8 +829,7 @@ var footer_default = { footer: { content: [getSoleRule(contributing_default), ge
846
829
  */
847
830
  var short_description_default = { "short-description": getSoleRule(description_default) };
848
831
 
849
- //#endregion
850
- //#region src/lib/readme/rules/title.ts
832
+ // src/lib/readme/rules/title.ts
851
833
  var title_default = { title: {
852
834
  async content(options) {
853
835
  const { postfix, prefix, titleCase } = z.object({
@@ -866,8 +848,7 @@ function makeTitleCase(text) {
866
848
  return text.split(SPLIT_FOR_TITLE_CASE_REGEX).filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
867
849
  }
868
850
 
869
- //#endregion
870
- //#region src/lib/readme/rules/header.ts
851
+ // src/lib/readme/rules/header.ts
871
852
  var header_default = { header: {
872
853
  content: [
873
854
  getSoleRule(title_default),
@@ -878,8 +859,7 @@ var header_default = { header: {
878
859
  order: 2
879
860
  } };
880
861
 
881
- //#endregion
882
- //#region src/lib/readme/rules/install.ts
862
+ // src/lib/readme/rules/install.ts
883
863
  const listFormatter = new Intl.ListFormat("en", {
884
864
  style: "long",
885
865
  type: "conjunction"
@@ -967,15 +947,13 @@ var install_default = { install: { async content(options) {
967
947
  return [...headingLines, ...codeBlock$1(command)].join("\n");
968
948
  } } };
969
949
 
970
- //#endregion
971
- //#region src/lib/readme/rules/installation.ts
950
+ // src/lib/readme/rules/installation.ts
972
951
  /**
973
952
  * Simple alias for `install`
974
953
  */
975
954
  var installation_default = { installation: getSoleRule(install_default) };
976
955
 
977
- //#endregion
978
- //#region src/lib/readme/rules/utilities/size/size-report.ts
956
+ // src/lib/readme/rules/utilities/size/size-report.ts
979
957
  const brotliCompressAsync = promisify(brotliCompress);
980
958
  const gzipCompressAsync = promisify(gzip);
981
959
  /**
@@ -1017,8 +995,7 @@ async function createSizeReport(filePath, precision = 1) {
1017
995
  }
1018
996
  }
1019
997
 
1020
- //#endregion
1021
- //#region src/lib/readme/rules/size.ts
998
+ // src/lib/readme/rules/size.ts
1022
999
  const optionsSchema$1 = z.object({
1023
1000
  compression: z.enum([
1024
1001
  "none",
@@ -1040,8 +1017,7 @@ var size_default = { size: { async content(options) {
1040
1017
  return getSizeForCompression(await createSizeReport(fullPath), validOptions.compression);
1041
1018
  } } };
1042
1019
 
1043
- //#endregion
1044
- //#region src/lib/readme/rules/size-table.ts
1020
+ // src/lib/readme/rules/size-table.ts
1045
1021
  const fileSchema = z.union([z.string(), z.array(z.string())]).transform((files) => Array.isArray(files) ? files : [files]);
1046
1022
  const optionsSchema = z.union([z.object({
1047
1023
  brotli: z.boolean().optional().default(true),
@@ -1099,8 +1075,7 @@ var size_table_default = { "size-table": { async content(options) {
1099
1075
  });
1100
1076
  } } };
1101
1077
 
1102
- //#endregion
1103
- //#region src/lib/readme/rules/skills.ts
1078
+ // src/lib/readme/rules/skills.ts
1104
1079
  const SKILLS_DIRECTORY = "skills";
1105
1080
  const SKILL_FILE_NAME = "SKILL.md";
1106
1081
  const GITHUB_REPOSITORY_REGEX = /^https:\/\/github\.com\/(?<slug>[^\/]+\/[^\/]+)$/v;
@@ -1207,7 +1182,11 @@ var skills_default = { skills: { async content(options) {
1207
1182
  ...headingLines,
1208
1183
  `This project bundles ${agentSkillsLink} in its published package to help coding agents work with ${name}.`,
1209
1184
  "",
1210
- `To sync the ${skillNoun} into your project, run ${skillsCliLink} from your project root:`,
1185
+ `To link the ${skillNoun} into your project with [pnpm](https://pnpm.io/agent-skills) 12.11 or later, approve the package once and pnpm links its ${skillNoun} on every install:`,
1186
+ "",
1187
+ ...codeBlock(`pnpm approve ${name}`),
1188
+ "",
1189
+ `With other package managers, sync the ${skillNoun} from your project root with ${skillsCliLink}:`,
1211
1190
  "",
1212
1191
  ...codeBlock("npx skills experimental_sync"),
1213
1192
  ...repositoryUrl === void 0 ? [] : [
@@ -1221,8 +1200,7 @@ var skills_default = { skills: { async content(options) {
1221
1200
  ].join("\n");
1222
1201
  } } };
1223
1202
 
1224
- //#endregion
1225
- //#region src/lib/readme/rules/table-of-contents.ts
1203
+ // src/lib/readme/rules/table-of-contents.ts
1226
1204
  var table_of_contents_default = { "table-of-contents": {
1227
1205
  async content(options, { tree }) {
1228
1206
  const validOptions = z.object({
@@ -1253,15 +1231,13 @@ var table_of_contents_default = { "table-of-contents": {
1253
1231
  order: 1
1254
1232
  } };
1255
1233
 
1256
- //#endregion
1257
- //#region src/lib/readme/rules/toc.ts
1234
+ // src/lib/readme/rules/toc.ts
1258
1235
  /**
1259
1236
  * Simple alias for table-of-contents
1260
1237
  */
1261
1238
  var toc_default = { toc: getSoleRule(table_of_contents_default) };
1262
1239
 
1263
- //#endregion
1264
- //#region src/lib/readme/rules/index.ts
1240
+ // src/lib/readme/rules/index.ts
1265
1241
  var rules_default = {
1266
1242
  ...badges_default,
1267
1243
  ...banner_default,
@@ -1285,8 +1261,7 @@ var rules_default = {
1285
1261
  ...toc_default
1286
1262
  };
1287
1263
 
1288
- //#endregion
1289
- //#region src/lib/config.ts
1264
+ // src/lib/config.ts
1290
1265
  let _configExplorer;
1291
1266
  let _additionalConfigExplorer;
1292
1267
  function getConfigExplorer() {
@@ -1368,8 +1343,7 @@ function defineConfig(config) {
1368
1343
  return config;
1369
1344
  }
1370
1345
 
1371
- //#endregion
1372
- //#region src/lib/format.ts
1346
+ // src/lib/format.ts
1373
1347
  let cachedPrettier;
1374
1348
  const configCache = /* @__PURE__ */ new Map();
1375
1349
  /**
@@ -1396,8 +1370,7 @@ async function formatWithPrettier(content, filePath) {
1396
1370
  });
1397
1371
  }
1398
1372
 
1399
- //#endregion
1400
- //#region src/lib/utilities.ts
1373
+ // src/lib/utilities.ts
1401
1374
  function zeroPad(n, nMax) {
1402
1375
  const places = nMax === 0 ? 1 : Math.floor(Math.log10(Math.abs(nMax)) + 1);
1403
1376
  return n.toString().padStart(places, "0");
@@ -1505,8 +1478,7 @@ function stripLintPlugins(config) {
1505
1478
  };
1506
1479
  }
1507
1480
 
1508
- //#endregion
1509
- //#region src/lib/processors.ts
1481
+ // src/lib/processors.ts
1510
1482
  async function processFiles(files, loader, processorGetter, name, output, config) {
1511
1483
  const [resolvedConfig, localRemarkConfig] = await Promise.all([loader({ additionalConfig: config }), loadAmbientRemarkConfig()]);
1512
1484
  const resolvedFiles = ensureArray(files);
@@ -1553,32 +1525,25 @@ function getStripProcessor(_config, ambientRemarkConfig) {
1553
1525
  });
1554
1526
  }
1555
1527
 
1556
- //#endregion
1557
- //#region src/lib/readme/templates/mdat-readme-compound.md?raw
1528
+ // src/lib/readme/templates/mdat-readme-compound.md?raw
1558
1529
  var mdat_readme_compound_default = "<!-- header -->\n\n<!-- table-of-contents -->\n\n## Overview\n\n## Getting started\n\n<!-- dependencies -->\n\n<!-- install -->\n\n## Usage\n\n### Library\n\n#### API\n\n#### Examples\n\n### CLI\n\n#### Commands\n\n#### Examples\n\n## Background\n\n### Motivation\n\n### Implementation notes\n\n### Similar projects\n\n## The future\n\n## Maintainers\n\n_List maintainer(s) for a repository, along with one way of contacting them (e.g. GitHub link or email)._\n\n## Acknowledgments\n\n_State anyone or anything that significantly helped with the development of your project. State public contact hyper-links if applicable._\n\n<!-- footer -->\n";
1559
1530
 
1560
- //#endregion
1561
- //#region src/lib/readme/templates/mdat-readme.md?raw
1531
+ // src/lib/readme/templates/mdat-readme.md?raw
1562
1532
  var mdat_readme_default = "<!-- title -->\n\n<!-- banner -->\n\n<!-- badges -->\n\n<!-- short-description -->\n\n<!-- table-of-contents -->\n\n## Overview\n\n## Getting started\n\n<!-- dependencies -->\n\n<!-- install -->\n\n## Usage\n\n### Library\n\n#### API\n\n#### Examples\n\n### CLI\n\n#### Commands\n\n#### Examples\n\n## Background\n\n### Motivation\n\n### Implementation notes\n\n### Similar projects\n\n## The future\n\n## Maintainers\n\n_List maintainer(s) for a repository, along with one way of contacting them (e.g. GitHub link or email)._\n\n## Acknowledgments\n\n_State anyone or anything that significantly helped with the development of your project. State public contact hyper-links if applicable._\n\n<!-- contributing -->\n\n<!-- license -->\n";
1563
1533
 
1564
- //#endregion
1565
- //#region src/lib/readme/templates/standard-readme-basic-compound.md?raw
1534
+ // src/lib/readme/templates/standard-readme-basic-compound.md?raw
1566
1535
  var standard_readme_basic_compound_default = "<!-- header -->\n\n<!-- install({ headingLevel: 2 }) -->\n\n## Usage\n\n```ts\n// Code block illustrating common usage.\n// Consider using the <!-- code({ file: \"path/to/example.ts\" }) --> comment as well.\n```\n\n<!-- footer -->\n";
1567
1536
 
1568
- //#endregion
1569
- //#region src/lib/readme/templates/standard-readme-basic.md?raw
1537
+ // src/lib/readme/templates/standard-readme-basic.md?raw
1570
1538
  var standard_readme_basic_default = "<!-- title -->\n\n<!-- short-description -->\n\n<!-- table-of-contents -->\n\n<!-- install({ headingLevel: 2 }) -->\n\n## Usage\n\n```ts\n// Code block illustrating common usage.\n// Consider using the <!-- code({ file: \"path/to/example.ts\" }) --> comment as well.\n```\n\n<!-- contributing -->\n\n<!-- license -->\n";
1571
1539
 
1572
- //#endregion
1573
- //#region src/lib/readme/templates/standard-readme-full-compound.md?raw
1540
+ // src/lib/readme/templates/standard-readme-full-compound.md?raw
1574
1541
  var standard_readme_full_compound_default = "<!-- header -->\n\n_Long description goes here._\n\n_No heading. Cover the main reasons for building the repository. This should describe your module in broad terms, generally in just a few paragraphs; more detail of the module's routines or methods, lengthy code examples, or other in-depth material should be given in subsequent sections._\n\n<!-- table-of-contents -->\n\n## Background\n\n_Cover motivation. Cover abstract dependencies. Cover intellectual provenance: A See Also section is also fitting._\n\n### See also\n\n<!-- install({ headingLevel: 2 }) -->\n\n<!-- dependencies -->\n\n## Usage\n\n```ts\n// Code block illustrating common usage.\n// Consider using the <!-- code({ file: \"path/to/example.ts\" }) --> comment as well.\n```\n\n```ts\n// If importable, code block indicating both import functionality and usage.\n```\n\n### CLI\n\n```ts\n// If CLI compatible, code block indicating common usage.\n```\n\n## _Extra Sections (Rename)_\n\n## Security\n\n## API\n\n_Describe exported functions and objects._\n\n- _Describe signatures, return types, callbacks, and events._\n- _Cover types covered where not obvious._\n- _Describe caveats._\n- _If using an external API generator (like go-doc, js-doc, or so on), point to an external API.md file. This can be the only item in the section, if present._\n\n## Maintainers\n\n_List maintainer(s) for a repository, along with one way of contacting them (e.g. GitHub link or email)._\n\n## Thanks\n\n_State anyone or anything that significantly helped with the development of your project. State public contact hyper-links if applicable._\n\n<!-- footer -->\n";
1575
1542
 
1576
- //#endregion
1577
- //#region src/lib/readme/templates/standard-readme-full.md?raw
1543
+ // src/lib/readme/templates/standard-readme-full.md?raw
1578
1544
  var standard_readme_full_default = "<!-- title -->\n\n<!-- banner -->\n\n<!-- badges -->\n\n<!-- short-description -->\n\n_Long description goes here._\n\n_No heading. Cover the main reasons for building the repository. This should describe your module in broad terms, generally in just a few paragraphs; more detail of the module's routines or methods, lengthy code examples, or other in-depth material should be given in subsequent sections._\n\n<!-- table-of-contents -->\n\n## Background\n\n_Cover motivation. Cover abstract dependencies. Cover intellectual provenance: A See Also section is also fitting._\n\n### See also\n\n<!-- install({ headingLevel: 2 }) -->\n\n<!-- dependencies -->\n\n## Usage\n\n```ts\n// Code block illustrating common usage.\n// Consider using the <!-- code({ file: \"path/to/example.ts\" }) --> comment as well.\n```\n\n```ts\n// If importable, code block indicating both import functionality and usage.\n```\n\n### CLI\n\n```ts\n// If CLI compatible, code block indicating common usage.\n```\n\n## _Extra Sections (Rename)_\n\n## Security\n\n## API\n\n_Describe exported functions and objects._\n\n- _Describe signatures, return types, callbacks, and events._\n- _Cover types covered where not obvious._\n- _Describe caveats._\n- _If using an external API generator (like go-doc, js-doc, or so on), point to an external API.md file. This can be the only item in the section, if present._\n\n## Maintainers\n\n_List maintainer(s) for a repository, along with one way of contacting them (e.g. GitHub link or email)._\n\n## Thanks\n\n_State anyone or anything that significantly helped with the development of your project. State public contact hyper-links if applicable._\n\n<!-- contributing -->\n\n<!-- license -->\n";
1579
1545
 
1580
- //#endregion
1581
- //#region src/lib/readme/templates/index.ts
1546
+ // src/lib/readme/templates/index.ts
1582
1547
  var templates_default = {
1583
1548
  "MDAT Readme": {
1584
1549
  content: {
@@ -1606,8 +1571,7 @@ var templates_default = {
1606
1571
  }
1607
1572
  };
1608
1573
 
1609
- //#endregion
1610
- //#region src/lib/readme/create.ts
1574
+ // src/lib/readme/create.ts
1611
1575
  const USAGE_HEADING = "\n## Usage\n";
1612
1576
  const NEXT_SECTION_REGEX = /\n(?:## |<!-- (?:contributing|footer) -->)/v;
1613
1577
  /**
@@ -1712,8 +1676,7 @@ function getTemplateOptions() {
1712
1676
  }));
1713
1677
  }
1714
1678
 
1715
- //#endregion
1716
- //#region src/lib/api.ts
1679
+ // src/lib/api.ts
1717
1680
  /**
1718
1681
  * Expand MDAT comments in one or more Markdown files. If no files are provided,
1719
1682
  * auto-finds the closest readme.md. Writing is the responsibility of the caller
@@ -1830,5 +1793,4 @@ async function formatResults(results) {
1830
1793
  for (const file of results) file.value = await formatWithPrettier(file.toString(), file.path === "" ? void 0 : file.path);
1831
1794
  }
1832
1795
 
1833
- //#endregion
1834
1796
  export { version as S, getReadmeMetadata as _, expand as a, setLogger$2 as b, stripString as c, templates_default as d, ensureArray as f, getContextMetadata as g, mergeConfig as h, collapseString as i, createReadme as l, loadConfig as m, checkString as n, expandString as o, defineConfig as p, collapse as r, strip as s, check as t, createReadmeInteractive as u, resetMetadataCaches as v, name as x, log as y };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdat",
3
- "version": "3.6.5",
3
+ "version": "3.6.6",
4
4
  "description": "CLI tool and TypeScript library to turn comments into content in Markdown files. MDAT makes it easy to generate and update dynamic boilerplate in project readmes.",
5
5
  "keywords": [
6
6
  "mdat",
@@ -41,8 +41,8 @@
41
41
  "mdat": "dist/bin/cli.js"
42
42
  },
43
43
  "files": [
44
- "dist/*",
45
- "skills/*"
44
+ "dist",
45
+ "skills"
46
46
  ],
47
47
  "dependencies": {
48
48
  "@clack/prompts": "^1.8.1",
@@ -58,10 +58,10 @@
58
58
  "picocolors": "^1.1.1",
59
59
  "plur": "^6.0.0",
60
60
  "pretty-bytes": "^7.2.0",
61
- "pretty-ms": "^9.3.1",
61
+ "pretty-ms": "^10.0.0",
62
62
  "remark": "^15.0.1",
63
63
  "remark-gfm": "^4.0.1",
64
- "remark-mdat": "^3.1.1",
64
+ "remark-mdat": "^3.1.2",
65
65
  "to-vfile": "^8.0.0",
66
66
  "type-fest": "^5.10.0",
67
67
  "unified-engine": "^11.2.2",
@@ -77,10 +77,10 @@
77
77
  "@types/node": "~24.13.6",
78
78
  "@types/unist": "^3.0.3",
79
79
  "@types/yargs": "^17.0.35",
80
- "@vitest/coverage-v8": "^5.0.4",
80
+ "@vitest/coverage-v8": "^5.0.5",
81
81
  "brewpub": "^0.5.0",
82
82
  "bumpp": "^12.3.0",
83
- "execa": "^10.1.0",
83
+ "execa": "^10.2.1",
84
84
  "mdat-plugin-cli-help": "^3.4.1",
85
85
  "mdat-plugin-example": "^3.0.1",
86
86
  "mdat-plugin-tldraw": "^3.0.1",
@@ -88,11 +88,11 @@
88
88
  "prettier": "^3.9.10",
89
89
  "publint": "^0.3.25",
90
90
  "shx": "^0.4.0",
91
- "skills": "1.7.1",
92
- "tsdown": "^0.23.1",
91
+ "tsdown": "^0.23.2",
92
+ "tslib": "^2.8.1",
93
93
  "typescript": "~6.0.3",
94
94
  "unplugin-raw": "^0.8.0",
95
- "vitest": "^5.0.4"
95
+ "vitest": "^5.0.5"
96
96
  },
97
97
  "peerDependencies": {
98
98
  "prettier": "^3.0.0"
package/readme.md CHANGED
@@ -703,7 +703,7 @@ Rules that generate inline content, like `badges`, `code`, and `size`, have no h
703
703
 
704
704
  - ##### `<!-- skills -->`
705
705
 
706
- Documents the [Agent Skills](https://agentskills.io) bundled with the project and how to install them. Detects skills from `skills/<name>/SKILL.md` files, and gives each one a "Skill:" sub-heading linking to its `SKILL.md` file, followed by the first sentence of the description from its frontmatter. Publishable npm packages get instructions for syncing skills from the installed package with the `experimental_sync` command of Vercel's [skills CLI](https://github.com/vercel-labs/skills), and for installing them from the repository with `skills add`. Private packages and non-Node projects only get the repository instructions. Reports an error if no skills are found. Remember to include the `skills` directory in the `files` field of `package.json`. The optional `headingLevel` sets the Markdown heading level and defaults to `2`.
706
+ Documents the [Agent Skills](https://agentskills.io) bundled with the project and how to install them. Detects skills from `skills/<name>/SKILL.md` files, and gives each one a "Skill:" sub-heading linking to its `SKILL.md` file, followed by the first sentence of the description from its frontmatter. Publishable npm packages get instructions for linking skills from the installed package with pnpm's [`pnpm approve`](https://pnpm.io/agent-skills) or the `experimental_sync` command of Vercel's [skills CLI](https://github.com/vercel-labs/skills), and for installing them from the repository with `skills add`. Private packages and non-Node projects only get the repository instructions. Reports an error if no skills are found. Remember to include the `skills` directory in the `files` field of `package.json`. The optional `headingLevel` sets the Markdown heading level and defaults to `2`.
707
707
 
708
708
  #### Compound
709
709