Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: MDX cannot find relative image path without leading ./ #10705

Closed
wants to merge 1 commit into from
Closed
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
5 changes: 0 additions & 5 deletions .changeset/khaki-turkeys-sip.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/loud-wasps-pay.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/olive-camels-greet.md

This file was deleted.

14 changes: 14 additions & 0 deletions .changeset/perfect-ties-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@astrojs/mdx": patch
---

Fixes an issue where images in MDX required a relative specifier (e.g. `./`)

Now, you can use the standard `![](img.png)` syntax in MDX files for images colocated in the same folder: no relative specifier required!

There is no need to update your project; your existing images will still continue to work. However, you may wish to remove any relative specifiers from these MDX images as they are no longer necessary:

```diff
- ![A cute dog](./dog.jpg)
+ ![A cute dog](dog.jpg)
<!-- This dog lives in the same folder as my article! -->
5 changes: 0 additions & 5 deletions .changeset/tall-wombats-clap.md

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/check-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
if: steps.blocked.outputs.result != 'true'
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Get changed files in the .changeset folder
Expand Down
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.5.16"
"astro": "^4.6.0"
}
}
4 changes: 2 additions & 2 deletions examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^2.2.4",
"@astrojs/mdx": "^2.3.0",
"@astrojs/rss": "^4.0.5",
"@astrojs/sitemap": "^3.1.2",
"astro": "^4.5.16"
"astro": "^4.6.0"
}
}
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^4.5.16"
"astro": "^4.6.0"
},
"peerDependencies": {
"astro": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.4.0",
"@types/alpinejs": "^3.13.5",
"alpinejs": "^3.13.3",
"astro": "^4.5.16"
"astro": "^4.6.0"
}
}
2 changes: 1 addition & 1 deletion examples/framework-lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/lit": "^4.0.1",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^4.5.16",
"astro": "^4.6.0",
"lit": "^3.1.2"
}
}
12 changes: 6 additions & 6 deletions examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/preact": "^3.1.2",
"@astrojs/react": "^3.1.1",
"@astrojs/solid-js": "^4.0.1",
"@astrojs/svelte": "^5.3.0",
"@astrojs/vue": "^4.0.10",
"@astrojs/preact": "^3.2.0",
"@astrojs/react": "^3.3.0",
"@astrojs/solid-js": "^4.1.0",
"@astrojs/svelte": "^5.4.0",
"@astrojs/vue": "^4.1.0",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"astro": "^4.5.16",
"astro": "^4.6.0",
"preact": "^10.19.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/framework-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/preact": "^3.1.2",
"@astrojs/preact": "^3.2.0",
"@preact/signals": "^1.2.1",
"astro": "^4.5.16",
"astro": "^4.6.0",
"preact": "^10.19.2"
}
}
4 changes: 2 additions & 2 deletions examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/react": "^3.1.1",
"@astrojs/react": "^3.3.0",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"astro": "^4.5.16",
"astro": "^4.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/framework-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/solid-js": "^4.0.1",
"astro": "^4.5.16",
"@astrojs/solid-js": "^4.1.0",
"astro": "^4.6.0",
"solid-js": "^1.8.5"
}
}
4 changes: 2 additions & 2 deletions examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/svelte": "^5.3.0",
"astro": "^4.5.16",
"@astrojs/svelte": "^5.4.0",
"astro": "^4.6.0",
"svelte": "^4.2.5"
}
}
4 changes: 2 additions & 2 deletions examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/vue": "^4.0.10",
"astro": "^4.5.16",
"@astrojs/vue": "^4.1.0",
"astro": "^4.6.0",
"vue": "^3.3.8"
}
}
2 changes: 1 addition & 1 deletion examples/hackernews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/node": "^8.2.5",
"astro": "^4.5.16"
"astro": "^4.6.0"
}
}
2 changes: 1 addition & 1 deletion examples/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^4.5.16"
"astro": "^4.6.0"
},
"peerDependencies": {
"astro": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"@astrojs/node": "^8.2.5",
"astro": "^4.5.16",
"astro": "^4.6.0",
"html-minifier": "^4.0.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.5.16"
"astro": "^4.6.0"
}
}
2 changes: 1 addition & 1 deletion examples/non-html-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.5.16"
"astro": "^4.6.0"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.5.16"
"astro": "^4.6.0"
}
}
4 changes: 2 additions & 2 deletions examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
"dependencies": {
"@astrojs/node": "^8.2.5",
"@astrojs/svelte": "^5.3.0",
"astro": "^4.5.16",
"@astrojs/svelte": "^5.4.0",
"astro": "^4.6.0",
"svelte": "^4.2.5"
}
}
2 changes: 1 addition & 1 deletion examples/starlog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.5.16",
"astro": "^4.6.0",
"sass": "^1.69.5",
"sharp": "^0.32.6"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/view-transitions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"devDependencies": {
"@astrojs/tailwind": "^5.1.0",
"@astrojs/node": "^8.2.5",
"astro": "^4.5.16"
"astro": "^4.6.0"
}
}
4 changes: 2 additions & 2 deletions examples/with-markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/markdoc": "^0.9.5",
"astro": "^4.5.16"
"@astrojs/markdoc": "^0.10.0",
"astro": "^4.6.0"
}
}
4 changes: 2 additions & 2 deletions examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/markdown-remark": "^5.0.0",
"astro": "^4.5.16",
"@astrojs/markdown-remark": "^5.1.0",
"astro": "^4.6.0",
"hast-util-select": "^6.0.2",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-markdown-shiki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.5.16"
"astro": "^4.6.0"
}
}
6 changes: 3 additions & 3 deletions examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^2.2.4",
"@astrojs/preact": "^3.1.2",
"astro": "^4.5.16",
"@astrojs/mdx": "^2.3.0",
"@astrojs/preact": "^3.2.0",
"astro": "^4.6.0",
"preact": "^10.19.2"
}
}
4 changes: 2 additions & 2 deletions examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/preact": "^3.1.2",
"@astrojs/preact": "^3.2.0",
"@nanostores/preact": "^0.5.0",
"astro": "^4.5.16",
"astro": "^4.6.0",
"nanostores": "^0.9.5",
"preact": "^10.19.2"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^2.2.4",
"@astrojs/mdx": "^2.3.0",
"@astrojs/tailwind": "^5.1.0",
"@types/canvas-confetti": "^1.6.3",
"astro": "^4.5.16",
"astro": "^4.6.0",
"autoprefixer": "^10.4.15",
"canvas-confetti": "^1.9.1",
"postcss": "^8.4.28",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^4.5.16",
"astro": "^4.6.0",
"vitest": "^1.3.1"
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"release": "pnpm run build && changeset publish",
"build": "turbo run build --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --filter=\"@benchmark/*\"",
"build:ci": "turbo run build:ci --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --filter=\"@benchmark/*\"",
"build:ci:no-cache": "pnpm build:ci --force",
"build:ci:no-cache": "pnpm -r --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --filter=\"@benchmark/*\" build:ci",
"build:examples": "turbo run build --filter=\"@example/*\"",
"dev": "turbo run dev --concurrency=40 --parallel --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --filter=\"@benchmark/*\"",
"format": "pnpm run format:code && pnpm run format:imports",
Expand All @@ -21,7 +21,7 @@
"format:imports": "biome check --apply .",
"format:imports:ci": "biome ci .",
"test": "turbo run test --concurrency=1 --filter=astro --filter=create-astro --filter=\"@astrojs/*\"",
"test:citgm": "pnpm test --force",
"test:citgm": "pnpm -r --filter=astro test",
"test:match": "cd packages/astro && pnpm run test:match",
"test:unit": "cd packages/astro && pnpm run test:unit",
"test:unit:match": "cd packages/astro && pnpm run test:unit:match",
Expand All @@ -44,7 +44,7 @@
"packages/*"
],
"engines": {
"node": ">=18.14.1",
"node": "^18.17.1 || ^20.3.0 || >=21.0.0",
"pnpm": ">=8.6.12"
},
"packageManager": "pnpm@8.6.12",
Expand Down
8 changes: 8 additions & 0 deletions packages/astro-prism/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @astrojs/prism

## 3.1.0

### Minor Changes

- [#10689](https://github.com/withastro/astro/pull/10689) [`683d51a5eecafbbfbfed3910a3f1fbf0b3531b99`](https://github.com/withastro/astro/commit/683d51a5eecafbbfbfed3910a3f1fbf0b3531b99) Thanks [@ematipico](https://github.com/ematipico)! - Deprecate support for versions of Node.js older than `v18.17.1` for Node.js 18, older than `v20.0.3` for Node.js 20, and the complete Node.js v19 release line.

This change is in line with Astro's [Node.js support policy](https://docs.astro.build/en/upgrade-astro/#support).

## 3.0.0

### Major Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/astro-prism/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@astrojs/prism",
"version": "3.0.0",
"version": "3.1.0",
"description": "Add Prism syntax highlighting support to your Astro site",
"author": "withastro",
"type": "module",
Expand Down Expand Up @@ -39,6 +39,6 @@
"astro-scripts": "workspace:*"
},
"engines": {
"node": ">=18.14.1"
"node": "^18.17.1 || ^20.3.0 || >=21.0.0"
}
}
Loading
Loading