Use turbo for building and watching concurrently (#5808)

- Add `typecheck` command to all packages.
- Use turbo to build and watch concurrently with caches.
- Remove root `bin/` folder with last global scripts
- `bin/companion.sh` -> `@uppy/companion/start-dev` (`yarn
start:companion` still works)
- `bin/build-components.mjs` -> `@uppy/components/migrate.mjs` (`yarn
migrate:components` can be used to run it). This only needs to be ran
for new components, not changing existing ones, so that's why it's not
part of the build process.

turbo is smart enough to build dependencies within a package first
before building the package itself (e.g if wanting to build @uppy/audio,
build @uppy/utils first). Unfortunately @uppy/core is a peer dep
everywhere turbo does not take it into account, yet it must be build
first to avoid race conditions. Therefor I added a turbo.json to each
package, which you normally never need, but this is an odd case I
suppose. Other solutions ran into cyclic dep errors.

Another PR would move over the test commands to turbo too.
This commit is contained in:
Merlijn Vos 2025-07-10 13:21:18 +02:00 committed by GitHub
parent 455abb32af
commit 271db86ad0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
101 changed files with 839 additions and 547 deletions

View file

@ -48,8 +48,8 @@ jobs:
env:
# https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
CYPRESS_INSTALL_BINARY: 0
- name: Build lib
run: corepack yarn run build:lib
- name: Build
run: corepack yarn run build
- name: Make Uppy bundle use local version
run: |
node <<'EOF'

View file

@ -63,6 +63,8 @@ jobs:
env:
# https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
CYPRESS_INSTALL_BINARY: 0
- name: Build
run: corepack yarn run build
- name: Run tests
run: corepack yarn run test:unit
@ -96,4 +98,4 @@ jobs:
env:
# https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
CYPRESS_INSTALL_BINARY: 0
- run: corepack yarn run test:ts
- run: corepack yarn run typecheck

View file

@ -47,6 +47,6 @@ jobs:
- name: Install dependencies
run: corepack yarn workspaces focus @uppy/companion
- name: Run tests
run: corepack yarn run test:companion
run: corepack yarn workspace @uppy/companion test
- name: Run type checks in focused workspace
run: corepack yarn run build:companion
run: corepack yarn workspace @uppy/companion typecheck

1
.gitignore vendored
View file

@ -17,6 +17,7 @@ yarn-error.log
tsconfig.tsbuildinfo
tsconfig.build.tsbuildinfo
.svelte-kit
.turbo
dist/
lib/

View file

@ -1,37 +0,0 @@
#!/usr/bin/env bash
# This script is meant to be run on a dev's machine to update the version on
# Yarn used by the monorepo. Its goal is to make sure that every mention of Yarn
# version is updated, and it re-installs the plugins to make sure those are
# up-to-date as well.
set -o pipefail
set -o errexit
set -o nounset
CURRENT_VERSION=$(corepack yarn --version)
LAST_VERSION=$(curl \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/yarnpkg/berry/releases?per_page=1 | \
awk '{ if ($1 == "\"tag_name\":") print $2 }' | \
sed 's#^"@yarnpkg/cli/##;s#",$##')
[ "$CURRENT_VERSION" = "$LAST_VERSION" ] && \
echo "Already using latest version." && \
exit 0
echo "Upgrading to Yarn $LAST_VERSION (from Yarn $CURRENT_VERSION)..."
PLUGINS=$(awk '{ if ($1 == "spec:") print $2 }' .yarnrc.yml)
echo "$PLUGINS" | xargs -n1 -t corepack yarn plugin remove
cp package.json .yarn/cache/tmp.package.json
sed "s#\"yarn\": \"$CURRENT_VERSION\"#\"yarn\": \"$LAST_VERSION\"#;s#\"yarn@$CURRENT_VERSION\"#\"yarn@$LAST_VERSION\"#" .yarn/cache/tmp.package.json > package.json
rm .yarn/cache/tmp.package.json
echo "$PLUGINS" | xargs -n1 -t corepack yarn plugin import
corepack yarn
git add package.json yarn.lock
git add .yarn/plugins

View file

@ -51,6 +51,7 @@
"cypress": "^13.0.0",
"cypress-terminal-report": "^6.0.0",
"deep-freeze": "^0.0.1",
"execa": "^9.6.0",
"parcel": "^2.9.3",
"process": "^0.11.10",
"prompts": "^2.4.2",

View file

@ -14,45 +14,37 @@
"e2e"
],
"scripts": {
"build": "yarn build:lib && npm-run-all --parallel build:js build:css --serial build:components size",
"build:lib": "tsc --build tsconfig.build.json",
"build:angular": "yarn workspace angular build",
"build:bundle": "yarn workspace uppy build:bundle",
"build": "turbo run build build:css --filter='./packages/@uppy/*' --filter='./packages/uppy'",
"build:clean": "cp .gitignore .gitignore.bak && printf '!node_modules\n!**/node_modules/**/*\n' >> .gitignore; git clean -Xfd packages e2e .parcel-cache coverage; mv .gitignore.bak .gitignore",
"build:companion": "yarn workspace @uppy/companion build",
"build:components": "node bin/build-components.mjs",
"build:css": "yarn workspaces foreach --all --no-private --parallel --exclude @uppy/components run build:css && yarn workspace @uppy/components build:css",
"build:js": "npm-run-all build:js:typeless build:locale-pack build:angular build:bundle",
"build:js:typeless": "npm-run-all build:companion build:svelte",
"build:locale-pack": "yarn workspace @uppy/locales build && yarn workspace @uppy/locales test",
"build:svelte": "yarn workspace @uppy/svelte build",
"migrate:components": "yarn workspace @uppy/components migrate",
"check": "yarn exec biome check --write",
"check:ci": "yarn exec biome ci",
"dev": "yarn workspace @uppy-dev/dev dev",
"dev:with-companion": "npm-run-all --parallel start:companion dev",
"e2e": "yarn build:clean && yarn build && yarn e2e:skip-build",
"e2e:ci": "start-server-and-test 'npm-run-all --parallel e2e:client start:companion:with-loadbalancer' '1234|3020' e2e:headless",
"e2e:client": "yarn workspace e2e client:start",
"e2e:cypress": "yarn workspace e2e cypress:open",
"e2e:generate": "yarn workspace e2e generate-test",
"e2e:headless": "yarn workspace e2e cypress:headless",
"e2e:skip-build": "npm-run-all --parallel watch:js:lib e2e:client start:companion:with-loadbalancer e2e:cypress",
"e2e": "npm-run-all --parallel watch e2e:client start:companion:with-loadbalancer e2e:cypress",
"release": "PACKAGES=$(yarn workspaces list --json) yarn workspace @uppy-dev/release interactive",
"size": "echo 'JS Bundle mingz:' && cat ./packages/uppy/dist/uppy.min.js | gzip | wc -c && echo 'CSS Bundle mingz:' && cat ./packages/uppy/dist/uppy.min.css | gzip | wc -c",
"start:companion": "bash bin/companion.sh",
"start:companion": "yarn workspace @uppy/companion start:dev",
"start:companion:with-loadbalancer": "e2e/start-companion-with-load-balancer.mjs",
"test": "npm-run-all lint test:locale-pack test:unit test:companion",
"test:companion": "yarn workspace @uppy/companion test",
"test:companion:watch": "yarn workspace @uppy/companion test --watch",
"test:locale-packs": "yarn locale-packs:unused && yarn locale-packs:warnings",
"test:locale-packs:unused": "yarn workspace @uppy-dev/locale-pack test unused",
"test:locale-packs:warnings": "yarn workspace @uppy-dev/locale-pack test warnings",
"test:unit": "yarn test:watch --run",
"test:watch": "vitest --environment jsdom --dir packages/@uppy",
"typecheck": "turbo run typecheck --filter='./packages/@uppy/*' --filter='./packages/uppy'",
"watch": "turbo watch build build:css --filter='./packages/@uppy/*'",
"test:locale-pack": "yarn workspace @uppy/locales test",
"test:ts": "yarn tsc -b && yarn workspace @uppy/svelte check",
"test:unit": "yarn run build && yarn test:watch --run",
"test:watch": "vitest --environment jsdom --dir packages/@uppy",
"uploadcdn": "yarn workspace uppy exec -- node upload-to-cdn.js",
"version": "yarn node ./bin/after-version-bump.js",
"watch": "npm-run-all --parallel watch:js:bundle watch:js:lib",
"watch:js:bundle": "onchange 'packages/{@uppy/,}*/src/**/*.{js,ts,jsx,tsx,svelte,scss,css}' --initial --verbose -- yarn run build:bundle",
"watch:js:lib": "onchange 'packages/{@uppy/,}*/src/**/*.{js,ts,jsx,tsx,svelte,scss,css}' --initial --verbose -- yarn run build"
"version": "yarn node ./bin/after-version-bump.js"
},
"resolutions": {
"@types/react": "^18",
@ -65,18 +57,10 @@
},
"devDependencies": {
"@biomejs/biome": "2.0.5",
"@types/jasmine": "file:./private/@types/jasmine",
"@types/jasminewd2": "file:./private/@types/jasmine",
"chalk": "^5.0.0",
"dotenv": "^16.0.0",
"esbuild": "^0.25.0",
"execa": "^9.5.1",
"glob": "^8.0.0",
"jsdom": "^24.0.0",
"jsdom": "^26.1.0",
"npm-run-all": "^4.1.5",
"onchange": "^7.1.0",
"resolve": "^1.17.0",
"start-server-and-test": "^1.14.0",
"turbo": "^2.5.4",
"typescript": "^5.8.3",
"vitest": "^1.6.1",
"vue-template-compiler": "workspace:*"

View file

@ -0,0 +1,24 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": [
"@uppy/core#build",
"@uppy/dashboard#build",
"@uppy/drag-drop#build",
"@uppy/progress-bar#build",
"@uppy/status-bar#build",
"@uppy/utils#build"
],
"inputs": [
"projects/uppy/angular/src/**/*.{js,ts,jsx,tsx}",
"package.json",
"angular.json",
"projects/uppy/angular/ng-package.json",
"projects/uppy/angular/tsconfig.lib.json",
"projects/uppy/angular/tsconfig.lib.prod.json"
],
"outputs": ["dist/uppy/angular/**"]
}
}
}

