Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion dev-packages/e2e-tests/test-applications/vue-3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
"type-check": "vue-tsc --build --force",
"test": "playwright test",
"test:build": "pnpm install && pnpm build",
"test:assert": "playwright test"
"test:assert": "pnpm test:print-version && playwright test",
"test:build-canary": "pnpm install && pnpm test:install-canary && pnpm build",
"test:build-latest": "pnpm install && pnpm add vue@latest && pnpm build",
"test:install-canary": "pnpm add vue@$(git ls-remote --tags --sort='v:refname' https://github.com/vuejs/core.git | tail -n1 | awk -F'/' '{print $NF}')",
Copy link

Choose a reason for hiding this comment

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

Bug: The script to get the latest Vue tag incorrectly includes the ^{} suffix from git ls-remote, which is an invalid version string for pnpm and will cause installation to fail.
Severity: HIGH | Confidence: High

🔍 Detailed Analysis

The test:build-canary script in package.json uses a shell command to find the latest Vue.js tag. The command git ls-remote --tags ... | tail -n1 incorrectly captures the dereferenced annotated tag, which includes a ^{} suffix (e.g., v3.4.15^{}). This string is not a valid version specifier for pnpm. As a result, the subsequent pnpm add vue@... command will fail with a version resolution error, causing the test:build-canary test variant to crash whenever it is executed.

💡 Suggested Fix

Modify the git ls-remote command to prevent capturing the ^{} suffix. One option is to add the --refs flag to only list actual tag references. Alternatively, filter the output to exclude lines ending in ^{}, for example by piping the output through grep -v '{}$' before tail -n1.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: dev-packages/e2e-tests/test-applications/vue-3/package.json#L18

Potential issue: The `test:build-canary` script in `package.json` uses a shell command
to find the latest Vue.js tag. The command `git ls-remote --tags ... | tail -n1`
incorrectly captures the dereferenced annotated tag, which includes a `^{}` suffix
(e.g., `v3.4.15^{}`). This string is not a valid version specifier for `pnpm`. As a
result, the subsequent `pnpm add vue@...` command will fail with a version resolution
error, causing the `test:build-canary` test variant to crash whenever it is executed.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8109808

Copy link
Collaborator Author

@logaretm logaretm Jan 2, 2026

Choose a reason for hiding this comment

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

No, it works well

"test:print-version": "node -p \"'Vue version: ' + require('vue/package.json').version\""
},
"dependencies": {
"@sentry/vue": "latest || *",
Expand All @@ -36,5 +40,19 @@
},
"volta": {
"extends": "../../package.json"
},
"sentryTest": {
"variants": [
{
"build-command": "pnpm test:build-latest",
"label": "vue-3 (latest)"
}
],
"optionalVariants": [
{
"build-command": "pnpm test:build-canary",
"label": "vue-3 (canary)"
}
]
}
}
Loading