Skip to content

Commit

Permalink
build: update dependencies (vexip-ui#441)
Browse files Browse the repository at this point in the history
* build: update dependencies

* style: lint code

* chore: update gulp config
  • Loading branch information
qmhc authored Dec 5, 2023
1 parent 311d358 commit 46afe5d
Show file tree
Hide file tree
Showing 87 changed files with 3,004 additions and 2,146 deletions.
21 changes: 13 additions & 8 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
function readPackage(pkg) {
if (pkg.dependencies.fsevents && pkg.dependencies.fsevents.match(/[\^~]?1./)) {
pkg.dependencies.fsevents = '^2.3.2'
} else if (pkg.dependencies.chokidar && pkg.dependencies.chokidar.match(/[\^~]?2./)) {
pkg.dependencies.chokidar = '^3.5.3'
} else if (pkg.dependencies.micromatch && pkg.dependencies.micromatch.match(/[\^~]?3./)) {
pkg.dependencies.micromatch = '^4.0.5'
} else if (pkg.dependencies.uuid && pkg.dependencies.uuid.match(/[\^~]?3./)) {
pkg.dependencies.uuid = '^7.0.3'
/** @type Record<string, string> */
const deps = pkg.dependencies

if (deps.fsevents && deps.fsevents.match(/[\^~]?1./)) {
deps.fsevents = '^2.3.2'
} else if (deps.chokidar && deps.chokidar.match(/[\^~]?2./)) {
deps.chokidar = '^3.5.3'
} else if (deps.micromatch && deps.micromatch.match(/[\^~]?3./)) {
deps.micromatch = '^4.0.5'
} else if (deps.uuid && deps.uuid.match(/[\^~]?3./)) {
deps.uuid = '^7.0.3'
} else if (deps.loupe && deps.loupe.match(/[\^~]?2\.3\.[0-6]/)) {
deps.loupe = '^2.3.7'
}

return pkg
Expand Down
4 changes: 2 additions & 2 deletions common/bem-helper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"types": "dist/index.d.ts",
"exports": {
".": {
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
"require": "./dist/index.cjs"
}
},
"private": false,
Expand Down
2 changes: 1 addition & 1 deletion common/bem-helper/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "esnext",
"allowJs": false,
"strict": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"skipLibCheck": true,
"noUnusedLocals": true,
"experimentalDecorators": true,
Expand Down
2 changes: 1 addition & 1 deletion common/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@vexip-ui/utils": "workspace:*"
},
"devDependencies": {
"vue": "^3.3.4"
"vue": "^3.3.10"
},
"peerDependencies": {
"vue": "^3.2.25"
Expand Down
2 changes: 1 addition & 1 deletion common/config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "esnext",
"allowJs": false,
"strict": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"skipLibCheck": true,
"noUnusedLocals": true,
"experimentalDecorators": true,
Expand Down
8 changes: 4 additions & 4 deletions common/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
"import": "./dist/index.mjs"
}
},
"private": false,
Expand All @@ -31,12 +31,12 @@
"directory": "common/hooks"
},
"dependencies": {
"@floating-ui/dom": "^1.5.1",
"@floating-ui/dom": "^1.5.3",
"@juggle/resize-observer": "^3.4.0",
"@vexip-ui/utils": "workspace:*"
},
"devDependencies": {
"vue": "^3.3.4"
"vue": "^3.3.10"
},
"peerDependencies": {
"vue": "^3.2.25"
Expand Down
2 changes: 1 addition & 1 deletion common/hooks/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "esnext",
"allowJs": false,
"strict": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"skipLibCheck": true,
"noUnusedLocals": true,
"experimentalDecorators": true,
Expand Down
24 changes: 15 additions & 9 deletions common/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@
],
"exports": {
".": {
"types": "./types/index.d.ts",
"require": "./lib/index.js",
"import": "./es/index.mjs",
"types": "./types/index.d.ts"
"import": "./es/index.mjs"
},
"./es": {
"types": "./types/index.d.ts",
"import": "./es/index.mjs"
},
"./lib": {
"types": "./types/index.d.ts",
"require": "./lib/index.js"
},
"./es": "./es/index.mjs",
"./lib": "./lib/index.js",
"./es/*.mjs": "./es/*.mjs",
"./es/*": "./es/*.mjs",
"./lib/*.js": "./lib/*.js",
Expand All @@ -42,13 +48,13 @@
"directory": "common/icons"
},
"devDependencies": {
"@types/node": "^20.8.4",
"@types/node": "^20.10.3",
"execa": "^8.0.1",
"fast-glob": "^3.3.1",
"fs-extra": "^11.1.1",
"fast-glob": "^3.3.2",
"fs-extra": "^11.2.0",
"kolorist": "^1.8.0",
"prettier": "^3.0.3",
"vue": "^3.3.4"
"prettier": "^3.1.0",
"vue": "^3.3.10"
},
"peerDependencies": {
"vue": "^3.2.25"
Expand Down
2 changes: 1 addition & 1 deletion common/icons/scripts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "esnext",
"allowJs": false,
"strict": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"noUnusedLocals": true,
"resolveJsonModule": true,
"esModuleInterop": true,
Expand Down
2 changes: 1 addition & 1 deletion common/icons/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "esnext",
"allowJs": false,
"strict": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"skipLibCheck": true,
"noUnusedLocals": true,
"experimentalDecorators": true,
Expand Down
4 changes: 2 additions & 2 deletions common/icons/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { readFileSync } from 'node:fs'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

import type { LogLevel } from 'vite'
import type { LogLevel, UserConfig } from 'vite'

const logLevel = process.env.LOG_LEVEL

Expand All @@ -16,7 +16,7 @@ const externalPkgs = ['@vue'].concat(
)
const external = (id: string) => externalPkgs.some(p => p === id || id.startsWith(`${p}/`))

export default defineConfig(async () => {
export default defineConfig(async (): Promise<UserConfig> => {
return {
logLevel: (logLevel || 'info') as LogLevel,
build: {
Expand Down
2 changes: 1 addition & 1 deletion common/meta/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "esnext",
"allowJs": false,
"strict": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"skipLibCheck": true,
"noUnusedLocals": true,
"experimentalDecorators": true,
Expand Down
10 changes: 5 additions & 5 deletions common/plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
"import": "./dist/index.js"
}
},
"private": false,
Expand All @@ -33,8 +33,8 @@
"local-pkg": "^0.5.0"
},
"devDependencies": {
"@types/node": "^20.4.1",
"tsup": "^7.2.0",
"unplugin-vue-components": "^0.25.2"
"@types/node": "^20.10.3",
"tsup": "^8.0.1",
"unplugin-vue-components": "^0.26.0"
}
}
2 changes: 1 addition & 1 deletion common/plugins/scripts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "esnext",
"allowJs": false,
"strict": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"noUnusedLocals": true,
"resolveJsonModule": true,
"esModuleInterop": true,
Expand Down
2 changes: 1 addition & 1 deletion common/plugins/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "esnext",
"allowJs": false,
"strict": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"skipLibCheck": true,
"noUnusedLocals": true,
"experimentalDecorators": true,
Expand Down
16 changes: 8 additions & 8 deletions common/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
"import": "./dist/index.js"
}
},
"private": false,
Expand All @@ -46,11 +46,11 @@
},
"devDependencies": {
"@pnpm/types": "^9.4.0",
"@types/minimist": "^1.2.3",
"@types/node": "^20.8.4",
"@types/prompts": "^2.4.6",
"@types/semver": "^7.5.3",
"@types/yargs": "^17.0.29",
"tsup": "^7.2.0"
"@types/minimist": "^1.2.5",
"@types/node": "^20.10.3",
"@types/prompts": "^2.4.9",
"@types/semver": "^7.5.6",
"@types/yargs": "^17.0.32",
"tsup": "^8.0.1"
}
}
2 changes: 1 addition & 1 deletion common/scripts/scripts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "esnext",
"allowJs": false,
"strict": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"noUnusedLocals": true,
"resolveJsonModule": true,
"esModuleInterop": true,
Expand Down
2 changes: 1 addition & 1 deletion common/scripts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "esnext",
"allowJs": false,
"strict": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"skipLibCheck": true,
"noUnusedLocals": true,
"experimentalDecorators": true,
Expand Down
4 changes: 2 additions & 2 deletions common/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
"import": "./dist/index.mjs"
}
},
"private": false,
Expand Down
12 changes: 6 additions & 6 deletions common/utils/tests/performance.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('performance', () => {
expect(fn).toHaveBeenCalledTimes(1)
expect(i).toBe(1)

vi.runAllTimers()
vi.runOnlyPendingTimers()
const r3 = dfn()
expect(fn).toHaveBeenCalledTimes(1)
expect(r2 === r3).toBe(false)
Expand All @@ -41,7 +41,7 @@ describe('performance', () => {
await r1
expect(i).toBe(2)

vi.runAllTimers()
vi.runOnlyPendingTimers()
await r3
expect(i).toBe(3)
})
Expand All @@ -54,7 +54,7 @@ describe('performance', () => {
dfn()
dfn()
expect(fn).toHaveBeenCalledTimes(0)
vi.runAllTimers()
vi.runOnlyPendingTimers()
expect(fn).toHaveBeenCalledTimes(1)
})

Expand All @@ -70,7 +70,7 @@ describe('performance', () => {
const r2 = dfn()
expect(fn).toHaveBeenCalledTimes(0)
expect(r1 === r2).toBe(true)
vi.runAllTimers()
vi.runOnlyPendingTimers()
expect(fn).toHaveBeenCalledTimes(1)
expect(i).toBe(1)

Expand All @@ -82,10 +82,10 @@ describe('performance', () => {
expect(fn).toHaveBeenCalledTimes(1)
expect(r2 === r3).toBe(false)

vi.runAllTimers()
vi.runOnlyPendingTimers()
expect(fn).toHaveBeenCalledTimes(2)

vi.runAllTimers()
vi.runOnlyPendingTimers()
await r3
expect(i).toBe(3)
})
Expand Down
2 changes: 1 addition & 1 deletion common/utils/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "esnext",
"allowJs": false,
"strict": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"skipLibCheck": true,
"noUnusedLocals": true,
"experimentalDecorators": true,
Expand Down
2 changes: 1 addition & 1 deletion components/auto-complete/tests/auto-complete.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('AutoComplete', () => {
const value = OPTIONS[0]

emitInput(input, value.toLocaleUpperCase())
vi.runAllTimers()
vi.runOnlyPendingTimers()
await nextTick()

const selectPopperEl = wrapper.find('.vxp-select__popper')
Expand Down
2 changes: 1 addition & 1 deletion components/carousel/tests/carousel.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async function doTransition(wrapper: VueWrapper<any>) {
await nextTick()
wrapper.vm.handleAfterMove()
await nextTick()
vi.runAllTimers()
vi.runOnlyPendingTimers()
await nextTick()
}

Expand Down
4 changes: 2 additions & 2 deletions components/color-picker/tests/color-picker.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async function toggleMove(el: HTMLElement, value = 40) {
moveEvent.clientX = value
moveEvent.clientY = value
document.dispatchEvent(moveEvent)
vi.runAllTimers()
vi.runOnlyPendingTimers()
await nextTick()

const upEvent = new CustomEvent('pointerup') as any
Expand Down Expand Up @@ -220,7 +220,7 @@ describe('ColorPicker', () => {
})

it('state', () => {
(['success', 'warning', 'error'] as const).forEach(state => {
;(['success', 'warning', 'error'] as const).forEach(state => {
const wrapper = mount(() => <ColorPicker state={state}></ColorPicker>)

expect(wrapper.find('.vxp-color-picker__selector').classes()).toContain(
Expand Down
Loading

0 comments on commit 46afe5d

Please sign in to comment.