View file

@ -44,6 +44,7 @@
},
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css"
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",
"typecheck": "tsc --build"
}
}

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -5,9 +5,6 @@
"license": "MIT",
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
},
"keywords": [
"file uploader",
"aws s3",

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -107,7 +107,9 @@
"build": "tsc -p .",
"deploy": "kubectl apply -f infra/kube/companion-kube.yml",
"start": "node ./lib/standalone/start-server.js",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --runInBand"
"start:dev": "bash start-dev",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --runInBand",
"typecheck": "tsc --build"
},
"engines": {
"node": "^18.20.0 || ^20.15.0 || >=22.0.0"

View file

@ -1,8 +1,8 @@
#!/usr/bin/env bash
# Load local env vars. In CI, these are injected.
if [ -f .env ]; then
node --watch -r dotenv/config ./packages/@uppy/companion/src/standalone/start-server.js
if [ -f ../../../.env ]; then
DOTENV_CONFIG_PATH=../../../.env node --watch -r dotenv/config src/standalone/start-server.js
else
env \
COMPANION_DATADIR="./output" \
@ -13,6 +13,5 @@ else
COMPANION_SECRET="development" \
COMPANION_PREAUTH_SECRET="development2" \
COMPANION_ALLOW_LOCAL_URLS="true" \
node --watch ./packages/@uppy/companion/src/standalone/start-server.js
fi
node --watch src/standalone/start-server.js
fi

View file

@ -1,5 +1,7 @@
#!/usr/bin/env node
// When new components are added (not when existing ones are changed),
// run this script to generate React, Vue, and Svelte wrappers
import { existsSync } from 'node:fs'
import fs from 'node:fs/promises'
import path from 'node:path'
@ -7,7 +9,7 @@ import { fileURLToPath } from 'node:url'
// Get the directory of this script
const scriptDir = path.dirname(fileURLToPath(import.meta.url))
const rootDir = path.resolve(scriptDir, '..')
const rootDir = path.resolve(scriptDir, '../../..')
// Define paths
// source:
@ -214,7 +216,7 @@ try {
vueComponents.push(componentName)
svelteComponents.push(componentName)
console.log(`✔︎ ${componentName}`)
console.log(` ${componentName}`)
} catch (error) {
console.error(`Error processing component ${file}:`, error)
}

View file

@ -22,8 +22,9 @@
},
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:css": "tailwindcss -m -i ./src/input.css -o ./dist/styles.css && yarn copy-css",
"copy-css": "mkdir -p ../react/dist ../vue/dist ../svelte/dist && cp ./dist/styles.css ../react/dist/ && cp ./dist/styles.css ../vue/dist/ && cp ./dist/styles.css ../svelte/dist/"
"build:css": "tailwindcss -m -i ./src/input.css -o ./dist/styles.css",
"migrate": "node migrate.mjs",
"typecheck": "tsc --build"
},
"dependencies": {
"@webcam/core": "^1.0.1",

View file

@ -7,12 +7,6 @@
@import 'tailwindcss/theme.css' layer(theme) prefix(uppy);
@import 'tailwindcss/utilities.css' layer(utilities) prefix(uppy);
@import "@uppy/core/dist/style.min.css";
@import "@uppy/image-editor/dist/style.min.css";
@import "@uppy/webcam/dist/style.min.css";
@import "@uppy/audio/dist/style.min.css";
@import "@uppy/screen-capture/dist/style.min.css";
/*
* Instead we took the preflight styles from tailwind and apply it under a .uppy-reset class
* so we can enjoy the benefits of preflight styles without affecting the rest of the website.

View file

@ -0,0 +1,20 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": [
"@uppy/audio#build",
"@uppy/core#build",
"@uppy/image-editor#build",
"@uppy/remote-sources#build",
"@uppy/screen-capture#build",
"@uppy/webcam#build"
],
"outputs": ["lib/**"]
},
"build:css": {
"inputs": ["src/input.css", "src/**/*.{js,ts,jsx,tsx}"],
"outputs": ["dist/styles.css"]
}
}
}

