Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 8086fa2

Browse files
committed
chore: refactor dependency resolution in package.json
1 parent 845dbad commit 8086fa2

File tree

27 files changed

+463
-193
lines changed

27 files changed

+463
-193
lines changed

_templates/generator/component/package.json.ejs.t

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ to: packages/<%=h.changeCase.paramCase(name)%>/package.json
1616
"files": [
1717
"dist"
1818
],
19-
19+
"exports": {
20+
".": {
21+
"require": "./dist/cjs/index.js",
22+
"default": "./dist/esm/index.js"
23+
}
24+
},
2025
"publishConfig": {
2126
"access": "public"
2227
},
@@ -25,7 +30,7 @@ to: packages/<%=h.changeCase.paramCase(name)%>/package.json
2530
"url": "git+https://github.com/chakra-ui/chakra-ui-vue-next.git"
2631
},
2732
"bugs": {
28-
"url": "https://github.com/chakra-ui/chakra-ui=vue-next/issues"
33+
"url": "https://github.com/chakra-ui/chakra-ui-vue-next/issues"
2934
},
3035
"sideEffects": false,
3136
"scripts": {

_templates/generator/module/package.json.ejs.t

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ to: packages/<%=h.changeCase.paramCase(name)%>/package.json
1212
"files": [
1313
"dist"
1414
],
15+
"exports": {
16+
".": {
17+
"require": "./dist/cjs/index.js",
18+
"default": "./dist/esm/index.js"
19+
}
20+
},
1521
"description": "<%= 'Chakra UI Vue | ' + h.changeCase.pascalCase(name) + ' module'%>",
1622
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next.git",
1723
"author": "Jonathan Bakebwa [email protected]",

_templates/generator/tooling/package.json.ejs.t

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ to: tooling/<%=h.changeCase.paramCase(name)%>/package.json
1212
"files": [
1313
"dist"
1414
],
15+
"exports": {
16+
".": {
17+
"require": "./dist/cjs/index.js",
18+
"default": "./dist/esm/index.js"
19+
}
20+
},
1521
"description": "<%= 'Chakra UI Vue | ' + h.changeCase.pascalCase(name) + ' module'%>",
1622
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next.git",
1723
"author": "Jonathan Bakebwa [email protected]",

package.json

Lines changed: 34 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
"version": "1.0.0",
44
"description": "Vue 3 compatible Chakra UI",
55
"main": "index.js",
6-
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next.git",
6+
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next",
77
"author": "Jonathan Bakebwa [email protected]",
88
"workspaces": [
99
"packages/*",
1010
"tooling/*",
1111
"website"
1212
],
1313
"scripts": {
14+
"pkg": "manypkg run",
15+
"pkgs:check": "manypkg check",
16+
"pkgs:fix": "manypkg fix",
1417
"postinstall": "yarn bootstrap",
1518
"bootstrap": "yarn run lerna bootstrap",
1619
"scaffold": "hygen",
@@ -22,57 +25,54 @@
2225
"lint": "eslint '*/**/*.{js,ts,tsx}' --quiet --fix",
2326
"docs:dev": "vitepress dev docs",
2427
"docs:build": "vitepress build docs",
25-
"docs:serve": "vitepress serve docs",
26-
"website": "yarn workspace @chakra-ui/vue-docs",
27-
"core": "yarn workspace @chakra-ui/vue-next",
28-
"nuxt": "yarn workspace @chakra-ui/nuxt-next",
29-
"system": "yarn workspace @chakra-ui/vue-system",
30-
"utils": "yarn workspace @chakra-ui/vue-utils",
31-
"theme": "yarn workspace @chakra-ui/vue-theme",
32-
"auto-import": "yarn workspace @chakra-ui/vue-auto-import",
33-
"c-alert": "yarn workspace @chakra-ui/c-alert",
34-
"c-theme-provider": "yarn workspace @chakra-ui/c-theme-provider",
35-
"c-box": "yarn workspace @chakra-ui/c-box",
36-
"c-button": "yarn workspace @chakra-ui/c-button",
37-
"c-flex": "yarn workspace @chakra-ui/c-flex",
38-
"c-icon": "yarn workspace @chakra-ui/c-icon",
39-
"c-reset": "yarn workspace @chakra-ui/c-reset",
40-
"c-spinner": "yarn workspace @chakra-ui/c-spinner",
41-
"c-badge": "yarn workspace @chakra-ui/c-badge",
42-
"c-portal": "yarn workspace @chakra-ui/c-portal",
43-
"c-popper": "yarn workspace @chakra-ui/c-popper"
28+
"docs:serve": "vitepress serve docs"
4429
},
4530
"license": "MIT",
4631
"private": true,
47-
"devDependencies": {
32+
"dependencies": {
4833
"@babel/cli": "^7.12.8",
4934
"@babel/core": "^7.12.9",
5035
"@babel/preset-env": "^7.12.7",
5136
"@babel/preset-typescript": "^7.12.7",
37+
"@chakra-ui/styled-system": "^1.9.0",
38+
"@chakra-ui/utils": "1.4.0",
5239
"@changesets/changelog-github": "^0.3.0",
5340
"@changesets/cli": "^2.14.1",
5441
"@commitlint/cli": "^11.0.0",
5542
"@commitlint/config-conventional": "^11.0.0",
43+
"@emotion/css": "^11.1.3",
44+
"@emotion/server": "^11.0.0",
45+
"@manypkg/cli": "^0.17.0",
46+
"@popperjs/core": "^2.8.4",
5647
"@testing-library/jest-dom": "^5.11.9",
5748
"@testing-library/user-event": "^12.6.2",
5849
"@testing-library/vue": "^6.3.4",
5950
"@types/jest": "^26.0.20",
6051
"@types/jest-axe": "^3.5.1",
52+
"@types/lodash.camelcase": "^4.3.6",
53+
"@types/lodash.kebabcase": "^4.1.6",
54+
"@types/lodash.mergewith": "^4.6.6",
6155
"@types/recursive-readdir": "^2.2.0",
56+
"@types/tinycolor2": "^1.4.2",
6257
"@typescript-eslint/eslint-plugin": "^2.34.0",
6358
"@typescript-eslint/parser": "4.0.1",
64-
"@vitejs/plugin-vue": "^1.0.6",
59+
"@vitejs/plugin-vue": "^1.1.4",
6560
"@vue/babel-plugin-jsx": "^1.0.3",
66-
"@vue/compiler-sfc": "^3.0.5",
61+
"@vue/compiler-sfc": "^3.0.6",
6762
"@vue/eslint-config-typescript": "^5.1.0",
6863
"@vuedx/typecheck": "^0.4.1",
6964
"@vuedx/typescript-plugin-vue": "^0.4.1",
65+
"@vueuse/motion": "^1.4.4",
7066
"axe-core": "^4.1.2",
7167
"babel-jest": "^26.6.3",
68+
"change-case": "^4.1.1",
7269
"chokidar": "^3.5.1",
7370
"concurrently": "^5.3.0",
7471
"consola": "^2.15.0",
7572
"cross-env": "^7.0.2",
73+
"css-get-unit": "^1.0.1",
74+
"csstype": "^3.0.5",
75+
"dequal": "^2.0.2",
7676
"esbuild-jest": "^0.4.0",
7777
"eslint": "^7.0.0",
7878
"eslint-config-prettier": "^6.12.0",
@@ -92,40 +92,24 @@
9292
"jest-transform-stub": "^2.0.0",
9393
"lerna": "^3.22.1",
9494
"lint-staged": "^10.5.3",
95+
"lodash.camelcase": "^4.3.0",
96+
"lodash.kebabcase": "^4.1.1",
97+
"lodash.mergewith": "^4.6.2",
98+
"object-assign": "^4.1.1",
9599
"prettier": "^2.1.2",
96100
"pretty": "^2.0.0",
101+
"react": "^17.0.1",
97102
"recursive-readdir": "^2.2.2",
103+
"tinycolor2": "^1.4.2",
98104
"ts-jest": "^26.5.0",
99105
"ts-node": "^9.0.0",
100-
"typescript": "^4.1.2",
101-
"vite": "^2.0.0-beta.44",
106+
"typescript": "^4.1.3",
107+
"vite": "^2.0.1",
102108
"vite-plugin-components": "^0.6.6",
103-
"vite-plugin-pages": "^0.3.0",
109+
"vite-plugin-pages": "^0.5.1",
104110
"vitepress": "^0.12.0",
105-
"vue": "^3.0.5",
111+
"vue": ">=3.0.5",
106112
"vue-jest": "^5.0.0-alpha.7",
107-
"vue-router": "4.0.0-beta.10"
108-
},
109-
"dependencies": {
110-
"@chakra-ui/styled-system": "^1.9.0",
111-
"@emotion/css": "^11.1.3",
112-
"@emotion/server": "^11.0.0",
113-
"@popperjs/core": "^2.8.4",
114-
"@types/lodash.camelcase": "^4.3.6",
115-
"@types/lodash.kebabcase": "^4.1.6",
116-
"@types/lodash.mergewith": "^4.6.6",
117-
"@types/tinycolor2": "^1.4.2",
118-
"@vueuse/motion": "^1.4.4",
119-
"change-case": "^4.1.1",
120-
"css-get-unit": "^1.0.1",
121-
"csstype": "^3.0.5",
122-
"dequal": "^2.0.2",
123-
"lodash.camelcase": "^4.3.0",
124-
"lodash.kebabcase": "^4.1.1",
125-
"lodash.mergewith": "^4.6.2",
126-
"object-assign": "^4.1.1",
127-
"react": "^17.0.1",
128-
"tinycolor2": "^1.4.2",
129-
"vue": "^3.0.5"
113+
"vue-router": "^4.0.4"
130114
}
131115
}

packages/c-accordion/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@
88
"files": [
99
"dist"
1010
],
11+
"exports": {
12+
".": {
13+
"require": "./dist/cjs/index.js",
14+
"default": "./dist/esm/index.js"
15+
}
16+
},
1117
"description": "Chakra UI Vue | CAccordion component",
12-
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next.git",
18+
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next/tree/master/packages/c-accordion",
1319
"author": "Jonathan Bakebwa [email protected]",
1420
"license": "MIT",
1521
"scripts": {

packages/c-alert/package.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@
88
"files": [
99
"dist"
1010
],
11+
"exports": {
12+
".": {
13+
"require": "./dist/cjs/index.js",
14+
"default": "./dist/esm/index.js"
15+
}
16+
},
1117
"description": "Chakra UI Vue | CAlert component",
12-
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next.git",
18+
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next/tree/master/packages/c-alert",
1319
"author": "Jonathan Bakebwa [email protected]",
1420
"license": "MIT",
1521
"scripts": {
@@ -23,13 +29,12 @@
2329
"watch:types": "cross-env tsc --emitDeclarationOnly --declaration --declarationDir dist/types --watch --incremental"
2430
},
2531
"dependencies": {
32+
"@chakra-ui/c-icon": "0.0.1-alpha.0",
2633
"@chakra-ui/vue-system": "0.0.1-alpha.0",
27-
"@chakra-ui/vue-utils": "0.0.1-alpha.0",
28-
"@chakra-ui/c-icon": "0.0.1-alpha.0"
34+
"@chakra-ui/vue-utils": "0.0.1-alpha.0"
2935
},
3036
"devDependencies": {
31-
"@chakra-ui/vue-system": "0.0.1-alpha.0",
32-
"vue": "^3.0.5"
37+
"vue": ">=3.0.5"
3338
},
3439
"peerDependencies": {
3540
"@chakra-ui/vue-system": "0.0.1-alpha.0",

packages/c-badge/package.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@
1212
"files": [
1313
"dist"
1414
],
15+
"exports": {
16+
".": {
17+
"require": "./dist/cjs/index.js",
18+
"default": "./dist/esm/index.js"
19+
}
20+
},
1521
"publishConfig": {
1622
"access": "public"
1723
},
18-
"repository": {
19-
"type": "git",
20-
"url": "git+https://github.com/chakra-ui/chakra-ui-vue-next.git"
21-
},
24+
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next/tree/master/packages/c-badge",
2225
"bugs": {
23-
"url": "https://github.com/chakra-ui/chakra-ui=vue-next/issues"
26+
"url": "https://github.com/chakra-ui/chakra-ui-vue-next/issues"
2427
},
2528
"sideEffects": false,
2629
"scripts": {
@@ -34,12 +37,11 @@
3437
"watch:types": "cross-env tsc --emitDeclarationOnly --declaration --declarationDir dist/types --watch --incremental"
3538
},
3639
"dependencies": {
37-
"@chakra-ui/vue-system": "0.0.1-alpha.0",
38-
"@chakra-ui/utils": "1.4.0"
40+
"@chakra-ui/utils": "1.4.0",
41+
"@chakra-ui/vue-system": "0.0.1-alpha.0"
3942
},
4043
"devDependencies": {
41-
"@chakra-ui/vue-system": "0.0.1-alpha.0",
42-
"vue": "^3.0.5"
44+
"vue": ">=3.0.5"
4345
},
4446
"peerDependencies": {
4547
"@chakra-ui/vue-system": "0.0.1-alpha.0",

packages/c-button/package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@
88
"files": [
99
"dist"
1010
],
11+
"exports": {
12+
".": {
13+
"require": "./dist/cjs/index.js",
14+
"default": "./dist/esm/index.js"
15+
}
16+
},
1117
"description": "Chakra UI Vue | CButton component",
12-
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next.git",
18+
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next/tree/master/packages/c-button",
1319
"author": "Jonathan Bakebwa [email protected]",
1420
"license": "MIT",
1521
"scripts": {
@@ -30,8 +36,7 @@
3036
"@chakra-ui/vue-utils": "0.0.1-alpha.0"
3137
},
3238
"devDependencies": {
33-
"@chakra-ui/vue-system": "0.0.1-alpha.0",
34-
"vue": "^3.0.5"
39+
"vue": ">=3.0.5"
3540
},
3641
"peerDependencies": {
3742
"@chakra-ui/vue-system": "0.0.1-alpha.0",

packages/c-color-mode/package.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@
1111
"files": [
1212
"dist"
1313
],
14+
"exports": {
15+
".": {
16+
"require": "./dist/cjs/index.js",
17+
"default": "./dist/esm/index.js"
18+
}
19+
},
1420
"publishConfig": {
1521
"access": "public"
1622
},
17-
"repository": {
18-
"type": "git",
19-
"url": "git+https://github.com/chakra-ui/chakra-ui-vue-next.git"
20-
},
23+
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next/tree/master/packages/c-color-mode",
2124
"bugs": {
22-
"url": "https://github.com/chakra-ui/chakra-ui=vue-next/issues"
25+
"url": "https://github.com/chakra-ui/chakra-ui-vue-next/issues"
2326
},
2427
"sideEffects": false,
2528
"scripts": {
@@ -37,5 +40,8 @@
3740
},
3841
"peerDependencies": {
3942
"vue": ">=3.0.5"
43+
},
44+
"devDependencies": {
45+
"vue": ">=3.0.5"
4046
}
4147
}

packages/c-flex/package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@
1212
"files": [
1313
"dist"
1414
],
15+
"exports": {
16+
".": {
17+
"require": "./dist/cjs/index.js",
18+
"default": "./dist/esm/index.js"
19+
}
20+
},
1521
"publishConfig": {
1622
"access": "public"
1723
},
18-
"repository": {
19-
"type": "git",
20-
"url": "git+https://github.com/chakra-ui/chakra-ui-vue-next.git"
21-
},
24+
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next/tree/master/packages/c-flex",
2225
"bugs": {
23-
"url": "https://github.com/chakra-ui/chakra-ui=vue-next/issues"
26+
"url": "https://github.com/chakra-ui/chakra-ui-vue-next/issues"
2427
},
2528
"sideEffects": false,
2629
"scripts": {
@@ -39,8 +42,7 @@
3942
},
4043
"devDependencies": {
4144
"@chakra-ui/vue-system": "0.0.1-alpha.0",
42-
"csstype": "^3.0.5",
43-
"vue": "^3.0.5"
45+
"vue": ">=3.0.5"
4446
},
4547
"peerDependencies": {
4648
"@chakra-ui/vue-system": "0.0.1-alpha.0",

0 commit comments

Comments
 (0)