Skip to content

Commit f10563a

Browse files
authored
Merge pull request #361 from nogic1008/build/monorepo-vue3
build: migrate to monorepo (for vue-jest@5)
2 parents c590d2e + c42dc7d commit f10563a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+293
-199
lines changed

e2e/__projects__/babel-in-package/package.json renamed to e2e/3.x/babel-in-package/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"name": "babel-in-package",
2+
"name": "vue3-babel-in-package",
33
"version": "1.0.0",
4-
"main": "index.js",
54
"license": "MIT",
65
"private": true,
76
"scripts": {
@@ -17,7 +16,8 @@
1716
"coffeescript": "^2.3.2",
1817
"jest": "^26.0.0",
1918
"ts-jest": "^26.4.4",
20-
"typescript": "^4.1.2"
19+
"typescript": "^4.1.2",
20+
"vue3-jest": "^26.0.0-alpha.10"
2121
},
2222
"jest": {
2323
"moduleFileExtensions": [
@@ -27,7 +27,7 @@
2727
],
2828
"transform": {
2929
"^.+\\.js$": "babel-jest",
30-
"^.+\\.vue$": "../../../lib/index.js"
30+
"^.+\\.vue$": "vue3-jest"
3131
}
3232
},
3333
"babel": {

e2e/__projects__/basic/package.json renamed to e2e/3.x/basic/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"name": "basic",
2+
"name": "vue3-basic",
33
"version": "1.0.0",
4-
"main": "index.js",
54
"license": "MIT",
65
"private": true,
76
"scripts": {
@@ -24,6 +23,7 @@
2423
"ts-jest": "^26.4.4",
2524
"typescript": "^4.1.2",
2625
"vue-class-component": "^8.0.0-beta.4",
26+
"vue3-jest": "^26.0.0-alpha.10",
2727
"vue-property-decorator": "^10.0.0-rc.3"
2828
},
2929
"jest": {
@@ -36,7 +36,7 @@
3636
"transform": {
3737
"^.+\\.ts$": "ts-jest",
3838
"^.+\\.js$": "babel-jest",
39-
"^.+\\.vue$": "../../../lib/index.js"
39+
"^.+\\.vue$": "vue3-jest"
4040
},
4141
"moduleNameMapper": {
4242
"^~?__styles/(.*)$": "<rootDir>/components/styles/$1"

e2e/__projects__/basic/test.js renamed to e2e/3.x/basic/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import ClassComponent from './components/ClassComponent.vue'
1111
import ClassComponentWithMixin from './components/ClassComponentWithMixin.vue'
1212
import ClassComponentProperty from './components/ClassComponentProperty.vue'
1313
import TypeScript from './components/TypeScript.vue'
14-
import jestVue from '../../../'
14+
import jestVue from 'vue3-jest'
1515
import RenderFunction from './components/RenderFunction.vue'
1616
import FunctionalSFC from './components/FunctionalSFC.vue'
1717
import CoffeeScript from './components/CoffeeScript.vue'
File renamed without changes.

e2e/__projects__/custom-transformers/package.json renamed to e2e/3.x/custom-transformers/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"name": "custom-transformers",
2+
"name": "vue3-custom-transformers",
33
"version": "1.0.0",
4-
"main": "index.js",
54
"license": "MIT",
65
"private": true,
76
"scripts": {
@@ -19,7 +18,8 @@
1918
"jest": "^26.0.0",
2019
"postcss": "^7.0.13",
2120
"postcss-color-function": "^4.0.1",
22-
"sass": "^1.23.7"
21+
"sass": "^1.23.7",
22+
"vue3-jest": "^26.0.0-alpha.10"
2323
},
2424
"jest": {
2525
"moduleFileExtensions": [
@@ -29,7 +29,7 @@
2929
],
3030
"transform": {
3131
"^.+\\.js$": "./babel-transformer.js",
32-
"^.+\\.vue$": "../../../lib"
32+
"^.+\\.vue$": "vue3-jest"
3333
},
3434
"moduleNameMapper": {
3535
"^~?__styles/(.*)$": "<rootDir>/components/styles/$1"

e2e/__projects__/javascript/package.json renamed to e2e/3.x/javascript/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"name": "javascript",
2+
"name": "vue3-javascript",
33
"version": "1.0.0",
4-
"main": "index.js",
54
"license": "MIT",
65
"private": true,
76
"scripts": {
@@ -14,7 +13,8 @@
1413
"@babel/core": "^7.9.0",
1514
"@babel/preset-env": "^7.9.0",
1615
"coffeescript": "^2.3.2",
17-
"jest": "^26.0.0"
16+
"jest": "^26.0.0",
17+
"vue3-jest": "^26.0.0-alpha.10"
1818
},
1919
"jest": {
2020
"moduleFileExtensions": [
@@ -24,7 +24,7 @@
2424
],
2525
"transform": {
2626
"^.+\\.js$": "babel-jest",
27-
"^.+\\.vue$": "../../../lib/index.js"
27+
"^.+\\.vue$": "vue3-jest"
2828
}
2929
},
3030
"babel": {
File renamed without changes.

e2e/__projects__/style/package.json renamed to e2e/3.x/style/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"name": "style",
2+
"name": "vue3-style",
33
"version": "1.0.0",
4-
"main": "index.js",
54
"license": "MIT",
65
"private": true,
76
"scripts": {
@@ -19,7 +18,8 @@
1918
"less": "^3.9.0",
2019
"postcss": "^7.0.13",
2120
"sass": "^1.23.7",
22-
"stylus": "^0.54.5"
21+
"stylus": "^0.54.5",
22+
"vue3-jest": "^26.0.0-alpha.10"
2323
},
2424
"jest": {
2525
"moduleFileExtensions": [
@@ -29,7 +29,7 @@
2929
],
3030
"transform": {
3131
"^.+\\.js$": "babel-jest",
32-
"^.+\\.vue$": "../../../lib"
32+
"^.+\\.vue$": "vue3-jest"
3333
},
3434
"moduleNameMapper": {
3535
"^~?__styles/(.*)$": "<rootDir>/components/styles/$1"
File renamed without changes.
File renamed without changes.
File renamed without changes.

e2e/__projects__/typescript/package.json renamed to e2e/3.x/typescript/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"name": "typescript",
2+
"name": "vue3-typescript",
33
"version": "1.0.0",
4-
"main": "index.js",
54
"license": "MIT",
65
"private": true,
76
"scripts": {
@@ -16,7 +15,8 @@
1615
"@babel/preset-env": "^7.9.0",
1716
"jest": "^26.0.0",
1817
"ts-jest": "^26.4.4",
19-
"typescript": "^4.1.2"
18+
"typescript": "^4.1.2",
19+
"vue3-jest": "^26.0.0-alpha.10"
2020
},
2121
"jest": {
2222
"globals": {
@@ -31,7 +31,7 @@
3131
],
3232
"transform": {
3333
"^.+\\.js$": "babel-jest",
34-
"^.+\\.vue$": "../../../lib/index.js"
34+
"^.+\\.vue$": "vue3-jest"
3535
}
3636
},
3737
"babel": {

e2e/test-runner.js

Lines changed: 0 additions & 84 deletions
This file was deleted.

package.json

Lines changed: 17 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,24 @@
11
{
2-
"name": "vue-jest",
3-
"version": "5.0.0-alpha.10",
4-
"description": "Jest Vue transform",
5-
"main": "lib/index.js",
6-
"files": [
7-
"lib"
8-
],
9-
"keywords": [
10-
"jest",
11-
"vue",
12-
"jest vue",
13-
"jest vue transform",
14-
"jest vue preprocessor",
15-
"vue jest",
16-
"vue jest",
17-
"vue jest transform",
18-
"vue jest preprocessor"
19-
],
2+
"name": "vue-jest-monorepo",
3+
"private": true,
4+
"engines": {
5+
"node": ">=10",
6+
"yarn": "^1.17.3"
7+
},
8+
"workspaces": {
9+
"packages": [
10+
"packages/*",
11+
"e2e/**"
12+
]
13+
},
2014
"scripts": {
21-
"format": "prettier --no-semi --single-quote --write '**/*.{js,json,md}'",
22-
"format:check": "prettier --no-semi --single-quote --check '**/*.{js,json,md}'",
23-
"lint": "eslint --ignore-path .gitignore '{,!(node_modules)/**/}*.js'",
15+
"format": "prettier --no-semi --single-quote --write \"**/*.{js,json,md}\"",
16+
"format:check": "prettier --no-semi --single-quote --check \"**/*.{js,json,md}\"",
17+
"lint": "eslint --ignore-path .gitignore \"{,!(node_modules)/**/}*.js\"",
2418
"lint:fix": "yarn lint --fix",
25-
"release": "semantic-release",
26-
"test": "yarn lint && yarn format:check && yarn test:e2e",
27-
"test:e2e": "node e2e/test-runner"
19+
"test": "yarn lint && yarn format:check && yarn workspaces run test"
2820
},
29-
"author": "Edd Yerburgh",
30-
"license": "MIT",
3121
"devDependencies": {
32-
"@babel/core": "^7.9.0",
33-
"@babel/preset-env": "^7.9.0",
34-
"@vue/compiler-sfc": "^3.0.3",
35-
"babel-core": "^7.0.0-bridge.0",
36-
"babel-jest": "^26.0.0",
37-
"coffeescript": "^2.3.2",
38-
"conventional-changelog": "^1.1.5",
3922
"eslint": "^5.12.0",
4023
"eslint-config-prettier": "^3.3.0",
4124
"eslint-config-standard": "^12.0.0",
@@ -44,49 +27,9 @@
4427
"eslint-plugin-promise": "^4.0.1",
4528
"eslint-plugin-standard": "^4.0.0",
4629
"eslint-plugin-vue": "^5.1.0",
47-
"fs-extra": "^7.0.1",
48-
"hamljs": "^0.6.2",
4930
"husky": "^1.1.4",
50-
"jade": "^1.11.0",
51-
"jest": "^26.0.0",
52-
"less": "^3.9.0",
5331
"lint-staged": "^8.0.5",
54-
"prettier": "^1.16.1",
55-
"pug": "^2.0.3",
56-
"sass": "^1.23.7",
57-
"semantic-release": "^15.13.2",
58-
"stylus": "^0.54.5",
59-
"ts-jest": "^26.4.4",
60-
"typescript": "^4.1.2",
61-
"vue": "^3.0.3"
62-
},
63-
"peerDependencies": {
64-
"@babel/core": "7.x",
65-
"babel-jest": ">= 24 < 27",
66-
"jest": ">= 24 < 27 ",
67-
"ts-jest": ">= 24 < 27 ",
68-
"typescript": ">= 3.x",
69-
"vue": "^3.0.0-0"
70-
},
71-
"peerDependenciesMeta": {
72-
"ts-jest": {
73-
"optional": true
74-
},
75-
"typescript": {
76-
"optional": true
77-
}
78-
},
79-
"dependencies": {
80-
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
81-
"chalk": "^2.1.0",
82-
"convert-source-map": "^1.6.0",
83-
"extract-from-css": "^0.4.4",
84-
"source-map": "0.5.6",
85-
"tsconfig": "^7.0.0"
86-
},
87-
"repository": {
88-
"type": "git",
89-
"url": "git+https://github.com/vuejs/vue-jest.git"
32+
"prettier": "^1.16.1"
9033
},
9134
"husky": {
9235
"hooks": {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)