View file

@ -39,6 +39,7 @@
"vitest": "^1.6.1"
},
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
}
}

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -11,7 +11,8 @@
],
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css"
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -8,7 +8,8 @@
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css"
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -8,7 +8,8 @@
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css"
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -7,7 +7,8 @@
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css"
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -8,7 +8,8 @@
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css"
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -8,7 +8,8 @@
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css"
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -8,7 +8,8 @@
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css"
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -8,7 +8,8 @@
"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",
"test": "yarn node script/test.mjs unused"
"test": "yarn node script/test.mjs unused",
"typecheck": "tsc --build"
},
"keywords": [
"uppy",

View file

@ -0,0 +1,42 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": [
"@uppy/image-editor#build",
"@uppy/box#build",
"@uppy/core#build",
"@uppy/google-drive-picker#build",
"@uppy/onedrive#build",
"@uppy/compressor#build",
"@uppy/url#build",
"@uppy/file-input#build",
"@uppy/dashboard#build",
"@uppy/google-photos-picker#build",
"@uppy/audio#build",
"@uppy/facebook#build",
"@uppy/google-drive#build",
"@uppy/thumbnail-generator#build",
"@uppy/screen-capture#build",
"@uppy/xhr-upload#build",
"@uppy/transloadit#build",
"@uppy/zoom#build",
"@uppy/dropbox#build",
"@uppy/webdav#build",
"@uppy/unsplash#build",
"@uppy/status-bar#build",
"@uppy/webcam#build",
"@uppy/instagram#build",
"@uppy/drag-drop#build"
],
"inputs": [
"../*/src/locale.ts",
"script/**/*.{js,ts,jsx,tsx}",
"package.json",
"tsconfig.json",
"tsconfig.build.json"
],
"outputs": ["lib/**"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -8,7 +8,8 @@
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css"
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -8,7 +8,8 @@
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css"
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,9 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"build:css": "mkdir -p dist && cp ../components/dist/styles.css dist/styles.css",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,13 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/components#build", "@uppy/core#build"],
"outputs": ["lib/**"]
},
"build:css": {
"dependsOn": ["build", "@uppy/components#build:css"],
"outputs": ["dist/styles.css"]
}
}
}

