Skip to content

Commit a4ca2a1

Browse files
committed
chore: merge in dev
2 parents 726262c + 4378963 commit a4ca2a1

File tree

144 files changed

+30445
-12889
lines changed

Some content is hidden

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

144 files changed

+30445
-12889
lines changed

Diff for: .circleci/config.yml

+3-63
Original file line numberDiff line numberDiff line change
@@ -60,48 +60,13 @@ jobs:
6060
- run:
6161
name: yarn test
6262
command: yarn test
63-
test_version_2.0.8:
63+
test_compat:
6464
<<: *defaults
6565
steps:
6666
- attach_workspace:
6767
at: ~/repo
6868
- *restore_node_modules
69-
- run: yarn test:compat "2.0.8"
70-
test_version_2.1.10:
71-
<<: *defaults
72-
steps:
73-
- attach_workspace:
74-
at: ~/repo
75-
- *restore_node_modules
76-
- run: yarn test:compat "2.1.10"
77-
test_version_2.2.6:
78-
<<: *defaults
79-
steps:
80-
- attach_workspace:
81-
at: ~/repo
82-
- *restore_node_modules
83-
- run: yarn test:compat "2.2.6"
84-
test_version_2.3.4:
85-
<<: *defaults
86-
steps:
87-
- attach_workspace:
88-
at: ~/repo
89-
- *restore_node_modules
90-
- run: yarn test:compat "2.3.4"
91-
test_version_2.4.2:
92-
<<: *defaults
93-
steps:
94-
- attach_workspace:
95-
at: ~/repo
96-
- *restore_node_modules
97-
- run: yarn test:compat "2.4.2"
98-
test_version_2.5.13:
99-
<<: *defaults
100-
steps:
101-
- attach_workspace:
102-
at: ~/repo
103-
- *restore_node_modules
104-
- run: yarn test:compat "2.5.16"
69+
- run: yarn test:compat
10570
workflows:
10671
version: 2
10772
install-tests:
@@ -116,32 +81,7 @@ workflows:
11681
- test:
11782
requires:
11883
- install
119-
- test_version_2.0.8:
120-
requires:
121-
- install
122-
- build_test
123-
- test
124-
- test_version_2.1.10:
125-
requires:
126-
- install
127-
- build_test
128-
- test
129-
- test_version_2.2.6:
130-
requires:
131-
- install
132-
- build_test
133-
- test
134-
- test_version_2.3.4:
135-
requires:
136-
- install
137-
- build_test
138-
- test
139-
- test_version_2.4.2:
140-
requires:
141-
- install
142-
- build_test
143-
- test
144-
- test_version_2.5.13:
84+
- test_compat:
14585
requires:
14686
- install
14787
- build_test

Diff for: .github/COMMIT_CONVENTIONS.md

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
## Git Commit Message Convention
2+
3+
> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular).
4+
5+
#### TL;DR:
6+
7+
Messages must be matched by the following regex:
8+
9+
```js
10+
;/^(revert: )?(feat|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50}/
11+
```
12+
13+
#### Examples
14+
15+
Appears under "Features" header, `Server Utils` subheader:
16+
17+
```
18+
feat(server-utils): add 'props' option
19+
```
20+
21+
Appears under "Bug Fixes" header, `Test Utils` subheader, with a link to issue #28:
22+
23+
```
24+
fix(test-utils): handle events on blur
25+
26+
close #28
27+
```
28+
29+
Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation:
30+
31+
```
32+
perf(test-utils): improve vdom diffing by removing 'foo' option
33+
34+
BREAKING CHANGE: The 'foo' option has been removed.
35+
```
36+
37+
The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header.
38+
39+
```
40+
revert: feat(server-utils): add 'comments' option
41+
42+
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
43+
```
44+
45+
### Full Message Format
46+
47+
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
48+
49+
```
50+
<type>(<scope>): <subject>
51+
<BLANK LINE>
52+
<body>
53+
<BLANK LINE>
54+
<footer>
55+
```
56+
57+
The **header** is mandatory and the **scope** of the header is optional.
58+
59+
### Revert
60+
61+
If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
62+
63+
### Type
64+
65+
If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However, if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog.
66+
67+
Other prefixes are up to your discretion. Suggested prefixes are `docs`, `chore`, `style`, `refactor`, and `test` for non-changelog related tasks.
68+
69+
### Scope
70+
71+
The scope could be anything specifying the place of the commit change. For example `core`, `compiler`, `ssr`, `v-model`, `transition` etc...
72+
73+
### Subject
74+
75+
The subject contains a succinct description of the change:
76+
77+
- use the imperative, present tense: "change" not "changed" nor "changes"
78+
- don't capitalize the first letter
79+
- no dot (.) at the end
80+
81+
### Body
82+
83+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
84+
The body should include the motivation for the change and contrast this with previous behavior.
85+
86+
### Footer
87+
88+
The footer should contain any information about **Breaking Changes** and is also the place to
89+
reference GitHub issues that this commit **Closes**.
90+
91+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

