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
This commit is contained in:
Merlijn Vos 2025-08-06 15:25:40 +02:00 committed by GitHub
parent ee0b2fc146
commit ea04a4d5fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 1 deletions

View file

@ -0,0 +1,6 @@
---
"@uppy/locales": patch
"uppy": patch
---
Add "files" in package.json to only publish what's needed

View file

@ -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": {

View file

@ -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",