View file

@ -22,5 +22,9 @@
},
"peerDependencies": {
"@uppy/core": "workspace:^"
},
"scripts": {
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -8,7 +8,8 @@
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css"
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -8,7 +8,8 @@
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css"
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -25,5 +25,9 @@
"devDependencies": {
"redux": "^4.0.0",
"vitest": "^1.6.1"
},
"scripts": {
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
}
}

View file

@ -33,6 +33,7 @@
},
"scripts": {
"build": "svelte-kit sync && svelte-package",
"build:css": "cp ../components/dist/styles.css dist/styles.css",
"prepublishOnly": "yarn run package",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
},

View file

@ -0,0 +1,20 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/components#build", "@uppy/core#build"],
"inputs": [
"src/**/*.{js,ts,svelte}",
"package.json",
"tsconfig.json",
"svelte.config.js",
"vite.config.js"
],
"outputs": [".svelte-kit/**", "dist/**"]
},
"build:css": {
"dependsOn": ["build", "@uppy/components#build:css"],
"outputs": ["dist/styles.css"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -8,7 +8,8 @@
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css"
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -5,7 +5,8 @@
"license": "MIT",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -4,6 +4,11 @@
"license": "MIT",
"type": "module",
"main": "lib/index.js",
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:css": "mkdir -p dist && cp ../components/dist/styles.css dist/styles.css",
"typecheck": "tsc --build"
},
"dependencies": {
"@uppy/components": "workspace:^",
"preact": "^10.5.13",

View file

@ -0,0 +1,13 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/components#build", "@uppy/core#build"],
"outputs": ["lib/**"]
},
"build:css": {
"dependsOn": ["build", "@uppy/components#build:css"],
"outputs": ["dist/styles.css"]
}
}
}

