mdat 1.3.0 → 1.3.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.
package/bin/cli.js CHANGED
@@ -33,21 +33,30 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
33
33
  var __commonJS = (cb, mod) => function() {
34
34
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
35
35
  };
36
- var __export = (all$2) => {
36
+ var __export = (all$2, symbols) => {
37
37
  let target = {};
38
- for (var name in all$2) __defProp(target, name, {
39
- get: all$2[name],
40
- enumerable: true
41
- });
38
+ for (var name in all$2) {
39
+ __defProp(target, name, {
40
+ get: all$2[name],
41
+ enumerable: true
42
+ });
43
+ }
44
+ if (symbols) {
45
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
46
+ }
42
47
  return target;
43
48
  };
44
49
  var __copyProps = (to, from, except, desc) => {
45
- if (from && typeof from === "object" || typeof from === "function") for (var keys$1 = __getOwnPropNames(from), i = 0, n = keys$1.length, key; i < n; i++) {
46
- key = keys$1[i];
47
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
48
- get: ((k) => from[k]).bind(null, key),
49
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
50
- });
50
+ if (from && typeof from === "object" || typeof from === "function") {
51
+ for (var keys$1 = __getOwnPropNames(from), i = 0, n = keys$1.length, key; i < n; i++) {
52
+ key = keys$1[i];
53
+ if (!__hasOwnProp.call(to, key) && key !== except) {
54
+ __defProp(to, key, {
55
+ get: ((k) => from[k]).bind(null, key),
56
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
57
+ });
58
+ }
59
+ }
51
60
  }
52
61
  return to;
53
62
  };
@@ -4605,7 +4614,7 @@ var yargs_default = Yargs;
4605
4614
 
4606
4615
  //#endregion
4607
4616
  //#region package.json
4608
- var version = "1.3.0";
4617
+ var version = "1.3.1";
4609
4618
 
4610
4619
  //#endregion
4611
4620
  //#region node_modules/.pnpm/irregular-plurals@4.2.0/node_modules/irregular-plurals/irregular-plurals.json
