Commit graph

63 commits

Author SHA1 Message Date
Merlijn Vos
7bf319646a
Migrate from Cypress to Vitest Browser Mode (#5828)
- Remove `e2e` folder entirely
- Remove all hacky resolutions and yarn patches
- Remove `@types/jasmine`, `js2ts` (convert a JS file to TS), and
`vue-template-compiler` from `private/`
- Remove e2e CI job
- Add browsers tests for vue, svelte, and react headless components and
hooks.
- Add new (browser) tests for transloadit, aws-s3, and dashboard.
- Remove final useless scripts from `package.json`, use direct
references in CI.
- Fix Dropzone component accessibility discovered during testing
- Clean up github workflows (move linters.yml into ci.yml, update
e2e.yml)

**Why Vitest Browser Mode?**

We could have used playwright but vitest browser mode uses it under the
hood and we get the use the vitest we know a love. No two entirely
different setups, no different assertions to relearn, write e2e tests as
if you're writing unit tests. Easy, fast, beautiful.

https://vitest.dev/guide/browser/

**Has every single e2e test been rewritten?**

No there were quite a few tests that have a lot overlap with existing or
newly added tests. There were also some tests that were so heavily
mocked inside and out you start to wonder what the value still is. Open
to discuss which tests still need to be added.
2025-07-28 11:27:37 +02:00
Merlijn Vos
271db86ad0
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.
2025-07-10 13:21:18 +02:00
Merlijn Vos
0259b09d73
Headless components (#5727)
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2025-05-22 09:59:43 +02:00
Merlijn Vos
e6b5cb897b
@uppy/svelte: use SvelteKit as the build tool (#5484) 2024-10-15 09:58:14 +02:00
Mikael Finstad
2f47666f98
Build fixes (#4959)
* add en_US to gitignore

as it seems to be generated when running `yarn build`

* update angular.json

this seems to be added when running build
2024-02-27 12:20:58 +01:00
Antoine du Hamel
773c8cb9a1
meta: add support for TypeScript plugins (#4640) 2023-10-17 15:38:15 +02:00
Antoine du Hamel
0a7eceac21
meta: fix all ESLint warnings and turn them into errors (#4398) 2023-04-04 15:54:13 +02:00
Mikael Finstad
41b8563ae2
@uppy/companion: add S3 prefix env variable (#4320)
* Adds optional COMPANION_S3_PREFIX for companion

* Fixing prefix usage

* fix implementation

* add docs

---------

Co-authored-by: Will Wilson <will.wilson@asset.tv>
2023-03-17 12:18:30 +08:00
Raúl Ibáñez
3f07d79de6
Add example for Uppy with S3 and a Node.js server (#4129)
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-10-17 16:43:00 -03:00
Antoine du Hamel
f4f1b810b7
meta: use a single .env file for config (#3498)
Fixes: https://github.com/transloadit/uppy/issues/3473
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2022-02-17 15:47:15 +01:00
Antoine du Hamel
f08b71d48b
meta: consolidate ENV files and fix contributing guidelines (#3475)
And use `pull_request_target` event instead of `pull_request` to use secrets from forks.

Fixes: https://github.com/transloadit/uppy/issues/3473

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2022-02-14 15:13:38 +01:00
Merlijn Vos
6da874ed3a
meta: Make E2E Great Again (#3444)
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-08 17:37:27 +01:00
Antoine du Hamel
2f15f61536
dev: move configuration to a .env file (#3430)
Putting the dev config in a git-ignored files improves DX and lower the
risk of a private dev key being committed by mistake.
2022-01-11 19:38:41 +01:00
Antoine du Hamel
c2673a6c01 meta: add VSCode workspace settings to .gitignore 2021-12-18 19:40:12 +01:00
Antoine du Hamel
cd8af60bfb
examples: update angular-example to Angular v13 (#3325)
* examples: update angular-example to Angular v13

* meta: upgrade TS version accross the board

* meta: upgrade ESLint packages

* Fix angular-examples tests

* bump lock file

* fix type conflict

* Upgrade `ng-packagr`
2021-11-22 19:12:56 +01:00
Antoine du Hamel
01d7ea13e9
meta: use Yarn v3 instead of npm (#3237)
* meta: use Yarn v3 instead of npm

* Update CONTRIBUTING.md to fix linter errors

* remove remaining npm commands

* Update deps
2021-10-20 15:16:59 +02:00
Antoine du Hamel
4c1ade4e3a
examples: Update to Parcel 2 (#3275)
* examples: Update to Parcel 2

* switch to ESM
2021-10-20 12:06:12 +02:00
Renée Kooi
7bf390abda
add markdown linting using remark (#2181)
* build: add markdown linting

* build: support markdown front matter

* build: fail remark lint on warnings

* Fix markdown lint warnings

* changelog: fix markdown errors, allow literal URLs

* ci: add markdown lint step

* website: regenerate contributing.md

* build: properly ignore vendor and built files from remark-lint

* build: add private packages to lerna config
2020-04-13 09:48:11 +02:00
Renée Kooi
be66c47deb
Actually check types (#1918)
* types: stronger typings

* Remove remaining `declare module` things for uppy.use

* Format types standard-style-like

* Add `target` properties to plugin typings

* Add type for `replaceTargetContent` option

* xhr-upload: allow lowercase method

* opt in to stricter typechecks

* use the strictly typed version in all typings tests

* endtoend: use strict types in typescript test

* Add some comments to the typings file so IDEs will warn about untyped use()

* informer: remove obsolete option from typings

* react: generate prop types based on actual options types

* react: update types

* react: fix import in typings test

* companion-client: add `pluginId` property to ProviderOptions type

Co-Authored-By: Ifedapo .A. Olarewaju <ifedapoolarewaju@gmail.com>

* core: remove some `any` types

* *: add locale string types

* *: generate locale typings

* core: fix LocaleStrings<> type

* dashboard: add locale string type tests

* tus: inherit options typings from tus-js-client

* transloadit: add missing options types

* ci: do the required build steps before testing typings

* Support TokenStorage in types, add `title?: string` options

* form: update typings

* types: put TokenStorage type in dependents

* Document Uppy.StrictTypes

* if we pin at least we should use the latest

* Allow document.querySelector

I think it's a eslint-plugin-compat bug that it's marking querySelector
as not available in Android Chrome 78.

Co-authored-by: Ifedapo .A. Olarewaju <ifedapoolarewaju@gmail.com>
2020-02-12 16:22:09 +01:00
ifedapoolarewaju
8b6ff05c6f
chores: gitignore even more kubernetes deplpoyment file(s) 2019-11-11 09:11:46 +01:00
ifedapoolarewaju
82e9ebd3de
chores: gitignore kubernetes deployment file 2019-11-11 08:56:44 +01:00
Artur Paikin
4e54483e61 core: setOptions for Core and plugins (#1728)
* Add a method to update options in Core

* Add a method to update options in Plugin (for any plugins)

* Allow re-initializing i18n locales after they’ve been updated with .setOptions

* use rest spread instead of Object.assign

* override setOptions in plugins to include i18nInit

* merge restrictions object in setOptions

* check that newOpts exists

* add spread ...

* don’t double merge

* add i18nInit to all plugins that use translation strings

* add setOptions tests to Core and Dashboard

* add setOptions docs for Core and Plugins

* fix tests for thumbnail-generator by adding plugins: {} to mock core

cause ThumbnailGenerator now calls this.setPluginState, which expects `core.state.plugins`

* also update meta with setOptions if it’s passed, change the way this.opts is set in core

@goto-bus-stop does this look ok? merging restrictions opts in core

* if locale was passed to setOptions(), call plugin.setOptions() on all plugins, so that i18n updates

* add Dashboard test that checks if locale is updated from Core via setOptions()

* Reafactor website Dashboard example to use setOptions and allow selecting a locale

🎉
2019-11-04 10:33:30 +01:00
Renée Kooi
a617c82e3a
Tweak gitignore 2019-09-18 10:59:17 +02:00
Renée Kooi
e96043364d
build: gitignore some website build artifacts 2019-06-17 16:00:46 +02:00
Evgenia Karunus
8be2004826 Feature/replace dnd in drag drop package (#1565)
* /examples/dev - added drag-drop plugin dev environment

* @uppy/drag-drop - moved isDragDropSupported() to @uppy/utils

* @uppy/drag-drop - got rid of drag-drop npm library

* examples/dev - made compiled files placed in /output instead of /lib

* ~/examples/dev - made watchify only watch files once

* @uppy/drag-drop - add onPaste

* /examples/dev - readded html css override-attempts

* @uppy/drag-drop - made whole area clickable, and made it accessible

* @uppy/drag-drop - removed excessive outline in firefox

* REVERTED last 2 commits
2019-06-05 17:04:34 +03:00
Kevin van Zonneveld
dd59b3ddd7 Update .gitignore 2019-05-29 16:10:18 +02:00
Kevin van Zonneveld
a42c41a695 Ignore companion test file 2019-04-26 09:39:59 +02:00
Artur Paikin
f5a6008573
Merge pull request #1279 from transloadit/dashboard/ui-fixes
Dashboard ui fixes
2019-02-11 17:05:29 +03:00
Artur Paikin
d24995879a ignore parcel cache and dev bundle 2019-02-06 22:07:37 +03:00
Artur Paikin
55eee77e25 inherit font, allow overriding outline 2019-02-06 14:08:39 +03:00
Ifedapo Olarewaju
e2a9cd3e4c refactor: make companion output file point to root directory 2018-07-22 18:53:57 +01:00
Ifedapo Olarewaju
fa53a14aab remove config from gitignore 2018-07-22 18:53:56 +01:00
Renée Kooi
df7fb461a3
Ignore .eslintcache. 2018-06-21 14:36:01 +02:00
Kevin van Zonneveld
33eb159a01
Upload Uppy releases to Edgly.net CDN (#558)
* Upload Uppy releases to Edgly.net CDN

* Install AWS CLI if needed

* Remove unpkg from docs

a) Good citizenship to pay for production bandwidth ourselves
b) Nice to have a CDN that will exist exactly as long we will :)

* Fix typos (thx @goto-bus-stop)
2018-01-29 10:08:02 +01:00
Rich Willars
540c02b6b0 Add jest tests
Adds tests for src/core/Utils

Ports translator tests to jest

Adds tests for core/index

Added code coverage report

Adds tests for core/UppySocket

Adds tests to src/core and cleanup of test directory

Switched from import to require as the project supports node v4

Runs tests using Babel for backwards compatibilty

Adds src/core state tests

Adds src/core reset & close tests

Updates stagnant snapshot

Adds tests for preprocessors and postprocessors in src/core/Core.js

Adds tests for uploaders and metadata in src/core/Core

Adds tests for adding and removing files in src/core/Core

Adds test for getFile
2017-09-08 17:18:58 +01:00
Ifedapo Olarewaju
c264d390f6 docs: non bundled example 2017-06-20 17:05:14 +01:00
Artur Paikin
044aa2d533 Greatly improved example page and command for dev — watch:example 2016-07-01 22:50:40 -04:00
Kevin van Zonneveld
1df4cf42ad Copy dist contents, not dist itself. Display correct uppy.js location 2016-04-07 18:48:35 +02:00
Kevin van Zonneveld
37c622faf5 Add a test-acceptance script which spins up servers in the background 2016-04-06 10:32:04 +02:00
Artur Paikin
0c1dee61ae Add config folder to gitignore 2016-02-21 12:32:44 -05:00
Kevin van Zonneveld
8920458d57 Move dynamically written uppy stats to theme config so we can git ignore it /cc @arturi @hedgerh 2016-01-28 09:50:14 +01:00
Artur Paikin
5af9819f00 Ignore injected uppy dist folder 2016-01-22 15:56:07 -05:00
Kevin van Zonneveld
25359cd310 Support for local environment for if you want to deploy by hand 2016-01-11 08:13:06 +01:00
Kevin van Zonneveld
d4000fbb7f Ignore debug logs 2016-01-05 17:23:55 +01:00
Kevin van Zonneveld
90bd9eb47e Use hexo renderer 2015-12-17 15:31:34 +01:00
Kevin van Zonneveld
924eef06ad Rename playground->cdn example and make it work 2015-12-11 12:05:49 +01:00
Harry Hedger
278495e27d Removed bin/builder script. Updated .gitignore. 2015-12-10 04:34:59 -05:00
Harry Hedger
3fdf14f6a3 Copy to examples folder 2015-12-08 09:51:55 -05:00
Harry Hedger
0b6f902b95 Add static app.js to gitignore 2015-12-05 15:01:20 -05:00
Artur Paikin
b34d3a5628 Merge 2015-11-27 08:37:39 -05:00