Skip to content

Commit 39be102

Browse files
authored
Upgrade Vuepress, Flow, and misc (#1646)
* 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
1 parent 94ee38d commit 39be102

File tree

7 files changed

+2296
-3036
lines changed

7 files changed

+2296
-3036
lines changed

.flowconfig

-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@
44

55
[libs]
66
flow
7-
8-
[options]
9-
suppress_comment= \\(.\\|\n\\)*\\$FlowIgnore

babel.config.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ module.exports = api => {
2929
[
3030
'@babel/preset-env',
3131
{
32-
// currently, there are dependency resolution issues with older versions of vuepress. Once vuepress is upgraded, core-js can be moved to version 3
33-
corejs: 2,
32+
corejs: 3,
3433
useBuiltIns: 'entry'
3534
}
3635
],

docs/.vuepress/config.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ module.exports = {
2121
description: 'Библиотека для тестирования Vue-компонентов'
2222
}
2323
},
24-
serviceWorker: true,
24+
plugins: ['@vuepress/pwa'],
2525
head: [
2626
['link', { rel: 'icon', href: '/favicon.png' }],
2727
['link', { rel: 'stylesheet', href: '/vueschool.css' }]
2828
],
29-
theme: 'vue',
29+
theme: '@vuepress/vue',
3030
themeConfig: {
3131
algolia: {
3232
apiKey: 'ee1b8516c9e5a5be9b6c25684eafc42f',
@@ -143,10 +143,8 @@ module.exports = {
143143
}
144144
}
145145
},
146-
markdown: {
147-
config: md => {
148-
// use more markdown-it plugins!
149-
md.use(require('markdown-it-include'))
150-
}
146+
extendMarkdown: md => {
147+
// use more markdown-it plugins!
148+
md.use(require('markdown-it-include'))
151149
}
152150
}

package.json

+8-7
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
"test:types": "tsc -p packages/test-utils/types && tsc -p packages/server-test-utils/types"
2727
},
2828
"dependencies": {
29-
"chalk": "^2.4.2",
29+
"chalk": "^4.1.0",
3030
"conditional-specs": "^1.0.1",
3131
"conventional-changelog": "^3.1.12",
32-
"cross-env": "^5.0.0",
33-
"flow-bin": "^0.66.0",
32+
"cross-env": "^7.0.2",
33+
"flow-bin": "^0.131.0",
3434
"lerna": "^3.20.2",
3535
"markdown-it-include": "^1.0.0",
3636
"rollup": "1",
@@ -40,15 +40,16 @@
4040
"rollup-plugin-json": "4",
4141
"rollup-plugin-node-resolve": "5",
4242
"semver": "^6.3.0",
43-
"typescript": "3",
43+
"typescript": "^3.9.7",
4444
"vee-validate": "^2.1.3",
4545
"vue": "^2.6.11",
4646
"vue-class-component": "^7.2.3",
4747
"vue-router": "^3.0.1",
4848
"vue-server-renderer": "^2.6.11",
4949
"vue-template-compiler": "^2.6.11",
50-
"vuepress": "^0.14.8",
51-
"vuepress-theme-vue": "^1.0.3",
50+
"vuepress": "^1.5.2",
51+
"@vuepress/theme-vue": "^1.5.2",
52+
"@vuepress/plugin-pwa": "^1.5.2",
5253
"vuex": "^3.0.1"
5354
},
5455
"devDependencies": {
@@ -68,7 +69,7 @@
6869
"babel-jest": "^26.0.1",
6970
"babel-loader": "^8.1.0",
7071
"commitizen": "^4.0.3",
71-
"core-js": "2",
72+
"core-js": "^3.6.5",
7273
"css-loader": "^4.2.0",
7374
"cz-conventional-changelog": "^3.0.2",
7475
"eslint": "^7.6.0",

packages/shared/util.js

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ function hasOwnProperty(obj, prop) {
3939
}
4040

4141
export function keys<T: string>(obj: any): Array<T> {
42+
// $FlowIgnore
4243
return Object.keys(obj)
4344
}
4445

packages/test-utils/src/wrapper.js

+5
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,9 @@ export default class Wrapper implements BaseWrapper {
378378
let element = this.element
379379
while (element) {
380380
if (
381+
// $FlowIgnore
381382
element.hidden ||
383+
// $FlowIgnore
382384
(element.style &&
383385
(element.style.visibility === 'hidden' ||
384386
element.style.display === 'none'))
@@ -541,6 +543,7 @@ export default class Wrapper implements BaseWrapper {
541543
const event = getCheckedEvent()
542544

543545
if (tagName === 'INPUT' && type === 'checkbox') {
546+
// $FlowIgnore
544547
if (this.element.checked === checked) {
545548
return nextTick()
546549
}
@@ -559,6 +562,7 @@ export default class Wrapper implements BaseWrapper {
559562
)
560563
}
561564

565+
// $FlowIgnore
562566
if (this.element.checked === checked) {
563567
return nextTick()
564568
}
@@ -592,6 +596,7 @@ export default class Wrapper implements BaseWrapper {
592596
throwError(`wrapper.setSelected() cannot be called on this element`)
593597
}
594598

599+
// $FlowIgnore
595600
if (this.element.selected) {
596601
return nextTick()
597602
}

0 commit comments

Comments
 (0)