@@ -27673,7 +27682,7 @@ var badges_default = { badges: {
27673
27682
  const packageJson$1 = await getPackageJson();
27674
27683
  const { name } = packageJson$1;
27675
27684
  const badges = [];
27676
- if (!packageJson$1.private && packageJson$1.publishConfig?.access === "public") badges.push(`[![NPM Package ${name}](https://img.shields.io/npm/v/${name}.svg)](https://npmjs.com/package/${name})`);
27685
+ if (!packageJson$1.name.startsWith("@") || packageJson$1.publishConfig?.access === "public") badges.push(`[![NPM Package ${name}](https://img.shields.io/npm/v/${name}.svg)](https://npmjs.com/package/${name})`);
27677
27686
  if (validOptions?.npm !== void 0) for (const name$1 of validOptions.npm) badges.push(`[![NPM Package ${name$1}](https://img.shields.io/npm/v/${name$1}.svg)](https://npmjs.com/package/${name$1})`);
27678
27687
  const { license } = packageJson$1;
27679
27688
  if (license !== void 0) badges.push(`[![License: ${license}](https://img.shields.io/badge/License-${license}-yellow.svg)](https://opensource.org/licenses/${license})`);
@@ -28045,7 +28054,7 @@ const optionsSchema$1 = unionType([objectType({
28045
28054
  showPercentage: booleanType().optional().default(false)
28046
28055
  })]).transform((options) => {
28047
28056
  if ("file" in options) {
28048
- const { file,...rest } = options;
28057
+ const { file, ...rest } = options;
28049
28058
  return {
28050
28059
  files: file,
28051
28060
  ...rest
@@ -28620,10 +28629,10 @@ function one(node$1) {
28620
28629
  if (node$1.type === "footnoteReference") return [];
28621
28630
  if (node$1.type === "link" || node$1.type === "linkReference") return all(node$1.children);
28622
28631
  if ("children" in node$1) {
28623
- const { children, position: position$2,...copy$1 } = node$1;
28632
+ const { children, position: position$2, ...copy$1 } = node$1;
28624
28633
  return Object.assign(esm_default(copy$1), { children: all(node$1.children) });
28625
28634
  }
28626
- const { position: position$1,...copy } = node$1;
28635
+ const { position: position$1, ...copy } = node$1;
28627
28636
  return esm_default(copy);
28628
28637
  }
28629
28638
 
@@ -28756,7 +28765,7 @@ async function loadConfigReadme(options) {
28756
28765
  addMetaComment: true,
28757
28766
  rules: rules_default
28758
28767
  };
28759
- const { additionalConfig = [], readmeDefaults = defaultReadmeConfig,...rest } = options ?? {};
28768
+ const { additionalConfig = [], readmeDefaults = defaultReadmeConfig, ...rest } = options ?? {};
28760
28769
  const result = await loadConfig({
28761
28770
  additionalConfig: Array.isArray(additionalConfig) ? additionalConfig : [additionalConfig],
28762
28771
  readmeDefaults,
package/dist/index.js CHANGED
@@ -25,21 +25,30 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
25
25
  var __commonJS = (cb, mod) => function() {
26
26
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
27
27
  };
28
- var __export = (all$2) => {
28
+ var __export = (all$2, symbols) => {
29
29
  let target = {};
30
- for (var name in all$2) __defProp(target, name, {
31
- get: all$2[name],
32
- enumerable: true
33
- });
30
+ for (var name in all$2) {
31
+ __defProp(target, name, {
32
+ get: all$2[name],
33
+ enumerable: true
34
+ });
35
+ }
36
+ if (symbols) {
37
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
38
+ }
34
39
  return target;
35
40
  };
36
41
  var __copyProps = (to, from, except, desc) => {
37
- if (from && typeof from === "object" || typeof from === "function") for (var keys$1 = __getOwnPropNames(from), i = 0, n = keys$1.length, key; i < n; i++) {
38
- key = keys$1[i];
39
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
40
- get: ((k) => from[k]).bind(null, key),
41
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
42
- });
42
+ if (from && typeof from === "object" || typeof from === "function") {
43
+ for (var keys$1 = __getOwnPropNames(from), i = 0, n = keys$1.length, key; i < n; i++) {
44
+ key = keys$1[i];
45
+ if (!__hasOwnProp.call(to, key) && key !== except) {
46
+ __defProp(to, key, {
47
+ get: ((k) => from[k]).bind(null, key),
48
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
49
+ });
50
+ }
51
+ }
43
52
  }
44
53
  return to;
45
54
  };
@@ -23391,7 +23400,7 @@ var badges_default = { badges: {
23391
23400
  const packageJson$1 = await getPackageJson();
23392
23401
  const { name } = packageJson$1;
23393
23402
  const badges = [];
23394
- if (!packageJson$1.private && packageJson$1.publishConfig?.access === "public") badges.push(`[![NPM Package ${name}](https://img.shields.io/npm/v/${name}.svg)](https://npmjs.com/package/${name})`);
23403
+ if (!packageJson$1.name.startsWith("@") || packageJson$1.publishConfig?.access === "public") badges.push(`[![NPM Package ${name}](https://img.shields.io/npm/v/${name}.svg)](https://npmjs.com/package/${name})`);
23395
23404
  if (validOptions?.npm !== void 0) for (const name$1 of validOptions.npm) badges.push(`[![NPM Package ${name$1}](https://img.shields.io/npm/v/${name$1}.svg)](https://npmjs.com/package/${name$1})`);
23396
23405
  const { license } = packageJson$1;
23397
23406
  if (license !== void 0) badges.push(`[![License: ${license}](https://img.shields.io/badge/License-${license}-yellow.svg)](https://opensource.org/licenses/${license})`);
@@ -23763,7 +23772,7 @@ const optionsSchema$1 = unionType([objectType({
23763
23772
  showPercentage: booleanType().optional().default(false)
23764
23773
  })]).transform((options) => {
23765
23774
  if ("file" in options) {
23766
- const { file,...rest } = options;
23775
+ const { file, ...rest } = options;
23767
23776
  return {
23768
23777
  files: file,
23769
23778
  ...rest
@@ -24338,10 +24347,10 @@ function one(node$1) {
24338
24347
  if (node$1.type === "footnoteReference") return [];
24339
24348
  if (node$1.type === "link" || node$1.type === "linkReference") return all(node$1.children);
24340
24349
  if ("children" in node$1) {
24341
- const { children, position: position$2,...copy$1 } = node$1;
24350
+ const { children, position: position$2, ...copy$1 } = node$1;
24342
24351
  return Object.assign(esm_default(copy$1), { children: all(node$1.children) });
24343
24352
  }
24344
- const { position: position$1,...copy } = node$1;
24353
+ const { position: position$1, ...copy } = node$1;
24345
24354
  return esm_default(copy);
24346
24355
  }
24347
24356
 
@@ -24474,7 +24483,7 @@ async function loadConfigReadme(options) {
24474
24483
  addMetaComment: true,
24475
24484
  rules: rules_default
24476
24485
  };
24477
- const { additionalConfig = [], readmeDefaults = defaultReadmeConfig,...rest } = options ?? {};
24486
+ const { additionalConfig = [], readmeDefaults = defaultReadmeConfig, ...rest } = options ?? {};
24478
24487
  const result = await loadConfig({
24479
24488
  additionalConfig: Array.isArray(additionalConfig) ? additionalConfig : [additionalConfig],
24480
24489
  readmeDefaults,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdat",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "CLI tool and TypeScript library implementing the Markdown Autophagic Template (MDAT) system. MDAT lets you use comments as dynamic content templates in Markdown files, making it easy to generate and update readme boilerplate.",
5
5
  "keywords": [
6
6
  "mdat",
@@ -41,7 +41,7 @@
41
41
  "@types/mdast": "^4.0.4",
42
42
  "@types/node": "^22.19.1",
43
43
  "@types/unist": "^3.0.3",
44
- "@types/yargs": "^17.0.34",
44
+ "@types/yargs": "^17.0.35",
45
45
  "cosmiconfig": "^9.0.0",
46
46
  "cosmiconfig-typescript-loader": "^6.2.0",
47
47
  "globby": "^14.1.0",
@@ -52,7 +52,7 @@
52
52
  "vfile": "^6.0.3"
53
53
  },
54
54
  "devDependencies": {
55
- "@kitschpatrol/shared-config": "^5.8.3",
55
+ "@kitschpatrol/shared-config": "^5.9.0",
56
56
  "bumpp": "^10.3.1",
57
57
  "execa": "^9.6.0",
58
58
  "find-up": "^8.0.0",
@@ -71,20 +71,17 @@
71
71
  "remark": "^15.0.1",
72
72
  "remark-gfm": "^4.0.1",
73
73
  "to-vfile": "^8.0.0",
74
- "tsdown": "^0.16.3",
74
+ "tsdown": "^0.16.7",
75
75
  "typescript": "~5.9.3",
76
76
  "unplugin-raw": "^0.6.3",
77
77
  "untildify": "^6.0.0",
78
- "vitest": "^4.0.8",
78
+ "vitest": "^4.0.14",
79
79
  "yargs": "^17.7.2",
80
80
  "zod": "^3.25.76"
81
81
  },
82
82
  "engines": {
83
83
  "node": ">=20.19.0"
84
84
  },
85
- "publishConfig": {
86
- "access": "public"
87
- },
88
85
  "scripts": {
89
86
  "build": "tsdown && tsc -p tsconfig.build.lib.json",
90
87
  "clean": "git rm -f pnpm-lock.yaml ; git clean -fdX",
package/readme.md CHANGED
@@ -749,8 +749,8 @@ See the [Examples section](https://github.com/kitschpatrol/remark-mdat#examples)
749
749
 
750
750
  | File | Original | Gzip | Brotli |
751
751
  | ------------ | -------- | ------- | ------ |
752
- | package.json | 2.5 kB | 1.1 kB | 974 B |
753
- | readme.md | 63.9 kB | 11.6 kB | 9.3 kB |
752
+ | package.json | 2.5 kB | 1.1 kB | 982 B |
753
+ | readme.md | 64 kB | 11.7 kB | 9.3 kB |
754
754
 
755
755
  <!-- /size-table -->
756
756