Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
3963691
chore: upgrade node to v24 and remove ts-node
MattP007 Jun 23, 2026
8afb880
chore: remove chalk dependency (replaced by util.styleText)
MattP007 Jun 23, 2026
0566a29
refactor: replace fs-extra and globby with node:fs/promises
MattP007 Jun 23, 2026
aaebda9
refactor: port tests from jest to node:test, remove jest dependency
MattP007 Jun 23, 2026
7cfe38b
chore: switch from npm to pnpm
10hendersonm Jul 1, 2026
6b97184
chore: upgrade toolchain to Node 24, ESLint v9, TypeScript 6
10hendersonm Jul 1, 2026
df17ebf
feat: add utils module (fileLocation, prettifyZodErrors)
10hendersonm Jul 1, 2026
3f36849
refactor: add Zod config validation, replace commander, improve error…
10hendersonm Jul 1, 2026
5929c9c
fix: pass process.stderr as second arg to Logger super()
10hendersonm Jul 1, 2026
e40a8ed
test: update tests for refactored code
10hendersonm Jul 1, 2026
4ec1f46
chore: update release script to use node: import prefixes
10hendersonm Jul 1, 2026
5639bbb
style: reformat mock.method call in cli.test.ts
10hendersonm Jul 1, 2026
b772b66
fix: add explicit type parameters to mock.fn() declarations
10hendersonm Jul 1, 2026
efbb1ba
fix: realign codeblockRegex.lastIndex after shorter block replacement
10hendersonm Jul 1, 2026
e75a2b1
fix: strip trailing slashes and support wildcard patterns in gitignor…
10hendersonm Jul 1, 2026
c203a61
chore: Add author and contributor attribution
10hendersonm Jul 1, 2026
05e6626
fix: -a pattern includes .mdx files
10hendersonm Jul 1, 2026
0f1551f
deps: Update node to 24.18.0
10hendersonm Jul 1, 2026
aee2882
deps: Update deps
10hendersonm Jul 1, 2026
e37a182
ci: Use pnpm
10hendersonm Jul 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .eslintrc.js

This file was deleted.

38 changes: 23 additions & 15 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,39 @@ jobs:
fetch-depth: 0

- name: Set Up NodeJs
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.3
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: '.nvmrc'
cache: npm

- name: Enable Corepack
run: corepack enable

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install Dependencies
run: npm ci
run: pnpm install

- name: Lint
run: npm run lint
run: pnpm run lint

- name: Test
run: npm test
run: pnpm run test

- name: Build
run: npm run build
- name: Type Check
run: pnpm run typecheck

- name: Cache Deployment
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
env:
cache-name: deployment-cache
with:
path: './**/*'
key: ${{ github.event.after }}
- name: Prune pnpm store
run: pnpm store prune

CheckRelease:
needs: Validate
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm exec lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
'*': 'pnpm run precommit',
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.10.0
v24.18.0
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
semi: false,
singleQuote: true,
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This project builds with node version:
{/* CODEBLOCK_START {"value": ".nvmrc", "hideValue": true} */}
{/* prettier-ignore */}
~~~~~~~~~~bash
v20.10.0
v24.18.0
~~~~~~~~~~

{/* CODEBLOCK_END */}
Expand Down
24 changes: 11 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Optionally, wire up `markdown-inject` to a git pre-commit hook tool like [husky]
CODEBLOCK_START
{
"type": "command",
"value": "npm run --silent markdown-inject -- --help",
"value": "pnpm --silent run markdown-inject --help",
"hideValue": true
}
-->
Expand All @@ -52,17 +52,15 @@ Examples:
Add file or command output to markdown documents.

Options:
-v, --version output the version number
-a, --all applies a globPattern of './**/*.md'
(default: false)
-b, --block-prefix <prefix> specifies the prefix for START and END HTML
comment blocks (default: "CODEBLOCK")
-n, --no-follow-symbolic-links prevents globs from following symlinks
-q, --quiet emits no console log statements (default:
false)
-e, --no-system-environment prevents "command"s from receiving system
environment
-h, --help display help for command
-v, --version output the version number
-a, --all applies a globPattern of './**/*.{md,mdx}'
(default: false)
-b, --block-prefix <prefix> specifies the prefix for START and END HTML
comment blocks (default: "CODEBLOCK")
-q, --quiet emits no console log statements (default: false)
-e, --no-system-environment prevents "command"s from receiving system
environment
-h, --help display help for command
~~~~~~~~~~

<!-- CODEBLOCK_END -->
Expand All @@ -84,7 +82,7 @@ Options:
~~~~~~~~~~bash
File: .nvmrc

v20.10.0
v24.18.0
~~~~~~~~~~

<!-- CODEBLOCK_END -->
Expand Down
25 changes: 25 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { defineConfig } from 'eslint/config'
import importPlugin from 'eslint-plugin-import'
import prettierPlugin from 'eslint-plugin-prettier/recommended'
import tseslint from 'typescript-eslint'

import prettierrc from './.prettierrc.js'

export default defineConfig(tseslint.configs.recommended, prettierPlugin, {
plugins: { import: importPlugin },
rules: {
'prettier/prettier': ['error', prettierrc],
'@typescript-eslint/no-explicit-any': 'off',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'import/order': [
'error',
{
groups: ['builtin', 'external', ['parent', 'sibling', 'index']],
'newlines-between': 'always',
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
},
})
8 changes: 0 additions & 8 deletions jest.config.js

This file was deleted.

Loading
Loading