View file

@ -8,7 +8,8 @@
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css"
"build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -7,7 +7,8 @@
"types": "types/index.d.ts",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -6,7 +6,8 @@
"main": "lib/index.js",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.build.json"
"build": "tsc --build tsconfig.build.json",
"typecheck": "tsc --build"
},
"keywords": [
"file uploader",

View file

@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@uppy/core#build"]
}
}
}

View file

@ -73,7 +73,8 @@
"scripts": {
"build": "tsc --build tsconfig.build.json",
"build:bundle": "node build-bundle.mjs",
"build:css": "sass --load-path=../../packages src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css"
"build:css": "sass --load-path=../../packages src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",
"typecheck": "tsc --build"
},
"devDependencies": {
"@aws-sdk/client-s3": "^3.338.0",

View file

@ -1,140 +0,0 @@
{
"files": [],
"references": [
{
"path": "./packages/@uppy/audio/tsconfig.build.json"
},
{
"path": "./packages/@uppy/aws-s3/tsconfig.build.json"
},
{
"path": "./packages/@uppy/box/tsconfig.build.json"
},
{
"path": "./packages/@uppy/companion-client/tsconfig.build.json"
},
{
"path": "./packages/@uppy/compressor/tsconfig.build.json"
},
{
"path": "./packages/@uppy/core/tsconfig.build.json"
},
{
"path": "./packages/@uppy/dashboard/tsconfig.build.json"
},
{
"path": "./packages/@uppy/drag-drop/tsconfig.build.json"
},
{
"path": "./packages/@uppy/drop-target/tsconfig.build.json"
},
{
"path": "./packages/@uppy/dropbox/tsconfig.build.json"
},
{
"path": "./packages/@uppy/facebook/tsconfig.build.json"
},
{
"path": "./packages/@uppy/file-input/tsconfig.build.json"
},
{
"path": "./packages/@uppy/form/tsconfig.build.json"
},
{
"path": "./packages/@uppy/golden-retriever/tsconfig.build.json"
},
{
"path": "./packages/@uppy/google-drive/tsconfig.build.json"
},
{
"path": "./packages/@uppy/google-drive-picker/tsconfig.build.json"
},
{
"path": "./packages/@uppy/google-photos-picker/tsconfig.build.json"
},
{
"path": "./packages/@uppy/image-editor/tsconfig.build.json"
},
{
"path": "./packages/@uppy/informer/tsconfig.build.json"
},
{
"path": "./packages/@uppy/instagram/tsconfig.build.json"
},
{
"path": "./packages/@uppy/locales/tsconfig.build.json"
},
{
"path": "./packages/@uppy/onedrive/tsconfig.build.json"
},
{
"path": "./packages/@uppy/progress-bar/tsconfig.build.json"
},
{
"path": "./packages/@uppy/provider-views/tsconfig.build.json"
},
{
"path": "./packages/@uppy/remote-sources/tsconfig.build.json"
},
{
"path": "./packages/@uppy/screen-capture/tsconfig.build.json"
},
{
"path": "./packages/@uppy/status-bar/tsconfig.build.json"
},
{
"path": "./packages/@uppy/store-default/tsconfig.build.json"
},
{
"path": "./packages/@uppy/thumbnail-generator/tsconfig.build.json"
},
{
"path": "./packages/@uppy/transloadit/tsconfig.build.json"
},
{
"path": "./packages/@uppy/tus/tsconfig.build.json"
},
{
"path": "./packages/@uppy/unsplash/tsconfig.build.json"
},
{
"path": "./packages/@uppy/url/tsconfig.build.json"
},
{
"path": "./packages/@uppy/utils/tsconfig.build.json"
},
{
"path": "./packages/@uppy/webcam/tsconfig.build.json"
},
{
"path": "./packages/@uppy/xhr-upload/tsconfig.build.json"
},
{
"path": "./packages/@uppy/zoom/tsconfig.build.json"
},
{
"path": "./packages/@uppy/webdav/tsconfig.build.json"
},
{
"path": "./packages/uppy/tsconfig.build.json"
},
{
"path": "./packages/@uppy/store-redux/tsconfig.build.json"
},
{
"path": "./packages/@uppy/redux-dev-tools/tsconfig.build.json"
},
// The order matters. @uppy/components must come after all other packages
// Then the framework implementations must go after @uppy/components
{
"path": "./packages/@uppy/components/tsconfig.build.json"
},
{
"path": "./packages/@uppy/react/tsconfig.build.json"
},
{
"path": "./packages/@uppy/vue/tsconfig.build.json"
}
]
}

View file

@ -1,139 +0,0 @@
{
"files": [],
"references": [
{
"path": "./packages/@uppy/audio/tsconfig.json"
},
{
"path": "./packages/@uppy/aws-s3/tsconfig.json"
},
{
"path": "./packages/@uppy/box/tsconfig.json"
},
{
"path": "./packages/@uppy/companion-client/tsconfig.json"
},
{
"path": "./packages/@uppy/compressor/tsconfig.json"
},
{
"path": "./packages/@uppy/core/tsconfig.json"
},
{
"path": "./packages/@uppy/dashboard/tsconfig.json"
},
{
"path": "./packages/@uppy/drag-drop/tsconfig.json"
},
{
"path": "./packages/@uppy/drop-target/tsconfig.json"
},
{
"path": "./packages/@uppy/dropbox/tsconfig.json"
},
{
"path": "./packages/@uppy/facebook/tsconfig.json"
},
{
"path": "./packages/@uppy/file-input/tsconfig.json"
},
{
"path": "./packages/@uppy/form/tsconfig.json"
},
{
"path": "./packages/@uppy/golden-retriever/tsconfig.json"
},
{
"path": "./packages/@uppy/google-drive/tsconfig.json"
},
{
"path": "./packages/@uppy/google-drive-picker/tsconfig.json"
},
{
"path": "./packages/@uppy/google-photos-picker/tsconfig.json"
},
{
"path": "./packages/@uppy/image-editor/tsconfig.json"
},
{
"path": "./packages/@uppy/informer/tsconfig.json"
},
{
"path": "./packages/@uppy/instagram/tsconfig.json"
},
{
"path": "./packages/@uppy/locales/tsconfig.json"
},
{
"path": "./packages/@uppy/onedrive/tsconfig.json"
},
{
"path": "./packages/@uppy/progress-bar/tsconfig.json"
},
{
"path": "./packages/@uppy/provider-views/tsconfig.json"
},
{
"path": "./packages/@uppy/remote-sources/tsconfig.json"
},
{
"path": "./packages/@uppy/screen-capture/tsconfig.json"
},
{
"path": "./packages/@uppy/status-bar/tsconfig.json"
},
{
"path": "./packages/@uppy/store-default/tsconfig.json"
},
{
"path": "./packages/@uppy/thumbnail-generator/tsconfig.json"
},
{
"path": "./packages/@uppy/transloadit/tsconfig.json"
},
{
"path": "./packages/@uppy/tus/tsconfig.json"
},
{
"path": "./packages/@uppy/unsplash/tsconfig.json"
},
{
"path": "./packages/@uppy/url/tsconfig.json"
},
{
"path": "./packages/@uppy/utils/tsconfig.json"
},
{
"path": "./packages/@uppy/webcam/tsconfig.json"
},
{
"path": "./packages/@uppy/xhr-upload/tsconfig.json"
},
{
"path": "./packages/@uppy/zoom/tsconfig.json"
},
{
"path": "./packages/@uppy/webdav/tsconfig.json"
},
{
"path": "./packages/uppy/tsconfig.json"
},
{
"path": "./packages/@uppy/store-redux/tsconfig.build.json"
},
{
"path": "./packages/@uppy/redux-dev-tools/tsconfig.build.json"
},
// The order matters. @uppy/components must come after all other packages
// Then the framework implementations must go after @uppy/components
{
"path": "./packages/@uppy/components/tsconfig.build.json"
},
{
"path": "./packages/@uppy/react/tsconfig.build.json"
},
{
"path": "./packages/@uppy/vue/tsconfig.build.json"
}
]
}

41
turbo.json Normal file
View file

@ -0,0 +1,41 @@
{
"$schema": "https://turborepo.com/schema.json",
"tasks": {
"build": {
"outputLogs": "new-only",
"dependsOn": ["^build"],
"inputs": [
"src/**/*.{js,ts,jsx,tsx}",
"package.json",
"tsconfig.json",
"tsconfig.build.json"
],
"outputs": ["lib/**", "dist/**"]
},
"build:css": {
"outputLogs": "new-only",
"inputs": ["src/**/*.scss"],
"outputs": ["lib/**/*.css", "dist/**/*.css"]
},
"typecheck": {
"outputLogs": "new-only",
"dependsOn": ["build"],
"inputs": ["src/**/*.{js,ts,jsx,tsx}", "tsconfig.json"]
},
"uppy#build": {
"outputLogs": "new-only",
"dependsOn": ["^build"],
"inputs": [
"src/**/*.{js,ts,jsx,tsx}",
"package.json",
"bundle.mjs",
"build-bundle.mjs"
],
"outputs": ["lib/**", "dist/**"]
},
"watch": {
"persistent": true,
"cache": false
}
}
}

Some files were not shown because too many files have changed in this diff Show more