Skip to content

Commit 27969d9

Browse files
committed
chore(charts-web): revert bump, reduce boilerplate
1 parent 0c5b30f commit 27969d9

3 files changed

Lines changed: 13 additions & 12 deletions

File tree

packages/pluggableWidgets/charts-web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mendix/charts-web",
3-
"version": "6.2.4",
3+
"version": "6.2.3",
44
"description": "Chart widgets collection for data visualization",
55
"copyright": "© Mendix Technology BV 2025. All rights reserved.",
66
"license": "Apache-2.0",

packages/pluggableWidgets/charts-web/src/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<package xmlns="http://www.mendix.com/package/1.0/">
3-
<clientModule name="Charts" version="6.2.4" xmlns="http://www.mendix.com/clientModule/1.0/">
3+
<clientModule name="Charts" version="6.2.3" xmlns="http://www.mendix.com/clientModule/1.0/">
44
<widgetFiles>
55
<widgetFile path="AreaChart/AreaChart.xml" />
66
<widgetFile path="BarChart/BarChart.xml" />

packages/shared/charts/rollup/shared-libs-config.cts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function sharedCode(bundle: BundleBuildConfig): RollupOptions {
156156

157157
return {
158158
input: bundle.sharedCharts.input,
159-
plugins: [...stdPlugins(bundle), sharedBundleLicensePlugin(bundle, true)],
159+
plugins: stdPlugins(bundle, true),
160160
// Mark reactPlotly as external to not include react-plotly.js in bundle.
161161
// Mark plotly as external to not include plotly.js in bundle.
162162
external: [...bundle.external, bundle.reactPlotly.input, bundle.plotly.input],
@@ -180,7 +180,7 @@ function reactPlotly(bundle: BundleBuildConfig): RollupOptions {
180180
input: bundle.reactPlotly.input,
181181
// Mark plotly as external to not include plotly.js in bundle.
182182
external: [...bundle.external],
183-
plugins: [...stdPlugins(bundle), sharedBundleLicensePlugin(bundle, false)],
183+
plugins: stdPlugins(bundle, false),
184184
output: [esmOutput, amdOutput]
185185
};
186186
}
@@ -221,7 +221,7 @@ function plotly(bundle: BundleBuildConfig): RollupOptions {
221221
],
222222
verbose: true
223223
}),
224-
sharedBundleLicensePlugin(bundle, false)
224+
...sharedBundleLicensePlugin(bundle, false)
225225
],
226226
output: [esmOutput, amdOutput]
227227
};
@@ -239,12 +239,12 @@ function plotly(bundle: BundleBuildConfig): RollupOptions {
239239
* @param bundle - The build config (needs isProd and amdDir)
240240
* @param isLastBundle - When true, write accumulated deps to disk
241241
*/
242-
function sharedBundleLicensePlugin(bundle: BundleBuildConfig, isLastBundle: boolean): Plugin | null {
242+
function sharedBundleLicensePlugin(bundle: BundleBuildConfig, isLastBundle: boolean): Plugin[] {
243243
if (!bundle.isProd) {
244-
return null;
244+
return [];
245245
}
246246

247-
return license({
247+
return [license({
248248
thirdParty: {
249249
includePrivate: true,
250250
output: (deps: Dependency[]) => {
@@ -275,7 +275,7 @@ function sharedBundleLicensePlugin(bundle: BundleBuildConfig, isLastBundle: bool
275275
}
276276
}
277277
}
278-
});
278+
})];
279279
}
280280

281281
/** Utils */
@@ -286,11 +286,12 @@ const isProd = (args: Args): boolean => !!args.configProduction;
286286
* IMPORTANT: Please use this only for common plugins.
287287
* All bundle specific plugins should be defined in the bundle function.
288288
*/
289-
const stdPlugins = (config: { isProd: boolean }): Plugin[] => [
289+
const stdPlugins = (bundle: BundleBuildConfig, isLastBundle: boolean): Plugin[] => [
290290
nodeResolve(),
291291
commonjs(),
292292
replace({
293-
"process.env.NODE_ENV": JSON.stringify(config.isProd ? "production" : "development")
293+
"process.env.NODE_ENV": JSON.stringify(bundle.isProd ? "production" : "development")
294294
}),
295-
tarser()
295+
tarser(),
296+
...sharedBundleLicensePlugin(bundle, isLastBundle)
296297
];

0 commit comments

Comments
 (0)