Commit graph

352 commits

Author SHA1 Message Date
Antoine du Hamel
2a4e2bf823
meta: fix e2e (#3562) 2022-03-11 19:24:38 +01:00
Antoine du Hamel
6012220d17
meta: fix support of export declaration in source files (#3558)
Rewrite all `export … from …` to `module.exports = require(…)`, and
`export default …` to `module.exports = …`  when transpiling ESM to CJS.

It also transform `.jsx` imports into `.js` as we are not shipping JSX to npm.
2022-03-11 12:37:55 +01:00
Mikael Finstad
267c34045a
replace debug
remove debug flag
instead add allowLocalUrls (COMPANION_ALLOW_LOCAL_URLS)
which defaults to false
this fixes https://huntr.dev/bounties/8b060cc3-2420-468e-8293-b9216620175b/

also don't allow localhost for any providers getURLMeta
2022-03-02 19:02:56 +08:00
Mikael Finstad
146d8f302d
Fix COMPANION_PATH (#3515)
* Fix COMPANION_PATH

make sure it serves everything served behind that path
fixes #3514

* add tests for subpath

* chmod +x companion.sh

* remove process.exit

as it's considered harmful in this case
an error thrown will also be printed to stderr

* add backward compatible redirect

* Apply suggestions from code review

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

* fix oops

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-03-02 17:52:59 +07:00
Antoine du Hamel
38174972d9
meta: fix CDN bundle (#3494) 2022-02-17 16:22:03 +01: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
a6e36217ad
meta: add support for ESM sources in build script (#3468) 2022-02-15 17:46:14 +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
848aa858e1
meta: replace browserify with esbuild (#3363)
* meta: build bundle using esbuild

* meta: don't use terser to build minified bundle

* website: use esbuild instead of browserify

* remove disc and disc.html

* Update lock file

* Simplify inject script

* nits

* fix `yarn start`
2022-01-13 15:22:01 +01:00
Antoine du Hamel
007aad98fb
meta: use ESBuild to bundle in E2E test suite (#3375)
* use ESBuild to bundle E2E tests

* fix linter warnings

* Update create-react-app deps

* list test suites dynamically
2021-12-16 11:33:19 +01:00
Antoine du Hamel
b17f1da4f3
meta: enable linter on mjs scripts (#3364) 2021-12-13 11:39:08 +01:00
Antoine du Hamel
3f56f194a7
meta: update npm deps (#3352) 2021-12-09 18:12:34 +01:00
Antoine du Hamel
9c7b17e936
@uppy/companion: don't pin Yarn version in package.json (#3347)
Fixes: https://github.com/transloadit/uppy/issues/3356
2021-12-09 16:52:33 +01:00
Antoine du Hamel
b8a466b6ad
meta: add release automations (#3304)
* meta: add release automations

* Add missing versions

* remove old scripts that are no longer useful

* add special casing for robodog

* skip fetching if HEAD is already available locally

* Publish to npm from GitHub actions

* fixes

* Update afterVersionBump script

* Fix getUpToDateRefsFromGitHub script

* Make sub-package specific changelogs

* fix git and PR opening process in GH Actions

* fix Release action

* don't fetch GH user names in changelog

* add support for commits that touch several packages

* add website as a valid commit message prefix

* Assign the PR to the releaser and fix other GH related bugs

* Remove release branch from CI

* Restore git history at the end of local release session

* skip CI if assignee has not approved the PR

* fix release commit message

* beautify commit message

* Special case for @uppy/robodog

* Failure is not an option

* Rename release CI

* Always rewind before crashing

* Improve logging

* fix changelog table

* fix linter

* Update CONTRIBUTING.md

* Remove unused package

* Disable Release workflow between two releases

* Fix git command and workaround deleted branch
2021-12-07 18:19:06 +01:00
Antoine du Hamel
96192e4177
@uppy/companion: fix deploy Yarn version (#3327)
* @uppy/companion: fix deploy

When running from the Dockerfile, Corepack cannot pick up the
information from the parent package.json and tries to run with an
older version of Yarn.

* Update update-yarn.sh
2021-11-29 20:15:49 +07:00
Antoine du Hamel
9380cf575c
build: disable loose transpilation for legacy bundle (#3329)
* Revert "Convert sets to arrays prior to using spread operator to enable transpilation to ES5 (#3297)"

This reverts commit a545c66d10.

* build: disable loose transpilation for legacy bundle

Refs: https://github.com/transloadit/uppy/pull/3297#issuecomment-963228990
2021-11-24 23:12:14 +01:00
Merlijn Vos
00094af525
Refactor locale scripts & generate types and docs (#3276)
Closes #3232 

### Summary

- Create `locale.js` for every plugin instead of `this.defaultLocale` in the class
- Complete refactor of locale scripts
  - No dynamic plugin class imports with hacks to mimic the environment in order to get the `defaultLocale`.
  - Separate tests and build in separate files
  - Add two modes for test file, `unused` (fails hard) and `warnings`
- Generate docs
  - Use remark to cleanly mutate the file
  - Rename some doc files to match the plugin name (such as `statusbar` --> `status-bar`)
  - Comments in `locale.js` are kept and are present in the docs as well.
- Generate types
2021-11-10 11:43:04 +01:00
Kevin van Zonneveld
bfe659820e
Upgrade linting to 2.0.0-0 (#3280)
* Upgrade linting to 2.0.0-0

* Adjust so we can pass without error

* Fix linting

* Update header-blacklist.js

* Update index.js

* Update Uppy.js

* Update Components.js

* Update StatusBar.js

* Update Assembly.js

* Upgrade to linting 2.0.0 (final release)
2021-11-09 11:19:05 +00:00
Murderlon
0dbec60257
Release uppy@2.1.2, @uppy/robodog@2.1.3 2021-11-08 16:09:34 +01:00
Murderlon
9fbc0de51b
meta: update version references in docs 2021-11-08 15:59:50 +01:00
Antoine du Hamel
8fae622a05 meta: add update-yarn script (#3278) 2021-10-27 17:52:47 +02: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
Artur Paikin
01158d7445
e2e tests: Move transloadit2 test into transloadit, remove the former (#3271)
* move transloadit2 test into transloadit, remove the former

* Update endtoend-build-tests

* Revert "move transloadit2 test into transloadit, remove the former"

This reverts commit ff25d4b8cd.

* Revert "Update endtoend-build-tests"

This reverts commit 723f48fc03.

* rename transloadit2 to transloadit-assembly-options

* timeout option is nested now https://webdriver.io/docs/api/element/waitForExist/
2021-10-19 18:44:35 +01:00
Antoine du Hamel
7cad0130dd
ci: fix tranloadit2 e2e tests (#3270)
* ci: fix tranloadit2 e2e tests

* ci: Re-enable tranloadit tests

* ci: update settings

* improve comments

* Remove cropping step from transloadit2 e2e test

* add steps back

* remove template id

* increase timeout

* transloadit2

* Re-enable all e2e tests

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-10-19 15:23:32 +01:00
Artur Paikin
38f780d14c
build: make-changelog script and draft 2.0 changelog (#3140)
* draft 2.0 changelog, WIP

* add bash script that outputs helpful list of changes between two tags

* Update CHANGELOG.md

* Update make-changelog
2021-08-29 22:57:29 +01:00
Antoine du Hamel
6b7ad5e7c7
Stricter linter (#3095)
* enforce some eslint rules

* enforce accessibility linter rules

* harden lint rules with only 1 or 2 warnings

* fix remaining rules with less than 3 warnings

* fix e2e tests

* fix remaining rules with less than 4 warnings

* fix remaining rules with less than 6 warnings

* fix `shuffleTaglines`

* fix companion build
2021-08-17 20:32:57 +02:00
Antoine du Hamel
d94c7d1232
build: harden locale pack check for unused or duplicate key (#3081) 2021-08-09 19:32:44 +02:00
Antoine du Hamel
126984ece3 @uppy/utils: avoid creating throw-away <div> in isDragDropSupported (#3080) 2021-08-09 16:12:47 +02:00
Renée Kooi
dd55949b79
Remove backwards compatibility hacks in locales (#2969)
* Remove poweredBy2 hack

* Remove exceedsSize2 hack

* tick off poweredBy/exceedsSize task

* do not lint generated files

* fix tests
2021-07-29 15:09:25 +02:00
Antoine du Hamel
823453a3d6
build: remove @babel/polyfill in favor of core-js@3 (#3025)
Also removes Babel plugin that have been merged in `@babel/preset-env`
from our dependencies.

Also switch back to the default value for the `modules` options:

> Setting this to false will preserve ES modules. Use this only if you
> intend to ship native ES Modules to browsers. If you are using a
> bundler with Babel, the default modules: "auto" is always preferred.

Refs: https://babel.dev/docs/en/babel-preset-env#options
Refs: https://github.com/zloirock/core-js/blob/HEAD/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md
2021-07-19 23:21:25 +02:00
Renée Kooi
34f08cdb5f
Fix lint warnings in bin/locale-packs.js (#3028) 2021-07-19 12:39:08 +02:00
Antoine du Hamel
d40b5241db
core: remove more IE hacks (#3015)
We can now use `Object.fromEntries`, `Object.values`, and `Symbol`.
Also changes polyfill suggestion for legacy browsers to use `core-js`
which includes almost all we need and more.
2021-07-16 09:27:51 +02:00
Antoine du Hamel
c1859e528a
tools: remove use of promisify where possible (#3010)
* tools: remove use of `promisify` where possible

Remove use of `promisify` when a native promise API is available.

* website: fix minify build

It seems that `tinyify` doesn't support some modern ES features,
replacing it with `terser`.

* website: fix highlight script

`Prism` needs to be a global variable now it seems...
2021-07-14 14:22:06 +02:00
Artur Paikin
a8003c873e
core: force new keyword (#2949)
* Force Uppy initialization with new keyword, remove run()

* update some types

* update docs and examples

* Update packages/@uppy/core/src/index.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

* Update packages/@uppy/core/types/index.d.ts

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

* add new in tests

* Move all types to ESM syntax and fix all issues

* Add back e2e build script and revert uppy docs commit

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Murderlon <merlijn@soverin.net>
2021-07-08 19:02:13 +01:00
Antoine du Hamel
431f437d18 deps: upgrade pacote to v11 2021-07-07 15:49:42 +02:00
Antoine du Hamel
95a8d871e9 deps: remove execa and refactor update-contributors script 2021-07-07 15:49:42 +02:00
Antoine du Hamel
06d5b3e254 deps: remove mkdirp in favor of the built-in fs.mkdir 2021-07-07 15:49:39 +02:00
Murderlon
fe96096c3d
Merge branch 'master' into 2.0
* master: (23 commits)
  A bit of polish (#2986)
  Companion: Fix typescript error
  Companion: Fix invalid referrer crashing the process
  Publish 1.30 blog post
  Release
  Build: Companion needs to be built before locale-pack
  Release
  Fix build: locale-pack first, integrations second
  changelog for 1.30
  Release
  Update package.json
  Only log info if debug is true (#2855)
  build(deps): bump prismjs from 1.23.0 to 1.24.0 (#2971)
  Angular Integration (#2871)
  ci: don't run markdown tests in type tests
  Add types for `uppy.once` method (#2965)
  build: lint fixes in build scripts
  Fix typo in docs/progressbar.md (#2962)
  Document `uppy.once` in `docs/uppy.md` (#2960)
  Add `props` example to docs/vue.md (#2959)
  ...
2021-07-07 15:32:38 +02:00
Andrew
8f4cc89a9e
Angular Integration (#2871)
* feature(integration): initial Angular framework implementation

* Package cleanup

* Actually add the components this time

* fix rendering bug

* Add documentation

* dependency fixes

* add broken example

* Make locales ignore angular

* dependency updates

* Update package-lock.json

* Fix broken example

* Make example consistent with docs

* angular: Update styling advice

* angular: Build system stuff

* angular: Escape dependency hell

* angular: Add dashboard-modal component

* angular: Update package.json/prepare for release

* angular: Fix styling bugs

* add Angular dependencies

* Update README.md

* lint fixes — those deps are in root

* Update README.md

Co-authored-by: Adam Medford <adammedford@gmail.com>
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-06-30 11:36:57 +01:00
Merlijn Vos
f0f1105ef0
Resolve or remove miscellaneous todos (#2967) 2021-06-29 12:54:19 +02:00
Antoine du Hamel
c315329399
Remove IE polyfills and special casing (#2947)
* Remove IE polyfills and special casing

* dashboard: remove `resize-observer-polyfill`

* deps: remove url-parse to use global `URL` instead

* Update documentation for browser support

* Add a migration guide

* Update e2e test platforms

* Remove polyfills from examples and add those missing in CDN bundle

* Use Node.js v16.x on CI because of `AbortController`

* Update bundle builder to produce two builds: `uppy.js` without polyfills, `uppy.legacy.js` with polyfills.

* Upgrade create-react-app deps

* remove null coalescing operator as it's not supported by the build chain

* disable Safari testing (for now)


Co-authored-by: Renée Kooi <renee@kooi.me>
2021-06-28 11:34:51 +02:00
Renée Kooi
ee2f527395 build: lint fixes in build scripts 2021-06-24 15:12:16 +02:00
Artur Paikin
e5061b1194
locales: remove es_GL that was kept for backwards-compat (#2943)
* remove es_GL for good — it was kept for backwards-compat

* remove legacy
2021-06-17 10:38:48 +01:00
Artur Paikin
e32524dd2d Revert "Update release"
This reverts commit db0eceeb75.
2021-05-28 12:00:11 +01:00
Artur Paikin
db0eceeb75 Update release 2021-05-28 11:43:17 +01:00
Artur Paikin
53563aad49 update versions is bundle-readme too
@kvz
2021-04-08 13:25:08 +01:00
Renée Kooi
e82f828d19
companion: smaller heroku deployment (#2845) 2021-04-01 12:30:26 +02:00
Artur Paikin
1fcb99540c
Add @uppy/drop-target — drag and drop files on any existing DOM element (#2836)
* Add dom-target plugin

* add dom-target to bundle and website — had trouble with css otherwise

* cleanup and dev setup

* newline at the end, restore inline: false by default

* dom-target --> drop-target, remove paste

* add docs, bundle, website example

* add types

@goto-bus-stop this should probably be something other than Uppy.PluginTarget since it won’t accept an uppy plugin?

* fix types

* Update examples/dev/Dashboard.js

Co-authored-by: Renée Kooi <renee@kooi.me>

* type string | Element

* Update packages/@uppy/drop-target/package.json

Co-authored-by: Renée Kooi <renee@kooi.me>

* Update packages/@uppy/drop-target/package.json

Co-authored-by: Renée Kooi <renee@kooi.me>

* Update examples/dev/Dashboard.js

Co-authored-by: Renée Kooi <renee@kooi.me>

* Create package-lock.json

* Update package-lock.json

* Update package-lock.json

Co-authored-by: Renée Kooi <renee@kooi.me>
2021-03-31 16:29:03 +01:00
Kevin van Zonneveld
7e465338cf
Upgrade to eslint-config-transloadit@1.2.0 (#2830)
* Upgrade to eslint-config-transloadit@1.2.0

* allow console.log for /bin files

* Reduce noise in PR
2021-03-25 13:51:50 +01:00