Skip to content

Commit

Permalink
Use more cancellation-friendly strategy for limit: N uploads (#1736)
Browse files Browse the repository at this point in the history
* xhr-upload: redo limit option using different strategy

* xhr-upload: fix marking requests as done

* Move duplicate createEventTracker definitions to @uppy/utils

* tus: new cancellation for local uploads

* tus: fix cancelling queued uploads

* tus: fix wrong name

* aws-s3-multipart: smol refactor

* aws-s3-multipart: new cancellation style

* aws-s3: new cancellation

* utils: port limitPromises test to RateLimitedQueue

* timing fix?

* tus: new cancellation on websocket

* xhr-upload: implement cancellation for remote uploads

* aws-s3-multipart: port to new cancellation

* utils: remove limitPromises

* xhr-upload: remove pause/resume code

* xhr-upload: clean up event listeners

* xhr-upload: extract progress timer to separate class

* Move ProgressTimeout class to utils

* utils: update typings

* Fix lint

* tus: make pause/resume respect the rate limiting queue

* tus: try to explain some of the tricky things at play in the Tus#upload method

* aws-s3-multipart: add missing { abort: true }

* aws-s3-multipart: make pause/resume respect the rate limiting queue

* eslintrc.json - fixed eslint warnings for jsdoc

* Revert "eslintrc.json - fixed eslint warnings for jsdoc"

This reverts commit 50b2477.

* eslintrc.json - allow indentation in jsdoc comments

* xhr-upload: fix promise return value

* tus: fix promise return value

* tus: add missing `return () => {}`

* utils: typing export type fixes

* tus: add more jsdoc

* companion-client: add missing SocketOptions type

* utils: fix more export typings

* core,companion-client,tus: more typings tweaking

* companion-client: test fix 😩

* companion-client: add type for Socket#open

* tus: fix emit() call

* add local cancellation fuzz....ish? test
  • Loading branch information
goto-bus-stop authored Sep 25, 2019
1 parent fc405e8 commit bb8b66d
Show file tree
Hide file tree
Showing 26 changed files with 1,210 additions and 475 deletions.
6 changes: 2 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,15 @@
"jsx-quotes": ["error", "prefer-double"],
"compat/compat": ["error"],

// "no-unused-vars": ["warn", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }],

"jsdoc/check-alignment": ["warn"],
"jsdoc/check-examples": ["warn"],
"jsdoc/check-indentation": ["warn"],
"jsdoc/check-param-names": ["warn"],
"jsdoc/check-syntax": ["warn"],
"jsdoc/check-tag-names": ["warn"],
"jsdoc/check-types": ["warn"],
"jsdoc/newline-after-description": ["warn"],
"jsdoc/valid-types": ["warn"]
"jsdoc/valid-types": ["warn"],
"jsdoc/check-indentation": ["off"]
},
"settings": {
"react": {
Expand Down
2 changes: 1 addition & 1 deletion bin/endtoend-build-tests
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ __base="$(basename ${__file} .sh)"
__root="$(cd "$(dirname "${__dir}")" && pwd)"

# Tests using a simple build setup.
tests="tus-drag-drop tus-dashboard i18n-drag-drop xhr-limit providers thumbnails transloadit url-plugin"
tests="chaos-monkey i18n-drag-drop providers thumbnails transloadit tus-drag-drop url-plugin xhr-limit"

for t in $tests; do
mkdir -p "${__root}/test/endtoend/$t/dist"
Expand Down
69 changes: 61 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"@babel/polyfill": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"@babel/register": "^7.4.4",
"@jamen/lorem": "^0.2.0",
"@octokit/rest": "^16.25.0",
"@size-limit/preset-big-lib": "^2.1.1",
"@types/aws-serverless-express": "^3.0.1",
Expand Down Expand Up @@ -107,6 +108,7 @@
"babel-jest": "^24.8.0",
"babel-plugin-inline-package-json": "^2.0.0",
"babelify": "^10.0.0",
"brake": "^1.0.1",
"browser-resolve": "^1.11.3",
"browser-sync": "^2.26.5",
"browserify": "^16.2.3",
Expand Down Expand Up @@ -138,6 +140,7 @@
"glob": "^7.1.3",
"globby": "^9.2.0",
"gzip-size": "^5.0.0",
"http-proxy": "^1.18.0",
"isomorphic-fetch": "2.2.1",
"jest": "24.8.0",
"json3": "^3.3.2",
Expand Down
Loading

0 comments on commit bb8b66d

Please sign in to comment.