From c0d31470e6ce16e8e6273097374674c5645fd42f Mon Sep 17 00:00:00 2001 From: Abdul karim mia <97598943+abdul-karim-mia@users.noreply.github.com> Date: Mon, 9 Nov 2026 05:38:37 +0530 Subject: [PATCH] fix(build): eliminate MODULE_TYPELESS_PACKAGE_JSON warning for mkshims Fixes #930 Since Node.js type-stripping was adopted, running mkshims during yarn build emitted a MODULE_TYPELESS_PACKAGE_JSON warning because module type was not specified in package.json and required reparsing. Renaming mkshims.ts to mkshims.mts and declaring type: module in sources/package.json eliminates the warning without impacting root CommonJS shims in dist. Signed-off-by: Abdul karim mia <97598943+abdul-karim-mia@users.noreply.github.com> --- mkshims.ts => mkshims.mts | 0 package.json | 2 +- sources/package.json | 3 +++ 3 files changed, 4 insertions(+), 1 deletion(-) rename mkshims.ts => mkshims.mts (100%) create mode 100644 sources/package.json diff --git a/mkshims.ts b/mkshims.mts similarity index 100% rename from mkshims.ts rename to mkshims.mts diff --git a/package.json b/package.json index fc7234995..5c54c029a 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ } }, "scripts": { - "build": "run clean && run build:bundle && node ./mkshims.ts", + "build": "run clean && run build:bundle && node ./mkshims.mts", "build:bundle": "esbuild ./sources/_lib.ts --bundle --platform=node --target=node22.22.2 --external:corepack --outfile='./dist/lib/corepack.cjs' --resolve-extensions='.ts,.mjs,.js'", "clean": "run rimraf dist shims", "corepack": "node ./sources/_cli.ts", diff --git a/sources/package.json b/sources/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/sources/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +}