From ea04a4d5feb95fcf3f07faf862d60183eba0eff1 Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Wed, 6 Aug 2025 15:25:40 +0200 Subject: [PATCH] Fix locales CDN publish (#5882) **Problem** - `@uppy/locales` on npm used to have `dist` (minified), `lib` (JS), `src` (to make the sourcemaps work) but dist is redundant tbh and only for the CDN - Since the new release tooling only `lib` was published to npm - CI release could not find any files to upload to CDN (it uses npm-pack, which checks the "files" in package.json and `dist` was missing) **Solution**: - Correct "files" in package.json's - Remove `main` from @uppy/locales package.json which pointed to something random? We still publish `dist` for `@uppy/locales` needlessly to npm afaik. Would require a bit more hacking to separate in the current setup --- .changeset/fluffy-deer-press.md | 6 ++++++ packages/@uppy/locales/package.json | 3 ++- packages/uppy/package.json | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .changeset/fluffy-deer-press.md diff --git a/.changeset/fluffy-deer-press.md b/.changeset/fluffy-deer-press.md new file mode 100644 index 000000000..3d730d5dd --- /dev/null +++ b/.changeset/fluffy-deer-press.md @@ -0,0 +1,6 @@ +--- +"@uppy/locales": patch +"uppy": patch +--- + +Add "files" in package.json to only publish what's needed diff --git a/packages/@uppy/locales/package.json b/packages/@uppy/locales/package.json index 1f49f7353..1d43de722 100644 --- a/packages/@uppy/locales/package.json +++ b/packages/@uppy/locales/package.json @@ -4,7 +4,6 @@ "version": "4.8.3", "license": "MIT", "type": "module", - "main": "locale-pack/index.mjs", "scripts": { "build": "yarn node script/build-en_US.mjs && tsc --build tsconfig.build.json && yarn format", "format": "cd ../../ && yarn check packages/@uppy/locales/src/en_US.ts", @@ -26,6 +25,8 @@ }, "files": [ "lib", + "src", + "dist", "CHANGELOG.md" ], "dependencies": { diff --git a/packages/uppy/package.json b/packages/uppy/package.json index ba24e9b16..27b25bc71 100644 --- a/packages/uppy/package.json +++ b/packages/uppy/package.json @@ -8,6 +8,12 @@ "type": "module", "unpkg": "dist/uppy.min.js", "style": "dist/uppy.min.css", + "files": [ + "src", + "lib", + "dist", + "CHANGELOG.md" + ], "keywords": [ "file uploader", "drag-drop",