create-vue 3.1.12 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/outfile.cjs +15 -26
- package/package.json +6 -6
- package/template/base/node_modules/.bin/vite +2 -2
- package/template/base/package.json +2 -2
- package/template/code/default/src/components/TheWelcome.vue +1 -1
- package/template/code/router/src/components/TheWelcome.vue +1 -1
- package/template/code/typescript-default/src/components/TheWelcome.vue +1 -1
- package/template/code/typescript-router/src/components/TheWelcome.vue +1 -1
- package/template/config/cypress/cypress/{integration/example.spec.js → e2e/example.cy.js} +0 -0
- package/template/config/cypress/cypress/{jsconfig.json → e2e/jsconfig.json} +1 -1
- package/template/config/cypress/cypress/support/commands.ts +37 -0
- package/template/config/cypress/cypress/support/{index.js → e2e.js} +0 -0
- package/template/config/cypress/cypress.config.js +8 -0
- package/template/config/cypress/cypress.config.ts +8 -0
- package/template/config/cypress/node_modules/.bin/cypress +2 -2
- package/template/config/cypress/package.json +3 -3
- package/template/config/cypress-ct/cypress/support/component-index.html +12 -0
- package/template/config/cypress-ct/cypress/support/component.js +27 -0
- package/template/config/cypress-ct/cypress/support/component.ts +39 -0
- package/template/config/cypress-ct/cypress.config.js +15 -0
- package/template/config/cypress-ct/cypress.config.ts +15 -0
- package/template/config/cypress-ct/node_modules/.bin/cypress +2 -2
- package/template/config/cypress-ct/package.json +4 -7
- package/template/config/cypress-ct/src/components/__tests__/{HelloWorld.spec.js → HelloWorld.cy.js} +2 -3
- package/template/config/pinia/package.json +1 -1
- package/template/config/router/package.json +2 -2
- package/template/config/typescript/node_modules/.bin/tsc +2 -2
- package/template/config/typescript/node_modules/.bin/tsserver +2 -2
- package/template/config/typescript/node_modules/.bin/vue-tsc +2 -2
- package/template/config/typescript/package.json +3 -3
- package/template/config/vitest/node_modules/.bin/vitest +2 -2
- package/template/config/vitest/package.json +3 -3
- package/template/config/vuex/package.json +1 -1
- package/template/eslint/package.json +2 -2
- package/template/tsconfig/base/{tsconfig.vite-config.json → tsconfig.config.json} +1 -1
- package/template/tsconfig/base/tsconfig.json +1 -1
- package/template/tsconfig/cypress/cypress/{tsconfig.json → e2e/tsconfig.json} +1 -1
- package/template/tsconfig/cypress-ct/tsconfig.cypress-ct.json +2 -2
- package/template/tsconfig/cypress-ct/tsconfig.json +1 -1
- package/template/tsconfig/vitest/tsconfig.json +1 -1
- package/template/config/cypress/cypress/plugins/index.js +0 -24
- package/template/config/cypress/cypress/plugins/index.ts +0 -19
- package/template/config/cypress/cypress.json +0 -3
- package/template/config/cypress-ct/cypress/plugins/index.js +0 -29
- package/template/config/cypress-ct/cypress/plugins/index.ts +0 -24
- package/template/config/cypress-ct/cypress.json +0 -7
- package/template/config/cypress-ct/node_modules/.bin/vite +0 -17
- package/template/tsconfig/cypress/cypress/plugins/tsconfig.json +0 -9
- package/template/tsconfig/vitest/tsconfig.vite-config.json +0 -8
package/outfile.cjs
CHANGED
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/*! create-vue v3.
|
|
2
|
+
/*! create-vue v3.2.2 | MIT */
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
9
|
var __commonJS = (cb, mod) => function __require() {
|
|
24
10
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
25
11
|
};
|
|
@@ -5196,7 +5182,7 @@ var require_lib = __commonJS({
|
|
|
5196
5182
|
for (question of questions) {
|
|
5197
5183
|
({ name, type } = question);
|
|
5198
5184
|
if (typeof type === "function") {
|
|
5199
|
-
type = await type(answer,
|
|
5185
|
+
type = await type(answer, { ...answers }, question);
|
|
5200
5186
|
question["type"] = type;
|
|
5201
5187
|
}
|
|
5202
5188
|
if (!type)
|
|
@@ -5205,7 +5191,7 @@ var require_lib = __commonJS({
|
|
|
5205
5191
|
if (passOn.includes(key))
|
|
5206
5192
|
continue;
|
|
5207
5193
|
let value = question[key];
|
|
5208
|
-
question[key] = typeof value === "function" ? await value(answer,
|
|
5194
|
+
question[key] = typeof value === "function" ? await value(answer, { ...answers }, lastPrompt) : value;
|
|
5209
5195
|
}
|
|
5210
5196
|
lastPrompt = question;
|
|
5211
5197
|
if (typeof question.message !== "string") {
|
|
@@ -5392,7 +5378,10 @@ function sortDependencies(packageJson) {
|
|
|
5392
5378
|
});
|
|
5393
5379
|
}
|
|
5394
5380
|
}
|
|
5395
|
-
return
|
|
5381
|
+
return {
|
|
5382
|
+
...packageJson,
|
|
5383
|
+
...sorted
|
|
5384
|
+
};
|
|
5396
5385
|
}
|
|
5397
5386
|
|
|
5398
5387
|
// utils/renderTemplate.ts
|
|
@@ -5525,7 +5514,7 @@ ${getCommand(packageManager, "test:unit")}
|
|
|
5525
5514
|
}
|
|
5526
5515
|
if (needsCypressCT) {
|
|
5527
5516
|
npmScriptsDescriptions += `
|
|
5528
|
-
### Run
|
|
5517
|
+
### Run Headed Component Tests with [Cypress Component Testing](https://on.cypress.io/component)
|
|
5529
5518
|
|
|
5530
5519
|
\`\`\`sh
|
|
5531
5520
|
${getCommand(packageManager, "test:unit")} # or \`${getCommand(packageManager, "test:unit:ci")}\` for headless testing
|
|
@@ -5563,10 +5552,10 @@ var path3 = __toESM(require("path"), 1);
|
|
|
5563
5552
|
var devDependencies = {
|
|
5564
5553
|
"@rushstack/eslint-patch": "^1.1.0",
|
|
5565
5554
|
"@vue/eslint-config-prettier": "^7.0.0",
|
|
5566
|
-
"@vue/eslint-config-typescript": "^
|
|
5555
|
+
"@vue/eslint-config-typescript": "^11.0.0",
|
|
5567
5556
|
eslint: "^8.5.0",
|
|
5568
5557
|
"eslint-plugin-cypress": "^2.12.1",
|
|
5569
|
-
"eslint-plugin-vue": "^
|
|
5558
|
+
"eslint-plugin-vue": "^9.0.0",
|
|
5570
5559
|
prettier: "^2.5.1"
|
|
5571
5560
|
};
|
|
5572
5561
|
|
|
@@ -5579,10 +5568,7 @@ addEslintDependency("eslint");
|
|
|
5579
5568
|
addEslintDependency("eslint-plugin-vue");
|
|
5580
5569
|
var config = {
|
|
5581
5570
|
root: true,
|
|
5582
|
-
extends: ["plugin:vue/vue3-essential"]
|
|
5583
|
-
env: {
|
|
5584
|
-
"vue/setup-compiler-macros": true
|
|
5585
|
-
}
|
|
5571
|
+
extends: ["plugin:vue/vue3-essential"]
|
|
5586
5572
|
};
|
|
5587
5573
|
function configureEslint({ language, styleGuide, needsPrettier, needsCypress, needsCypressCT }) {
|
|
5588
5574
|
switch (`${styleGuide}-${language}`) {
|
|
@@ -5603,7 +5589,7 @@ function configureEslint({ language, styleGuide, needsPrettier, needsCypress, ne
|
|
|
5603
5589
|
if (needsCypress) {
|
|
5604
5590
|
const cypressOverrides = [
|
|
5605
5591
|
{
|
|
5606
|
-
files: needsCypressCT ? ["**/__tests__/*.spec.{js,ts,jsx,tsx}", "cypress/
|
|
5592
|
+
files: needsCypressCT ? ["**/__tests__/*.{cy,spec}.{js,ts,jsx,tsx}", "cypress/e2e/**.{cy,spec}.{js,ts,jsx,tsx}"] : ["cypress/e2e/**.{cy,spec}.{js,ts,jsx,tsx}"],
|
|
5607
5593
|
extends: ["plugin:cypress/recommended"]
|
|
5608
5594
|
}
|
|
5609
5595
|
];
|
|
@@ -5848,6 +5834,9 @@ Scaffolding project in ${root}...`);
|
|
|
5848
5834
|
if (needsCypress) {
|
|
5849
5835
|
render("tsconfig/cypress");
|
|
5850
5836
|
}
|
|
5837
|
+
if (needsCypressCT) {
|
|
5838
|
+
render("tsconfig/cypress-ct");
|
|
5839
|
+
}
|
|
5851
5840
|
if (needsVitest) {
|
|
5852
5841
|
render("tsconfig/vitest");
|
|
5853
5842
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-vue",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "An easy way to start a Vue project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/vuejs/create-vue#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/eslint": "^8.4.
|
|
28
|
+
"@types/eslint": "^8.4.3",
|
|
29
29
|
"@types/prompts": "^2.0.14",
|
|
30
30
|
"@vue/tsconfig": "^0.1.3",
|
|
31
|
-
"esbuild": "^0.14.
|
|
31
|
+
"esbuild": "^0.14.47",
|
|
32
32
|
"esbuild-plugin-license": "^1.2.2",
|
|
33
33
|
"husky": "^8.0.1",
|
|
34
34
|
"kolorist": "^1.5.1",
|
|
35
|
-
"lint-staged": "^
|
|
35
|
+
"lint-staged": "^13.0.2",
|
|
36
36
|
"minimist": "^1.2.6",
|
|
37
37
|
"npm-run-all": "^4.1.5",
|
|
38
|
-
"prettier": "^2.
|
|
38
|
+
"prettier": "^2.7.1",
|
|
39
39
|
"prompts": "^2.4.2",
|
|
40
|
-
"zx": "^
|
|
40
|
+
"zx": "^4.3.0"
|
|
41
41
|
},
|
|
42
42
|
"lint-staged": {
|
|
43
43
|
"*.{js,ts,vue,json}": [
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/vite@2.9.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/vite@2.9.12/node_modules/vite/bin/vite.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../node_modules/.pnpm/vite@2.9.
|
|
16
|
+
exec node "$basedir/../../../../node_modules/.pnpm/vite@2.9.12/node_modules/vite/bin/vite.js" "$@"
|
|
17
17
|
fi
|
|
@@ -31,7 +31,7 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
31
31
|
<a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>. If you need to test
|
|
32
32
|
your components and web pages, check out
|
|
33
33
|
<a href="https://www.cypress.io/" target="_blank">Cypress</a> and
|
|
34
|
-
<a href="https://
|
|
34
|
+
<a href="https://on.cypress.io/component" target="_blank"
|
|
35
35
|
>Cypress Component Testing</a
|
|
36
36
|
>.
|
|
37
37
|
|
|
@@ -31,7 +31,7 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
31
31
|
<a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>. If you need to test
|
|
32
32
|
your components and web pages, check out
|
|
33
33
|
<a href="https://www.cypress.io/" target="_blank">Cypress</a> and
|
|
34
|
-
<a href="https://
|
|
34
|
+
<a href="https://on.cypress.io/component" target="_blank"
|
|
35
35
|
>Cypress Component Testing</a
|
|
36
36
|
>.
|
|
37
37
|
|
|
@@ -31,7 +31,7 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
31
31
|
<a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>. If you need to test
|
|
32
32
|
your components and web pages, check out
|
|
33
33
|
<a href="https://www.cypress.io/" target="_blank">Cypress</a> and
|
|
34
|
-
<a href="https://
|
|
34
|
+
<a href="https://on.cypress.io/component" target="_blank"
|
|
35
35
|
>Cypress Component Testing</a
|
|
36
36
|
>.
|
|
37
37
|
|
|
@@ -31,7 +31,7 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
31
31
|
<a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>. If you need to test
|
|
32
32
|
your components and web pages, check out
|
|
33
33
|
<a href="https://www.cypress.io/" target="_blank">Cypress</a> and
|
|
34
|
-
<a href="https://
|
|
34
|
+
<a href="https://on.cypress.io/component" target="_blank"
|
|
35
35
|
>Cypress Component Testing</a
|
|
36
36
|
>.
|
|
37
37
|
|
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
// ***********************************************
|
|
3
|
+
// This example commands.ts shows you how to
|
|
4
|
+
// create various custom commands and overwrite
|
|
5
|
+
// existing commands.
|
|
6
|
+
//
|
|
7
|
+
// For more comprehensive examples of custom
|
|
8
|
+
// commands please read more here:
|
|
9
|
+
// https://on.cypress.io/custom-commands
|
|
10
|
+
// ***********************************************
|
|
11
|
+
//
|
|
12
|
+
//
|
|
13
|
+
// -- This is a parent command --
|
|
14
|
+
// Cypress.Commands.add('login', (email, password) => { ... })
|
|
15
|
+
//
|
|
16
|
+
//
|
|
17
|
+
// -- This is a child command --
|
|
18
|
+
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
|
19
|
+
//
|
|
20
|
+
//
|
|
21
|
+
// -- This is a dual command --
|
|
22
|
+
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
23
|
+
//
|
|
24
|
+
//
|
|
25
|
+
// -- This will overwrite an existing command --
|
|
26
|
+
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
|
27
|
+
//
|
|
28
|
+
// declare global {
|
|
29
|
+
// namespace Cypress {
|
|
30
|
+
// interface Chainable {
|
|
31
|
+
// login(email: string, password: string): Chainable<void>
|
|
32
|
+
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
33
|
+
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
34
|
+
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
|
35
|
+
// }
|
|
36
|
+
// }
|
|
37
|
+
// }
|
|
File without changes
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/cypress@
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/cypress@10.1.0/node_modules/cypress/bin/cypress" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/cypress@
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/cypress@10.1.0/node_modules/cypress/bin/cypress" "$@"
|
|
17
17
|
fi
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"scripts": {
|
|
3
|
-
"test:e2e": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress open'",
|
|
4
|
-
"test:e2e:ci": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress run'"
|
|
3
|
+
"test:e2e": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress open --e2e'",
|
|
4
|
+
"test:e2e:ci": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress run --e2e'"
|
|
5
5
|
},
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"cypress": "^
|
|
7
|
+
"cypress": "^10.1.0",
|
|
8
8
|
"start-server-and-test": "^1.14.0"
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
|
+
<title>Components App</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div data-cy-root></div>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// ***********************************************************
|
|
2
|
+
// This example support/component.js is processed and
|
|
3
|
+
// loaded automatically before your test files.
|
|
4
|
+
//
|
|
5
|
+
// This is a great place to put global configuration and
|
|
6
|
+
// behavior that modifies Cypress.
|
|
7
|
+
//
|
|
8
|
+
// You can change the location of this file or turn off
|
|
9
|
+
// automatically serving support files with the
|
|
10
|
+
// 'supportFile' configuration option.
|
|
11
|
+
//
|
|
12
|
+
// You can read more here:
|
|
13
|
+
// https://on.cypress.io/configuration
|
|
14
|
+
// ***********************************************************
|
|
15
|
+
|
|
16
|
+
// Import commands.js using ES2015 syntax:
|
|
17
|
+
import './commands'
|
|
18
|
+
|
|
19
|
+
// Alternatively you can use CommonJS syntax:
|
|
20
|
+
// require('./commands')
|
|
21
|
+
|
|
22
|
+
import { mount } from 'cypress/vue'
|
|
23
|
+
|
|
24
|
+
Cypress.Commands.add('mount', mount)
|
|
25
|
+
|
|
26
|
+
// Example use:
|
|
27
|
+
// cy.mount(MyComponent)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// ***********************************************************
|
|
2
|
+
// This example support/component.ts is processed and
|
|
3
|
+
// loaded automatically before your test files.
|
|
4
|
+
//
|
|
5
|
+
// This is a great place to put global configuration and
|
|
6
|
+
// behavior that modifies Cypress.
|
|
7
|
+
//
|
|
8
|
+
// You can change the location of this file or turn off
|
|
9
|
+
// automatically serving support files with the
|
|
10
|
+
// 'supportFile' configuration option.
|
|
11
|
+
//
|
|
12
|
+
// You can read more here:
|
|
13
|
+
// https://on.cypress.io/configuration
|
|
14
|
+
// ***********************************************************
|
|
15
|
+
|
|
16
|
+
// Import commands.js using ES2015 syntax:
|
|
17
|
+
import './commands'
|
|
18
|
+
|
|
19
|
+
// Alternatively you can use CommonJS syntax:
|
|
20
|
+
// require('./commands')
|
|
21
|
+
|
|
22
|
+
import { mount } from 'cypress/vue'
|
|
23
|
+
|
|
24
|
+
// Augment the Cypress namespace to include type definitions for
|
|
25
|
+
// your custom command.
|
|
26
|
+
// Alternatively, can be defined in cypress/support/component.d.ts
|
|
27
|
+
// with a <reference path="./component" /> at the top of your spec.
|
|
28
|
+
declare global {
|
|
29
|
+
namespace Cypress {
|
|
30
|
+
interface Chainable {
|
|
31
|
+
mount: typeof mount
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
Cypress.Commands.add('mount', mount)
|
|
37
|
+
|
|
38
|
+
// Example use:
|
|
39
|
+
// cy.mount(MyComponent)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { defineConfig } = require('cypress')
|
|
2
|
+
|
|
3
|
+
module.exports = defineConfig({
|
|
4
|
+
e2e: {
|
|
5
|
+
specPattern: 'cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}',
|
|
6
|
+
baseUrl: 'http://localhost:4173'
|
|
7
|
+
},
|
|
8
|
+
component: {
|
|
9
|
+
specPattern: 'src/**/__tests__/*.{cy,spec}.{js,ts,jsx,tsx}',
|
|
10
|
+
devServer: {
|
|
11
|
+
framework: 'vue',
|
|
12
|
+
bundler: 'vite'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
})
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineConfig } from 'cypress'
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
e2e: {
|
|
5
|
+
specPattern: 'cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}',
|
|
6
|
+
baseUrl: 'http://localhost:4173'
|
|
7
|
+
},
|
|
8
|
+
component: {
|
|
9
|
+
specPattern: 'src/**/__tests__/*.{cy,spec}.{js,ts,jsx,tsx}',
|
|
10
|
+
devServer: {
|
|
11
|
+
framework: 'vue',
|
|
12
|
+
bundler: 'vite'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
})
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/cypress@
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/cypress@10.1.0/node_modules/cypress/bin/cypress" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/cypress@
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/cypress@10.1.0/node_modules/cypress/bin/cypress" "$@"
|
|
17
17
|
fi
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"scripts": {
|
|
3
|
-
"test:unit": "cypress open
|
|
4
|
-
"test:unit:ci": "cypress run
|
|
3
|
+
"test:unit": "cypress open --component",
|
|
4
|
+
"test:unit:ci": "cypress run --component --quiet --reporter spec"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"vue": "^3.2.
|
|
7
|
+
"vue": "^3.2.37"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"
|
|
11
|
-
"@cypress/vue": "^3.1.2",
|
|
12
|
-
"cypress": "^9.7.0",
|
|
13
|
-
"vite": "^2.9.9"
|
|
10
|
+
"cypress": "^10.1.0"
|
|
14
11
|
}
|
|
15
12
|
}
|
package/template/config/cypress-ct/src/components/__tests__/{HelloWorld.spec.js → HelloWorld.cy.js}
RENAMED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { mount } from '@cypress/vue'
|
|
2
1
|
import HelloWorld from '../HelloWorld.vue'
|
|
3
2
|
|
|
4
3
|
describe('HelloWorld', () => {
|
|
5
4
|
it('playground', () => {
|
|
6
|
-
mount(HelloWorld, { props: { msg: 'Hello Cypress' } })
|
|
5
|
+
cy.mount(HelloWorld, { props: { msg: 'Hello Cypress' } })
|
|
7
6
|
})
|
|
8
7
|
|
|
9
8
|
it('renders properly', () => {
|
|
10
|
-
mount(HelloWorld, { props: { msg: 'Hello Cypress' } })
|
|
9
|
+
cy.mount(HelloWorld, { props: { msg: 'Hello Cypress' } })
|
|
11
10
|
cy.get('h1').should('contain', 'Hello Cypress')
|
|
12
11
|
})
|
|
13
12
|
})
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.7.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/bin/tsc" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.7.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/bin/tsc" "$@"
|
|
17
17
|
fi
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.7.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/bin/tsserver" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.7.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/bin/tsserver" "$@"
|
|
17
17
|
fi
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vue-tsc@0.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vue-tsc@0.38.1_typescript@4.7.4/node_modules/vue-tsc/bin/vue-tsc.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/vue-tsc@0.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vue-tsc@0.38.1_typescript@4.7.4/node_modules/vue-tsc/bin/vue-tsc.js" "$@"
|
|
17
17
|
fi
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"type-check": "vue-tsc --noEmit"
|
|
6
6
|
},
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@types/node": "^16.11.
|
|
8
|
+
"@types/node": "^16.11.41",
|
|
9
9
|
"npm-run-all": "^4.1.5",
|
|
10
|
-
"typescript": "~4.7.
|
|
11
|
-
"vue-tsc": "^0.
|
|
10
|
+
"typescript": "~4.7.4",
|
|
11
|
+
"vue-tsc": "^0.38.1"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vitest@0.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vitest@0.15.1_jsdom@20.0.0/node_modules/vitest/vitest.mjs" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/vitest@0.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vitest@0.15.1_jsdom@20.0.0/node_modules/vitest/vitest.mjs" "$@"
|
|
17
17
|
fi
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
"test:unit": "vitest --environment jsdom"
|
|
4
4
|
},
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"vue": "^3.2.
|
|
6
|
+
"vue": "^3.2.37"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"@vue/test-utils": "^2.0.0",
|
|
10
|
-
"jsdom": "^
|
|
11
|
-
"vitest": "^0.
|
|
10
|
+
"jsdom": "^20.0.0",
|
|
11
|
+
"vitest": "^0.15.1"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"devDependencies": {
|
|
3
3
|
"@rushstack/eslint-patch": "^1.1.0",
|
|
4
4
|
"@vue/eslint-config-prettier": "^7.0.0",
|
|
5
|
-
"@vue/eslint-config-typescript": "^
|
|
5
|
+
"@vue/eslint-config-typescript": "^11.0.0",
|
|
6
6
|
"eslint": "^8.5.0",
|
|
7
7
|
"eslint-plugin-cypress": "^2.12.1",
|
|
8
|
-
"eslint-plugin-vue": "^
|
|
8
|
+
"eslint-plugin-vue": "^9.0.0",
|
|
9
9
|
"prettier": "^2.5.1"
|
|
10
10
|
}
|
|
11
11
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/* eslint-env node */
|
|
2
|
-
/// <reference types="cypress" />
|
|
3
|
-
// ***********************************************************
|
|
4
|
-
// This example plugins/index.js can be used to load plugins
|
|
5
|
-
//
|
|
6
|
-
// You can change the location of this file or turn off loading
|
|
7
|
-
// the plugins file with the 'pluginsFile' configuration option.
|
|
8
|
-
//
|
|
9
|
-
// You can read more here:
|
|
10
|
-
// https://on.cypress.io/plugins-guide
|
|
11
|
-
// ***********************************************************
|
|
12
|
-
|
|
13
|
-
// This function is called when a project is opened or re-opened (e.g. due to
|
|
14
|
-
// the project's config changing)
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @type {Cypress.PluginConfig}
|
|
18
|
-
*/
|
|
19
|
-
// eslint-disable-next-line no-unused-vars
|
|
20
|
-
module.exports = (on, config) => {
|
|
21
|
-
// `on` is used to hook into various events Cypress emits
|
|
22
|
-
// `config` is the resolved Cypress config
|
|
23
|
-
return config
|
|
24
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/* eslint-env node */
|
|
2
|
-
// ***********************************************************
|
|
3
|
-
// This example plugins/index.ts can be used to load plugins
|
|
4
|
-
//
|
|
5
|
-
// You can change the location of this file or turn off loading
|
|
6
|
-
// the plugins file with the 'pluginsFile' configuration option.
|
|
7
|
-
//
|
|
8
|
-
// You can read more here:
|
|
9
|
-
// https://on.cypress.io/plugins-guide
|
|
10
|
-
// ***********************************************************
|
|
11
|
-
|
|
12
|
-
// This function is called when a project is opened or re-opened (e.g. due to
|
|
13
|
-
// the project's config changing)
|
|
14
|
-
|
|
15
|
-
export default ((on, config) => {
|
|
16
|
-
// `on` is used to hook into various events Cypress emits
|
|
17
|
-
// `config` is the resolved Cypress config
|
|
18
|
-
return config
|
|
19
|
-
}) as Cypress.PluginConfig
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/* eslint-env node */
|
|
2
|
-
/// <reference types="cypress" />
|
|
3
|
-
// ***********************************************************
|
|
4
|
-
// This example plugins/index.js can be used to load plugins
|
|
5
|
-
//
|
|
6
|
-
// You can change the location of this file or turn off loading
|
|
7
|
-
// the plugins file with the 'pluginsFile' configuration option.
|
|
8
|
-
//
|
|
9
|
-
// You can read more here:
|
|
10
|
-
// https://on.cypress.io/plugins-guide
|
|
11
|
-
// ***********************************************************
|
|
12
|
-
|
|
13
|
-
// This function is called when a project is opened or re-opened (e.g. due to
|
|
14
|
-
// the project's config changing)
|
|
15
|
-
|
|
16
|
-
const { startDevServer } = require('@cypress/vite-dev-server')
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @type {Cypress.PluginConfig}
|
|
20
|
-
*/
|
|
21
|
-
// eslint-disable-next-line no-unused-vars
|
|
22
|
-
module.exports = (on, config) => {
|
|
23
|
-
// `on` is used to hook into various events Cypress emits
|
|
24
|
-
// `config` is the resolved Cypress config
|
|
25
|
-
on('dev-server:start', (options) => {
|
|
26
|
-
return startDevServer({ options })
|
|
27
|
-
})
|
|
28
|
-
return config
|
|
29
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/* eslint-env node */
|
|
2
|
-
// ***********************************************************
|
|
3
|
-
// This example plugins/index.ts can be used to load plugins
|
|
4
|
-
//
|
|
5
|
-
// You can change the location of this file or turn off loading
|
|
6
|
-
// the plugins file with the 'pluginsFile' configuration option.
|
|
7
|
-
//
|
|
8
|
-
// You can read more here:
|
|
9
|
-
// https://on.cypress.io/plugins-guide
|
|
10
|
-
// ***********************************************************
|
|
11
|
-
|
|
12
|
-
// This function is called when a project is opened or re-opened (e.g. due to
|
|
13
|
-
// the project's config changing)
|
|
14
|
-
|
|
15
|
-
import { startDevServer } from '@cypress/vite-dev-server'
|
|
16
|
-
|
|
17
|
-
export default ((on, config) => {
|
|
18
|
-
// `on` is used to hook into various events Cypress emits
|
|
19
|
-
// `config` is the resolved Cypress config
|
|
20
|
-
on('dev-server:start', (options) => {
|
|
21
|
-
return startDevServer({ options })
|
|
22
|
-
})
|
|
23
|
-
return config
|
|
24
|
-
}) as Cypress.PluginConfig
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
-
esac
|
|
7
|
-
|
|
8
|
-
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite@2.9.9/node_modules/vite/bin/vite.js" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/vite@2.9.9/node_modules/vite/bin/vite.js" "$@"
|
|
17
|
-
fi
|