Skip to content

build: merge 'next' (Vue 3) branch into 'master' (Vue 2) for monorepo #363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 87 commits into from
Jul 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
4d32026
chore: bump deps
lmiller1990 Mar 28, 2020
443a928
feat: use vue 3 compiler
lmiller1990 Mar 28, 2020
eb65c82
refactor: decouple tests from vue test utils
lmiller1990 Mar 28, 2020
2a43675
fix: update tests and bump deps
lmiller1990 Mar 28, 2020
8549590
refactor: tests
lmiller1990 Mar 28, 2020
13534c8
chore: bump deps
lmiller1990 Mar 28, 2020
5697ee0
chore: bump deps
lmiller1990 Mar 28, 2020
fc7cb1f
chore: refactor and bump deps
lmiller1990 Mar 28, 2020
c988dbb
refactor: update test runner
lmiller1990 Mar 28, 2020
7305926
refactor: code style
lmiller1990 Mar 28, 2020
6b47660
docs: update readme
lmiller1990 Mar 28, 2020
b287fed
fix: force es5 for TS
lmiller1990 Jul 2, 2020
4eb19bc
Merge pull request #250 from vuejs/lachlan/force-es5
lmiller1990 Jul 2, 2020
e0cbca7
chore: 5.0.0-alpha.1
lmiller1990 Jul 2, 2020
5e9a544
fix: use babel to transpile template code
lmiller1990 Jul 29, 2020
07f71a3
chore: update snapshots
lmiller1990 Jul 29, 2020
0da767d
chore: lint
lmiller1990 Jul 29, 2020
64e854f
fix: should require vue 3 as peer dependency
haoqunjiang Jul 30, 2020
8aef247
refactor!: support wider range of jest versions by making babel-jest …
haoqunjiang Jul 30, 2020
c5e69b2
Merge pull request #261 from sodatea/fix-vue-version
lmiller1990 Jul 30, 2020
d688d7d
Merge branch 'next' into refactor-jest-dependencies
lmiller1990 Jul 30, 2020
a0dfa5a
Merge pull request #260 from vuejs/transpile-template
lmiller1990 Aug 1, 2020
198b3cc
Merge pull request #262 from sodatea/refactor-jest-dependencies
lmiller1990 Aug 1, 2020
9de7917
chore: 5.0.0-alpha.2
lmiller1990 Aug 1, 2020
efdec06
fix: use ts compiler or babel depending on environment
lmiller1990 Aug 5, 2020
b7ab5d6
fix: update snapshots
lmiller1990 Aug 5, 2020
f88a719
Merge pull request #264 from vuejs/combine-ts-and-babel
lmiller1990 Aug 9, 2020
98c5d81
chore: update yarn.lock
lmiller1990 Aug 11, 2020
251ce2a
Add fallback for tsconfig api
nogic1008 Sep 11, 2020
6a48f76
fix: convert SourceMapGenerator to RawSourceMap
nogic1008 Sep 11, 2020
c0e8de1
fix: do not require projects to have typescript installed
JessicaSachs Sep 15, 2020
416c38e
Merge pull request #283 from vuejs/issue-282
JessicaSachs Sep 16, 2020
bb5be76
Merge pull request #276 from nogic1008/hotfix/transform-next
lmiller1990 Sep 17, 2020
26387ab
publish: 5.0.0-alpha.3
lmiller1990 Sep 18, 2020
560ee7c
wip: script setup
lmiller1990 Oct 5, 2020
73601c6
fix: fix tests
lmiller1990 Oct 6, 2020
1100fb2
fix: lint
lmiller1990 Oct 6, 2020
3172cfe
Merge pull request #290 from vuejs/feature/script-setu
lmiller1990 Oct 10, 2020
26deb2b
test: add test for SFC in script setup
lmiller1990 Oct 11, 2020
75aee31
publish: 5.0.0-alpha.5
lmiller1990 Oct 11, 2020
0672a80
Rewrite code generation using SourceMaps
jolting Nov 6, 2020
e7b913b
Fix source maps for <script setup>
jolting Nov 7, 2020
e0c4c6c
Fix external source filename
jolting Nov 7, 2020
5622ea6
Merge pull request #296 from jolting/next
lmiller1990 Nov 11, 2020
2f66ef4
added test
Stijn98s Nov 14, 2020
8b3ebd6
fix test
Stijn98s Nov 14, 2020
5775137
remove console log
Stijn98s Nov 15, 2020
3706e5d
Merge pull request #299 from Stijn98s/class-component-support
lmiller1990 Nov 15, 2020
4cb7698
fix: merge __vccOpts to support class component
lmiller1990 Nov 16, 2020
cbf37ea
refactor: remove unused code
lmiller1990 Nov 16, 2020
8f78919
tests: remove unused param
lmiller1990 Nov 16, 2020
64b0733
Merge pull request #300 from vuejs/fix/support-computed-properties-cl…
lmiller1990 Nov 16, 2020
7d05d15
publish: 5.0.0-alpha.6
lmiller1990 Nov 17, 2020
19804de
chore: bump to vue 3.0.3
lmiller1990 Nov 30, 2020
6048627
Merge pull request #305 from vuejs/bump-deps
lmiller1990 Dec 1, 2020
0aa9bdd
publish 5.0.0-alpha.7
lmiller1990 Dec 1, 2020
5af29e9
fix: do not require ts-jest and typescript
lmiller1990 Dec 7, 2020
a04949a
chore: update test project dependencies
lmiller1990 Dec 7, 2020
7a4da29
chore: update dependencies for babel project
lmiller1990 Dec 7, 2020
ace6aa7
chore: add typescript and ts-jest as dev and peer deps
lmiller1990 Dec 7, 2020
7c195c7
test: fix tests
lmiller1990 Dec 7, 2020
3823eb2
Merge pull request #307 from vuejs/remove-ts-dep
lmiller1990 Dec 7, 2020
4629f9d
add source map dependency
ZachJW34 Jan 17, 2021
28a76b2
chore: 5.0.0-alpha.8
lmiller1990 Jan 18, 2021
9c4eef1
Merge pull request #315 from ZachJW34/add-source-maps
lmiller1990 Feb 8, 2021
e2853d7
feat: add support for specific tsconfig file path inside of vue-jest …
xiaohulu Mar 29, 2021
acab463
ci: setup GitHub Actions to next branch (#326)
nogic1008 Mar 29, 2021
af80ab0
Fix coverage reports for typescript for vue3 (#331)
jolting Apr 6, 2021
76dfcad
fix: support for class component mixins (#334)
Evertvdw May 5, 2021
9cd1062
fix: process render function, exported as default (#335)
0x009922 May 9, 2021
d086ee5
publish: 5.0.0-alpha.9
lmiller1990 May 9, 2021
84c15ed
add css-module feature (#345)
YutamaKotaro May 31, 2021
68ea450
chore: publish alpha 10
lmiller1990 May 31, 2021
eeaf205
add less relative import (#349)
YutamaKotaro Jun 14, 2021
c590d2e
fix(deps): add missing devDependencies in e2e/ projects (for 5.x) (#358)
nogic1008 Jun 16, 2021
d993fd9
build: move library to /packages/vue3-jest
nogic1008 Jun 16, 2021
ae4561f
test: move e2e projects
nogic1008 Jun 16, 2021
f62f762
build: add package.json for monorepo
nogic1008 Jun 16, 2021
595d310
chore(deps): remove lint & e2e deps in vue3-jest
nogic1008 Jun 16, 2021
90f8503
test: rename e2e projects
nogic1008 Jun 16, 2021
b013c8f
chore(deps-dev): add vue-jest deps in e2e projects
nogic1008 Jun 16, 2021
3b35abe
build: change package name to vue3-jest
nogic1008 Jun 16, 2021
2dd8e6a
test: remove unused test runner
nogic1008 Jun 16, 2021
c42dc7d
build: support jest 26.x only
nogic1008 Jun 20, 2021
f10563a
Merge pull request #361 from nogic1008/build/monorepo-vue3
lmiller1990 Jun 21, 2021
e40cc7a
Merge branch 'master' into next
nogic1008 Jun 23, 2021
a75242e
chore(deps): nohoist vue package
nogic1008 Jun 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
key: node-10-dependencies-{{ checksum "package.json" }}

# run tests!
- run: npm run test
- run: yarn test
47 changes: 47 additions & 0 deletions e2e/3.x/babel-in-package/components/Basic.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<template>
<div class="hello">
<h1 :class="headingClasses">{{ msg }}</h1>
</div>
</template>

<style module="css">
.testA {
background-color: red;
}
</style>
<style module>
.testB {
background-color: blue;
}
</style>
<style>
.testC {
background-color: blue;
}
</style>

<script>
export default {
name: 'basic',
computed: {
headingClasses: function headingClasses() {
return {
red: this.isCrazy,
blue: !this.isCrazy,
shadow: this.isCrazy
}
}
},
data: function data() {
return {
msg: 'Welcome to Your Vue.js App',
isCrazy: false
}
},
methods: {
toggleClass: function toggleClass() {
this.isCrazy = !this.isCrazy
}
}
}
</script>
9 changes: 9 additions & 0 deletions e2e/3.x/babel-in-package/components/Coffee.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<h1>Coffee</h1>
</template>

<script lang="coffee">
export default
name: 'coffee'
data: -> {}
</script>
22 changes: 22 additions & 0 deletions e2e/3.x/babel-in-package/components/TypeScript.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<template>
<div>
<div id="parent">
{{ exclamationMarks }}
</div>
<type-script-child />
</div>
</template>

<script lang="ts">
import TypeScriptChild from './TypeScriptChild.vue'
export default {
computed: {
exclamationMarks(): string {
return 'Parent'
}
},
components: {
TypeScriptChild
}
}
</script>
13 changes: 13 additions & 0 deletions e2e/3.x/babel-in-package/components/TypeScriptChild.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<template>
<div id="child">{{ exclamationMarks }}</div>
</template>

<script lang="ts">
export default {
computed: {
exclamationMarks(): string {
return 'Child'
}
}
}
</script>
38 changes: 38 additions & 0 deletions e2e/3.x/babel-in-package/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "vue3-babel-in-package",
"version": "1.0.0",
"license": "MIT",
"private": true,
"scripts": {
"test": "jest --no-cache test.js"
},
"dependencies": {
"vue": "^3.0.3"
},
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"@vue/compiler-sfc": "^3.0.3",
"coffeescript": "^2.3.2",
"jest": "^26.0.0",
"ts-jest": "^26.4.4",
"typescript": "^4.1.2",
"vue3-jest": "^26.0.0-alpha.10"
},
"jest": {
"moduleFileExtensions": [
"js",
"json",
"vue"
],
"transform": {
"^.+\\.js$": "babel-jest",
"^.+\\.vue$": "vue3-jest"
}
},
"babel": {
"presets": [
"@babel/env"
]
}
}
36 changes: 36 additions & 0 deletions e2e/3.x/babel-in-package/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { createApp, h } from 'vue'

import TypeScript from './components/TypeScript.vue'
import Basic from './components/Basic.vue'
import Coffee from './components/Coffee.vue'

function mount(Component, props, slots) {
document.getElementsByTagName('html')[0].innerHTML = ''
const el = document.createElement('div')
el.id = 'app'
document.body.appendChild(el)
const Parent = {
render() {
return h(Component, props, slots)
}
}
createApp(Parent).mount(el)
}

test('processes .vue files', () => {
mount(Basic)
expect(document.querySelector('h1').textContent).toBe(
'Welcome to Your Vue.js App'
)
})

test('processes .vue file with lang set to coffee', () => {
mount(Coffee)
expect(document.querySelector('h1').textContent).toBe('Coffee')
})

test('processes .vue files with lang set to typescript', () => {
mount(TypeScript)
expect(document.querySelector('#parent').textContent).toBe('Parent')
expect(document.querySelector('#child').textContent).toBe('Child')
})
19 changes: 19 additions & 0 deletions e2e/3.x/babel-in-package/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "ES2017",
"lib": ["dom", "es6"],
"module": "ES2015",
"moduleResolution": "node",
"types": ["vue-typescript-import-dts", "node"],
"isolatedModules": false,
"experimentalDecorators": true,
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"suppressImplicitAnyIndexErrors": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true
}
}
91 changes: 91 additions & 0 deletions e2e/3.x/basic/__snapshots__/test.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`generates source maps for .vue files 1`] = `
"\\"use strict\\";

Object.defineProperty(exports, \\"__esModule\\", {
value: true
});
exports[\\"default\\"] = void 0;
var _default = {
name: 'basic',
computed: {
headingClasses: function headingClasses() {
return {
red: this.isCrazy,
blue: !this.isCrazy,
shadow: this.isCrazy
};
}
},
data: function data() {
return {
msg: 'Welcome to Your Vue.js App',
isCrazy: false
};
},
methods: {
toggleClass: function toggleClass() {
this.isCrazy = !this.isCrazy;
}
}
};
exports[\\"default\\"] = _default;
\\"use strict\\";
Object.defineProperty(exports, \\"__esModule\\", { value: true });
exports.render = void 0;
var vue_1 = require(\\"vue\\");
var _hoisted_1 = { class: \\"hello\\" };
function render(_ctx, _cache) {
return (vue_1.openBlock(), vue_1.createBlock(\\"div\\", _hoisted_1, [
vue_1.createVNode(\\"h1\\", { class: _ctx.headingClasses }, vue_1.toDisplayString(_ctx.msg), 3 /* TEXT, CLASS */)
]));
}
exports.render = render;
;exports.default = {...exports.default, render};;exports.default = {...exports.default, __cssModules: {\\"css\\":{\\"testA\\":\\"testA\\"},\\"$style\\":{\\"testB\\":\\"testB\\"}}}"
`;

exports[`generates source maps using src attributes 1`] = `
"\\"use strict\\";

Object.defineProperty(exports, \\"__esModule\\", {
value: true
});
exports[\\"default\\"] = void 0;
var _default = {
name: 'basic',
computed: {
headingClasses: function headingClasses() {
return {
red: this.isCrazy,
blue: !this.isCrazy,
shadow: this.isCrazy
};
}
},
data: function data() {
return {
msg: 'Welcome to Your Vue.js App',
isCrazy: false
};
},
methods: {
toggleClass: function toggleClass() {
this.isCrazy = !this.isCrazy;
}
}
};
exports[\\"default\\"] = _default;
\\"use strict\\";
Object.defineProperty(exports, \\"__esModule\\", { value: true });
exports.render = void 0;
var vue_1 = require(\\"vue\\");
var _hoisted_1 = { class: \\"hello\\" };
function render(_ctx, _cache) {
return (vue_1.openBlock(), vue_1.createBlock(\\"div\\", _hoisted_1, [
vue_1.createVNode(\\"h1\\", { class: _ctx.headingClasses }, vue_1.toDisplayString(_ctx.msg), 3 /* TEXT, CLASS */)
]));
}
exports.render = render;
;exports.default = {...exports.default, render};"
`;
4 changes: 4 additions & 0 deletions e2e/3.x/basic/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
presets: ['@babel/preset-env'],
plugins: ['transform-vue-jsx']
}
47 changes: 47 additions & 0 deletions e2e/3.x/basic/components/Basic.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<template>
<div class="hello">
<h1 :class="headingClasses">{{ msg }}</h1>
</div>
</template>

<style module="css">
.testA {
background-color: red;
}
</style>
<style module>
.testB {
background-color: blue;
}
</style>
<style>
.testC {
background-color: blue;
}
</style>

<script>
export default {
name: 'basic',
computed: {
headingClasses: function headingClasses() {
return {
red: this.isCrazy,
blue: !this.isCrazy,
shadow: this.isCrazy
}
}
},
data: function data() {
return {
msg: 'Welcome to Your Vue.js App',
isCrazy: false
}
},
methods: {
toggleClass: function toggleClass() {
this.isCrazy = !this.isCrazy
}
}
}
</script>
3 changes: 3 additions & 0 deletions e2e/3.x/basic/components/BasicSrc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="hello">
<h1 :class="headingClasses">{{ msg }}</h1>
</div>
23 changes: 23 additions & 0 deletions e2e/3.x/basic/components/BasicSrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export default {
name: 'basic',
computed: {
headingClasses: function headingClasses() {
return {
red: this.isCrazy,
blue: !this.isCrazy,
shadow: this.isCrazy
}
}
},
data: function data() {
return {
msg: 'Welcome to Your Vue.js App',
isCrazy: false
}
},
methods: {
toggleClass: function toggleClass() {
this.isCrazy = !this.isCrazy
}
}
}
3 changes: 3 additions & 0 deletions e2e/3.x/basic/components/BasicSrc.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template src="./BasicSrc.html"></template>

<script src="./BasicSrc.js"></script>
Loading