Skip to content

Commit 4dd33a2

Browse files
authored
Merge pull request #360 from nogic1008/build/monorepo-vue2
build: migrate to monorepo (for vue-jest@4)
2 parents 48ac03d + 73eaf6d commit 4dd33a2

Some content is hidden

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

76 files changed

+202
-193
lines changed

Diff for: e2e/__projects__/babel-in-package/package.json renamed to e2e/2.x/babel-in-package/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"name": "babel-in-package",
2+
"name": "vue2-babel-in-package",
33
"version": "1.0.0",
4-
"main": "index.js",
54
"license": "MIT",
65
"private": true,
76
"scripts": {
@@ -19,7 +18,8 @@
1918
"coffeescript": "^2.3.2",
2019
"jest": "26.x",
2120
"ts-jest": "^26.3.0",
22-
"typescript": "^3.2.2"
21+
"typescript": "^3.2.2",
22+
"vue2-jest": "~26.0.0"
2323
},
2424
"jest": {
2525
"moduleFileExtensions": [
@@ -29,7 +29,7 @@
2929
],
3030
"transform": {
3131
"^.+\\.js$": "babel-jest",
32-
"^.+\\.vue$": "vue-jest"
32+
"^.+\\.vue$": "vue2-jest"
3333
}
3434
},
3535
"babel": {
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.
File renamed without changes.

Diff for: e2e/__projects__/basic/package.json renamed to e2e/2.x/basic/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"name": "basic",
2+
"name": "vue2-basic",
33
"version": "1.0.0",
4-
"main": "index.js",
54
"license": "MIT",
65
"private": true,
76
"scripts": {
@@ -24,7 +23,8 @@
2423
"pug": "^3.0.1",
2524
"sass": "^1.23.7",
2625
"ts-jest": "^26.3.0",
27-
"typescript": "^3.2.2"
26+
"typescript": "^3.2.2",
27+
"vue2-jest": "~26.0.0"
2828
},
2929
"jest": {
3030
"moduleFileExtensions": [
@@ -34,7 +34,7 @@
3434
],
3535
"transform": {
3636
"^.+\\.js$": "babel-jest",
37-
"^.+\\.vue$": "vue-jest"
37+
"^.+\\.vue$": "vue2-jest"
3838
},
3939
"moduleNameMapper": {
4040
"^~?__styles/(.*)$": "<rootDir>/components/styles/$1"

Diff for: e2e/__projects__/basic/test.js renamed to e2e/2.x/basic/test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import TypeScript from './components/TypeScript.vue'
33
import TemplateString from './components/TemplateString.vue'
44
import { resolve } from 'path'
55
import { readFileSync } from 'fs'
6-
import jestVue from 'vue-jest'
6+
import jestVue from 'vue2-jest'
77
import RenderFunction from './components/RenderFunction.vue'
88
import Jade from './components/Jade.vue'
99
import FunctionalSFC from './components/FunctionalSFC.vue'
File renamed without changes.

Diff for: e2e/__projects__/custom-transformers/package.json renamed to e2e/2.x/custom-transformers/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"name": "custom-transformers",
2+
"name": "vue2-custom-transformers",
33
"version": "1.0.0",
4-
"main": "index.js",
54
"license": "MIT",
65
"private": true,
76
"scripts": {
@@ -18,7 +17,8 @@
1817
"jest": "26.x",
1918
"postcss": "^7.0.13",
2019
"postcss-color-function": "^4.0.1",
21-
"sass": "^1.23.7"
20+
"sass": "^1.23.7",
21+
"vue2-jest": "~26.0.0"
2222
},
2323
"jest": {
2424
"moduleFileExtensions": [
@@ -28,7 +28,7 @@
2828
],
2929
"transform": {
3030
"^.+\\.js$": "./babel-transformer.js",
31-
"^.+\\.vue$": "vue-jest"
31+
"^.+\\.vue$": "vue2-jest"
3232
},
3333
"moduleNameMapper": {
3434
"^~?__styles/(.*)$": "<rootDir>/components/styles/$1"
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.

Diff for: e2e/__projects__/style/package.json renamed to e2e/2.x/style/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"name": "style",
2+
"name": "vue2-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+
"vue2-jest": "~26.0.0"
2323
},
2424
"jest": {
2525
"moduleFileExtensions": [
@@ -29,7 +29,7 @@
2929
],
3030
"transform": {
3131
"^.+\\.js$": "babel-jest",
32-
"^.+\\.vue$": "vue-jest"
32+
"^.+\\.vue$": "vue2-jest"
3333
},
3434
"moduleNameMapper": {
3535
"^~tmp/(.*)": "/tmp/$1",

Diff for: e2e/__projects__/style/setup.js renamed to e2e/2.x/style/setup.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const fs = require('fs')
22

3-
const testDir = 'node_modules/vue-jest-test'
3+
const testDir = '../../../node_modules/vue-jest-test'
44

55
if (!fs.existsSync(testDir)) {
66
fs.mkdirSync(testDir)
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: e2e/test-runner.js

-84
This file was deleted.

Diff for: package.json

+14-68
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,24 @@
11
{
2-
"name": "vue-jest",
3-
"version": "4.0.1",
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": {
2115
"format": "prettier --no-semi --single-quote --write \"**/*.{js,json,md}\"",
2216
"format:check": "prettier --no-semi --single-quote --check \"**/*.{js,json,md}\"",
2317
"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/test-utils": "^1.1.0",
35-
"babel-core": "^7.0.0-bridge.0",
36-
"babel-jest": "^23.6.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,46 +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": "^3.0.1",
56-
"sass": "^1.23.7",
57-
"semantic-release": "^15.13.2",
58-
"stylus": "^0.54.5",
59-
"ts-jest": "^26.3.0",
60-
"typescript": "^3.2.2",
61-
"vue": "^2.4.2",
62-
"vue-template-compiler": "^2.4.2"
63-
},
64-
"peerDependencies": {
65-
"@babel/core": "7.x",
66-
"babel-jest": ">= 24 < 27",
67-
"jest": "26.x",
68-
"ts-jest": ">= 24 < 27 ",
69-
"vue": "^2.x",
70-
"vue-template-compiler": "^2.x"
71-
},
72-
"peerDependenciesMeta": {
73-
"ts-jest": {
74-
"optional": true
75-
}
76-
},
77-
"dependencies": {
78-
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
79-
"@vue/component-compiler-utils": "^3.1.0",
80-
"chalk": "^2.1.0",
81-
"extract-from-css": "^0.4.4",
82-
"source-map": "0.5.6"
83-
},
84-
"repository": {
85-
"type": "git",
86-
"url": "git+https://github.com/vuejs/vue-jest.git"
32+
"prettier": "^1.16.1"
8733
},
8834
"husky": {
8935
"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.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: packages/vue2-jest/package.json

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"name": "vue2-jest",
3+
"version": "26.0.0",
4+
"description": "Jest transformer for Vue 2",
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+
],
20+
"scripts": {
21+
"release": "semantic-release",
22+
"test": "echo \"There are no unit tests yet. Run e2e/2.x/ tests instead.\""
23+
},
24+
"author": "Edd Yerburgh",
25+
"license": "MIT",
26+
"devDependencies": {
27+
"@babel/core": "^7.9.0",
28+
"@babel/preset-env": "^7.9.0",
29+
"@vue/test-utils": "^1.1.0",
30+
"babel-core": "^7.0.0-bridge.0",
31+
"babel-jest": "^23.6.0",
32+
"conventional-changelog": "^1.1.5",
33+
"jest": "^26.0.0",
34+
"semantic-release": "^15.13.2",
35+
"ts-jest": "^26.3.0",
36+
"typescript": "^3.2.2",
37+
"vue": "^2.4.2",
38+
"vue-template-compiler": "^2.4.2"
39+
},
40+
"peerDependencies": {
41+
"@babel/core": "7.x",
42+
"babel-jest": ">= 24 < 27",
43+
"jest": "26.x",
44+
"ts-jest": ">= 24 < 27 ",
45+
"vue": "^2.x",
46+
"vue-template-compiler": "^2.x"
47+
},
48+
"peerDependenciesMeta": {
49+
"ts-jest": {
50+
"optional": true
51+
}
52+
},
53+
"dependencies": {
54+
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
55+
"@vue/component-compiler-utils": "^3.1.0",
56+
"chalk": "^2.1.0",
57+
"extract-from-css": "^0.4.4",
58+
"source-map": "0.5.6"
59+
},
60+
"repository": {
61+
"type": "git",
62+
"url": "git+https://github.com/vuejs/vue-jest.git"
63+
},
64+
"husky": {
65+
"hooks": {
66+
"pre-commit": "lint-staged"
67+
}
68+
},
69+
"lint-staged": {
70+
"*.{js,json,css,md,vue}": [
71+
"yarn format",
72+
"git add"
73+
]
74+
}
75+
}

0 commit comments

Comments
 (0)