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

5.2.2 breaks CI generated "data-v-..." component ids #547

Closed
8 of 9 tasks
cope opened this issue Mar 17, 2025 · 2 comments
Closed
8 of 9 tasks

5.2.2 breaks CI generated "data-v-..." component ids #547

cope opened this issue Mar 17, 2025 · 2 comments
Labels
p4-important ❗ Violate documented behavior or significantly improves performance (priority)

Comments

@cope
Copy link

cope commented Mar 17, 2025

Related plugins

Describe the bug

I upgraded @vitejs/plugin-vue from 5.2.1 to 5.2.2 and now the component ids in my CI are different from the component ids on my machine where the snaps are generated.

In one of my components, in @vitejs/plugin-vue 5.2.1 the component id was data-v-f895525f on both my machine and the CI.

After upgrading to 5.2.2, the the component id on my machine is data-v-7ecf2a22 while in CI it is data-v-33eca55f.

Thus all my tests with snapshots are now failing.

Two questions arise, why have the ids changed at all, and why are they now different on different machines?

Reproduction

n/a

Steps to reproduce

No response

System Info

My machine:
  System:
    OS: Windows 11 10.0.22631
    CPU: (32) x64 13th Gen Intel(R) Core(TM) i9-13950HX
    Memory: 35.40 GB / 63.66 GB
  Binaries:
    Node: 22.11.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 10.6.3 - C:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Edge: Chromium (133.0.3065.92)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @vitejs/plugin-vue: ^5.2.2 => 5.2.2
    vite: ^6.2.2 => 6.2.2

CI:
  System:
    OS: Linux 4.4 Ubuntu 20.04.6 LTS (Focal Fossa)
    CPU: (16) x64 Intel(R) Xeon(R) Platinum 8160 CPU @ 2.10GHz
    Memory: 27.74 GB / 31.42 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 22.13.1 - /usr/bin/node
    npm: 10.9.2 - /usr/bin/npm
    pnpm: 10.2.0 - /usr/bin/pnpm
  npmPackages:
    @vitejs/plugin-vue: ^5.2.2 => 5.2.2 
    vite: ^6.2.2 => 6.2.2

Used Package Manager

pnpm

Logs

It is clearly caused by this change #538

Image

The documentation clearly states that componentIdGenerator='filepath', which I presume is the default, "hash the file path (relative to the project root)" should use the relative path.

Image

Yet the change clearly uses the relative path only in the componentIdGenerator='function' case.

Validations

@cope
Copy link
Author

cope commented Mar 17, 2025

@edison1105 could you please clarify?

@edison1105
Copy link
Member

fixed via #548

@edison1105 edison1105 added p4-important ❗ Violate documented behavior or significantly improves performance (priority) and removed pending triage labels Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p4-important ❗ Violate documented behavior or significantly improves performance (priority)
Projects
None yet
Development

No branches or pull requests

2 participants