Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node_version: [20, 22, 24, latest]
node_version: [22, 24, latest]
include:
- os: windows-latest
node_version: 24
Expand Down
22 changes: 12 additions & 10 deletions __tests__/e2e/markdown-extensions/markdown-extensions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,23 +123,25 @@ describe('Table of Contents', () => {
})

describe('Custom Containers', () => {
enum CustomBlocks {
Info = 'INFO',
Tip = 'TIP',
Warning = 'WARNING',
Danger = 'DANGER',
Details = 'Details'
}
const CustomBlocks = {
Info: 'INFO',
Tip: 'TIP',
Warning: 'WARNING',
Danger: 'DANGER',
Details: 'Details'
} as const

type CustomBlock = (typeof CustomBlocks)[keyof typeof CustomBlocks]

const classnameMap = {
const classnameMap: Record<CustomBlock, string> = {
[CustomBlocks.Info]: 'info',
[CustomBlocks.Tip]: 'tip',
[CustomBlocks.Warning]: 'warning',
[CustomBlocks.Danger]: 'danger',
[CustomBlocks.Details]: 'details'
}

const getTitleText = (locator: Locator, type: CustomBlocks) => {
const getTitleText = (locator: Locator, type: CustomBlock) => {
if (type === CustomBlocks.Details) {
return locator.locator('summary').textContent()
} else {
Expand All @@ -152,7 +154,7 @@ describe('Custom Containers', () => {
for (const [index, type] of Object.values(CustomBlocks).entries()) {
const block = blocks.nth(index)
const classList = await getClassList(block)
expect(classList).contain(classnameMap[type as CustomBlocks])
expect(classList).contain(classnameMap[type])
expect(await getTitleText(block, type)).toBe(type)
}
})
Expand Down
5 changes: 4 additions & 1 deletion __tests__/e2e/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ export default defineConfig({
testTimeout: timeout,
hookTimeout: timeout,
teardownTimeout: timeout,
globals: true
globals: true,
experimental: {
viteModuleRunner: false
}
}
})
62 changes: 24 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,10 @@
"lib"
],
"scripts": {
"clean": "node -e \"require('node:fs').rmSync('./dist',{recursive:!0,force:!0,maxRetries:10})\"",
"dev": "pnpm clean && pnpm dev:shared && pnpm dev:start",
"dev:start": "pnpm --stream '/^dev:(client|node|watch)$/'",
"dev:client": "tsc --sourcemap -w --preserveWatchOutput -p src/client",
"dev:node": "DEV=true pnpm build:node -w",
"dev:shared": "node scripts/copyShared",
"dev:watch": "node scripts/watchAndCopy",
"build": "pnpm build:prepare && pnpm build:client && pnpm build:node",
"build:prepare": "pnpm clean && node scripts/copyShared",
"build:client": "vue-tsc --noEmit -p src/client && tsc -p src/client && node scripts/copyClient",
"build:node": "tsc -p src/node --noEmit && rollup --config rollup.config.ts --configPlugin esbuild",
"test": "pnpm --aggregate-output --reporter=append-only '/^test:(unit|e2e|init)$/'",
"dev": "tsdown --watch",
"build": "tsdown",
"test": "pnpm --aggregate-output --reporter=append-only '/^test:(type|unit|e2e|init)$/'",
"test:type": "tsc -p src/node --noEmit && vue-tsc -p src/client --noEmit",
"test:unit": "vitest run -r __tests__/unit",
"test:unit:watch": "vitest -r __tests__/unit",
"test:e2e": "pnpm test:e2e-dev && pnpm test:e2e-build",
Expand Down Expand Up @@ -96,25 +88,25 @@
"*": "prettier --experimental-cli --ignore-unknown --write"
},
"dependencies": {
"@docsearch/css": "^4.5.3",
"@docsearch/js": "^4.5.3",
"@docsearch/sidepanel-js": "^4.5.3",
"@iconify-json/simple-icons": "^1.2.69",
"@docsearch/css": "^4.5.4",
"@docsearch/js": "^4.5.4",
"@docsearch/sidepanel-js": "^4.5.4",
"@iconify-json/simple-icons": "^1.2.70",
"@shikijs/core": "^3.22.0",
"@shikijs/transformers": "^3.22.0",
"@shikijs/types": "^3.22.0",
"@types/markdown-it": "^14.1.2",
"@vitejs/plugin-vue": "^6.0.4",
"@vue/devtools-api": "^8.0.5",
"@vue/shared": "^3.5.27",
"@vueuse/core": "^14.2.0",
"@vueuse/integrations": "^14.2.0",
"@vue/devtools-api": "^8.0.6",
"@vue/shared": "^3.5.28",
"@vueuse/core": "^14.2.1",
"@vueuse/integrations": "^14.2.1",
"focus-trap": "^8.0.0",
"mark.js": "8.11.1",
"minisearch": "^7.2.0",
"shiki": "^3.22.0",
"vite": "^7.3.1",
"vue": "^3.5.27"
"vue": "^3.5.28"
},
"devDependencies": {
"@clack/prompts": "^1.0.0",
Expand All @@ -127,11 +119,6 @@
"@mdit-vue/plugin-toc": "^3.0.2",
"@mdit-vue/shared": "^3.0.2",
"@polka/compression": "^1.0.0-next.28",
"@rollup/plugin-alias": "^6.0.0",
"@rollup/plugin-commonjs": "^29.0.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.3",
"@rollup/plugin-replace": "^6.0.3",
"@types/cross-spawn": "^6.0.6",
"@types/fs-extra": "^11.0.4",
"@types/lodash.template": "^4.5.3",
Expand All @@ -140,14 +127,13 @@
"@types/markdown-it-container": "^4.0.0",
"@types/markdown-it-emoji": "^3.0.1",
"@types/minimist": "^1.2.5",
"@types/node": "^25.2.0",
"@types/node": "^25.2.2",
"@types/picomatch": "^4.0.2",
"@types/prompts": "^2.4.9",
"chokidar": "^4.0.3",
"conventional-changelog": "^7.1.1",
"conventional-changelog-angular": "^8.1.0",
"cross-spawn": "^7.0.6",
"esbuild": "^0.27.2",
"esbuild": "^0.27.3",
"execa": "^9.6.1",
"fs-extra": "^11.3.3",
"get-port": "^7.1.0",
Expand All @@ -159,37 +145,37 @@
"markdown-it-anchor": "^9.2.0",
"markdown-it-async": "^2.2.0",
"markdown-it-attrs": "^4.3.1",
"markdown-it-cjk-friendly": "^2.0.1",
"markdown-it-cjk-friendly": "^2.0.2",
"markdown-it-container": "^4.0.0",
"markdown-it-emoji": "^3.0.0",
"markdown-it-mathjax3": "^4.3.2",
"minimist": "^1.2.8",
"mkdist": "^2.4.1",
"nanoid": "^5.1.6",
"obug": "^2.1.1",
"ora": "^9.1.0",
"ora": "^9.3.0",
"oxc-minify": "^0.98.0",
"p-map": "^7.0.4",
"package-directory": "^8.2.0",
"path-to-regexp": "^6.3.0",
"picocolors": "^1.1.1",
"picomatch": "^4.0.3",
"playwright-chromium": "^1.58.1",
"playwright-chromium": "^1.58.2",
"polka": "^1.0.0-next.28",
"postcss": "^8.5.6",
"postcss-selector-parser": "^7.1.1",
"prettier": "^3.8.1",
"prompts": "^2.4.2",
"punycode": "^2.3.1",
"rollup": "^4.57.1",
"rollup-plugin-dts": "6.1.1",
"rollup-plugin-esbuild": "^6.2.1",
"semver": "^7.7.3",
"semver": "^7.7.4",
"simple-git-hooks": "^2.13.1",
"sirv": "^3.0.2",
"sitemap": "^9.0.0",
"tinyglobby": "^0.2.15",
"tsdown": "^0.20.3",
"typescript": "^5.9.3",
"vitest": "4.0.0-beta.4",
"vitest": "^4.1.0-beta.3",
"vue-sfc-transformer": "^0.1.17",
"vue-tsc": "^3.2.4",
"wait-on": "^9.0.3"
},
Expand All @@ -209,5 +195,5 @@
"optional": true
}
},
"packageManager": "pnpm@10.28.2"
"packageManager": "pnpm@10.29.2"
}
Loading