Skip to content
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

Upgrade Vuepress, Flow, and misc #1646

Merged
merged 6 commits into from
Aug 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions .flowconfig
Expand Up @@ -4,6 +4,3 @@

[libs]
flow

[options]
suppress_comment= \\(.\\|\n\\)*\\$FlowIgnore
3 changes: 1 addition & 2 deletions babel.config.js
Expand Up @@ -29,8 +29,7 @@ module.exports = api => {
[
'@babel/preset-env',
{
// currently, there are dependency resolution issues with older versions of vuepress. Once vuepress is upgraded, core-js can be moved to version 3
corejs: 2,
corejs: 3,
useBuiltIns: 'entry'
}
],
Expand Down
12 changes: 5 additions & 7 deletions docs/.vuepress/config.js
Expand Up @@ -21,12 +21,12 @@ module.exports = {
description: 'Библиотека для тестирования Vue-компонентов'
}
},
serviceWorker: true,
plugins: ['@vuepress/pwa'],
head: [
['link', { rel: 'icon', href: '/favicon.png' }],
['link', { rel: 'stylesheet', href: '/vueschool.css' }]
],
theme: 'vue',
theme: '@vuepress/vue',
themeConfig: {
algolia: {
apiKey: 'ee1b8516c9e5a5be9b6c25684eafc42f',
Expand Down Expand Up @@ -143,10 +143,8 @@ module.exports = {
}
}
},
markdown: {
config: md => {
// use more markdown-it plugins!
md.use(require('markdown-it-include'))
}
extendMarkdown: md => {
// use more markdown-it plugins!
md.use(require('markdown-it-include'))
}
}
15 changes: 8 additions & 7 deletions package.json
Expand Up @@ -26,11 +26,11 @@
"test:types": "tsc -p packages/test-utils/types && tsc -p packages/server-test-utils/types"
},
"dependencies": {
"chalk": "^2.4.2",
"chalk": "^4.1.0",
"conditional-specs": "^1.0.1",
"conventional-changelog": "^3.1.12",
"cross-env": "^5.0.0",
"flow-bin": "^0.66.0",
"cross-env": "^7.0.2",
"flow-bin": "^0.131.0",
"lerna": "^3.20.2",
"markdown-it-include": "^1.0.0",
"rollup": "1",
Expand All @@ -40,15 +40,16 @@
"rollup-plugin-json": "4",
"rollup-plugin-node-resolve": "5",
"semver": "^6.3.0",
"typescript": "3",
"typescript": "^3.9.7",
"vee-validate": "^2.1.3",
"vue": "^2.6.11",
"vue-class-component": "^7.2.3",
"vue-router": "^3.0.1",
"vue-server-renderer": "^2.6.11",
"vue-template-compiler": "^2.6.11",
"vuepress": "^0.14.8",
"vuepress-theme-vue": "^1.0.3",
"vuepress": "^1.5.2",
"@vuepress/theme-vue": "^1.5.2",
"@vuepress/plugin-pwa": "^1.5.2",
"vuex": "^3.0.1"
},
"devDependencies": {
Expand All @@ -68,7 +69,7 @@
"babel-jest": "^26.0.1",
"babel-loader": "^8.1.0",
"commitizen": "^4.0.3",
"core-js": "2",
"core-js": "^3.6.5",
"css-loader": "^4.2.0",
"cz-conventional-changelog": "^3.0.2",
"eslint": "^7.6.0",
Expand Down
1 change: 1 addition & 0 deletions packages/shared/util.js
Expand Up @@ -39,6 +39,7 @@ function hasOwnProperty(obj, prop) {
}

export function keys<T: string>(obj: any): Array<T> {
// $FlowIgnore
return Object.keys(obj)
}

Expand Down
5 changes: 5 additions & 0 deletions packages/test-utils/src/wrapper.js
Expand Up @@ -378,7 +378,9 @@ export default class Wrapper implements BaseWrapper {
let element = this.element
while (element) {
if (
// $FlowIgnore
element.hidden ||
// $FlowIgnore
(element.style &&
(element.style.visibility === 'hidden' ||
element.style.display === 'none'))
Expand Down Expand Up @@ -541,6 +543,7 @@ export default class Wrapper implements BaseWrapper {
const event = getCheckedEvent()

if (tagName === 'INPUT' && type === 'checkbox') {
// $FlowIgnore
if (this.element.checked === checked) {
return nextTick()
}
Expand All @@ -559,6 +562,7 @@ export default class Wrapper implements BaseWrapper {
)
}

// $FlowIgnore
if (this.element.checked === checked) {
return nextTick()
}
Expand Down Expand Up @@ -592,6 +596,7 @@ export default class Wrapper implements BaseWrapper {
throwError(`wrapper.setSelected() cannot be called on this element`)
}

// $FlowIgnore
if (this.element.selected) {
return nextTick()
}
Expand Down