From 52225425fa94bed11530c22f884e90f44c8e642c Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Mon, 27 Jul 2026 17:58:00 -0700 Subject: [PATCH 01/18] vastly improve performance of validate-regions script --- scripts/validate-regions.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/validate-regions.ts b/scripts/validate-regions.ts index d1128d03..d61c4c93 100644 --- a/scripts/validate-regions.ts +++ b/scripts/validate-regions.ts @@ -147,11 +147,19 @@ function validateSource(filePath: string) { } function walkExamples(dir: string) { + if (dir.indexOf('build') != -1 || dir.indexOf('gradle') != -1) { + // don't even bother with directories that won't contain source files + return; + } for (const entry of readdirSync(dir, { withFileTypes: true })) { const full = join(dir, entry.name); if (entry.isDirectory()) { walkExamples(full); } else { + if (!full.endsWith('.java')) { + // we only care about source files + continue; + } validateSource(full); } } From 179e7170c61d9b51a6244b07ee8aa186c8f9d35e Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Mon, 27 Jul 2026 18:09:18 -0700 Subject: [PATCH 02/18] only run dead link checker in CI --- .remarkrc.mjs | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.remarkrc.mjs b/.remarkrc.mjs index 64af7285..1e949f6b 100644 --- a/.remarkrc.mjs +++ b/.remarkrc.mjs @@ -14,19 +14,23 @@ export default { remarkPresetLintRecommended, remarkNoInlineCodeFences, remarkNoHtmlLinks, - [ - remarkLintNoDeadUrls, - { - skipLocalhost: false, - skipOffline: true, - skipUrlPatterns: [ - 'https://github.com/signup', - 'https://code.visualstudio.com/', - 'https://www.conventionalcommits.org/en/v1.0.0/', - 'https://vale.sh/', - 'https://squoosh.app/', - ], // Add known flaky URL patterns here - }, - ], + // @ts-expect-error I don't think we should add node types to an astro project? + // only run dead link checker in CI to save time in dev + process.env.CI + ? [ + remarkLintNoDeadUrls, + { + skipLocalhost: false, + skipOffline: true, + skipUrlPatterns: [ + 'https://github.com/signup', + 'https://code.visualstudio.com/', + 'https://www.conventionalcommits.org/en/v1.0.0/', + 'https://vale.sh/', + 'https://squoosh.app/', + ], // Add known flaky URL patterns here + }, + ] + : () => undefined, ], }; From a68639baa032e8f92531f3ef22edd3d3ffaa0f6b Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Mon, 27 Jul 2026 18:22:29 -0700 Subject: [PATCH 03/18] retry ci From 617e72d3ffcbb6bbc421b935a59178d2c8e7c0fb Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Mon, 27 Jul 2026 18:46:30 -0700 Subject: [PATCH 04/18] allow any file extension for source files --- scripts/validate-regions.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/validate-regions.ts b/scripts/validate-regions.ts index d61c4c93..ac1e7386 100644 --- a/scripts/validate-regions.ts +++ b/scripts/validate-regions.ts @@ -15,6 +15,7 @@ const CODE_REGION_SOURCES_KEY_RE = /^codeRegionSources:\s*$/; const CODE_REGION_SOURCE_ENTRY_RE = /^\s+([\w-]+):\s*(.+?)\s*$/; const errors: string[] = []; +const extensions: Set = new Set(); function parseCodeRegionSources(content: string): Map { const sources = new Map(); @@ -35,9 +36,9 @@ function parseCodeRegionSources(content: string): Map { const m = line.match(CODE_REGION_SOURCE_ENTRY_RE); if (m) { sources.set(m[1]!, m[2]!); + extensions.add(m[2]!.split('.').at(-1)!); } } - return sources; } @@ -156,7 +157,7 @@ function walkExamples(dir: string) { if (entry.isDirectory()) { walkExamples(full); } else { - if (!full.endsWith('.java')) { + if (!extensions.has(full.split('.').at(-1)!)) { // we only care about source files continue; } From 5e554e3ba827f9204fab61dc80947d3ba25f649a Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Mon, 27 Jul 2026 19:19:01 -0700 Subject: [PATCH 05/18] add node types --- .remarkrc.mjs | 1 - package.json | 3 ++- pnpm-lock.yaml | 61 +++++++++++++++++++++++++++++++------------------- 3 files changed, 40 insertions(+), 25 deletions(-) diff --git a/.remarkrc.mjs b/.remarkrc.mjs index 1e949f6b..8201d875 100644 --- a/.remarkrc.mjs +++ b/.remarkrc.mjs @@ -14,7 +14,6 @@ export default { remarkPresetLintRecommended, remarkNoInlineCodeFences, remarkNoHtmlLinks, - // @ts-expect-error I don't think we should add node types to an astro project? // only run dead link checker in CI to save time in dev process.env.CI ? [ diff --git a/package.json b/package.json index d2793a6e..54babe21 100644 --- a/package.json +++ b/package.json @@ -40,12 +40,13 @@ "@eslint/js": "^10.0.1", "@types/estree": "^1.0.9", "@types/mdast": "^4.0.4", + "@types/node": "^26.1.2", "astro-eslint-parser": "^1.4.0", "eslint": "^10.5.0", "eslint-plugin-astro": "^1.7.0", - "mdast-util-mdx": "^3.0.0", "husky": "^9.1.7", "lint-staged": "^17.0.8", + "mdast-util-mdx": "^3.0.0", "mdast-util-mdx-jsx": "^3.2.0", "mdx2vast": "^0.3.1", "prettier": "^3.8.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 03e40d4b..4b380db9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,13 +13,13 @@ importers: version: 7.2.1 '@astrojs/starlight': specifier: ^0.41.4 - version: 0.41.4(@astrojs/markdown-remark@7.2.1)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0))(typescript@6.0.3) + version: 0.41.4(@astrojs/markdown-remark@7.2.1)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0))(typescript@6.0.3) '@mdi/js': specifier: ^7.4.47 version: 7.4.47 astro: specifier: ^7.1.3 - version: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0) + version: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0) sharp: specifier: ^0.34.5 version: 0.34.5 @@ -39,6 +39,9 @@ importers: '@types/mdast': specifier: ^4.0.4 version: 4.0.4 + '@types/node': + specifier: ^26.1.2 + version: 26.1.2 astro-eslint-parser: specifier: ^1.4.0 version: 1.4.0 @@ -89,7 +92,7 @@ importers: version: 7.0.1 starlight-links-validator: specifier: ^0.20.0 - version: 0.20.1(@astrojs/starlight@0.41.4(@astrojs/markdown-remark@7.2.1)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0))(typescript@6.0.3))(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0)) + version: 0.20.1(@astrojs/starlight@0.41.4(@astrojs/markdown-remark@7.2.1)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0))(typescript@6.0.3))(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0)) tsx: specifier: ^4.22.4 version: 4.22.4 @@ -1155,6 +1158,9 @@ packages: '@types/node@24.12.4': resolution: {integrity: sha512-GUUEShf+PBCGW2KaXwcIt3Yk+e3pkKwWKb9GSyM9WQVE+ep2jzmHdGsHzu4wgcZy5fN9FBdVzjpBQsYlpfpgLA==} + '@types/node@26.1.2': + resolution: {integrity: sha512-Vu4a5UFA9rIIFJ7rB/Vaafh9lrCQszopTCx6KjFboXTGQbPNasehVR5TEiithSDGyd1DEiUByggTZsg8jukeIg==} + '@types/picomatch@4.0.3': resolution: {integrity: sha512-iG0T6+nYJ9FAPmx9SsUlnwcq1ZVRuCXcVEvWnntoPlrOpwtSTKNDC9uVAxTsC3PUvJ+99n4RpAcNgBbHX3JSnQ==} @@ -3508,6 +3514,9 @@ packages: undici-types@7.16.0: resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} + undici-types@8.3.0: + resolution: {integrity: sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==} + undici@8.9.0: resolution: {integrity: sha512-aWZpUj7XoGonMClx4gdDRfgBjqeA+F473aDmROQQbM9n6PRfK/u1q/a0X4wMTgcHfT8H6fpbt98PFuDUwFg2YA==} engines: {node: '>=22.19.0'} @@ -4075,13 +4084,13 @@ snapshots: hast-util-from-html: 2.0.3 satteri: 0.9.5 - '@astrojs/mdx@7.0.3(@astrojs/markdown-satteri@0.3.4)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0))': + '@astrojs/mdx@7.0.3(@astrojs/markdown-satteri@0.3.4)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0))': dependencies: '@astrojs/internal-helpers': 0.10.1 '@astrojs/markdown-remark': 7.2.1 '@mdx-js/mdx': 3.1.1 acorn: 8.16.0 - astro: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0) + astro: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0) es-module-lexer: 2.1.0 estree-util-visit: 2.0.0 hast-util-to-html: 9.0.5 @@ -4107,17 +4116,17 @@ snapshots: stream-replace-string: 2.0.0 zod: 4.4.3 - '@astrojs/starlight@0.41.4(@astrojs/markdown-remark@7.2.1)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0))(typescript@6.0.3)': + '@astrojs/starlight@0.41.4(@astrojs/markdown-remark@7.2.1)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0))(typescript@6.0.3)': dependencies: '@astrojs/markdown-satteri': 0.3.4 - '@astrojs/mdx': 7.0.3(@astrojs/markdown-satteri@0.3.4)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0)) + '@astrojs/mdx': 7.0.3(@astrojs/markdown-satteri@0.3.4)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0)) '@astrojs/sitemap': 3.7.2 '@pagefind/default-ui': 1.4.0 '@types/hast': 3.0.4 '@types/js-yaml': 4.0.9 '@types/mdast': 4.0.4 - astro: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0) - astro-expressive-code: 0.44.1(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0)) + astro: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0) + astro-expressive-code: 0.44.1(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0)) bcp-47: 2.1.0 hast-util-from-html: 2.0.3 hast-util-select: 6.0.4 @@ -4878,7 +4887,7 @@ snapshots: '@types/concat-stream@2.0.3': dependencies: - '@types/node': 24.12.4 + '@types/node': 26.1.2 '@types/debug@4.1.12': dependencies: @@ -4937,11 +4946,15 @@ snapshots: dependencies: undici-types: 7.16.0 + '@types/node@26.1.2': + dependencies: + undici-types: 8.3.0 + '@types/picomatch@4.0.3': {} '@types/sax@1.2.7': dependencies: - '@types/node': 24.12.4 + '@types/node': 26.1.2 '@types/supports-color@8.1.3': {} @@ -5175,13 +5188,13 @@ snapshots: transitivePeerDependencies: - supports-color - astro-expressive-code@0.44.1(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0)): + astro-expressive-code@0.44.1(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0)): dependencies: - astro: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0) + astro: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0) rehype-expressive-code: 0.44.1 url-extras: 0.1.0 - astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0): + astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0): dependencies: '@astrojs/compiler-rs': 0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) '@astrojs/internal-helpers': 0.10.1 @@ -5231,8 +5244,8 @@ snapshots: ultrahtml: 1.6.0 unifont: 0.7.4 unstorage: 1.17.5 - vite: 8.1.5(@types/node@24.12.4)(esbuild@0.28.1)(tsx@4.22.4)(yaml@2.9.0) - vitefu: 1.1.2(vite@8.1.5(@types/node@24.12.4)(esbuild@0.28.1)(tsx@4.22.4)(yaml@2.9.0)) + vite: 8.1.5(@types/node@26.1.2)(esbuild@0.28.1)(tsx@4.22.4)(yaml@2.9.0) + vitefu: 1.1.2(vite@8.1.5(@types/node@26.1.2)(esbuild@0.28.1)(tsx@4.22.4)(yaml@2.9.0)) xxhash-wasm: 1.1.0 yargs-parser: 22.0.0 zod: 4.4.3 @@ -8162,11 +8175,11 @@ snapshots: spdx-license-ids@3.0.23: {} - starlight-links-validator@0.20.1(@astrojs/starlight@0.41.4(@astrojs/markdown-remark@7.2.1)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0))(typescript@6.0.3))(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0)): + starlight-links-validator@0.20.1(@astrojs/starlight@0.41.4(@astrojs/markdown-remark@7.2.1)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0))(typescript@6.0.3))(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0)): dependencies: - '@astrojs/starlight': 0.41.4(@astrojs/markdown-remark@7.2.1)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0))(typescript@6.0.3) + '@astrojs/starlight': 0.41.4(@astrojs/markdown-remark@7.2.1)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0))(typescript@6.0.3) '@types/picomatch': 4.0.3 - astro: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0) + astro: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@26.1.2)(rollup@4.59.0)(tsx@4.22.4)(yaml@2.9.0) github-slugger: 2.0.0 hast-util-from-html: 2.0.3 hast-util-has-property: 3.0.0 @@ -8360,6 +8373,8 @@ snapshots: undici-types@7.16.0: {} + undici-types@8.3.0: {} + undici@8.9.0: {} unified-args@11.0.1: @@ -8617,7 +8632,7 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 - vite@8.1.5(@types/node@24.12.4)(esbuild@0.28.1)(tsx@4.22.4)(yaml@2.9.0): + vite@8.1.5(@types/node@26.1.2)(esbuild@0.28.1)(tsx@4.22.4)(yaml@2.9.0): dependencies: lightningcss: 1.33.0 picomatch: 4.0.5 @@ -8625,15 +8640,15 @@ snapshots: rolldown: 1.1.5 tinyglobby: 0.2.17 optionalDependencies: - '@types/node': 24.12.4 + '@types/node': 26.1.2 esbuild: 0.28.1 fsevents: 2.3.3 tsx: 4.22.4 yaml: 2.9.0 - vitefu@1.1.2(vite@8.1.5(@types/node@24.12.4)(esbuild@0.28.1)(tsx@4.22.4)(yaml@2.9.0)): + vitefu@1.1.2(vite@8.1.5(@types/node@26.1.2)(esbuild@0.28.1)(tsx@4.22.4)(yaml@2.9.0)): optionalDependencies: - vite: 8.1.5(@types/node@24.12.4)(esbuild@0.28.1)(tsx@4.22.4)(yaml@2.9.0) + vite: 8.1.5(@types/node@26.1.2)(esbuild@0.28.1)(tsx@4.22.4)(yaml@2.9.0) volar-service-css@0.0.70(@volar/language-service@2.4.28): dependencies: From 0169a434b54bc2cd58be18c83e7f29dfbe49659d Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Mon, 27 Jul 2026 23:01:49 -0700 Subject: [PATCH 06/18] better path exclusions --- scripts/validate-regions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/validate-regions.ts b/scripts/validate-regions.ts index ac1e7386..9737b666 100644 --- a/scripts/validate-regions.ts +++ b/scripts/validate-regions.ts @@ -1,10 +1,11 @@ import { readFileSync, readdirSync } from 'fs'; -import { join, relative } from 'path'; +import { basename, join, relative } from 'path'; import { fileURLToPath } from 'url'; const ROOT = fileURLToPath(new URL('..', import.meta.url)); const EXAMPLES_DIR = join(ROOT, 'examples'); const DOCS_DIR = join(ROOT, 'src', 'content', 'docs'); +const SKIP_DIRS = new Set(['build', '.gradle', 'node_modules']); const START_RE = /^\s*(?:\/\/|#|--|)?\s*\[(\w+)\]\s*$/; const END_RE = /^\s*(?:\/\/|#|--|)?\s*\[\/(\w+)\]\s*$/; @@ -148,8 +149,7 @@ function validateSource(filePath: string) { } function walkExamples(dir: string) { - if (dir.indexOf('build') != -1 || dir.indexOf('gradle') != -1) { - // don't even bother with directories that won't contain source files + if (SKIP_DIRS.has(basename(dir))) { return; } for (const entry of readdirSync(dir, { withFileTypes: true })) { From 347eb317d7f6d2db22834cbe6fbb02dd062db048 Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Tue, 28 Jul 2026 20:58:32 -0700 Subject: [PATCH 07/18] slightly improve eslint performance --- .gitignore | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 50e55cb1..3082a619 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,5 @@ bun.lock */build/* # IntelliJ -.idea \ No newline at end of file +.idea +.eslintcache \ No newline at end of file diff --git a/package.json b/package.json index 54babe21..ca0a0678 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "prebuild": "tsx scripts/generate-glossary.ts", "predev": "tsx scripts/generate-glossary.ts", "lint": "pnpm lint:eslint && pnpm lint:md && pnpm lint:regions && pnpm lint:glossary && pnpm typecheck && pnpm vale", - "lint:eslint": "eslint .", + "lint:eslint": "eslint . --cache", "lint:md": "remark src/content/docs --ext mdx --frail", "lint:regions": "tsx scripts/validate-regions.ts", "vale": "pnpm vale:setup && vale sync && vale src/content", From 88c9bab76b751382b0337f0454a06e59ca5babe5 Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Tue, 28 Jul 2026 23:01:55 -0700 Subject: [PATCH 08/18] increase typescript performance --- .gitignore | 3 ++- eslint.config.mjs | 7 +------ tsconfig.json | 4 +++- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 3082a619..6eedd3f3 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,5 @@ bun.lock # IntelliJ .idea -.eslintcache \ No newline at end of file +.eslintcache +tsconfig.tsbuildinfo \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs index 0efff8c4..5d5a1e94 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,7 +1,6 @@ import js from '@eslint/js'; import astro from 'eslint-plugin-astro'; import globals from 'globals'; -import process from 'node:process'; import tseslint from 'typescript-eslint'; import { defineConfig } from 'eslint/config'; @@ -21,8 +20,7 @@ export default defineConfig([ { argsIgnorePattern: '^_' }, ], '@typescript-eslint/no-explicit-any': 'error', - // ci runs `astro check` which runs a full typescript checker - 'no-undef': process.env.CI ? 'off' : 'error', + 'no-undef': 'off', }, }, { @@ -42,8 +40,5 @@ export default defineConfig([ ImageMetadata: 'readonly', }, }, - rules: { - 'no-undef': 'off', - }, }, ]); diff --git a/tsconfig.json b/tsconfig.json index bb515185..29d2c728 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,9 +3,11 @@ "include": [".astro/types.d.ts", "**/*"], "exclude": ["dist"], "compilerOptions": { + "lib": ["DOM", "ESNext"], "paths": { "@components/*": ["./src/components/*"] }, - "checkJs": true + "checkJs": true, + "incremental": true } } From bef03ac44f9fd0c5662c856bc2d723caf54956f5 Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Tue, 28 Jul 2026 23:12:53 -0700 Subject: [PATCH 09/18] narrow eslint input to improve performance --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 56aa7a8b..32843490 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "prebuild": "tsx scripts/generate-glossary.ts", "predev": "tsx scripts/generate-glossary.ts", "lint": "pnpm lint:eslint && pnpm lint:md && pnpm lint:regions && pnpm lint:glossary && pnpm typecheck && pnpm vale", - "lint:eslint": "eslint . --cache", + "lint:eslint": "eslint \"src/**/*.{ts,astro,js,mjs,css}\" \"*.mjs\" --cache", "lint:md": "remark src/content/docs --ext mdx --frail", "lint:regions": "tsx scripts/validate-regions.ts", "vale": "pnpm vale:setup && vale sync && vale src/content", From 89cf3dfb7b103be896271512d1dd8f92e3d9a46b Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Wed, 29 Jul 2026 16:13:41 -0700 Subject: [PATCH 10/18] add gradle path exclusion --- scripts/validate-regions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validate-regions.ts b/scripts/validate-regions.ts index 9737b666..1df61e06 100644 --- a/scripts/validate-regions.ts +++ b/scripts/validate-regions.ts @@ -5,7 +5,7 @@ import { fileURLToPath } from 'url'; const ROOT = fileURLToPath(new URL('..', import.meta.url)); const EXAMPLES_DIR = join(ROOT, 'examples'); const DOCS_DIR = join(ROOT, 'src', 'content', 'docs'); -const SKIP_DIRS = new Set(['build', '.gradle', 'node_modules']); +const SKIP_DIRS = new Set(['build', '.gradle', 'node_modules', 'gradle']); const START_RE = /^\s*(?:\/\/|#|--|)?\s*\[(\w+)\]\s*$/; const END_RE = /^\s*(?:\/\/|#|--|)?\s*\[\/(\w+)\]\s*$/; From 7d9d1646abe63eec3a5d29f8cdeb275ac7fcb829 Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Thu, 30 Jul 2026 16:14:59 -0700 Subject: [PATCH 11/18] only run full astro check when astro files are changed --- .husky/pre-push | 7 +- package.json | 3 +- pnpm-lock.yaml | 211 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 219 insertions(+), 2 deletions(-) mode change 100644 => 100755 .husky/pre-push diff --git a/.husky/pre-push b/.husky/pre-push old mode 100644 new mode 100755 index 48f9bf50..2682f1bb --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1 +1,6 @@ -pnpm typecheck --minimumFailingSeverity warning +# pnpm typecheck --minimumFailingSeverity warning +if git diff --cached --name-only | grep -q '\.astro$'; then + astro check --minimumFailingSeverity warning +else + tsc --noEmit +fi \ No newline at end of file diff --git a/package.json b/package.json index 32843490..4554f67c 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "tsx": "^4.22.4", "typescript": "^6.0.3", "typescript-eslint": "^8.61.1", - "vfile": "^6.0.3" + "vfile": "^6.0.3", + "typescript-7": "npm:typescript@^7.0.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d063804c..f50b4cbb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -102,6 +102,9 @@ importers: typescript: specifier: ^6.0.3 version: 6.0.3 + typescript-7: + specifier: npm:typescript@^7.0.2 + version: typescript@7.0.2 typescript-eslint: specifier: ^8.61.1 version: 8.61.1(eslint@10.5.0)(typescript@6.0.3) @@ -1241,6 +1244,126 @@ packages: resolution: {integrity: sha512-6fJ9MHWtK14C1DSkiMlHUSOmrVebL7150xZJBlJiL62jjhIA4JmOq6flwBgDxIdBKKdoiZRel+dfPD5MLfny3w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript/typescript-aix-ppc64@7.0.2': + resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [aix] + + '@typescript/typescript-darwin-arm64@7.0.2': + resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [darwin] + + '@typescript/typescript-darwin-x64@7.0.2': + resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [darwin] + + '@typescript/typescript-freebsd-arm64@7.0.2': + resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [freebsd] + + '@typescript/typescript-freebsd-x64@7.0.2': + resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [freebsd] + + '@typescript/typescript-linux-arm64@7.0.2': + resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [linux] + + '@typescript/typescript-linux-arm@7.0.2': + resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} + engines: {node: '>=16.20.0'} + cpu: [arm] + os: [linux] + + '@typescript/typescript-linux-loong64@7.0.2': + resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} + engines: {node: '>=16.20.0'} + cpu: [loong64] + os: [linux] + + '@typescript/typescript-linux-mips64el@7.0.2': + resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} + engines: {node: '>=16.20.0'} + cpu: [mips64el] + os: [linux] + + '@typescript/typescript-linux-ppc64@7.0.2': + resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [linux] + + '@typescript/typescript-linux-riscv64@7.0.2': + resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} + engines: {node: '>=16.20.0'} + cpu: [riscv64] + os: [linux] + + '@typescript/typescript-linux-s390x@7.0.2': + resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} + engines: {node: '>=16.20.0'} + cpu: [s390x] + os: [linux] + + '@typescript/typescript-linux-x64@7.0.2': + resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [linux] + + '@typescript/typescript-netbsd-arm64@7.0.2': + resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [netbsd] + + '@typescript/typescript-netbsd-x64@7.0.2': + resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [netbsd] + + '@typescript/typescript-openbsd-arm64@7.0.2': + resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [openbsd] + + '@typescript/typescript-openbsd-x64@7.0.2': + resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [openbsd] + + '@typescript/typescript-sunos-x64@7.0.2': + resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [sunos] + + '@typescript/typescript-win32-arm64@7.0.2': + resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [win32] + + '@typescript/typescript-win32-x64@7.0.2': + resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [win32] + '@ungap/structured-clone@1.3.0': resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} deprecated: Potential CWE-502 - Update to 1.3.1 or higher @@ -3502,6 +3625,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@7.0.2: + resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} + engines: {node: '>=16.20.0'} + hasBin: true + ufo@1.6.3: resolution: {integrity: sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==} @@ -5058,6 +5186,66 @@ snapshots: '@typescript-eslint/types': 8.61.1 eslint-visitor-keys: 5.0.1 + '@typescript/typescript-aix-ppc64@7.0.2': + optional: true + + '@typescript/typescript-darwin-arm64@7.0.2': + optional: true + + '@typescript/typescript-darwin-x64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-x64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm@7.0.2': + optional: true + + '@typescript/typescript-linux-loong64@7.0.2': + optional: true + + '@typescript/typescript-linux-mips64el@7.0.2': + optional: true + + '@typescript/typescript-linux-ppc64@7.0.2': + optional: true + + '@typescript/typescript-linux-riscv64@7.0.2': + optional: true + + '@typescript/typescript-linux-s390x@7.0.2': + optional: true + + '@typescript/typescript-linux-x64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-sunos-x64@7.0.2': + optional: true + + '@typescript/typescript-win32-arm64@7.0.2': + optional: true + + '@typescript/typescript-win32-x64@7.0.2': + optional: true + '@ungap/structured-clone@1.3.0': {} '@volar/kit@2.4.28(typescript@6.0.3)': @@ -8366,6 +8554,29 @@ snapshots: typescript@6.0.3: {} + typescript@7.0.2: + optionalDependencies: + '@typescript/typescript-aix-ppc64': 7.0.2 + '@typescript/typescript-darwin-arm64': 7.0.2 + '@typescript/typescript-darwin-x64': 7.0.2 + '@typescript/typescript-freebsd-arm64': 7.0.2 + '@typescript/typescript-freebsd-x64': 7.0.2 + '@typescript/typescript-linux-arm': 7.0.2 + '@typescript/typescript-linux-arm64': 7.0.2 + '@typescript/typescript-linux-loong64': 7.0.2 + '@typescript/typescript-linux-mips64el': 7.0.2 + '@typescript/typescript-linux-ppc64': 7.0.2 + '@typescript/typescript-linux-riscv64': 7.0.2 + '@typescript/typescript-linux-s390x': 7.0.2 + '@typescript/typescript-linux-x64': 7.0.2 + '@typescript/typescript-netbsd-arm64': 7.0.2 + '@typescript/typescript-netbsd-x64': 7.0.2 + '@typescript/typescript-openbsd-arm64': 7.0.2 + '@typescript/typescript-openbsd-x64': 7.0.2 + '@typescript/typescript-sunos-x64': 7.0.2 + '@typescript/typescript-win32-arm64': 7.0.2 + '@typescript/typescript-win32-x64': 7.0.2 + ufo@1.6.3: {} ultrahtml@1.6.0: {} From 0292004c62c48f4fe795d3caed813cd16ae355c8 Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Thu, 30 Jul 2026 16:15:49 -0700 Subject: [PATCH 12/18] narrow prettier run rules --- lint-staged.config.mjs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/lint-staged.config.mjs b/lint-staged.config.mjs index 1b56c8b9..e0708f62 100644 --- a/lint-staged.config.mjs +++ b/lint-staged.config.mjs @@ -1,6 +1,24 @@ +const runPrettierOn = + '**/*.{' + + [ + '.js', + '.mjs', + '.ts', + '.json', + '.json5', + '.jsonc', + '.css', + '.md', + '.mdx', + '.yaml', + '.yml', + '.astro', + ].join(',') + + '}'; + /** @type {import('lint-staged').Configuration} */ export default { - '**/*': (files) => `prettier --write --ignore-unknown ${files.join(' ')}`, + [runPrettierOn]: (files) => `prettier --write --ignore-unknown ${files.join(' ')}`, '**/*.{astro,ts,mjs,js}': (files) => `eslint --fix ${files.join(' ')}`, 'src/content/**/*.{md,mdx}': (files) => [ `pnpm remark ${files.join(' ')} --ext mdx --frail --no-stdout --quiet`, @@ -14,4 +32,4 @@ export default { ], // Yes, I know this should be a FunctionTask but those are kinda bad until https://github.com/lint-staged/lint-staged/issues/1826 is resolved 'package.json': () => 'pnpm tsx scripts/syncLockfile.lint.ts', -}; +}; \ No newline at end of file From 555f870ebb8d87fe08a3b6d71bc5ddf24964734a Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Thu, 30 Jul 2026 16:37:11 -0700 Subject: [PATCH 13/18] add debug functionality to script --- .husky/pre-push | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.husky/pre-push b/.husky/pre-push index 2682f1bb..475c5bdc 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,6 +1,15 @@ -# pnpm typecheck --minimumFailingSeverity warning if git diff --cached --name-only | grep -q '\.astro$'; then + echo "Running full astro check" astro check --minimumFailingSeverity warning else - tsc --noEmit + if [ -n "${DEBUG}" ]; then + echo "Using TypeScript version: $(tsc --version) at $(which tsc)" + start=$(date +%s%N) + tsc --noEmit + end=$(date +%s%N) + echo "TypeScript time (approx): $(((end - start)/1000000))ms" + else + echo "Running TypeScript check" + tsc --noEmit + fi fi \ No newline at end of file From 2e8b5cacaeb6f4c3ff9b337efca5991e13092944 Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Thu, 30 Jul 2026 16:43:54 -0700 Subject: [PATCH 14/18] fix vale --- lint-staged.config.mjs | 5 +++-- src/content/docs/learning-course/stage0/operators.mdx | 2 +- .../stage1/stage1b/command-based-overview.mdx | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lint-staged.config.mjs b/lint-staged.config.mjs index e0708f62..b15ae21f 100644 --- a/lint-staged.config.mjs +++ b/lint-staged.config.mjs @@ -18,7 +18,8 @@ const runPrettierOn = /** @type {import('lint-staged').Configuration} */ export default { - [runPrettierOn]: (files) => `prettier --write --ignore-unknown ${files.join(' ')}`, + [runPrettierOn]: (files) => + `prettier --write --ignore-unknown ${files.join(' ')}`, '**/*.{astro,ts,mjs,js}': (files) => `eslint --fix ${files.join(' ')}`, 'src/content/**/*.{md,mdx}': (files) => [ `pnpm remark ${files.join(' ')} --ext mdx --frail --no-stdout --quiet`, @@ -32,4 +33,4 @@ export default { ], // Yes, I know this should be a FunctionTask but those are kinda bad until https://github.com/lint-staged/lint-staged/issues/1826 is resolved 'package.json': () => 'pnpm tsx scripts/syncLockfile.lint.ts', -}; \ No newline at end of file +}; diff --git a/src/content/docs/learning-course/stage0/operators.mdx b/src/content/docs/learning-course/stage0/operators.mdx index 56bc398c..4ab9a5dd 100644 --- a/src/content/docs/learning-course/stage0/operators.mdx +++ b/src/content/docs/learning-course/stage0/operators.mdx @@ -7,7 +7,7 @@ codeRegionSources: default: stage0/snippets/Operators.java --- -In Java, we use operators to change or compare the values of variables. +In Java, we use operators to change, or compare the values of variables. There four different types of operators are: - Arithmetic Operators diff --git a/src/content/docs/learning-course/stage1/stage1b/command-based-overview.mdx b/src/content/docs/learning-course/stage1/stage1b/command-based-overview.mdx index b527129d..c47064ab 100644 --- a/src/content/docs/learning-course/stage1/stage1b/command-based-overview.mdx +++ b/src/content/docs/learning-course/stage1/stage1b/command-based-overview.mdx @@ -15,8 +15,8 @@ set of instructions (execute this task, then this, and finally this). However, robots (and humans!) don't just execute a set of tasks and shut down. Imagine your daily routine. -When an alarm clock rings, you turn it off and tumble out of bed. -When your belly rumbles, you walk to the fridge and get a snack. +When an alarm clock rings, you turn it off, and tumble out of bed. +When your belly rumbles, you walk to the fridge, and get a snack. When the clock strikes 8 AM, you open the front door to leave for school. @@ -48,7 +48,7 @@ However, the structure of using `Command`s to represent behaviors misses an impo Think back to the human example: you’re walking to the fridge, but the clock hits 8 AM before you get there. You can't do both at once, since both actions require your arms and legs. -So, you stop and leave for school. +So, you stop, and leave for school. Next, the robot. If the X and Y buttons are held, the shooter and intake motors should both run. From 0c4089fe1d9cae3476918dadf883d434036b7695 Mon Sep 17 00:00:00 2001 From: httphypixelnet <91695346+httphypixelnet@users.noreply.github.com> Date: Fri, 31 Jul 2026 11:02:00 -0700 Subject: [PATCH 15/18] Remove second period from paths --- lint-staged.config.mjs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lint-staged.config.mjs b/lint-staged.config.mjs index b15ae21f..8540e235 100644 --- a/lint-staged.config.mjs +++ b/lint-staged.config.mjs @@ -1,18 +1,18 @@ const runPrettierOn = '**/*.{' + [ - '.js', - '.mjs', - '.ts', - '.json', - '.json5', - '.jsonc', - '.css', - '.md', - '.mdx', - '.yaml', - '.yml', - '.astro', + 'js', + 'mjs', + 'ts', + 'json', + 'json5', + 'jsonc', + 'css', + 'md', + 'mdx', + 'yaml', + 'yml', + 'astro', ].join(',') + '}'; From 950bc4164a6d743e5bf9716f922dc37849bfeeca Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Tue, 4 Aug 2026 14:28:39 -0700 Subject: [PATCH 16/18] Revert "fix vale" This reverts commit 2e8b5cacaeb6f4c3ff9b337efca5991e13092944. --- lint-staged.config.mjs | 5 ++--- src/content/docs/learning-course/stage0/operators.mdx | 2 +- .../stage1/stage1b/command-based-overview.mdx | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lint-staged.config.mjs b/lint-staged.config.mjs index 8540e235..f845739a 100644 --- a/lint-staged.config.mjs +++ b/lint-staged.config.mjs @@ -18,8 +18,7 @@ const runPrettierOn = /** @type {import('lint-staged').Configuration} */ export default { - [runPrettierOn]: (files) => - `prettier --write --ignore-unknown ${files.join(' ')}`, + [runPrettierOn]: (files) => `prettier --write --ignore-unknown ${files.join(' ')}`, '**/*.{astro,ts,mjs,js}': (files) => `eslint --fix ${files.join(' ')}`, 'src/content/**/*.{md,mdx}': (files) => [ `pnpm remark ${files.join(' ')} --ext mdx --frail --no-stdout --quiet`, @@ -33,4 +32,4 @@ export default { ], // Yes, I know this should be a FunctionTask but those are kinda bad until https://github.com/lint-staged/lint-staged/issues/1826 is resolved 'package.json': () => 'pnpm tsx scripts/syncLockfile.lint.ts', -}; +}; \ No newline at end of file diff --git a/src/content/docs/learning-course/stage0/operators.mdx b/src/content/docs/learning-course/stage0/operators.mdx index 4ab9a5dd..56bc398c 100644 --- a/src/content/docs/learning-course/stage0/operators.mdx +++ b/src/content/docs/learning-course/stage0/operators.mdx @@ -7,7 +7,7 @@ codeRegionSources: default: stage0/snippets/Operators.java --- -In Java, we use operators to change, or compare the values of variables. +In Java, we use operators to change or compare the values of variables. There four different types of operators are: - Arithmetic Operators diff --git a/src/content/docs/learning-course/stage1/stage1b/command-based-overview.mdx b/src/content/docs/learning-course/stage1/stage1b/command-based-overview.mdx index c47064ab..b527129d 100644 --- a/src/content/docs/learning-course/stage1/stage1b/command-based-overview.mdx +++ b/src/content/docs/learning-course/stage1/stage1b/command-based-overview.mdx @@ -15,8 +15,8 @@ set of instructions (execute this task, then this, and finally this). However, robots (and humans!) don't just execute a set of tasks and shut down. Imagine your daily routine. -When an alarm clock rings, you turn it off, and tumble out of bed. -When your belly rumbles, you walk to the fridge, and get a snack. +When an alarm clock rings, you turn it off and tumble out of bed. +When your belly rumbles, you walk to the fridge and get a snack. When the clock strikes 8 AM, you open the front door to leave for school. @@ -48,7 +48,7 @@ However, the structure of using `Command`s to represent behaviors misses an impo Think back to the human example: you’re walking to the fridge, but the clock hits 8 AM before you get there. You can't do both at once, since both actions require your arms and legs. -So, you stop, and leave for school. +So, you stop and leave for school. Next, the robot. If the X and Y buttons are held, the shooter and intake motors should both run. From 60c0fd0a2582274171a9fce131a439b9469029c4 Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Tue, 4 Aug 2026 14:34:26 -0700 Subject: [PATCH 17/18] resolve small comments --- .husky/pre-push | 14 +-- lint-staged.config.mjs | 5 +- package.json | 5 +- pnpm-lock.yaml | 211 ----------------------------------------- 4 files changed, 8 insertions(+), 227 deletions(-) diff --git a/.husky/pre-push b/.husky/pre-push index 475c5bdc..7f0353c7 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,15 +1,7 @@ -if git diff --cached --name-only | grep -q '\.astro$'; then +if git diff --name-only @{u}..HEAD | grep -q '\.astro$'; then echo "Running full astro check" astro check --minimumFailingSeverity warning else - if [ -n "${DEBUG}" ]; then - echo "Using TypeScript version: $(tsc --version) at $(which tsc)" - start=$(date +%s%N) - tsc --noEmit - end=$(date +%s%N) - echo "TypeScript time (approx): $(((end - start)/1000000))ms" - else - echo "Running TypeScript check" - tsc --noEmit - fi + echo "Running TypeScript check" + tsc --noEmit fi \ No newline at end of file diff --git a/lint-staged.config.mjs b/lint-staged.config.mjs index f845739a..8540e235 100644 --- a/lint-staged.config.mjs +++ b/lint-staged.config.mjs @@ -18,7 +18,8 @@ const runPrettierOn = /** @type {import('lint-staged').Configuration} */ export default { - [runPrettierOn]: (files) => `prettier --write --ignore-unknown ${files.join(' ')}`, + [runPrettierOn]: (files) => + `prettier --write --ignore-unknown ${files.join(' ')}`, '**/*.{astro,ts,mjs,js}': (files) => `eslint --fix ${files.join(' ')}`, 'src/content/**/*.{md,mdx}': (files) => [ `pnpm remark ${files.join(' ')} --ext mdx --frail --no-stdout --quiet`, @@ -32,4 +33,4 @@ export default { ], // Yes, I know this should be a FunctionTask but those are kinda bad until https://github.com/lint-staged/lint-staged/issues/1826 is resolved 'package.json': () => 'pnpm tsx scripts/syncLockfile.lint.ts', -}; \ No newline at end of file +}; diff --git a/package.json b/package.json index 4554f67c..74eedab1 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "prebuild": "tsx scripts/generate-glossary.ts", "predev": "tsx scripts/generate-glossary.ts", "lint": "pnpm lint:eslint && pnpm lint:md && pnpm lint:regions && pnpm lint:glossary && pnpm typecheck && pnpm vale", - "lint:eslint": "eslint \"src/**/*.{ts,astro,js,mjs,css}\" \"*.mjs\" --cache", + "lint:eslint": "eslint \"src/**/*.{ts,astro,js,mjs,css}\" \"*.mjs\" \"scripts/*.{ts,mjs,js}\" --cache", "lint:md": "remark src/content/docs --ext mdx --frail", "lint:regions": "tsx scripts/validate-regions.ts", "vale": "pnpm vale:setup && vale sync && vale src/content", @@ -62,7 +62,6 @@ "tsx": "^4.22.4", "typescript": "^6.0.3", "typescript-eslint": "^8.61.1", - "vfile": "^6.0.3", - "typescript-7": "npm:typescript@^7.0.2" + "vfile": "^6.0.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f50b4cbb..d063804c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -102,9 +102,6 @@ importers: typescript: specifier: ^6.0.3 version: 6.0.3 - typescript-7: - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript-eslint: specifier: ^8.61.1 version: 8.61.1(eslint@10.5.0)(typescript@6.0.3) @@ -1244,126 +1241,6 @@ packages: resolution: {integrity: sha512-6fJ9MHWtK14C1DSkiMlHUSOmrVebL7150xZJBlJiL62jjhIA4JmOq6flwBgDxIdBKKdoiZRel+dfPD5MLfny3w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript/typescript-aix-ppc64@7.0.2': - resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} - engines: {node: '>=16.20.0'} - cpu: [ppc64] - os: [aix] - - '@typescript/typescript-darwin-arm64@7.0.2': - resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [darwin] - - '@typescript/typescript-darwin-x64@7.0.2': - resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [darwin] - - '@typescript/typescript-freebsd-arm64@7.0.2': - resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [freebsd] - - '@typescript/typescript-freebsd-x64@7.0.2': - resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [freebsd] - - '@typescript/typescript-linux-arm64@7.0.2': - resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [linux] - - '@typescript/typescript-linux-arm@7.0.2': - resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} - engines: {node: '>=16.20.0'} - cpu: [arm] - os: [linux] - - '@typescript/typescript-linux-loong64@7.0.2': - resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} - engines: {node: '>=16.20.0'} - cpu: [loong64] - os: [linux] - - '@typescript/typescript-linux-mips64el@7.0.2': - resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} - engines: {node: '>=16.20.0'} - cpu: [mips64el] - os: [linux] - - '@typescript/typescript-linux-ppc64@7.0.2': - resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} - engines: {node: '>=16.20.0'} - cpu: [ppc64] - os: [linux] - - '@typescript/typescript-linux-riscv64@7.0.2': - resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} - engines: {node: '>=16.20.0'} - cpu: [riscv64] - os: [linux] - - '@typescript/typescript-linux-s390x@7.0.2': - resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} - engines: {node: '>=16.20.0'} - cpu: [s390x] - os: [linux] - - '@typescript/typescript-linux-x64@7.0.2': - resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [linux] - - '@typescript/typescript-netbsd-arm64@7.0.2': - resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [netbsd] - - '@typescript/typescript-netbsd-x64@7.0.2': - resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [netbsd] - - '@typescript/typescript-openbsd-arm64@7.0.2': - resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [openbsd] - - '@typescript/typescript-openbsd-x64@7.0.2': - resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [openbsd] - - '@typescript/typescript-sunos-x64@7.0.2': - resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [sunos] - - '@typescript/typescript-win32-arm64@7.0.2': - resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [win32] - - '@typescript/typescript-win32-x64@7.0.2': - resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [win32] - '@ungap/structured-clone@1.3.0': resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} deprecated: Potential CWE-502 - Update to 1.3.1 or higher @@ -3625,11 +3502,6 @@ packages: engines: {node: '>=14.17'} hasBin: true - typescript@7.0.2: - resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} - engines: {node: '>=16.20.0'} - hasBin: true - ufo@1.6.3: resolution: {integrity: sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==} @@ -5186,66 +5058,6 @@ snapshots: '@typescript-eslint/types': 8.61.1 eslint-visitor-keys: 5.0.1 - '@typescript/typescript-aix-ppc64@7.0.2': - optional: true - - '@typescript/typescript-darwin-arm64@7.0.2': - optional: true - - '@typescript/typescript-darwin-x64@7.0.2': - optional: true - - '@typescript/typescript-freebsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-freebsd-x64@7.0.2': - optional: true - - '@typescript/typescript-linux-arm64@7.0.2': - optional: true - - '@typescript/typescript-linux-arm@7.0.2': - optional: true - - '@typescript/typescript-linux-loong64@7.0.2': - optional: true - - '@typescript/typescript-linux-mips64el@7.0.2': - optional: true - - '@typescript/typescript-linux-ppc64@7.0.2': - optional: true - - '@typescript/typescript-linux-riscv64@7.0.2': - optional: true - - '@typescript/typescript-linux-s390x@7.0.2': - optional: true - - '@typescript/typescript-linux-x64@7.0.2': - optional: true - - '@typescript/typescript-netbsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-netbsd-x64@7.0.2': - optional: true - - '@typescript/typescript-openbsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-openbsd-x64@7.0.2': - optional: true - - '@typescript/typescript-sunos-x64@7.0.2': - optional: true - - '@typescript/typescript-win32-arm64@7.0.2': - optional: true - - '@typescript/typescript-win32-x64@7.0.2': - optional: true - '@ungap/structured-clone@1.3.0': {} '@volar/kit@2.4.28(typescript@6.0.3)': @@ -8554,29 +8366,6 @@ snapshots: typescript@6.0.3: {} - typescript@7.0.2: - optionalDependencies: - '@typescript/typescript-aix-ppc64': 7.0.2 - '@typescript/typescript-darwin-arm64': 7.0.2 - '@typescript/typescript-darwin-x64': 7.0.2 - '@typescript/typescript-freebsd-arm64': 7.0.2 - '@typescript/typescript-freebsd-x64': 7.0.2 - '@typescript/typescript-linux-arm': 7.0.2 - '@typescript/typescript-linux-arm64': 7.0.2 - '@typescript/typescript-linux-loong64': 7.0.2 - '@typescript/typescript-linux-mips64el': 7.0.2 - '@typescript/typescript-linux-ppc64': 7.0.2 - '@typescript/typescript-linux-riscv64': 7.0.2 - '@typescript/typescript-linux-s390x': 7.0.2 - '@typescript/typescript-linux-x64': 7.0.2 - '@typescript/typescript-netbsd-arm64': 7.0.2 - '@typescript/typescript-netbsd-x64': 7.0.2 - '@typescript/typescript-openbsd-arm64': 7.0.2 - '@typescript/typescript-openbsd-x64': 7.0.2 - '@typescript/typescript-sunos-x64': 7.0.2 - '@typescript/typescript-win32-arm64': 7.0.2 - '@typescript/typescript-win32-x64': 7.0.2 - ufo@1.6.3: {} ultrahtml@1.6.0: {} From c9801bfafca232df85f7b21a89b494050b1fa382 Mon Sep 17 00:00:00 2001 From: httphypixelnet Date: Wed, 5 Aug 2026 10:36:30 -0700 Subject: [PATCH 18/18] ensure all file extensions are parsed --- scripts/validate-regions.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/validate-regions.ts b/scripts/validate-regions.ts index 1df61e06..98e4230d 100644 --- a/scripts/validate-regions.ts +++ b/scripts/validate-regions.ts @@ -65,7 +65,7 @@ function walkMdx(dir: string) { if (!m) continue; const [, alias, definedFilePath, regionName] = m; - + console.dir(m); let filePath: string | undefined; if (alias) { filePath = codeRegionSources.get(alias); @@ -76,6 +76,14 @@ function walkMdx(dir: string) { continue; } } else if (definedFilePath) { + const ext = basename(definedFilePath).split('.').at(-1); + if (!ext) { + errors.push( + `${relative(DOCS_DIR, full)}: Region "${regionName}" doesn't specify a file extension.`, + ); + continue; + } + extensions.add(ext); filePath = definedFilePath; } else { filePath = codeRegionSources.get('default');