Diff for: .github/CONTRIBUTING.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Hi! I’m really excited that you are interested in contributing to Vue Test Uti
55
- [Code of Conduct](https://github.com/vuejs/vue/blob/dev/.github/CODE_OF_CONDUCT.md)
66
- [Issue Reporting Guidelines](#issue-reporting-guidelines)
77
- [Pull Request Guidelines](#pull-request-guidelines)
8+
- [Committing Changes](#committing-changes)
89
- [Development Setup](#development-setup)
910
- [Project Structure](#project-structure)
1011

@@ -22,7 +23,7 @@ Hi! I’m really excited that you are interested in contributing to Vue Test Uti
2223

2324
- It's OK to have multiple small commits as you work on the PR - we will let GitHub automatically squash it before merging.
2425

25-
- Make sure `npm test` passes. (see [development setup](#development-setup))
26+
- Make sure `yarn test` passes. (see [development setup](#development-setup))
2627

2728
- If adding new feature:
2829

@@ -34,32 +35,33 @@ Hi! I’m really excited that you are interested in contributing to Vue Test Uti
3435
- Provide detailed description of the bug in the PR. Live demo preferred.
3536
- Add appropriate test coverage if applicable.
3637

38+
### Committing Changes
39+
40+
Commit messages should follow the [commit message convention](./COMMIT_CONVENTION.md) so that changelogs can be automatically generated. Commit messages will be automatically validated upon commit. If you are not familiar with the commit message convention, you can use `npm run commit` or `yarn commit` instead of `git commit`, which provides an interactive CLI for generating proper commit messages.
41+
3742
## Development Setup
3843

3944
You will need [Node.js](http://nodejs.org) **version 6+**
4045

41-
Vue Test Utils is a monorepo. It contains a root package.json for running scripts across the project. The code is inside separate packages in the `packages` directory. The project uses [lerna](https://lerna.js.org/) to manage the workspaces.
46+
Vue Test Utils is a monorepo. It contains a root `package.json` for running scripts across the project. The code is inside separate packages in the `packages` directory. The project uses [lerna](https://lerna.js.org/) to manage the workspaces and should be run using [yarn](https://yarnpkg.com/lang/en/).
4247

4348
After cloning the repo, run:
4449

4550
```bash
4651
$ yarn
4752
```
4853

49-
Or with npm:
50-
51-
```bash
52-
npm i && npm run bootstrap
53-
```
54-
5554
### Commonly used NPM scripts
5655

5756
```bash
5857
# run unit tests with mocha-webpack
59-
$ npm run test:unit
58+
$ yarn test:unit
6059

6160
# run the full test suite, include linting / type checking
62-
$ npm test
61+
$ yarn test
62+
63+
# run tests against src files only. Allows inline debugging.
64+
$ yarn test:unit:only:dev
6365
```
6466

6567
There are some other scripts available in the `scripts` section of the `package.json` file.

Diff for: .nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v10

Diff for: .vscode/settings.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"javascript.validate.enable": false,
3+
"flow.pathToFlow": "${workspaceFolder}/node_modules/.bin/flow"
4+
}

Diff for: CHANGELOG.md

+39
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,45 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
<a name="1.0.0-beta.30"></a>
7+
# [1.0.0-beta.30](https://github.com/vuejs/vue-test-utils/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2019-11-28)
8+
9+
10+
### Bug Fixes
11+
12+
* **types:** allow `false` as a component stub value ([#1231](https://github.com/vuejs/vue-test-utils/issues/1231)) ([2a4c6ef](https://github.com/vuejs/vue-test-utils/commit/2a4c6ef))
13+
* add $set scoped slot helper ([#1287](https://github.com/vuejs/vue-test-utils/issues/1287)) ([a9eea7b](https://github.com/vuejs/vue-test-utils/commit/a9eea7b)), closes [#1253](https://github.com/vuejs/vue-test-utils/issues/1253)
14+
* polyfill Element.matches for IE < 11 ([#1230](https://github.com/vuejs/vue-test-utils/issues/1230)) ([5e04331](https://github.com/vuejs/vue-test-utils/commit/5e04331)), closes [#1223](https://github.com/vuejs/vue-test-utils/issues/1223)
15+
* respect "hidden" attributes in isVisible() ([#1257](https://github.com/vuejs/vue-test-utils/issues/1257)) ([950763f](https://github.com/vuejs/vue-test-utils/commit/950763f))
16+
* return promise from render and renderToString ([#1164](https://github.com/vuejs/vue-test-utils/issues/1164)) ([3c597d3](https://github.com/vuejs/vue-test-utils/commit/3c597d3))
17+
* stub model option ([#1166](https://github.com/vuejs/vue-test-utils/issues/1166)) ([f81695b](https://github.com/vuejs/vue-test-utils/commit/f81695b))
18+
* typo. ([#1312](https://github.com/vuejs/vue-test-utils/issues/1312)) ([90b2af7](https://github.com/vuejs/vue-test-utils/commit/90b2af7))
19+
20+
21+
### Code Refactoring
22+
23+
* remove sync mode ([#1141](https://github.com/vuejs/vue-test-utils/issues/1141)) ([ef613de](https://github.com/vuejs/vue-test-utils/commit/ef613de))
24+
25+
26+
### Features
27+
28+
* add correct render type ([#1143](https://github.com/vuejs/vue-test-utils/issues/1143)) ([8a9757c](https://github.com/vuejs/vue-test-utils/commit/8a9757c))
29+
* **wrapper:** allow destroy() method to work with functional components ([#1188](https://github.com/vuejs/vue-test-utils/issues/1188)) ([f4ea3fd](https://github.com/vuejs/vue-test-utils/commit/f4ea3fd))
30+
* add option to pretty print html components ([#1229](https://github.com/vuejs/vue-test-utils/issues/1229)) ([99336c4](https://github.com/vuejs/vue-test-utils/commit/99336c4))
31+
* stop auto stubbing transition and transition-group ([#1127](https://github.com/vuejs/vue-test-utils/issues/1127)) ([85a972c](https://github.com/vuejs/vue-test-utils/commit/85a972c))
32+
33+
34+
### BREAKING CHANGES
35+
36+
* html output will now be formatted
37+
* render and renderToString are now async
38+
* * Remove `sync` mode
39+
* Remove TransitionStub
40+
* Remove Transition
41+
42+
43+
44+
645
<a name="1.0.0-beta.29"></a>
746
# [1.0.0-beta.29](https://github.com/vuejs/vue-test-utils/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2019-02-02)
847

Diff for: docs/.vuepress/config.js

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ module.exports = {
2222
}
2323
},
2424
serviceWorker: true,
25+
head: [['link', { rel: 'icon', href: '/favicon.png' }]],
2526
theme: 'vue',
2627
themeConfig: {
2728
algolia: {

Diff for: docs/.vuepress/public/favicon.png

3.37 KB
Loading

Diff for: docs/README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ Vue Test Utils is the official unit testing utility library for Vue.js.
1010
- [Testing Single-File Components with Jest](guides/testing-single-file-components-with-jest.md)
1111
- [Testing Single-File Components with Mocha + webpack](guides/testing-single-file-components-with-mocha-webpack.md)
1212
- [Testing Single-File Components with Karma](guides/testing-single-file-components-with-karma.md)
13+
- [Testing in Node.js Without a Build Step](guides/usage-without-a-build-step-node.md)
1314
- [Testing Asynchronous Behavior](guides/testing-async-components.md)
1415
- [Using with TypeScript](guides/using-with-typescript.md)
1516
- [Using with Vue Router](guides/using-with-vue-router.md)
1617
- [Using with Vuex](guides/using-with-vuex.md)
18+
- [Useful Libraries for Testing](guides/useful-libraries-for-testing.md)
1719
- [API](api/)
1820
- [mount](api/mount.md)
1921
- [shallowMount](api/shallowMount.md)
@@ -32,7 +34,6 @@ Vue Test Utils is the official unit testing utility library for Vue.js.
3234
- [listeners](api/options.md#listeners)
3335
- [parentComponent](api/options.md#parentComponent)
3436
- [provide](api/options.md#provide)
35-
- [sync](api/options.md#sync)
3637
- [other options](api/options.md#other-options)
3738
- [Wrapper](api/wrapper/)
3839
- [attributes](api/wrapper/attributes.md)
@@ -77,8 +78,6 @@ Vue Test Utils is the official unit testing utility library for Vue.js.
7778
- [trigger](api/wrapper-array/trigger.md)
7879
- [isVisible](api/wrapper-array/isVisible.md)
7980
- [components](api/components/)
80-
- [TransitionStub](api/components/TransitionStub.md)
81-
- [TransitionGroupStub](api/components/TransitionGroupStub.md)
8281
- [RouterLinkStub](api/components/RouterLinkStub.md)
8382
- [Selectors](api/selectors.md)
8483
- [createWrapper](api/createWrapper.md)

Diff for: docs/api/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
!!!include(docs/api/createLocalVue.md)!!!
99
!!!include(docs/api/createWrapper.md)!!!
1010
!!!include(docs/api/config.md)!!!
11+
!!!include(docs/api/enableAutoDestroy.md)!!!

Diff for: docs/api/components/README.md

-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,3 @@
33
Vue Test Utils includes utility components you can use to stub components.
44

55
!!!include(docs/api/components/RouterLinkStub.md)!!!
6-
!!!include(docs/api/components/TransitionStub.md)!!!
7-
!!!include(docs/api/components/TransitionGroupStub.md)!!!

Diff for: docs/api/components/TransitionGroupStub.md

-31
This file was deleted.

0 commit comments

Comments
 (0)