Skip to content

Commit

Permalink
Upgrade Vuepress, Flow, and misc (#1646)
Browse files Browse the repository at this point in the history
* improvement(vuepress): upgrade VuePress to version 1.x

Upgrade vuepress docs server to 1.x to gain recent features and bugfixes

* improvement(corejs): upgrade core-js to version 3.x

Upgrade core-js to version 3.x to gain new featurs and bugfixes. Version 2.x is no longer
maintained.

* chore(chalk): upgrade Chalk

Upgrade Chalk to latest major release

* build(flow): upgrade flow from 66 to 133

Removed suppress comment option as it is removed from flow 133. $FlowIgnore is now a supported
suppressed comment. See https://flow.org/en/docs/config/options/#toc-suppress-comment-regex for more
details.

* refactor(typescript): pin Typescript to ^3.9.7

* chore(cross-env): upgrade cross-env to v 7.x

Major change includes environment deprecations, which drops support for Node < 10.x
  • Loading branch information
AtofStryker committed Aug 17, 2020
1 parent 94ee38d commit 39be102
Show file tree
Hide file tree
Showing 7 changed files with 2,296 additions and 3,036 deletions.
3 changes: 0 additions & 3 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@

[libs]
flow

[options]
suppress_comment= \\(.\\|\n\\)*\\$FlowIgnore
3 changes: 1 addition & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 39be102

Please sign in to comment.