Skip to content

Conversation

@colinaaa
Copy link
Contributor

@colinaaa colinaaa commented Jun 5, 2025

Description

Currently, using absolute path as environment would failed on Windows:

Cannot find dependency 'vitest-environment-C:\Users\Admin\colin\lynx-stack\packages\react\testing-library\dist\env\vitest.js'

Instead of env[0] === '/', we use path.isAbsolute(env) instead.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@netlify
Copy link

netlify bot commented Jun 5, 2025

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 744c43b
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6841bca4f3117e000808d780
😎 Deploy Preview https://deploy-preview-8105--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

github-merge-queue bot pushed a commit to lynx-family/lynx-stack that referenced this pull request Jun 6, 2025
## Summary

<!-- Can you explain the reasoning behind implementing this change? What
problem or issue does this pull request resolve? -->

Similar to #1007, we normalize the relative path to ensure consistent
snapshot generation across Windows, Linux, and macOS.

> [!NOTE]
> The testing library does not work on Windows now since we are using
`environment` with a absolute path.
> An error "Cannot find dependency
'vitest-environment-C:\Users\Admin\colin\lynx-stack\packages\react\testing-library\dist\env\vitest.js'"
would occur.
>
> I've submitted a fix at vitest-dev/vitest#8105

<!-- It would be helpful if you could provide any relevant context, such
as GitHub issues or related discussions. -->

issue: #81

## Checklist

<!--- Check and mark with an "x" -->

- [ ] Tests updated (or not required).
- [ ] Documentation updated (or not required).
github-merge-queue bot pushed a commit to lynx-family/lynx-stack that referenced this pull request Jun 6, 2025
## Summary

<!-- Can you explain the reasoning behind implementing this change? What
problem or issue does this pull request resolve? -->

Similar to #1007, we normalize the relative path to ensure consistent
snapshot generation across Windows, Linux, and macOS.

> [!NOTE]
> The testing library does not work on Windows now since we are using
`environment` with a absolute path.
> An error "Cannot find dependency
'vitest-environment-C:\Users\Admin\colin\lynx-stack\packages\react\testing-library\dist\env\vitest.js'"
would occur.
>
> I've submitted a fix at vitest-dev/vitest#8105

<!-- It would be helpful if you could provide any relevant context, such
as GitHub issues or related discussions. -->

issue: #81

## Checklist

<!--- Check and mark with an "x" -->

- [ ] Tests updated (or not required).
- [ ] Documentation updated (or not required).
github-merge-queue bot pushed a commit to lynx-family/lynx-stack that referenced this pull request Jun 6, 2025
## Summary

<!-- Can you explain the reasoning behind implementing this change? What
problem or issue does this pull request resolve? -->

Similar to #1007, we normalize the relative path to ensure consistent
snapshot generation across Windows, Linux, and macOS.

> [!NOTE]
> The testing library does not work on Windows now since we are using
`environment` with a absolute path.
> An error "Cannot find dependency
'vitest-environment-C:\Users\Admin\colin\lynx-stack\packages\react\testing-library\dist\env\vitest.js'"
would occur.
>
> I've submitted a fix at vitest-dev/vitest#8105

<!-- It would be helpful if you could provide any relevant context, such
as GitHub issues or related discussions. -->

issue: #81

## Checklist

<!--- Check and mark with an "x" -->

- [ ] Tests updated (or not required).
- [ ] Documentation updated (or not required).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants