Skip to content

Commit 1df154e

Browse files
authored
chore(deps): ⬆️ upgrade deps (easy-temps#42)
* chore(deps): ⬆️ upgrade deps * chore: update tsconfig.json
1 parent 791c4cb commit 1df154e

27 files changed

+2623
-2122
lines changed

.eslintrc

Lines changed: 0 additions & 10 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,41 @@
11
{
2+
// Enable the ESlint flat config support
3+
"eslint.experimental.useFlatConfig": true,
4+
5+
// Disable the default formatter, use eslint instead
26
"prettier.enable": false,
37
"editor.formatOnSave": false,
8+
9+
// Auto fix
410
"editor.codeActionsOnSave": {
5-
"source.fixAll.eslint": true
6-
}
11+
"source.fixAll": "explicit",
12+
"source.organizeImports": "never"
13+
},
14+
15+
// Silent the stylistic rules in you IDE, but still auto fix them
16+
"eslint.rules.customizations": [
17+
{ "rule": "style/*", "severity": "off" },
18+
{ "rule": "*-indent", "severity": "off" },
19+
{ "rule": "*-spacing", "severity": "off" },
20+
{ "rule": "*-spaces", "severity": "off" },
21+
{ "rule": "*-order", "severity": "off" },
22+
{ "rule": "*-dangle", "severity": "off" },
23+
{ "rule": "*-newline", "severity": "off" },
24+
{ "rule": "*quotes", "severity": "off" },
25+
{ "rule": "*semi", "severity": "off" }
26+
],
27+
28+
// Enable eslint for all supported languages
29+
"eslint.validate": [
30+
"javascript",
31+
"javascriptreact",
32+
"typescript",
33+
"typescriptreact",
34+
"vue",
35+
"html",
36+
"markdown",
37+
"json",
38+
"jsonc",
39+
"yaml"
40+
]
741
}

