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 bug for projects with spaces in their pathname #2156

Merged
merged 7 commits into from
Jul 29, 2024
Merged

Conversation

delucis
Copy link
Member

@delucis delucis commented Jul 27, 2024

Description

A user reported an issue on Discord that seems to be caused by an improperly encoded pathname when they were building a project in a directory containing a space in the pathname. I initially assumed it to be a Windows bug, but it looks like it’s also reproducible on macOS and Linux.

To test this, I have renamed the directory containing one of our end-to-end fixtures to include a space. I could also add a separate fixture, but it felt kind of excessive to add an additional fixture just to test the pathname. Hopefully by testing this we’ll catch similar issues in the future.

This PR correctly resolves the import in virtual:starlight/collection-config to fix the bug.

Copy link

changeset-bot bot commented Jul 27, 2024

🦋 Changeset detected

Latest commit: e8eec1f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Patch

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

@github-actions github-actions bot added the 🌟 core Changes to Starlight’s main package label Jul 27, 2024
Copy link

netlify bot commented Jul 27, 2024

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit e8eec1f
🔍 Latest deploy log https://app.netlify.com/sites/astro-starlight/deploys/66a793b5bfb697000886944c
😎 Deploy Preview https://deploy-preview-2156--astro-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@astrobot-houston
Copy link
Collaborator

astrobot-houston commented Jul 27, 2024

size-limit report 📦

Path Size
/index.html 5.95 KB (0%)
/_astro/*.js 21.87 KB (0%)
/_astro/*.css 13.79 KB (0%)

@delucis delucis changed the title Fix Windows path bug Fix bug for projects with spaces in their pathname Jul 27, 2024
@delucis delucis added the 🌟 patch Change that triggers a patch release label Jul 27, 2024
@delucis delucis marked this pull request as ready for review July 27, 2024 14:36
Copy link
Member

@HiDeoo HiDeoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect to me 👍

@delucis delucis merged commit 904ad47 into main Jul 29, 2024
15 checks passed
@delucis delucis deleted the chris/windows-fix branch July 29, 2024 13:22
@astrobot-houston astrobot-houston mentioned this pull request Jul 29, 2024
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Aug 6, 2024
* main: (275 commits)
  [ci] release (withastro#2165)
  Define well-known RTL locales before calling `getLocaleInfo()` for default locale (withastro#2167)
  Update dependencies (withastro#2166)
  Improve page load performance (withastro#2155)
  docs: Add CodeSweetly to showcase (withastro#2160)
  [ci] release (withastro#2145)
  Fix bug for projects with spaces in their pathname (withastro#2156)
  ci: update file icons (withastro#2157)
  [ci] format
  Merge <link rel="canonical" /> tags, quick fixes (withastro#2153) (withastro#2154)
  Add two new showcase sites (withastro#2149)
  [ci] format
  i18n(zh-cn): Update `environmental-impact.md` (withastro#2148)
  add Saasfly showcase (withastro#2147)
  docs: add 'og:image:alt' metadata (withastro#2143)
  Deleting unnecessary twitter meta tags, quick fixes (withastro#2137)
  [ci] format
  i18n(es): update `environmental-impact` (withastro#2144)
  [ci] release (withastro#2142)
  feat: Add Pinterest icon to social list (withastro#2135)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 core Changes to Starlight’s main package 🌟 patch Change that triggers a patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants