Repository navigation
Fix dependency resolution warnings with the Cloudflare adapter - #4250
Conversation
🦋 Changeset detectedLatest commit: 8498182 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
delucis
left a comment
There was a problem hiding this comment.
Thanks @HiDeoo! I’d seen this logging a couple of times in user logs but hadn’t had time to investigate.
Just one query: is it possible these resolutions would still be needed by a user using @astrojs/markdown-remark? Or is it fixed also for those projects now?
Not as far as I know. We were the ones importing and using these dependencies in some components ( Just to be sure, I also re-did the same test in a project using both the Cloudflare adapter and the Unified processor and I did not get any If Astro and |
delucis
left a comment
There was a problem hiding this comment.
OK, great. Thanks for taking the time confirm that! 🙌
* main: (43 commits) Move starlight-ai-actions to community plugins section (withastro#4271) docs: Add manuscrio-pdf to community resources (withastro#4257) docs: add Starlight Visual Customizer to community tools (withastro#4262) docs: rename ask-my-site to ondocs in community plugins (withastro#4256) Fix i18n dashboard responsive issues (withastro#4272) i18n(ko-KR): update `plugins` (withastro#4270) docs: add starlight-ai-chatbot to community plugins (withastro#4255) i18n(ja): update authoring-content.mdx (withastro#4267) i18n(ja): update i18n.mdx (withastro#4266) i18n(ja): update index.mdx (withastro#4265) i18n(ja): update reference/plugins.md (withastro#4268) i18n(ko-KR): update `plugins` (withastro#4258) docs: add starlight-ai-actions to community plugins (withastro#4254) docs: add ask-my-site to community plugins (withastro#4253) [ci] release (withastro#4235) i18n(is): Add Icelandic UI translations (withastro#4252) Fix dependency resolution warnings with the Cloudflare adapter (withastro#4250) docs: add astro-aeo to community plugins (withastro#4251) i18n(ru): update `resources/plugins.mdx` (withastro#4249) feat: integrate zizmor (withastro#4011) ...
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@astrojs/starlight](https://starlight.astro.build) ([source](https://github.com/withastro/starlight/tree/HEAD/packages/starlight)) | [`0.42.5` → `0.42.6`](https://renovatebot.com/diffs/npm/@astrojs%2fstarlight/0.42.5/0.42.6) |  |  | --- ### Release Notes <details> <summary>withastro/starlight (@​astrojs/starlight)</summary> ### [`v0.42.6`](https://github.com/withastro/starlight/blob/HEAD/packages/starlight/CHANGELOG.md#0426) [Compare Source](https://github.com/withastro/starlight/compare/@astrojs/starlight@0.42.5...@astrojs/starlight@0.42.6) ##### Patch Changes - [#​4252](withastro/starlight#4252) [`40a2584`](withastro/starlight@40a2584) Thanks [@​olafur-andri](https://github.com/olafur-andri)! - Adds Icelandic language support - [#​4229](withastro/starlight#4229) [`e4a3d82`](withastro/starlight@e4a3d82) Thanks [@​HiDeoo](https://github.com/HiDeoo)! - Fixes a potential issue with icons being cut off in Firefox when pinch-zooming. - [#​4226](withastro/starlight#4226) [`fb562dd`](withastro/starlight@fb562dd) Thanks [@​HiDeoo](https://github.com/HiDeoo)! - Fixes an issue where pages not importing components from `@astrojs/starlight/components` included styles of Starlight components used on other pages. - [#​4250](withastro/starlight#4250) [`531af7d`](withastro/starlight@531af7d) Thanks [@​HiDeoo](https://github.com/HiDeoo)! - Fixes `Failed to resolve dependency` warnings logged when running the development server in projects using the Cloudflare adapter. - [#​4229](withastro/starlight#4229) [`e4a3d82`](withastro/starlight@e4a3d82) Thanks [@​HiDeoo](https://github.com/HiDeoo)! - Fixes the `codePen` and `node` icons slightly extending beyond their bounding box. </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNDkuMyIsInVwZGF0ZWRJblZlciI6IjQ0LjE0OS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Description
While reviewing and doing some tests for #4218, I noticed some
Failed to resolve dependencywarnings being logged when running the development server in projects using the Cloudflare adapter.These dependencies were actually never dependencies of Expressive Code but of Starlight itself and were removed in #4134. This now causes the warning. I guess these directives were working previously due to pnpm hoisting behavior and Vite does not care about the exact path but if it can resolve the dependency or not.
To test, I ran:
cd packages/starlightpnpm build && pnpm pack --out /tmp/sl-cloudflare-test.tgzIn a new directory, I then ran the following commands:
pnpm create astro@latest . -- --template starlight --install --no-gitpnpm astro add cloudflarepnpm add /tmp/sl-cloudflare-test.tgzpnpm devHere is a comparison before and after the changes: