Skip to content
Merged
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
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,30 @@ jobs:
- name: Verify the package contents
# Catches an `exports`/`files` mistake before it reaches a release.
run: pnpm pack --pack-destination "${RUNNER_TEMP}"

integration:
name: Astro integration
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up pnpm and Node.js
uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
with:
runtime: node@24
cache: true
install: false

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Astro integration test
# Deliberately its own job on a single Node version, not part of the
# `test` matrix. This boots a real Astro build to prove the plugin works
# through `markdown.processor` — it exercises Astro's wiring, not this
# package's Node compatibility, so running it three times proves
# nothing extra. Keeping it out of `test:coverage` also keeps an Astro
# or Rolldown hiccup off the release path, since `prepublishOnly` runs
# that script.
run: pnpm test:integration
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@ coverage/
.cache/
*.log
.DS_Store
.pnpm-store/
.pnpm-store/
# Byproducts of the Astro integration build (test/integration/astro.test.ts).
# `.astro/` comes from `sync`, which build() always runs; `node_modules/` is
# Vite's cache dir, which Astro derives from the project root, not `cacheDir`.
test/fixtures/astro/.astro/
test/fixtures/astro/.cache/
test/fixtures/astro/.output/
test/fixtures/astro/node_modules/
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hast-plugin-external-title",
"version": "1.0.1",
"description": "Sätteri hast plugin that fetches the page title of external links and sets it as the `title` attribute, with pluggable caching.",
"description": "S\u00e4tteri hast plugin that fetches the page title of external links and sets it as the `title` attribute, with pluggable caching.",
"license": "MIT",
"author": {
"name": "Ari Palo",
Expand Down Expand Up @@ -45,6 +45,7 @@
"typecheck": "tsc --noEmit -p tsconfig.json && tsc -p tsconfig.test.json",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"test:integration": "vitest run --config vitest.integration.config.ts",
"test:watch": "vitest watch",
"prepack": "pnpm build",
"prepublishOnly": "pnpm typecheck && pnpm test:coverage"
Expand All @@ -59,6 +60,7 @@
"satteri": "^0.10.0"
},
"devDependencies": {
"@astrojs/markdown-satteri": "^0.3.7",
"@semantic-release/changelog": "^7.0.0",
"@semantic-release/commit-analyzer": "^13.0.1",
"@semantic-release/git": "^11.0.1",
Expand All @@ -67,7 +69,9 @@
"@semantic-release/release-notes-generator": "^14.1.1",
"@types/node": "^22.20.1",
"@vitest/coverage-v8": "4.1.11",
"astro": "^7.2.4",
"conventional-changelog-conventionalcommits": "^9.3.1",
"msw": "^2.15.0",
"npm": "^11.19.0",
"satteri": "^0.10.5",
"semantic-release": "^25.0.9",
Expand Down
Loading
Loading