Skip to content

Commit b48e9a9

Browse files
chore(deps-dev): bump vite from 5.4.20 to 7.1.12 (#5612)
* chore(deps-dev): bump vite from 5.4.20 to 7.1.12 Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.20 to 7.1.12. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v7.1.12/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v7.1.12/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 7.1.12 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore: upgrade vite --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jean-Michel FRANCOIS <jeanmichel.francois@qlik.com>
1 parent e52aeb0 commit b48e9a9

File tree

5 files changed

+188
-259
lines changed

5 files changed

+188
-259
lines changed

packages/playground-vite/index.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<%- injectMeta %>
87
<script type="text/javascript">
98
window.basename = '/';
109
var process = { browser: true, env: { NODE_ENV: 'development' } };
1110
</script>
1211
<title>Vite + React</title>
12+
'', '@talend/locales-tui-components', '@talend/locales-tui-containers',
13+
'@talend/locales-tui-faceted-search', '@talend/locales-tui-forms',
14+
15+
<meta name="@talend/locales-design-system" content="7.15.1" />
16+
<meta name="@talend/locales-tui-components" content="16.0.1" />
17+
<meta name="@talend/locales-tui-containers" content="9.1.3" />
18+
<meta name="@talend/locales-tui-faceted-search" content="11.3.0" />
19+
<meta name="@talend/locales-tui-forms" content="15.2.0" />
1320
</head>
1421
<body>
1522
<div id="app"></div>

packages/playground-vite/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@
4040
"i18next-http-backend": "^1.4.5",
4141
"mockjs": "^1.1.0",
4242
"sass": "^1.93.2",
43-
"vite": "^5.4.21",
44-
"vite-plugin-html": "^3.2.2",
43+
"vite": "^7.1.12",
4544
"vite-plugin-mock": "^3.0.2",
4645
"webpack": "^5.102.1"
4746
},

packages/playground-vite/src/app/index.jsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
* Being the first import is important, so that it is the default style
66
* and other style can override it
77
*/
8-
// eslint-disable-next-line @talend/import-depth
9-
import { initI18n } from './i18n.js';
108

9+
// eslint-disable-next-line @talend/import-depth
1110
import '@talend/bootstrap-theme/dist/bootstrap.css';
1211
import cmf from '@talend/react-cmf';
1312
import getRouter from '@talend/react-cmf-router';
14-
import { AppLoader, IconsProvider as BaseIconsProvider } from '@talend/react-components';
13+
import { AppLoader } from '@talend/react-components';
1514
import containersModule from '@talend/react-containers';
1615
import ComponentForm from '@talend/react-containers/lib/ComponentForm';
1716

@@ -21,6 +20,7 @@ import { Dataviz } from './components/Dataviz.jsx';
2120
import { FacetedSearchPlayground } from './components/FacetedSearch.jsx';
2221
import { Icons } from './components/Icons.jsx';
2322
import { LeaguesList } from './components/List.jsx';
23+
import { initI18n } from './i18n.js';
2424

2525
// thanks ui-scripts
2626
let basename = window.basename;
@@ -31,21 +31,13 @@ if (basename === '/') {
3131
const router = getRouter({ basename });
3232

3333
initI18n();
34-
const allsvg = `${basename || ''}/cdn/@talend/icons/${
35-
process.env.ICONS_VERSION
36-
}/dist/svg-bundle/all.svg`;
37-
38-
function IconsProvider() {
39-
return <BaseIconsProvider bundles={[allsvg]} />;
40-
}
4134

4235
const app = {
4336
components: {
4437
ComponentForm,
4538
ComponentFormSandbox,
4639
FacetedSearch: FacetedSearchPlayground,
4740
LeaguesList,
48-
IconsProvider,
4941
Dataviz,
5042
Icons,
5143
},
@@ -68,4 +60,5 @@ console.log('app bootstrap should happens only once');
6860
* - Fetch the settings
6961
* - render react-dom in the dom 'app' element
7062
*/
63+
debugger;
7164
cmf.bootstrap(app);

packages/playground-vite/vite.config.js

Lines changed: 3 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,12 @@
1+
/* eslint-disable import/no-extraneous-dependencies */
12
import react from '@vitejs/plugin-react';
23
import fixReactVirtualized from 'esbuild-plugin-react-virtualized';
3-
import fs, { existsSync } from 'fs';
4-
import path, { join } from 'path';
4+
import fs from 'fs';
5+
import path from 'path';
56
import { fileURLToPath } from 'url';
67
import { defineConfig } from 'vite';
7-
import { createHtmlPlugin } from 'vite-plugin-html';
88
import { viteMockServe } from 'vite-plugin-mock';
99

10-
function getPath(pkg) {
11-
let currentDir = path.dirname(fileURLToPath(import.meta.resolve(pkg)));
12-
13-
while (currentDir !== '/' && !existsSync(join(currentDir, 'package.json'))) {
14-
currentDir = path.dirname(currentDir);
15-
}
16-
17-
if (existsSync(join(currentDir, 'package.json'))) {
18-
return currentDir;
19-
}
20-
throw new Error('package.json introuvable pour le package spécifié');
21-
}
22-
23-
function getVersion(pkg) {
24-
const packagePath = path.join(getPath(pkg), 'package.json');
25-
const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
26-
return packageJson.version;
27-
}
28-
29-
const PKGS = [
30-
'@talend/locales-design-system',
31-
'@talend/locales-tui-components',
32-
'@talend/locales-tui-containers',
33-
'@talend/locales-tui-faceted-search',
34-
'@talend/locales-tui-forms',
35-
'@talend/assets-api',
36-
'@talend/design-tokens',
37-
'@talend/design-system',
38-
'@talend/react-components',
39-
'@talend/react-containers',
40-
'@talend/react-cmf',
41-
'@talend/react-cmf-router',
42-
'@talend/react-dataviz',
43-
'@talend/react-faceted-search',
44-
'@talend/react-forms',
45-
'@talend/bootstrap-theme',
46-
'@talend/icons',
47-
];
48-
49-
const patterns = PKGS.map(pkg => `<meta name="${pkg}" content="${getVersion(pkg)}" />`).join('\n');
50-
5110
// https://vitejs.dev/config/
5211
export default defineConfig({
5312
plugins: [
@@ -56,15 +15,6 @@ export default defineConfig({
5615
mockPath: 'mockVite',
5716
localEnabled: true,
5817
}),
59-
createHtmlPlugin({
60-
minify: true,
61-
inject: {
62-
data: {
63-
title: 'index',
64-
injectMeta: patterns,
65-
},
66-
},
67-
}),
6818
{
6919
name: 'configure-static-files',
7020
configureServer(server) {

0 commit comments

Comments
 (0)