Skip to content

Commit 3341efb

Browse files
renovate[bot]FRSgitclaude
authored
chore(deps): update dependency cypress to v15 (#361)
* chore(deps): update dependency cypress to v15 * fix: migrate webpack example from vue-cli-service to webpack bundler for Cypress 15 vue-cli-service CT support was dropped in Cypress 14. Migrate the webpack example to use webpack directly with vue-loader, matching the Cypress 15 migration guide. - Replace @vue/cli-service and @vue/cli-plugin-e2e-cypress with direct webpack - Add webpack.config.js with VueLoaderPlugin and HtmlWebpackPlugin - Update cypress.config.ts: framework "vue-cli" → "vue", add baseUrl - Update scripts to use webpack-dev-server and start-server-and-test - Fix propsData → props in CT test (Vue 2 → Vue 3 API) - Update cypress to v15.18.0 in webpack example Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: upgrade webpack-dev-server to v5 and fix require() lint error Cypress 15's @cypress/webpack-dev-server requires webpack-dev-server v5. Also inline the CT webpack config using ES module imports to fix the no-require-imports lint rule. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jakub Freisler <jakub@frsource.org> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b3fe929 commit 3341efb

6 files changed

Lines changed: 1257 additions & 1740 deletions

File tree

examples/webpack/cypress.config.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { defineConfig } from "cypress";
22
import { initPlugin } from "@frsource/cypress-plugin-visual-regression-diff/plugins";
3+
import { VueLoaderPlugin } from "vue-loader";
34

4-
module.exports = defineConfig({
5+
export default defineConfig({
56
e2e: {
7+
baseUrl: "http://localhost:8080",
68
setupNodeEvents(on, config) {
79
initPlugin(on, config);
810
},
@@ -14,8 +16,18 @@ module.exports = defineConfig({
1416
initPlugin(on, config);
1517
},
1618
devServer: {
17-
framework: "vue-cli",
19+
framework: "vue",
1820
bundler: "webpack",
21+
webpackConfig: {
22+
plugins: [new VueLoaderPlugin()],
23+
module: {
24+
rules: [
25+
{ test: /\.vue$/, loader: "vue-loader" },
26+
{ test: /\.css$/, use: ["vue-style-loader", "css-loader"] },
27+
{ test: /\.(png|jpg|gif|svg)$/, type: "asset/resource" },
28+
],
29+
},
30+
},
1931
},
2032
},
2133
});

examples/webpack/cypress/component/HelloWorld.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const msg = "Some random test message";
66
describe("HelloWorld.cy.js", () => {
77
it("playground", () => {
88
mount(HelloWorld, {
9-
propsData: { msg },
9+
props: { msg },
1010
}).then(() => {
1111
cy.contains("h1", msg);
1212
cy.matchImage();

examples/webpack/package.json

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,30 @@
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
6-
"serve": "vue-cli-service serve",
7-
"build": "vue-cli-service build",
8-
"test:open": "vue-cli-service test:e2e --env \"pluginVisualRegressionImagesPath={spec_path}/__image_snapshots_local__\"",
9-
"test:run": "vue-cli-service test:e2e",
6+
"serve": "webpack serve --mode development",
7+
"build": "webpack --mode production",
8+
"test:open": "cypress open --env \"pluginVisualRegressionImagesPath={spec_path}/__image_snapshots_local__\"",
9+
"test:run": "cypress run",
1010
"test:ct": "pnpm test:open --component",
11-
"test:ct:ci": "pnpm test:run --component --headless",
12-
"test:e2e": "pnpm test:open --e2e",
13-
"test:e2e:ci": "pnpm test:run --e2e --headless"
11+
"test:ct:ci": "pnpm test:run --component",
12+
"test:e2e": "start-server-and-test serve http://localhost:8080 \"pnpm test:open --e2e\"",
13+
"test:e2e:ci": "start-server-and-test serve http://localhost:8080 \"pnpm test:run --e2e\""
1414
},
1515
"dependencies": {
1616
"vue": "3.2.45"
1717
},
1818
"devDependencies": {
1919
"@frsource/cypress-plugin-visual-regression-diff": "workspace:*",
20-
"@vue/cli-plugin-e2e-cypress": "5.0.8",
21-
"@vue/cli-service": "5.0.8",
22-
"cypress": "13.14.2",
23-
"typescript": "5.0.4"
20+
"@vue/compiler-sfc": "3.2.45",
21+
"css-loader": "6.11.0",
22+
"cypress": "15.18.0",
23+
"html-webpack-plugin": "5.6.3",
24+
"start-server-and-test": "2.0.10",
25+
"typescript": "5.0.4",
26+
"vue-loader": "17.4.2",
27+
"vue-style-loader": "4.1.3",
28+
"webpack": "5.99.9",
29+
"webpack-cli": "5.1.4",
30+
"webpack-dev-server": "^5.0.0"
2431
}
2532
}

examples/webpack/webpack.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
const path = require('path')
2+
const { VueLoaderPlugin } = require('vue-loader')
3+
const HtmlWebpackPlugin = require('html-webpack-plugin')
4+
5+
module.exports = {
6+
entry: './src/main.js',
7+
resolve: {
8+
extensions: ['.js', '.ts', '.vue'],
9+
alias: { '@': path.resolve(__dirname, 'src') },
10+
},
11+
devServer: { port: 8080 },
12+
plugins: [
13+
new VueLoaderPlugin(),
14+
new HtmlWebpackPlugin({
15+
template: './public/index.html',
16+
title: 'Vue App',
17+
templateParameters: { BASE_URL: '/' },
18+
}),
19+
],
20+
module: {
21+
rules: [
22+
{ test: /\.vue$/, loader: 'vue-loader' },
23+
{ test: /\.css$/, use: ['vue-style-loader', 'css-loader'] },
24+
{ test: /\.(png|jpg|gif|svg)$/, type: 'asset/resource' },
25+
],
26+
},
27+
}

packages/cypress-plugin-visual-regression-diff/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"@types/tmp": "0.2.6",
7373
"@vitest/coverage-v8": "4.1.9",
7474
"cpy-cli": "4.2.0",
75-
"cypress": "13.17.0",
75+
"cypress": "15.18.0",
7676
"del-cli": "7.0.0",
7777
"microbundle": "0.15.1",
7878
"prettier": "3.9.0",

0 commit comments

Comments
 (0)