Skip to content

Commit 0a36752

Browse files
authored
chore: NO-JIRA upgrade vite to version 8 (#1136)
1 parent 7f16018 commit 0a36752

File tree

17 files changed

+1148
-984
lines changed

17 files changed

+1148
-984
lines changed

.github/actions/setup-environment/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ runs:
1919

2020
- name: Install dependencies
2121
shell: bash
22-
run: pnpm install --frozen-lockfile
22+
run: |
23+
pnpm install --frozen-lockfile || \
24+
(npm config delete @dialpad:registry && pnpm install --frozen-lockfile)

package.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"postcss": "^7.0.39 || ^8.3.3",
1818
"react": "^18.3.1",
1919
"typescript": "^5.2",
20-
"vite": "^5.0.0 || ^7.0.7",
20+
"vite": "^8.0.0",
2121
"vue": "^3.2",
2222
"vuepress": "^2.0.0-rc.24"
2323
}
@@ -35,6 +35,9 @@
3535
"test-exclude": "^7.0.1",
3636
"trim": ">=0.0.3",
3737
"trim-newlines": ">=3.0.1"
38+
},
39+
"patchedDependencies": {
40+
"@tiptap/vue-3@3.19.0": "patches/@tiptap__vue-3@3.19.0.patch"
3841
}
3942
},
4043
"files": [
@@ -86,7 +89,7 @@
8689
"@dialpad/dialtone-cli": "workspace:*",
8790
"@dialpad/dialtone-mcp-server": "workspace:*",
8891
"@dialpad/dialtone-tokens": "workspace:*",
89-
"@dialpad/i18n": "1.22.3",
92+
"@dialpad/i18n": "1.25.0",
9093
"@floating-ui/dom": "^1.6.0",
9194
"@tiptap/core": "3.19.0",
9295
"@tiptap/extension-blockquote": "3.19.0",
@@ -122,7 +125,8 @@
122125
"linkifyjs": "4.3.2",
123126
"overlayscrollbars": "2.10.0",
124127
"regex-combined-emojis": "1.6.0",
125-
"tippy.js": "6.3.7"
128+
"tippy.js": "6.3.7",
129+
"vue-tsc": "3.2.6"
126130
},
127131
"devDependencies": {
128132
"@commitlint/cli": "^18.4.3",
@@ -136,8 +140,8 @@
136140
"@semantic-release/exec": "^6.0.3",
137141
"@semantic-release/git": "^10.0.1",
138142
"@types/node": "^20.4.5",
139-
"@vitejs/plugin-vue": "^5.2.3",
140-
"@vitest/coverage-v8": "^1.0.0",
143+
"@vitejs/plugin-vue": "^6.0.5",
144+
"@vitest/coverage-v8": "^4.1.0",
141145
"@vue/tsconfig": "^0.4.0",
142146
"axe-core": "^4.7.2",
143147
"axe-playwright": "^2.0.3",
@@ -149,7 +153,7 @@
149153
"eslint-plugin-eslint-plugin": "6.3.1",
150154
"eslint-plugin-jest": "^29.0.1",
151155
"eslint-plugin-json": "4.0.1",
152-
"eslint-plugin-storybook": "10.2.6",
156+
"eslint-plugin-storybook": "10.3.0",
153157
"eslint-plugin-vitest": "^0.5.4",
154158
"eslint-plugin-vue": "^10.4.0",
155159
"eslint-plugin-vuejs-accessibility": "^2.4.1",
@@ -180,10 +184,10 @@
180184
"typedoc": "^0.28.2",
181185
"typedoc-plugin-markdown": "^4.6.1",
182186
"typescript": "^5.2",
183-
"vite": "^5.4.2",
187+
"vite": "^8.0.0",
184188
"vite-bundle-visualizer": "^1.2.1",
185-
"vite-plugin-dts": "^4.0.3",
186-
"vitest": "^1.6.1",
189+
"vite-plugin-dts": "^4.5.4",
190+
"vitest": "^4.1.0",
187191
"vue-docgen-api": "^4.75.0",
188192
"vue-template-compiler": "^2.7.16",
189193
"wait-on": "^7.2.0",

packages/combinator/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
],
2626
"exports": {
2727
".": "./dist/dialtone-combinator.js",
28-
"./css": "./dist/style.css",
28+
"./css": "./dist/dialtone-combinator.css",
2929
"./*": "./dist/src/lib/*.js"
3030
},
3131
"dependencies": {

packages/combinator/vite.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import { fileURLToPath } from 'url';
44

55
export default defineConfig({
66
build: {
7+
target: 'es2020',
78
sourcemap: true,
89
minify: false,
9-
rollupOptions: {
10+
rolldownOptions: {
1011
external: [
1112
/^@dialpad/,
1213
'change-case',
@@ -18,9 +19,6 @@ export default defineConfig({
1819
output: {
1920
preserveModules: true,
2021
minifyInternalExports: false,
21-
globals: {
22-
vue: 'Vue',
23-
},
2422
},
2523
},
2624
lib: {

packages/dialtone-docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"glob": "^11.0.3",
1212
"gray-matter": "^4.0.3",
1313
"handlebars": "^4.7.8",
14-
"vitest": "^1.6.1"
14+
"vitest": "^4.1.0"
1515
},
1616
"keywords": ["documentation", "ai", "dialtone"],
1717
"license": "MIT"

packages/dialtone-icons/gulpfile.cjs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const settings = {
1414
// ================================================================================
1515
// @@ GENERAL
1616
const { src, dest, series } = require('gulp');
17+
const merge = require('merge-stream');
1718
const del = require('del');
1819
const rename = require('gulp-rename');
1920
const fs = require('fs');
@@ -177,7 +178,7 @@ const transformSVGtoVue = function (done) {
177178
// Reads previous keywords-icons.json file to extract keywords and add any new icon
178179
// into the respective category.
179180
// ================================================================================
180-
const updateIconsJSON = function (done) {
181+
const updateIconsJSON = function () {
181182
const rawData = fs.readFileSync(paths.exports.keywordsIcons);
182183
const keywordsJSON = JSON.parse(rawData).categories;
183184
const iconsList = [];
@@ -199,18 +200,18 @@ const updateIconsJSON = function (done) {
199200
fs.writeFileSync(paths.exports.iconsList, `export default ${JSON.stringify(iconsList)}`);
200201

201202
// Copies the icons.js and keywords-icons.json to dist/
202-
src([paths.exports.keywordsIcons, paths.exports.iconsList])
203+
const copyStream = src([paths.exports.keywordsIcons, paths.exports.iconsList])
203204
.pipe(dest('./dist/'));
204205

205206
// Prettifies the JSON to improve readability and easier keyword adding.
206-
src(paths.exports.keywordsIcons)
207+
const prettifyStream = src(paths.exports.keywordsIcons)
207208
.pipe(jsonFormat(2))
208209
.pipe(dest('./src/'));
209210

210-
return done();
211+
return merge(copyStream, prettifyStream);
211212
};
212213

213-
const updateIllustrationsJSON = function (done) {
214+
const updateIllustrationsJSON = function () {
214215
const rawData = fs.readFileSync(paths.exports.keywordsIllustrations);
215216
const keywordsJSON = JSON.parse(rawData).categories;
216217
const illustrationsList = [];
@@ -232,15 +233,15 @@ const updateIllustrationsJSON = function (done) {
232233
fs.writeFileSync(paths.exports.illustrationsList, `export default ${JSON.stringify(illustrationsList)}`);
233234

234235
// Copies the illustrations.js and keywords-illustrations.json to dist/
235-
src([paths.exports.keywordsIllustrations, paths.exports.illustrationsList])
236+
const copyStream = src([paths.exports.keywordsIllustrations, paths.exports.illustrationsList])
236237
.pipe(dest('./dist/'));
237238

238239
// Prettifies the JSON to improve readability and easier keyword adding.
239-
src(paths.exports.keywordsIllustrations)
240+
const prettifyStream = src(paths.exports.keywordsIllustrations)
240241
.pipe(jsonFormat(2))
241242
.pipe(dest('./src/'));
242243

243-
return done();
244+
return merge(copyStream, prettifyStream);
244245
};
245246

246247
const updateExports = function (done) {

packages/dialtone-icons/project.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"command": "pnpm exec gulp"
99
},
1010
"inputs": [
11-
"{projectRoot}/src/**/*",
11+
"{projectRoot}/src/svg/**/*",
12+
"{projectRoot}/src/keywords-icons.json",
13+
"{projectRoot}/src/keywords-illustrations.json",
1214
"{projectRoot}/transformSVGtoVue.cjs",
1315
"{projectRoot}/gulpfile.cjs"
1416
],

packages/dialtone-icons/vue2/vite.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default defineConfig({
2727
},
2828
formats: ['es', 'cjs'],
2929
},
30-
rollupOptions: {
30+
rolldownOptions: {
3131
external: ['vue'],
3232
output: {
3333
minifyInternalExports: true,

packages/dialtone-icons/vue3/vite.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const illustrationEntries = glob.sync('../src/illustrations/*.vue').reduce((entr
1818
}, {});
1919
export default defineConfig({
2020
build: {
21+
target: 'es2020',
2122
sourcemap: true,
2223
lib: {
2324
entry: {
@@ -27,7 +28,7 @@ export default defineConfig({
2728
},
2829
formats: ['es', 'cjs'],
2930
},
30-
rollupOptions: {
31+
rolldownOptions: {
3132
external: ['vue'],
3233
output: {
3334
minifyInternalExports: true,
@@ -37,7 +38,7 @@ export default defineConfig({
3738
},
3839
plugins: [
3940
vue(),
40-
dts({ outDir: 'dist/types' }),
41+
dts({ outDir: 'dist/types', vue: true, parallel: true }),
4142
],
4243
resolve: {
4344
alias: {

packages/dialtone-tokens/vite.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const postcssEntries = glob.sync('./postcss/*.js').reduce((entries, path) => {
1515
// https://vitejs.dev/config/
1616
export default defineConfig({
1717
build: {
18+
target: 'es2020',
1819
emptyOutDir: false,
1920
lib: {
2021
entry: {
@@ -23,7 +24,7 @@ export default defineConfig({
2324
},
2425
formats: ['es', 'cjs'],
2526
},
26-
rollupOptions: {
27+
rolldownOptions: {
2728
output: {
2829
minifyInternalExports: true,
2930
chunkFileNames: () => 'themes/chunks/[name]-[hash].js',

0 commit comments

Comments
 (0)