Misc updates#208
Draft
10hendersonm wants to merge 20 commits into
Draft
Conversation
Co-authored-by: Dayton <SVDEA001@target.com>
Co-authored-by: Dayton <SVDEA001@target.com>
Co-authored-by: Dayton <SVDEA001@target.com>
Co-authored-by: Dayton <SVDEA001@target.com>
Co-authored-by: Dayton <SVDEA001@target.com>
- Drop build step: switch to Node 24 native TypeScript type stripping; tsconfig is now noEmit with erasableSyntaxOnly, and main/bin point directly to src/index.ts - Remove ts-loader shim (scripts/ts-loader.mjs) — no longer needed - Replace ESLint v7 flat-file (.eslintrc.js) with v9 flat config (eslint.config.mjs), add eslint-plugin-import for import ordering - Bump prettier 2→3, husky 6→9, typescript 5→6, @types/node 22→24 - Switch .prettierrc.js to ESM (export default) to match flat config - Add @commander-js/extra-typings and zod as runtime dependencies - Update engines to node >=24 Co-authored-by: Dayton <SVDEA001@target.com>
Co-authored-by: Dayton <SVDEA001@target.com>
… handling
- Replace commander with @commander-js/extra-typings for typed options
- Validate block configs with Zod schema instead of manual type checks,
surfacing structured error messages via prettifyZodErrors
- Remove the --no-follow-symbolic-links option (followSymlinks removed
from ReplaceOptions and glob call); fix Dirent typing in glob exclude
- Expand default glob pattern from **/*.md to **/*.{md,mdx}
- Use logger.error + process.exitCode = 1 (non-throwing) for per-block
errors so remaining blocks still get processed
- Switch imports to .ts extensions and node: protocol prefixes
Co-authored-by: Dayton <SVDEA001@target.com>
Co-authored-by: Dayton <SVDEA001@target.com>
- cli.test.ts: scope stdoutWriteMock per-test to avoid breaking
node:test runner IPC; update expected glob pattern (.md → .{md,mdx});
remove followSymlinks from expected call args
- md-inject.test.ts: fix child_process mock path to use node: prefix;
update error assertions to match new string-based logger.error output
(drop objectContaining wrappers); remove followSymlinks from call sites
- meta.test.ts: update lock file check from package-lock.json to
pnpm-lock.yaml
- helpers.ts: formatting-only changes (prettier)
Co-authored-by: Dayton <SVDEA001@target.com>
Co-authored-by: Dayton <SVDEA001@target.com>
Co-authored-by: Dayton <SVDEA001@target.com>
mock.fn() defaults F to (...args: any[]) => undefined, causing mockImplementation to reject callbacks with non-undefined return types. Adding explicit generics to envCiMock, globMock, and readFileMock resolves all typecheck errors. Co-authored-by: Dayton <SVDEA001@target.com>
When a codeblock's replacement text is shorter than the original match, the regex engine's lastIndex pointed past the start of the next block in the mutated string, causing subsequent blocks to be silently skipped. Realign lastIndex to pre.length + newBlock.length after each replacement, and replace the deprecated substr with slice. Co-authored-by: Dayton <SVDEA001@target.com>
…e exclusion readGitignorePatterns stripped whitespace but not trailing slashes, so directory patterns like `dist/` were stored as `dist/` and never matched path segments. Also filter negation lines (`!`) which should not be treated as exclusions. isGitignored now converts glob patterns containing `*` or `?` to regex (** crosses separators, * and ? stay within a segment) so patterns like `*.generated.md` correctly exclude matching files. Co-authored-by: Dayton <SVDEA001@target.com>
d2c49dc to
aee2882
Compare
57f0dd4 to
e37a182
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #140 and a bunch of vuln issues?
Changes
Validation