Skip to content

Commit 4fd5021

Browse files
authored
test(vue): Added canary and latest test variants to Vue tests (#18681)
This pull request adds new test scripts and Sentry test configuration variants to the `vue-3` test application. The main goal is to enable automated testing of the application against both the latest and canary (alpha) versions of Vue, improving compatibility and early detection of issues with upcoming Vue releases. Vue has several tags but no single tag is considered the "cutting-edge" of Vue releases. [The docs suggest using](https://vuejs.org/about/releases#pre-releases) `install-vue` tool but none of the suggested tags are suitable: - `canary` latest publish is 2 years ago `3.2` - `edge` covers the main branch and not the latest releases, currently sitting at `3.5.xx` - `alpha` latest alpha release, already outdated with `beta` releases are coming through - `beta` will be outdated once `rc` releases start going through - `rc` will be outdated once the stable version comes through So it doesn't feel like there is one good option here, so I opted to instead use git to query the latest tag on the Vue repo and just use that, it's not true canary and it will sometimes install other versions but I'm out of ideas. Happy to hear more thoughts and ideas here! I will reach out to Vue team members to see if they can make `canary` live again. closes #18679
1 parent 66f4825 commit 4fd5021

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

dev-packages/e2e-tests/test-applications/vue-3/package.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
"type-check": "vue-tsc --build --force",
1313
"test": "playwright test",
1414
"test:build": "pnpm install && pnpm build",
15-
"test:assert": "playwright test"
15+
"test:assert": "pnpm test:print-version && playwright test",
16+
"test:build-canary": "pnpm install && pnpm test:install-canary && pnpm build",
17+
"test:build-latest": "pnpm install && pnpm add vue@latest && pnpm build",
18+
"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}')",
19+
"test:print-version": "node -p \"'Vue version: ' + require('vue/package.json').version\""
1620
},
1721
"dependencies": {
1822
"@sentry/vue": "latest || *",
@@ -36,5 +40,19 @@
3640
},
3741
"volta": {
3842
"extends": "../../package.json"
43+
},
44+
"sentryTest": {
45+
"variants": [
46+
{
47+
"build-command": "pnpm test:build-latest",
48+
"label": "vue-3 (latest)"
49+
}
50+
],
51+
"optionalVariants": [
52+
{
53+
"build-command": "pnpm test:build-canary",
54+
"label": "vue-3 (canary)"
55+
}
56+
]
3957
}
4058
}

0 commit comments

Comments
 (0)