diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 273b4b3b8..000000000 --- a/.babelrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "presets": ["env", "stage-2", "flow-vue"], - "comments": false, - "env": { - "test": { - "plugins": ["istanbul"] - } - } -} diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..0f0bee0c4 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,76 @@ +version: 2 + +defaults: &defaults + working_directory: ~/repo/vue-test-utils + docker: + - image: vuejs/ci +restore_node_modules: &restore_node_modules + restore_cache: + name: Restore node_modules cache + keys: + - v1-dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }} +jobs: + install: + <<: *defaults + steps: + - checkout + - *restore_node_modules + - run: + name: remove vuepress from dependencies + command: sed -i '/vuepress/ d' package.json + - run: + name: yarn --version + command: yarn --version + - run: + name: yarn install + command: yarn install + - save_cache: + name: Save dependencies cache + key: v1-dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }} + paths: + - node_modules/ + - persist_to_workspace: + root: ~/repo + paths: + - vue-test-utils/ + bootstrap: + <<: *defaults + steps: + - attach_workspace: + at: ~/repo + - *restore_node_modules + - run: + name: yarn bootstrap + command: yarn bootstrap + build_test: + <<: *defaults + steps: + - attach_workspace: + at: ~/repo + - *restore_node_modules + - run: + name: yarn build:test + command: yarn build:test + test: + <<: *defaults + steps: + - attach_workspace: + at: ~/repo + - *restore_node_modules + - run: + name: yarn test + command: yarn test +workflows: + version: 2 + install-tests: + jobs: + - install + - bootstrap: + requires: + - install + - build_test: + requires: + - install + - test: + requires: + - install diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..884a2323e --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +**/dist/** diff --git a/.eslintrc b/.eslintrc index c8236b24d..3bfd1f67a 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,14 +2,31 @@ "globals": { "wrapper": true, "expect": true, - "Element": true + "Element": true, + "jest": true }, "root": true, "plugins": [ "flowtype" ], "extends": [ - "plugin:vue-libs/recommended", - "plugin:flowtype/recommended" - ] + "plugin:flowtype/recommended", + "plugin:vue-libs/recommended" + ], + "rules": { + "template-curly-spacing" : "off", + "for-direction": "off", + "getter-return": "off", + "no-debugger": 2, + "no-proto": 0, + "space-before-function-paren": 0, + "object-curly-spacing": 0, + "indent": 0 + }, + "parserOptions": { + "parser": "babel-eslint", + "ecmaFeatures": { + "legacyDecorators": true + } + } } diff --git a/.flowconfig b/.flowconfig index 1f8ce555f..fa4b44464 100644 --- a/.flowconfig +++ b/.flowconfig @@ -4,6 +4,3 @@ [libs] flow - -[options] -suppress_comment= \\(.\\|\n\\)*\\$FlowIgnore \ No newline at end of file diff --git a/.github/COMMIT_CONVENTIONS.md b/.github/COMMIT_CONVENTIONS.md new file mode 100644 index 000000000..db48dad77 --- /dev/null +++ b/.github/COMMIT_CONVENTIONS.md @@ -0,0 +1,91 @@ +## Git Commit Message Convention + +> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular). + +#### TL;DR: + +Messages must be matched by the following regex: + +```js +;/^(revert: )?(feat|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50}/ +``` + +#### Examples + +Appears under "Features" header, `Server Utils` subheader: + +``` +feat(server-utils): add 'props' option +``` + +Appears under "Bug Fixes" header, `Test Utils` subheader, with a link to issue #28: + +``` +fix(test-utils): handle events on blur + +close #28 +``` + +Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation: + +``` +perf(test-utils): improve vdom diffing by removing 'foo' option + +BREAKING CHANGE: The 'foo' option has been removed. +``` + +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. + +``` +revert: feat(server-utils): add 'comments' option + +This reverts commit 667ecc1654a317a13331b17617d973392f415f02. +``` + +### Full Message Format + +A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: + +``` +(): + + + +