Skip to content

Commit

Permalink
Merge branch 'main' into fix-throttle-global-state
Browse files Browse the repository at this point in the history
* main: (61 commits)
  Release: [email protected] (#4511)
  @uppy/aws-s3-multipart: fix the chunk size calculation (#4508)
  @uppy/aws-s3: add `shouldUseMultipart` option (#4299)
  @uppy/companion: switch from aws-sdk v2 to @aws-sdk/* (v3) (#4285)
  Migrate all lodash' per-method-packages usage to lodash. (#4274)
  @uppy/core: Don't set late (throttled) progress event on a file that is 100% complete (#4507)
  @uppy/companion: revert randomness from file names (#4509)
  Custom provider fixes (#4498)
  @uppy/transloadit: ensure `fields` is not nullish when there no uploaded files (#4487)
  When file is removed (or all are canceled), controller.abort queued requests (#4504)
  @uppy/provider-views: Fix range selection not resetting and computing correctly (#4415)
  meta: disallow use of `.only` in tests (#4494)
  @uppy/companion: fix 500 when file name contains non-ASCII chars (#4493)
  @uppy/locales: update `fr_FR.js` (#4499)
  Don't close socket while upload is still in progress (#4479)
  meta: bump `luxon` from 1.28.0 to 1.28.1 (#4497)
  @uppy/utils: rename `EventTracker` -> `EventManager` (#4481)
  meta: bump cookiejar from 2.1.3 to 2.1.4 (#4496)
  meta: make `pre-commit` use `corepack yarn` instead of `npm run` (#4495)
  meta: bump ua-parser-js from 0.7.31 to 0.7.35 (#4474)
  ...
  • Loading branch information
Murderlon committed Jun 20, 2023
2 parents d19d9ee + 147e5da commit 438e6d6
Show file tree
Hide file tree
Showing 224 changed files with 7,810 additions and 3,922 deletions.
14 changes: 0 additions & 14 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@ lib
dist
coverage
test/lib/**
website/public/**
website/src/examples/**/*.html
website/themes/uppy/source/js/smooth-scroll.min.js
website/themes/uppy/source/js/uppy.js
website/themes/uppy/source/uppy/**
test/endtoend/*/build
examples/svelte-example/public/build/
bundle-legacy.js
website/src/_posts/201*.md
website/src/_posts/2020-*.md
website/src/_posts/2021-01-*.md
website/src/_posts/2021-02-*.md
website/src/_posts/2021-03-*.md
website/src/_posts/2021-04-*.md
website/src/_posts/2021-05-*.md
website/src/_posts/2021-06-*.md
website/src/docs/react-dashboard.md
60 changes: 17 additions & 43 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = {
// extra:
'compat',
'jsdoc',
'no-only-tests',
'unicorn',
],
parser: '@babel/eslint-parser',
Expand All @@ -53,8 +54,15 @@ module.exports = {
ignore: svgPresentationAttributes,
}],

// Special rules for CI:
...(process.env.CI && {
// Some imports are available only after a full build, which we don't do on CI.
'import/no-unresolved': 'off',
}),

// rules we want to enforce
'array-callback-return': 'error',
'func-names': 'error',
'implicit-arrow-linebreak': 'error',
'import/no-dynamic-require': 'error',
'import/no-extraneous-dependencies': 'error',
Expand All @@ -76,25 +84,8 @@ module.exports = {
'prefer-spread': 'error',
'unicorn/prefer-node-protocol': 'error',

// transloadit rules we would like to enforce in the future
// but will require separate PRs to gradually get there
// and so the meantime: just warn
'class-methods-use-this': ['warn'],
'consistent-return': ['warn'],
'default-case': ['warn'],
'global-require': ['warn'],
'import/no-unresolved': ['warn'],
'import/order': ['warn'],
'no-mixed-operators': ['warn'],
'no-param-reassign': ['warn'],
'no-redeclare': ['warn'],
'no-shadow': ['warn'],
'no-use-before-define': ['warn', { 'functions': false }],
'radix': ['warn'],
'react/button-has-type': 'error',
'react/destructuring-assignment': ['warn'],
'react/forbid-prop-types': 'error',
'react/jsx-props-no-spreading': ['warn'],
'react/no-access-state-in-setstate': 'error',
'react/no-array-index-key': 'error',
'react/no-deprecated': 'error',
Expand Down Expand Up @@ -122,8 +113,8 @@ module.exports = {
// jsdoc
'jsdoc/check-alignment': 'error',
'jsdoc/check-examples': 'off', // cannot yet be supported for ESLint 8, see https://github.com/eslint/eslint/issues/14745
'jsdoc/check-param-names': ['warn'],
'jsdoc/check-syntax': ['warn'],
'jsdoc/check-param-names': 'error',
'jsdoc/check-syntax': 'error',
'jsdoc/check-tag-names': ['error', { jsxTags: true }],
'jsdoc/check-types': 'error',
'jsdoc/newline-after-description': 'error',
Expand Down Expand Up @@ -253,7 +244,6 @@ module.exports = {
'packages/@uppy/webcam/src/**/*.js',
'packages/@uppy/xhr-upload/src/**/*.js',
'packages/@uppy/zoom/src/**/*.js',
'website/src/examples/*/*.es6',
],
parser: 'espree',
parserOptions: {
Expand Down Expand Up @@ -359,20 +349,10 @@ module.exports = {
'no-use-before-define': 'warn',
},
},
{
files: [
'website/src/examples/*/*.es6',
],
rules: {
'import/no-extraneous-dependencies': 'off',
'no-console': 'off',
},
},
{
files: [
'*.test.js',
'test/endtoend/*.js',
'website/*.js',
'bin/**.js',
],
rules: {
Expand All @@ -383,17 +363,15 @@ module.exports = {
files: [
'bin/**.js',
'bin/**.mjs',
'examples/**/*.config.js',
'examples/**/*.cjs',
'examples/**/*.js',
'packages/@uppy/companion/test/**/*.js',
'test/**/*.js',
'test/**/*.ts',
'*.test.js',
'*.test-d.ts',
'postcss.config.js',
'.eslintrc.js',
'website/*.js',
'website/**/*.js',
'private/**/*.js',
],
rules: {
Expand All @@ -415,15 +393,6 @@ module.exports = {
},
},

{
files: [
'website/themes/uppy/source/js/*.js',
],
rules: {
'prefer-const': ['off'],
},
},

{
files: ['test/endtoend/*/*.mjs', 'test/endtoend/*/*.ts'],
rules: {
Expand Down Expand Up @@ -528,7 +497,12 @@ module.exports = {
},
{
files: ['e2e/**/*.ts', 'e2e/**/*.js', 'e2e/**/*.jsx', 'e2e/**/*.mjs'],
rules: { 'import/no-extraneous-dependencies': 'off', 'no-unused-expressions': 'off', 'no-console': 'off' },
rules: {
'import/no-extraneous-dependencies': 'off',
'no-console': 'off',
'no-only-tests/no-only-tests': 'error',
'no-unused-expressions': 'off',
},
},
],
}
12 changes: 0 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,6 @@ test/endtoend/create-react-app/coverage/
uppy-*.tgz
generatedLocale.d.ts

website/db.json
website/*.log
website/node_modules/
website/public/
website/.deploy*/
website/src/_drafts
website/themes/uppy/source/uppy/
website/themes/uppy/_config.yml
website/src/_template/list_of_locale_packs.md
website/src/examples/locale_list.json
website/themes/uppy/layout/partials/generated_stargazers.ejs

**/output/*
!output/.keep
examples/dev/file.txt
Expand Down
34 changes: 34 additions & 0 deletions .yarn/patches/pre-commit-npm-1.2.2-f30af83877.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/index.js b/index.js
index a20646d922945004cb737918ef6b6d063bb3c2a4..a44863e9555abdaa569f309b1197fddc8dd244a5 100644
--- a/index.js
+++ b/index.js
@@ -147,7 +147,7 @@ Hook.prototype.log = function log(lines, exit) {
* @api private
*/
Hook.prototype.initialize = function initialize() {
- ['git', 'npm'].forEach(function each(binary) {
+ ['git', 'corepack'].forEach(function each(binary) {
try { this[binary] = which.sync(binary); }
catch (e) {}
}, this);
@@ -159,9 +159,9 @@ Hook.prototype.initialize = function initialize() {
if (!this.npm) {
try {
process.env.PATH += path.delimiter + path.dirname(process.env._);
- this.npm = which.sync('npm');
+ this.npm = which.sync('corepack');
} catch (e) {
- return this.log(this.format(Hook.log.binary, 'npm'), 0);
+ return this.log(this.format(Hook.log.binary, 'corepack'), 0);
}
}

@@ -225,7 +225,7 @@ Hook.prototype.run = function runner() {
// this doesn't have the required `isAtty` information that libraries use to
// output colors resulting in script output that doesn't have any color.
//
- spawn(hooked.npm, ['run', script, '--silent'], {
+ spawn(hooked.npm, ['yarn', script], {
env: process.env,
cwd: hooked.root,
stdio: [0, 1, 2]
2 changes: 1 addition & 1 deletion BUNDLE-README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Uppy

Hi, thanks for trying out the bundled version of the Uppy File Uploader. You can use
this from a CDN (`<script src="https://releases.transloadit.com/uppy/v3.6.1/uppy.min.js"></script>`) or bundle it with your webapp.
this from a CDN (`<script src="https://releases.transloadit.com/uppy/v3.10.0/uppy.min.js"></script>`) or bundle it with your webapp.

Note that the recommended way to use Uppy is to install it with yarn/npm and use a
bundler like Webpack so that you can create a smaller custom build with only the
Expand Down
169 changes: 169 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,175 @@ Please add your entries in this format:

In the current stage we aim to release a new version at least every month.

## 3.10.0

Released: 2023-06-19

| Package | Version | Package | Version |
| ---------------------- | ------- | ---------------------- | ------- |
| @uppy/aws-s3 | 3.2.0 | @uppy/status-bar | 3.2.0 |
| @uppy/aws-s3-multipart | 3.4.0 | @uppy/transloadit | 3.1.6 |
| @uppy/companion | 4.5.1 | @uppy/tus | 3.1.1 |
| @uppy/core | 3.2.1 | @uppy/url | 3.3.2 |
| @uppy/dashboard | 3.4.1 | @uppy/utils | 5.4.0 |
| @uppy/golden-retriever | 3.0.4 | @uppy/xhr-upload | 3.3.0 |
| @uppy/locales | 3.2.2 | uppy | 3.10.0 |
| @uppy/provider-views | 3.3.1 | | |

- @uppy/aws-s3-multipart: fix the chunk size calculation (Antoine du Hamel / #4508)
- @uppy/aws-s3: add `shouldUseMultipart` option (Antoine du Hamel / #4299)
- @uppy/companion: switch from aws-sdk v2 to @aws-sdk/* (v3) (Scott Bessler / #4285)
- @uppy/companion,@uppy/core,@uppy/dashboard,@uppy/golden-retriever,@uppy/status-bar,@uppy/utils: Migrate all lodash' per-method-packages usage to lodash. (LinusMain / #4274)
- @uppy/core: Don't set late (throttled) progress event on a file that is 100% complete (Artur Paikin / #4507)
- @uppy/companion: revert randomness from file names (Mikael Finstad / #4509)
- @uppy/companion: Custom provider fixes (Mikael Finstad / #4498)
- @uppy/transloadit: ensure `fields` is not nullish when there no uploaded files (Antoine du Hamel / #4487)
- @uppy/aws-s3-multipart,@uppy/aws-s3,@uppy/tus,@uppy/utils,@uppy/xhr-upload: When file is removed (or all are canceled), controller.abort queued requests (Artur Paikin / #4504)
- @uppy/provider-views: Fix range selection not resetting and computing correctly (Terence C / #4415)
- meta: disallow use of `.only` in tests (Antoine du Hamel / #4494)
- @uppy/companion: fix 500 when file name contains non-ASCII chars (Antoine du Hamel / #4493)
- @uppy/locales: update `fr_FR.js` (Samuel De Backer / #4499)
- @uppy/aws-s3-multipart,@uppy/tus,@uppy/xhr-upload: Don't close socket while upload is still in progress (Artur Paikin / #4479)
- meta: bump `luxon` from 1.28.0 to 1.28.1 (dependabot[bot] / #4497)
- @uppy/utils: rename `EventTracker` -> `EventManager` (Stephen Wooten / #4481)
- meta: bump cookiejar from 2.1.3 to 2.1.4 (dependabot[bot] / #4496)
- meta: make `pre-commit` use `corepack yarn` instead of `npm run` (Antoine du Hamel / #4495)
- meta: bump ua-parser-js from 0.7.31 to 0.7.35 (dependabot[bot] / #4474)
- meta: bump @sideway/formula from 3.0.0 to 3.0.1 (dependabot[bot] / #4473)
- meta: bump http-cache-semantics from 4.1.0 to 4.1.1 (dependabot[bot] / #4472)
- @uppy/companion: Use filename from content-disposition instead of relying on url, with fallback (Artur Paikin / #4489)
- meta: bump `babel`, `esbuild`, and `vite` (dependabot[bot] / #4485)
- @uppy/dashboard: include the old state when setting new (Artur Paikin / #4490)
- @uppy/companion: fix companion implicitpath (Mikael Finstad / #4484)
- @uppy/companion: fix undefined protocol and example page (Mikael Finstad / #4483)
- meta: upgrade Cypress 12.9.0 -> 12.14.0 (Antoine du Hamel / #4491)
- @uppy/core: remove `state` getter from types (Antoine du Hamel / #4477)
- examples/php-xhr: Added filename sanitation and file size check before saving (neuronet77 / #4432)
- examples/php-xhr: update PHP dependencies (dependabot[bot])
- @uppy/xhr-upload: add support for arrays in metadata (Vasiliy Matyushin / #4431)
- @uppy/status-bar: Filtered ETA (stduhpf / #4458)
- @uppy/aws-s3-multipart: fix `getUploadParameters` option (Antoine du Hamel / #4465)


## 3.9.1

Released: 2023-05-15

| Package | Version | Package | Version |
| ----------------- | ------- | ----------------- | ------- |
| @uppy/transloadit | 3.1.5 | uppy | 3.9.1 |

- @uppy/transloadit: clean up event listener to prevent cancelled assemblies (Merlijn Vos / #4447)


## 3.9.0

Released: 2023-05-02

| Package | Version | Package | Version |
| ---------------------- | ------- | ---------------------- | ------- |
| @uppy/aws-s3 | 3.1.1 | @uppy/status-bar | 3.1.2 |
| @uppy/aws-s3-multipart | 3.3.0 | @uppy/transloadit | 3.1.4 |
| @uppy/locales | 3.2.1 | uppy | 3.9.0 |

- @uppy/aws-s3-multipart: allowedMetaFields: null means “include all” (Artur Paikin / #4437)
- @uppy/aws-s3-multipart: add `shouldUseMultipart ` option (Antoine du Hamel / #4205)
- @uppy/transloadit: Reset `tus` key in the file on error, so retried files are re-uploaded (Artur Paikin / #4421)
- meta: commit build file that was modified (Antoine du Hamel)
- meta: examples: add CORS settings for DigitalOcean Spaces (Antoine du Hamel / #4428)
- @uppy/aws-s3: deprecate `timeout` option (Antoine du Hamel / #4298)
- @uppy/aws-s3-multipart: make retries more robust (Antoine du Hamel / #4424)
- meta: fix badges on README (Antoine du Hamel / #4419)


## 3.8.0

Released: 2023-04-18

| Package | Version | Package | Version |
| ------------------------- | ------- | ------------------------- | ------- |
| @uppy/angular | 0.5.2 | @uppy/progress-bar | 3.0.2 |
| @uppy/audio | 1.1.1 | @uppy/provider-views | 3.3.0 |
| @uppy/aws-s3 | 3.1.0 | @uppy/react | 3.1.2 |
| @uppy/aws-s3-multipart | 3.2.0 | @uppy/react-native | 0.5.1 |
| @uppy/box | 2.1.1 | @uppy/redux-dev-tools | 3.0.2 |
| @uppy/companion | 4.5.0 | @uppy/remote-sources | 1.0.3 |
| @uppy/companion-client | 3.1.3 | @uppy/screen-capture | 3.1.1 |
| @uppy/compressor | 1.0.2 | @uppy/status-bar | 3.1.1 |
| @uppy/core | 3.2.0 | @uppy/store-default | 3.0.3 |
| @uppy/dashboard | 3.4.0 | @uppy/store-redux | 3.0.3 |
| @uppy/drag-drop | 3.0.2 | @uppy/svelte | 3.0.2 |
| @uppy/dropbox | 3.1.1 | @uppy/thumbnail-generator | 3.0.3 |
| @uppy/facebook | 3.1.1 | @uppy/transloadit | 3.1.3 |
| @uppy/file-input | 3.0.2 | @uppy/tus | 3.1.0 |
| @uppy/form | 3.0.2 | @uppy/unsplash | 3.2.1 |
| @uppy/golden-retriever | 3.0.3 | @uppy/url | 3.3.1 |
| @uppy/google-drive | 3.1.1 | @uppy/utils | 5.3.0 |
| @uppy/image-editor | 2.1.2 | @uppy/vue | 1.0.2 |
| @uppy/informer | 3.0.2 | @uppy/webcam | 3.3.1 |
| @uppy/instagram | 3.1.1 | @uppy/xhr-upload | 3.2.0 |
| @uppy/locales | 3.2.0 | @uppy/zoom | 2.1.1 |
| @uppy/onedrive | 3.1.1 | uppy | 3.8.0 |

- @uppy/companion: increase max limits for remote file list operations (Mikael Finstad / #4417)
- @uppy/xhr-upload: fix type in README.md (Top Master / #4416)
- @uppy/core: improve performance of validating & uploading files (Mikael Finstad / #4402)
- @uppy/provider-views: Concurrent file listing (Mikael Finstad / #4401)
- @uppy/core,@uppy/locales,@uppy/provider-views: User feedback adding recursive folders take 2 (Mikael Finstad / #4399)
- @uppy/dashboard: Single File Mode: fix layout and make optional (Artur Paikin / #4374)
- @uppy/informer: add a check in `TransitionGroup` when component is null (Juan Belej / #4410)
- meta: Fix logos in all the readmes (Artur Paikin / #4407)
- meta: fix logo in readme (Kid / #4403)


## 3.7.0

Released: 2023-04-04

| Package | Version | Package | Version |
| ---------------------- | ------- | ---------------------- | ------- |
| @uppy/aws-s3 | 3.0.6 | @uppy/status-bar | 3.1.0 |
| @uppy/aws-s3-multipart | 3.1.3 | @uppy/transloadit | 3.1.2 |
| @uppy/companion | 4.4.0 | @uppy/tus | 3.0.6 |
| @uppy/companion-client | 3.1.2 | @uppy/unsplash | 3.2.0 |
| @uppy/core | 3.1.2 | @uppy/url | 3.3.0 |
| @uppy/dashboard | 3.3.2 | @uppy/utils | 5.2.0 |
| @uppy/locales | 3.1.0 | @uppy/xhr-upload | 3.1.1 |
| @uppy/provider-views | 3.2.0 | uppy | 3.7.0 |
| @uppy/react | 3.1.1 | | |

- @uppy/aws-s3-multipart,@uppy/aws-s3,@uppy/tus,@uppy/xhr-upload: make sure that we reset serverToken when an upload fails (Mikael Finstad / #4376)
- @uppy/aws-s3-multipart: do not auto-open sockets, clean them up on abort (Antoine du Hamel)
- @uppy/aws-s3: Update types (Minh Hieu / #4294)
- @uppy/companion-client: do not open socket more than once (Artur Paikin)
- @uppy/companion: add `service: 'companion'` to periodic ping (Mikael Finstad / #4383)
- @uppy/companion: add connection keep-alive to dropbox (Mikael Finstad / #4365)
- @uppy/companion: add missing env variable for standalone option (Mikael Finstad / #4382)
- @uppy/companion: add S3 prefix env variable (Mikael Finstad / #4320)
- @uppy/companion: allow local ips when testing (Mikael Finstad / #4328)
- @uppy/companion: fix typo in redis-emitter.js (Ikko Eltociear Ashimine / #4362)
- @uppy/companion: merge Provider/SearchProvider (Mikael Finstad / #4330)
- @uppy/companion: only body parse when needed & increased body size for s3 (Mikael Finstad / #4372)
- @uppy/core: fix bug with `setOptions` (Nguyễn bảo Trung / #4350)
- @uppy/locales: locales: add es_MX (Kevin van Zonneveld / #4393)
- @uppy/locales: locales: add hi_IN (Kevin van Zonneveld / #4391)
- @uppy/provider-views: fix race condition when adding folders (Mikael Finstad / #4384)
- @uppy/provider-views: UI: Use form attribite with a form in doc root to prevent outer form submit (Artur Paikin / #4283)
- @uppy/transloadit: fix socket error message (Artur Paikin / #4352)
- @uppy/tus: do not auto-open sockets, clean them up on abort (Antoine du Hamel)
- meta: add version info in the bundlers CI (Antoine du Hamel / #4386)
- meta: deploy to Heroku on every companion commit (Mikael Finstad / #4367)
- meta: example: migrate `redux` to ESM (Antoine du Hamel / #4158)
- meta: fix all ESLint warnings and turn them into errors (Antoine du Hamel / #4398)
- meta: fixup! website: update links to work under the new URL (Antoine du Hamel / #4371)
- meta: remove duplicate outdated OSS support docs (Mikael Finstad, Artur Paikin / #4364)
- meta: use overrides to make sure no uppy package is fetch from npm (Antoine du Hamel / #4395)
- website: add a deprecation notice and a link to the new website (Antoine du Hamel / #4370)
- website: fix home page (Antoine du Hamel)
- website: Remove the website (Merlijn Vos / #4369)
- website: update links to work under the new URL (Antoine du Hamel / #4371)


## 3.6.1

Released: 2023-03-07
Expand Down
Loading

0 comments on commit 438e6d6

Please sign in to comment.