From 15a361241a92cd1775874a3efbb6530682a186f0 Mon Sep 17 00:00:00 2001 From: StEve Young <2747745470@qq.com> Date: Wed, 22 Jul 2020 10:25:28 +0800 Subject: [PATCH] fix: v0.5.1, close #28, update deps (#29) * build: close #28, update deps * test: attachToDocument -> attachTo * docs: release v0.5.1 * style: eslint fix --- .eslintrc.js | 4 +-- package.json | 59 ++++++++++++++++++++-------------------- test/.eslintrc.js | 2 +- test/DemoAndCode.test.js | 6 +++- 4 files changed, 37 insertions(+), 34 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index f6367fd..3883ebd 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,7 +4,7 @@ module.exports = { parser: 'babel-eslint', sourceType: 'module', ecmaFeatures: { - legacyDecorators: true + legacyDecorators: true, }, }, env: { @@ -19,7 +19,7 @@ module.exports = { ], plugins: ['vue'], rules: { - 'indent': [2, 4], + indent: [2, 4], 'promise/param-names': 0, 'comma-dangle': [2, 'always-multiline'], }, diff --git a/package.json b/package.json index 1dd27ca..365bc07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuepress-plugin-demo-code", - "version": "0.5.0", + "version": "0.5.1", "description": "📝 Demo and code plugin for vuepress", "main": "src/index.js", "files": [ @@ -27,46 +27,45 @@ }, "lint-staged": { "{src,test}/**/*.{js,vue}": [ - "eslint --fix", - "git add" + "eslint --fix" ] }, "dependencies": { - "codesandbox": "2.1.10", - "markdown-it-container": "^2.0.0", - "prismjs": "^1.17.1", - "vuepress-plugin-code-copy": "^1.0.4" + "codesandbox": "2.1.16", + "markdown-it-container": "^3.0.0", + "prismjs": "^1.20.0", + "vuepress-plugin-code-copy": "^1.0.6" }, "devDependencies": { - "@babel/core": "^7.7.2", - "@babel/preset-env": "^7.7.1", - "@commitlint/cli": "^8.2.0", - "@commitlint/config-conventional": "^8.2.0", - "@vue/test-utils": "^1.0.0-beta.29", - "all-contributors-cli": "^6.11.0", + "@babel/core": "^7.10.5", + "@babel/preset-env": "^7.10.4", + "@commitlint/cli": "^9.1.2", + "@commitlint/config-conventional": "^9.1.1", + "@vue/test-utils": "^1.0.3", + "all-contributors-cli": "^6.16.1", "babel-core": "^7.0.0-bridge.0", - "babel-eslint": "^10.0.3", - "codecov": "^3.6.1", - "cross-env": "^6.0.3", - "eslint": "^6.6.0", - "eslint-config-standard": "^14.1.0", + "babel-eslint": "^10.1.0", + "codecov": "^3.7.1", + "cross-env": "^7.0.2", + "eslint": "^7.5.0", + "eslint-config-standard": "^14.1.1", "eslint-config-vue": "^2.0.2", - "eslint-plugin-import": "^2.18.2", - "eslint-plugin-node": "^10.0.0", + "eslint-plugin-import": "^2.22.0", + "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.1", - "eslint-plugin-vue": "^6.0.1", - "gh-pages": "^2.1.1", - "husky": "^3.1.0", - "jest": "^24.9.0", + "eslint-plugin-vue": "^6.2.2", + "gh-pages": "^3.1.0", + "husky": "^4.2.5", + "jest": "^26.1.0", "jest-serializer-vue": "^2.0.2", "jest-transform-stub": "^2.0.0", - "lint-staged": "^9.4.3", - "markdown-it-include": "^1.1.0", - "rimraf": "^3.0.0", - "vue-jest": "^3.0.5", - "vuepress": "^1.2.0", - "vuepress-plugin-smooth-scroll": "^0.0.7" + "lint-staged": "^10.2.11", + "markdown-it-include": "^1.1.1", + "rimraf": "^3.0.2", + "vue-jest": "^3.0.6", + "vuepress": "^1.5.2", + "vuepress-plugin-smooth-scroll": "^0.0.9" }, "keywords": [ "vue", diff --git a/test/.eslintrc.js b/test/.eslintrc.js index 64a76a5..4f73eaa 100644 --- a/test/.eslintrc.js +++ b/test/.eslintrc.js @@ -1,3 +1,3 @@ module.exports = { - env: { jest: true } + env: { jest: true }, } diff --git a/test/DemoAndCode.test.js b/test/DemoAndCode.test.js index ea11f87..8415400 100644 --- a/test/DemoAndCode.test.js +++ b/test/DemoAndCode.test.js @@ -7,8 +7,12 @@ describe('DemoAndCode', () => { let wrapper beforeEach(() => { + const div = document.createElement('div') + div.id = 'root' + document.body.appendChild(div) + wrapper = shallowMount(DemoAndCode, { - attachToDocument: true, + attachTo: '#root', }) })