From 71a63b645956be5f0c44f45f60bebc7a2e7e0d37 Mon Sep 17 00:00:00 2001 From: "Ali.Haydar.Sumer" Date: Mon, 22 Jun 2026 13:34:57 +0200 Subject: [PATCH 1/3] Use relative globs so widget xmls are copied on Windows --- packages/pluggable-widgets-tools/configs/rollup.config.mjs | 5 +++-- .../pluggable-widgets-tools/configs/rollup.config.native.mjs | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/pluggable-widgets-tools/configs/rollup.config.mjs b/packages/pluggable-widgets-tools/configs/rollup.config.mjs index 4998ce2d..b6015387 100644 --- a/packages/pluggable-widgets-tools/configs/rollup.config.mjs +++ b/packages/pluggable-widgets-tools/configs/rollup.config.mjs @@ -320,9 +320,10 @@ export default async args => { clear({ targets: [outDir, mpkDir] }), command([ () => { - cp(join(sourcePath, "src/**/*.xml"), outDir); + // Re-target join(widgetRoot,...) after PR #182. + cp("src/**/*.xml", outDir); if (existsSync(`src/${widgetName}.icon.png`) || existsSync(`src/${widgetName}.tile.png`)) { - cp(join(sourcePath, `src/${widgetName}.@(tile|icon)?(.dark).png`), outDir); + cp(`src/${widgetName}.@(tile|icon)?(.dark).png`, outDir); } } ]), diff --git a/packages/pluggable-widgets-tools/configs/rollup.config.native.mjs b/packages/pluggable-widgets-tools/configs/rollup.config.native.mjs index 72316abb..f8171edc 100644 --- a/packages/pluggable-widgets-tools/configs/rollup.config.native.mjs +++ b/packages/pluggable-widgets-tools/configs/rollup.config.native.mjs @@ -257,9 +257,10 @@ export default async args => { clear({ targets: [outDir, mpkDir] }), command([ () => { - cp(join(sourcePath, "src/**/*.xml"), outDir); + // Re-target join(widgetRoot,...) after PR #182. + cp("src/**/*.xml", outDir); if (existsSync(`src/${widgetName}.icon.png`) || existsSync(`src/${widgetName}.tile.png`)) { - cp(join(sourcePath, `src/${widgetName}.@(tile|icon)?(.dark).png`), outDir); + cp(`src/${widgetName}.@(tile|icon)?(.dark).png`, outDir); } } ]) From c3d2d6550ea6b2036f6217a4cdb67ea2b99d0b4d Mon Sep 17 00:00:00 2001 From: "Ali.Haydar.Sumer" Date: Mon, 22 Jun 2026 13:35:43 +0200 Subject: [PATCH 2/3] Assert xmls are present in the bundle --- packages/command-tests/commands.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/command-tests/commands.js b/packages/command-tests/commands.js index 236e5bf7..b5da6a21 100644 --- a/packages/command-tests/commands.js +++ b/packages/command-tests/commands.js @@ -228,6 +228,7 @@ async function main() { ) { throw new Error("Expected mpk file to be generated, but it wasn't."); } + checkWidgetBundleFiles(); } async function testRelease() { @@ -244,6 +245,18 @@ async function main() { ) { throw new Error("Expected mpk file to be generated, but it wasn't."); } + checkWidgetBundleFiles(); + } + + function checkWidgetBundleFiles() { + // XML files copied into the staging dir before zipping; missing here means a broken mpk. + const stagingDir = join(workDir, "dist", "tmp", "widgets"); + const missing = ["package.xml", `${widgetPackageJson.widgetName}.xml`].filter( + f => !existsSync(join(stagingDir, f)) + ); + if (missing.length) { + throw new Error(`Expected widget bundle files in mpk, but missing: ${missing.join(", ")}.`); + } } async function checkDependenciesFiles(isNative, boilerplate, version) { From 0807b2da7e9ead0c9f9db044eaac198b9c154681 Mon Sep 17 00:00:00 2001 From: "Ali.Haydar.Sumer" Date: Mon, 22 Jun 2026 13:36:06 +0200 Subject: [PATCH 3/3] Update the change log --- packages/pluggable-widgets-tools/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/pluggable-widgets-tools/CHANGELOG.md b/packages/pluggable-widgets-tools/CHANGELOG.md index 91c7297b..aa700345 100644 --- a/packages/pluggable-widgets-tools/CHANGELOG.md +++ b/packages/pluggable-widgets-tools/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed + +- We fixed an issue on Windows where the generated `.mpk` was missing the widget's `.xml` files and icon/tile PNGs. + ### Changed - We replaced `ts-jest` with `@swc/jest` as the Jest transform (3–5× faster for TSX-heavy test suites) and switched the test runner from `jest-jasmine2` to `jest-circus`.