From 32570b4b104d0d3048bbdf8b554729947d4dfff9 Mon Sep 17 00:00:00 2001 From: Filip Sobol Date: Thu, 19 Dec 2024 12:17:46 +0100 Subject: [PATCH 1/2] Fix: Add `default` to `exports` entries in `package.json` files.. --- scripts/release/utils/updatepackageentrypoint.mjs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/release/utils/updatepackageentrypoint.mjs b/scripts/release/utils/updatepackageentrypoint.mjs index a8bb2837c43..b6fde0aeeff 100644 --- a/scripts/release/utils/updatepackageentrypoint.mjs +++ b/scripts/release/utils/updatepackageentrypoint.mjs @@ -29,7 +29,8 @@ export default async function updatePackageEntryPoint( packagePath ) { pkgJson.exports = { '.': { types: './' + types, - import: './' + main + import: './' + main, + default: './' + main }, './dist/*': { /** @@ -39,12 +40,10 @@ export default async function updatePackageEntryPoint( packagePath ) { * files will be moved to the `dist` directory. */ types: './' + types, - import: './dist/*' + import: './dist/*', + default: './dist/*' }, - './src/*': { - types: './' + types, - import: './src/*' - } + './src/*': './src/*' }; if ( files.includes( 'build' ) ) { From f6c9960f7b638d592d93ad5513cd8c157f52e40b Mon Sep 17 00:00:00 2001 From: Filip Sobol Date: Thu, 19 Dec 2024 12:30:46 +0100 Subject: [PATCH 2/2] Update `exports` --- scripts/release/utils/updatepackageentrypoint.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/release/utils/updatepackageentrypoint.mjs b/scripts/release/utils/updatepackageentrypoint.mjs index b6fde0aeeff..1556c4511ad 100644 --- a/scripts/release/utils/updatepackageentrypoint.mjs +++ b/scripts/release/utils/updatepackageentrypoint.mjs @@ -43,7 +43,11 @@ export default async function updatePackageEntryPoint( packagePath ) { import: './dist/*', default: './dist/*' }, - './src/*': './src/*' + './src/*': { + types: './src/*.d.ts', + import: './src/*', + default: './src/*' + } }; if ( files.includes( 'build' ) ) {