Skip to content

Commit

Permalink
feat: use catalog to uniformly manage pnpm project dependencies (#2560)
Browse files Browse the repository at this point in the history
* feat: use catalog to uniformly manage pnpm project dependencies

* feat: 升级pnpm
  • Loading branch information
zzcr authored Nov 27, 2024
1 parent 49564de commit 83c5e04
Show file tree
Hide file tree
Showing 235 changed files with 269 additions and 254 deletions.
2 changes: 1 addition & 1 deletion examples/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@opentiny/unplugin-tiny-vue": "~0.0.2",
"@vitejs/plugin-vue": "^4.5.2",
"typescript": "^5.2.2",
"vite": "^5.0.8",
"vite": "catalog:",
"vue-tsc": "^1.8.25"
}
}
2 changes: 1 addition & 1 deletion examples/openinula-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"postcss": "^8.4.16",
"typescript": "^5.0.2",
"vite": "^4.3.8",
"vite": "catalog:",
"vite-plugin-svgr": "^3.2.0"
}
}
2 changes: 1 addition & 1 deletion examples/react-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"postcss": "^8.4.16",
"tailwindcss": "^3.3.3",
"typescript": "^5.0.2",
"vite": "^4.3.8",
"vite": "catalog:",
"vite-plugin-react": "^4.0.1",
"vite-plugin-svgr": "^3.2.0"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/react-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"unplugin-auto-import": "0.8.7",
"unplugin-vue-components": "^0.19.9",
"uslug": "^1.0.4",
"vite": "^4.3.8",
"vite": "catalog:",
"vite-plugin-html": "^2.0.0",
"vite-plugin-inspect": "^0.5.0",
"vite-plugin-md": "0.13.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"unocss": "^0.39.3",
"unplugin-vue-components": "^0.19.9",
"uslug": "^1.0.4",
"vite": "^4.3.8",
"vite": "catalog:",
"vite-plugin-dynamic-import": "1.5.0",
"vite-plugin-html": "^3.0.0",
"vite-plugin-inspect": "^0.5.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/solid-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"@opentiny/vue-renderless": "~3.14.0"
},
"devDependencies": {
"vite": "^4.4.5",
"vite": "catalog:",
"vite-plugin-solid": "^2.7.0",
"vite-plugin-inspect": "^0.7.10"
}
}
}
4 changes: 2 additions & 2 deletions examples/solid-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
},
"devDependencies": {
"fs-extra": "^11.2.0",
"vite": "^4.4.5",
"vite": "catalog:",
"vite-plugin-solid": "^2.7.0",
"vite-plugin-inspect": "^0.7.10",
"@opentiny/vue-vite-template2jsx": "workspace:~"
}
}
}
4 changes: 2 additions & 2 deletions examples/vue2.7/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
"tailwindcss": "^3.2.4",
"tailwindcss-vite-plugin": "^0.0.3",
"typescript": "^5.0.0",
"vite": "^4.3.8",
"vite": "catalog:",
"vite-plugin-checker": "^0.5.2",
"vite-plugin-dynamic-import": "^1.2.4",
"vite-plugin-inspect": "^0.7.9",
"vite-plugin-md": "^0.22.5",
"vite-plugin-vue-inspector": "^3.3.2",
"vite-plugin-vue2-svg": "^0.3.0",
"vitest": "^0.31.0",
"vitest": "catalog:",
"vue": "~2.7.10",
"vue-i18n": "^8.9.0",
"vue-template-compiler": "2.7.10",
Expand Down
4 changes: 2 additions & 2 deletions examples/vue2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@
"typescript": "^5.0.0",
"unocss": "^0.61.9",
"unplugin-vue2-script-setup": "^0.11.3",
"vite": "^4.3.8",
"vite": "catalog:",
"vite-plugin-checker": "^0.5.2",
"vite-plugin-dynamic-import": "^1.2.4",
"vite-plugin-inspect": "^0.7.9",
"vite-plugin-md": "^0.22.5",
"vite-plugin-vue-inspector": "^3.3.2",
"vite-plugin-vue2": "^2.0.2",
"vite-plugin-vue2-svg": "^0.3.0",
"vitest": "^0.31.0",
"vitest": "catalog:",
"vue": "2.6.14",
"vue-i18n": "^8.9.0",
"vue-template-compiler": "2.6.14",
Expand Down
4 changes: 2 additions & 2 deletions examples/vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@
"tailwindcss-vite-plugin": "^0.0.3",
"typescript": "^5.0.0",
"unocss": "^0.61.9",
"vite": "^4.3.8",
"vite": "catalog:",
"vite-plugin-checker": "^0.5.2",
"vite-plugin-dynamic-import": "^1.2.4",
"vite-plugin-inspect": "^0.7.10",
"vite-plugin-md": "^0.22.5",
"vite-plugin-vue-inspector": "^3.3.2",
"vite-svg-loader": "^3.6.0",
"vitest": "^0.31.0",
"vitest": "catalog:",
"vue": "^3.3.9",
"vue-i18n": "^9.1.7"
}
Expand Down
2 changes: 1 addition & 1 deletion internals/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"rollup": "^3.7.3",
"semver": "^7.3.8",
"tsup": "7.2.0",
"vite": "^4.3.8",
"vite": "catalog:",
"tailwindcss": "^3.2.4"
},
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion internals/cli/public/template/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
"vitest": "catalog:"
},
"dependencies": {
"@opentiny/vue-renderless": "workspace:~",
Expand Down
2 changes: 1 addition & 1 deletion internals/unplugin-tiny-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
"rimraf": "^5.0.5",
"tsup": "7.2.0",
"typescript": "^5.0.0",
"vite": "^4.3.8"
"vite": "catalog:"
}
}
4 changes: 2 additions & 2 deletions internals/unplugin-virtual-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@
"rollup": "^3.7.3",
"tsup": "7.2.0",
"typescript": "^5.0.0",
"vite": "^4.3.8",
"vitest": "^0.31.0",
"vite": "catalog:",
"vitest": "catalog:",
"webpack": "^5.75.0"
}
}
2 changes: 1 addition & 1 deletion internals/vue-vite-import/example/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@vitejs/plugin-vue": "^1.10.2",
"@vitejs/plugin-vue-jsx": "^2.0.1",
"vite-plugin-inspect": "^0.7.10",
"vite": "^4.3.8"
"vite": "catalog:"
},
"email": ""
}
2 changes: 1 addition & 1 deletion internals/vue-vite-import/example/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/node": "^18.14.6",
"@vitejs/plugin-vue": "^4.0.0",
"typescript": "^5.0.0",
"vite": "^4.3.8",
"vite": "catalog:",
"vue-tsc": "^1.6.5"
}
}
2 changes: 1 addition & 1 deletion internals/vue-vite-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"devDependencies": {
"typescript": "^5.0.0",
"tsup": "7.2.0",
"vite": "^4.3.8",
"vite": "catalog:",
"rimraf": "^3.0.2"
}
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "opentiny-vue",
"version": "3.14.0",
"private": true,
"packageManager": "pnpm@8.3.1",
"packageManager": "pnpm@9.14.2",
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
"author": "OpenTiny Team",
"license": "MIT",
Expand All @@ -27,8 +27,8 @@
],
"main": "packages/index.js",
"engines": {
"node": ">=16",
"pnpm": ">=6.35"
"node": ">=18",
"pnpm": ">=9.5"
},
"scripts": {
"preinstall": "npx only-allow pnpm",
Expand Down Expand Up @@ -194,7 +194,7 @@
"shelljs": "^0.8.5",
"shx": "^0.3.4",
"typescript": "^5.0.0",
"vite": "^4.3.8",
"vite": "catalog:",
"vue": "^3.4.23",
"vue-tsc": "^1.6.5"
},
Expand Down Expand Up @@ -228,7 +228,7 @@
"vue2": "npm:vue@2.6.14",
"vue2.7": "npm:vue@2.7.10",
"vue3": "npm:vue@3.4.23",
"vite": "^4.3.8"
"vite": "catalog:"
},
"packageExtensions": {
"vue-template-compiler@2.6.14": {
Expand Down
4 changes: 3 additions & 1 deletion packages/modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,9 @@
"path": "vue/src/grid-select/index.ts",
"type": "component",
"exclude": false,
"mode": ["pc"]
"mode": [
"pc"
]
},
"GridToolbar": {
"path": "vue/src/grid-toolbar/index.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/action-menu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "module",
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
"vitest": "catalog:"
},
"scripts": {
"build": "pnpm -w build:ui $npm_package_name",
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/action-sheet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "module",
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
"vitest": "catalog:"
},
"scripts": {
"build": "pnpm -w build:ui $npm_package_name",
Expand Down
22 changes: 8 additions & 14 deletions packages/vue/src/alert/__tests__/alert.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,31 @@ describe('PC Mode', () => {
})

test('closable', () => {
const wrapper = mount(() => <Alert closable={false}/>)
const wrapper = mount(() => <Alert closable={false} />)
expect(wrapper.find('.tiny-alert__close').exists()).toBeFalsy()
})

test('title', () => {
const title = 'mock title when size is large'
const wrapper = mount(() => <Alert size='large' title={title}/>)
const wrapper = mount(() => <Alert size="large" title={title} />)
expect(wrapper.find('.tiny-alert__title').text()).toEqual(title)
})

test('center', () => {
const wrapper = mount(() => <Alert center={true}/>)
const wrapper = mount(() => <Alert center={true} />)
expect(wrapper.find('.is-center').exists()).toBeTruthy()
})

test('close-text', () => {
const closeText = 'close'
const wrapper = mount(() => <Alert closeText={closeText}/>)
const wrapper = mount(() => <Alert closeText={closeText} />)
expect(wrapper.find('.tiny-alert__close').exists()).toBeFalsy()
expect(wrapper.find('.is-custom').exists()).toBeTruthy()
expect(wrapper.find('.is-custom').text()).toEqual(closeText)
})

test('show-icon', () => {
const wrapper = mount(() => <Alert showIcon={false}/>)
const wrapper = mount(() => <Alert showIcon={false} />)
// close icon and alert icon use the same class
expect(wrapper.findAll('.tiny-alert__icon').length).toEqual(1)
})
Expand All @@ -70,25 +70,19 @@ describe('PC Mode', () => {

test('default slot', () => {
const text = 'default slot'
const wrapper = mount(() => (
<Alert size='large' v-slots={{ default: () => text }}/>
))
const wrapper = mount(() => <Alert size="large" v-slots={{ default: () => text }} />)
expect(wrapper.find('.tiny-alert__opration').text()).toEqual(text)
})

test('description slot', () => {
const text = 'description slot'
const wrapper = mount(() => (
<Alert size='large' v-slots={{ description: () => text }}/>
))
const wrapper = mount(() => <Alert size="large" v-slots={{ description: () => text }} />)
expect(wrapper.find('.tiny-alert__description').text()).toEqual(text)
})

test('close event', async () => {
const handleClose = vi.fn()
const wrapper = mount(() => (
<Alert size='large' onClose={handleClose}/>
))
const wrapper = mount(() => <Alert size="large" onClose={handleClose} />)
await wrapper.find('.tiny-alert__close').trigger('click')
expect(handleClose).toHaveBeenCalled()
})
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/alert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "module",
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
"vitest": "catalog:"
},
"scripts": {
"build": "pnpm -w build:ui $npm_package_name",
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/amount/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "module",
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
"vitest": "catalog:"
},
"scripts": {
"build": "pnpm -w build:ui $npm_package_name",
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/anchor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
},
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
"vitest": "catalog:"
}
}
2 changes: 1 addition & 1 deletion packages/vue/src/area/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "module",
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
"vitest": "catalog:"
},
"scripts": {
"build": "pnpm -w build:ui $npm_package_name",
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/async-flowchart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "module",
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
"vitest": "catalog:"
},
"scripts": {
"build": "pnpm -w build:ui $npm_package_name",
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/autocomplete/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
},
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
"vitest": "catalog:"
}
}
2 changes: 1 addition & 1 deletion packages/vue/src/avatar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "module",
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
"vitest": "catalog:"
},
"scripts": {
"build": "pnpm -w build:ui $npm_package_name",
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/badge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "module",
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
"vitest": "catalog:"
},
"scripts": {
"build": "pnpm -w build:ui $npm_package_name",
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/base-select/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
},
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
"vitest": "catalog:"
}
}
Loading

0 comments on commit 83c5e04

Please sign in to comment.