Skip to content

fix: parse error in import.meta.env assignment#10586

Open
yamachi4416 wants to merge 2 commits into
vitest-dev:mainfrom
yamachi4416:fix/import-meta-env-assignment
Open

fix: parse error in import.meta.env assignment#10586
yamachi4416 wants to merge 2 commits into
vitest-dev:mainfrom
yamachi4416:fix/import-meta-env-assignment

Conversation

@yamachi4416

@yamachi4416 yamachi4416 commented Jun 12, 2026

Copy link
Copy Markdown

Description

Resolves #10091

I understand that it was previously wrapped in Object.assign({}) to avoid a syntax error. To ensure that it will not throw an error even when the right-hand side is an assignment, I have updated the implementation to Array({})[0]

Could you please review if this is the right approach?

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.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

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

netlify Bot commented Jun 12, 2026

Copy link
Copy Markdown

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit d677d39
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6a385edbc8b6d20008eb7178
😎 Deploy Preview https://deploy-preview-10586--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@yamachi4416 yamachi4416 marked this pull request as ready for review June 12, 2026 12:04
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.

Parse error in import.meta.env assignment

1 participant