@heroiclands/package-build 25.5.0 → 25.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @heroiclands/package-build
2
2
 
3
+ ## 25.5.1
4
+
5
+ **Builds and commands**
6
+
7
+ - `package-build markdown` checks a repository of any size, rather than crashing on large ones.
8
+
3
9
  ## 25.5.0
4
10
 
5
11
  **Languages and scripts**
@@ -451,6 +451,9 @@ function gitignoreHooks(root) {
451
451
  };
452
452
  }
453
453
 
454
+ /** Sources per markdownlint call: it lints `strings` by recursing once per entry, so a large set overflows the stack. */
455
+ const LINT_BATCH_SIZE = 200;
456
+
454
457
  /**
455
458
  * Lint markdown under a root with the `markdownlint` library.
456
459
  *
@@ -560,10 +563,19 @@ export async function runMarkdownlint(params) {
560
563
  }
561
564
  const lintSources = async (selected) => {
562
565
  const { files: _files, ...shared } = options;
563
- const results = await lint({
564
- ...shared,
565
- strings: Object.fromEntries(selected.map((file) => [file, sources.get(file).text])),
566
- });
566
+ const results = {};
567
+ for (let start = 0; start < selected.length; start += LINT_BATCH_SIZE) {
568
+ const batch = selected.slice(start, start + LINT_BATCH_SIZE);
569
+ Object.assign(
570
+ results,
571
+ await lint({
572
+ ...shared,
573
+ strings: Object.fromEntries(
574
+ batch.map((file) => [file, sources.get(file).text]),
575
+ ),
576
+ }),
577
+ );
578
+ }
567
579
  for (const file of selected) {
568
580
  const protectedSource = sources.get(file);
569
581
  results[file] = (results[file] ?? [])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heroiclands/package-build",
3
- "version": "25.5.0",
3
+ "version": "25.5.1",
4
4
  "description": "Shared toolchain for building and shipping a HeroicLands Foundry VTT package \u2014 content compilation, manifest, localization, staging, bundle, release and deployment.",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "type": "module",