auto-imports.d.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
// Generated by 'unplugin-auto-import'
1+
/* eslint-disable */
2+
/* prettier-ignore */
3+
// @ts-nocheck
4+
// noinspection JSUnusedGlobalSymbols
5+
// Generated by unplugin-auto-import
26
export {}
37
declare global {
48
const EffectScope: typeof import('vue')['EffectScope']
@@ -56,6 +60,7 @@ declare global {
5660
const toRaw: typeof import('vue')['toRaw']
5761
const toRef: typeof import('vue')['toRef']
5862
const toRefs: typeof import('vue')['toRefs']
63+
const toValue: typeof import('vue')['toValue']
5964
const triggerRef: typeof import('vue')['triggerRef']
6065
const unref: typeof import('vue')['unref']
6166
const useAttrs: typeof import('vue')['useAttrs']
@@ -72,3 +77,8 @@ declare global {
7277
const watchPostEffect: typeof import('vue')['watchPostEffect']
7378
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
7479
}
80+
// for type re-export
81+
declare global {
82+
// @ts-ignore
83+
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
84+
}

build/mock/createMockServer.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
const { join } = require('path')
2-
const url = require('url')
1+
/* eslint-disable node/prefer-global/process */
2+
const { join } = require('node:path')
3+
const url = require('node:url')
34
const chokidar = require('chokidar')
45
const signale = require('signale')
56
const { match } = require('path-to-regexp')
67
const { initMock, getMatchMock } = require('./getMockData')
78
const { winPath } = require('./utils')
89
const { configBabelRegister } = require('./registerBabel')
10+
911
let watcher
1012
function getPaths(cwd) {
1113
const winCwd = winPath(cwd)
@@ -95,7 +97,8 @@ module.exports = function (opts) {
9597
let queryParams = {}
9698

9799
if (req.url)
98-
// eslint-disable-next-line n/no-deprecated-api
100+
101+
// eslint-disable-next-line node/no-deprecated-api
99102
queryParams = url.parse(req.url, true)
100103

101104
const reqUrl = queryParams.pathname

build/mock/getMockData.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
const path = require('path')
1+
const path = require('node:path')
22
const glob = require('glob')
33
const { pathToRegexp } = require('path-to-regexp')
44
const signale = require('signale')
55
const { winPath } = require('./utils')
6+
67
let _mockconfig = {}
8+
// eslint-disable-next-line node/prefer-global/process
79
const cwd = process.cwd()
810
let mockList = []
911
// 获取mock文件列表

build/mock/registerBabel.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
const { join, isAbsolute } = require('path')
2-
const { existsSync } = require('fs')
1+
/* eslint-disable node/prefer-global/process */
2+
const { join, isAbsolute } = require('node:path')
3+
const { existsSync } = require('node:fs')
34
const { winPath } = require('./utils')
5+
46
let files = null
57

68
function initFiles(cwd) {

components.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// generated by unplugin-vue-components
2-
// We suggest you to commit this file into source control
1+
/* eslint-disable */
2+
/* prettier-ignore */
3+
// @ts-nocheck
4+
// Generated by unplugin-vue-components
35
// Read more: https://github.com/vuejs/core/pull/3399
4-
import '@vue/runtime-core'
5-
66
export {}
77

8-
declare module '@vue/runtime-core' {
8+
declare module 'vue' {
99
export interface GlobalComponents {
1010
Chart: typeof import('./src/components/chart/index.vue')['default']
1111
VanButton: typeof import('vant/es')['Button']

eslint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const antfu = require('@antfu/eslint-config').default
2+
3+
module.exports = antfu()

package.json

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -17,59 +17,59 @@
1717
},
1818
"dependencies": {
1919
"@vant/touch-emulator": "^1.4.0",
20-
"@vant/use": "^1.5.1",
21-
"axios": "^1.4.0",
22-
"echarts": "^5.4.2",
20+
"@vant/use": "^1.6.0",
21+
"axios": "^1.5.1",
22+
"echarts": "^5.4.3",
2323
"lodash-es": "^4.17.21",
2424
"nprogress": "^0.2.0",
25-
"pinia": "^2.1.3",
26-
"pinia-plugin-persistedstate": "^3.1.0",
25+
"pinia": "^2.1.7",
26+
"pinia-plugin-persistedstate": "^3.2.0",
2727
"resize-detector": "^0.3.0",
2828
"store": "^2.0.12",
29-
"vant": "^4.4.1",
29+
"vant": "^4.7.2",
3030
"vconsole": "^3.15.1",
31-
"vue": "^3.3.4",
32-
"vue-router": "^4.2.2",
31+
"vue": "^3.3.6",
32+
"vue-router": "^4.2.5",
3333
"vue-router-better-scroller": "^0.0.0"
3434
},
3535
"devDependencies": {
36-
"@antfu/eslint-config": "^0.33.1",
37-
"@babel/core": "^7.22.1",
38-
"@babel/preset-env": "^7.22.4",
39-
"@babel/preset-typescript": "^7.21.5",
40-
"@babel/register": "^7.21.0",
41-
"@types/lodash-es": "^4.17.7",
42-
"@types/node": "^18.16.16",
43-
"@types/nprogress": "^0.2.0",
44-
"@types/store": "^2.0.2",
45-
"@vitejs/plugin-legacy": "^3.0.2",
46-
"@vitejs/plugin-vue": "^4.2.3",
47-
"@vitejs/plugin-vue-jsx": "^3.0.1",
48-
"autoprefixer": "^10.4.14",
49-
"babel-plugin-module-resolver": "^4.1.0",
36+
"@antfu/eslint-config": "1.0.0-beta.28",
37+
"@babel/core": "^7.23.2",
38+
"@babel/preset-env": "^7.23.2",
39+
"@babel/preset-typescript": "^7.23.2",
40+
"@babel/register": "^7.22.15",
41+
"@types/lodash-es": "^4.17.10",
42+
"@types/node": "^20.8.7",
43+
"@types/nprogress": "^0.2.2",
44+
"@types/store": "^2.0.4",
45+
"@vitejs/plugin-legacy": "^4.1.1",
46+
"@vitejs/plugin-vue": "^4.4.0",
47+
"@vitejs/plugin-vue-jsx": "^3.0.2",
48+
"autoprefixer": "^10.4.16",
49+
"babel-plugin-module-resolver": "^5.0.0",
5050
"commitizen": "^4.3.0",
51-
"consola": "^2.15.3",
51+
"consola": "^3.2.3",
5252
"cross-env": "^7.0.3",
5353
"cz-emoji-chinese": "^0.3.1",
54-
"eslint": "^8.42.0",
54+
"eslint": "^8.52.0",
5555
"husky": "^8.0.3",
56-
"less": "^4.1.3",
56+
"less": "^4.2.0",
5757
"mockjs": "^1.1.0",
5858
"path-to-regexp": "^6.2.1",
59-
"plop": "^3.1.2",
60-
"postcss-mobile-forever": "^3.3.2",
61-
"rollup": "^3.24.0",
62-
"rollup-plugin-visualizer": "^5.9.0",
59+
"plop": "^4.0.0",
60+
"postcss-mobile-forever": "^4.0.0",
61+
"rollup": "^4.1.4",
62+
"rollup-plugin-visualizer": "^5.9.2",
6363
"signale": "^1.4.0",
6464
"slash2": "^2.0.0",
65-
"terser": "^5.17.7",
66-
"typescript": "^4.9.5",
67-
"unplugin-auto-import": "^0.12.2",
68-
"unplugin-vue-components": "^0.22.12",
69-
"vite": "^4.3.9",
70-
"vite-plugin-vconsole": "^1.3.1",
71-
"vitest": "^0.25.8",
72-
"vue-tsc": "^1.6.5"
65+
"terser": "^5.22.0",
66+
"typescript": "^5.2.2",
67+
"unplugin-auto-import": "^0.16.6",
68+
"unplugin-vue-components": "^0.25.2",
69+
"vite": "^4.5.0",
70+
"vite-plugin-vconsole": "^2.0.1",
71+
"vitest": "^0.34.6",
72+
"vue-tsc": "^1.8.19"
7373
},
7474
"pnpm": {
7575
"peerDependencyRules": {

plop-templates/component/prompt.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,30 @@ module.exports = {
77
name: 'name',
88
message: 'component name please',
99
validate: notEmpty('name'),
10-
},
11-
{
10+
}, {
1211
type: 'checkbox',
1312
name: 'blocks',
1413
message: 'Blocks:',
1514
choices: [{
1615
name: '<template>',
1716
value: 'template',
1817
checked: true,
19-
},
20-
{
18+
}, {
2119
name: '<script>',
2220
value: 'script',
2321
checked: true,
24-
},
25-
{
22+
}, {
2623
name: 'style',
2724
value: 'style',
2825
checked: true,
29-
},
30-
],
26+
}],
3127
validate(value) {
3228
if (!value.includes('script') && !value.includes('template'))
3329
return 'Components require at least a <script> or <template> tag.'
3430

3531
return true
3632
},
37-
},
38-
],
33+
}],
3934
actions: (data) => {
4035
const name = '{{properCase name}}'
4136
const actions = [{

plop-templates/view/prompt.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,30 @@ module.exports = {
77
name: 'name',
88
message: 'view name please',
99
validate: notEmpty('name'),
10-
},
11-
{
10+
}, {
1211
type: 'checkbox',
1312
name: 'blocks',
1413
message: 'Blocks:',
1514
choices: [{
1615
name: '<template>',
1716
value: 'template',
1817
checked: true,
19-
},
20-
{
18+
}, {
2119
name: '<script>',
2220
value: 'script',
2321
checked: true,
24-
},
25-
{
22+
}, {
2623
name: 'style',
2724
value: 'style',
2825
checked: true,
29-
},
30-
],
26+
}],
3127
validate(value) {
3228
if (!value.includes('script') && !value.includes('template'))
3329
return 'View require at least a <script> or <template> tag.'
3430

3531
return true
3632
},
37-
},
38-
],
33+
}],
3934
actions: (data) => {
4035
const name = '{{name}}'
4136
const actions = [{

plopfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const viewGenerator = require('./plop-templates/view/prompt')
22
const componentGenerator = require('./plop-templates/component/prompt')
3+
34
module.exports = function (plop) {
45
plop.setGenerator('view', viewGenerator)
56
plop.setGenerator('component', componentGenerator)

0 commit comments

Comments
 (0)