Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: uppy@3.0.0-beta.4 #3943

Merged
merged 13 commits into from Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion BUNDLE-README.md
@@ -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.0.0-beta.3/uppy.min.js"></script>`) or bundle it with your webapp.
this from a CDN (`<script src="https://releases.transloadit.com/uppy/v3.0.0-beta.4/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
49 changes: 49 additions & 0 deletions CHANGELOG.md
Expand Up @@ -12,6 +12,36 @@ Please add your entries in this format:

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

## 3.0.0-beta.4

Released: 2022-08-03

| Package | Version | Package | Version |
| ---------------------- | ------------ | ---------------------- | ------------ |
| @uppy/aws-s3-multipart | 3.0.0-beta.3 | @uppy/screen-capture | 3.0.0-beta.2 |
| @uppy/companion | 4.0.0-beta.3 | @uppy/status-bar | 3.0.0-beta.2 |
| @uppy/core | 3.0.0-beta.3 | @uppy/store-default | 3.0.0-beta.2 |
| @uppy/dashboard | 3.0.0-beta.3 | @uppy/transloadit | 3.0.0-beta.4 |
| @uppy/drop-target | 2.0.0-beta.2 | @uppy/tus | 3.0.0-beta.2 |
| @uppy/informer | 3.0.0-beta.2 | @uppy/url | 3.0.0-beta.2 |
| @uppy/react | 3.0.0-beta.3 | @uppy/robodog | 3.0.0-beta.4 |
| @uppy/remote-sources | 1.0.0-beta.3 | uppy | 3.0.0-beta.4 |

- @uppy/companion,@uppy/tus: Upgrade tus-js-client to 3.0.0 (Merlijn Vos / #3942)
- meta: fix release script (Antoine du Hamel)
- @uppy/aws-s3-multipart: Correctly handle errors for `prepareUploadParts` (Merlijn Vos / #3912)
- @uppy/store-default: export the class, don't expose `.callbacks` (Antoine du Hamel / #3928)
- @uppy/remote-sources: do not rely on `.name` property (Antoine du Hamel / #3941)
- @uppy/screen-capture: fix TODOs (Antoine du Hamel / #3930)
- @uppy/status-bar: rename internal modules (Antoine du Hamel / #3929)
- @uppy/transloadit: remove static properties in favor of exports (Antoine du Hamel / #3927)
- @uppy/informer: simplify `render` method (Antoine du Hamel / #3931)
- @uppy/url: remove private methods from public API (Antoine du Hamel / #3934)
- @uppy/dashboard: change `copyToClipboard` signature (Antoine du Hamel / #3933)
- @uppy/drop-target: remove `isFileTransfer` from the public API (Antoine du Hamel / #3932)
- meta: improve beta release script (Antoine du Hamel)


## 3.0.0-beta.3

Released: 2022-07-27
Expand Down Expand Up @@ -135,6 +165,25 @@ Released: 2022-05-30
- @uppy/transloadit: remove IE 10 hack (Antoine du Hamel / #3777)


## 2.13.2

Released: 2022-08-02

| Package | Version | Package | Version |
| ----------------- | ------- | ----------------- | ------- |
| @uppy/transloadit | 2.3.6 | @uppy/robodog | 2.9.2 |
| @uppy/tus | 2.4.2 | uppy | 2.13.2 |

- @uppy/transloadit: send `assembly-cancelled` only once (Antoine du Hamel / #3937)
- meta: `keepNames` in bundle (Antoine du Hamel / #3926)
- meta: e2e: fix Transloadit test suite with Cypress 10 (Antoine du Hamel / #3936)
- meta: Bump guzzlehttp/guzzle from 7.4.1 to 7.4.5 in /examples/aws-presigned-url (dependabot[bot] / #3842)
- @uppy/tus: fix dependencies (Antoine du Hamel / #3923)
- meta: doc: fix linter failure in `image-editor.md` (Antoine du Hamel / #3924)
- meta: doc: Fix typo in image-editor.md (Ikko Ashimine / #3921)
- website: Docs and header fix (Artur Paikin / #3920)


## 2.13.1

Released: 2022-07-27
Expand Down
37 changes: 19 additions & 18 deletions README.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions bin/build-bundle.mjs
Expand Up @@ -18,6 +18,7 @@ function buildBundle (srcFile, bundleFile, { minify = true, standalone = '', plu
outfile: bundleFile,
platform: 'browser',
minify,
keepNames: true,
plugins,
target,
format,
Expand Down
74 changes: 74 additions & 0 deletions e2e/cypress/integration/dashboard-transloadit.spec.ts
@@ -1,3 +1,9 @@
const FLAKY = {
retries: {
runMode: 3, // retry flaky test
},
}

describe('Dashboard with Transloadit', () => {
beforeEach(() => {
cy.visit('/dashboard-transloadit')
Expand Down Expand Up @@ -44,6 +50,74 @@ describe('Dashboard with Transloadit', () => {
})
})

it('should emit one assembly-cancelled event when cancelled', FLAKY, () => {
const spy = cy.spy()

cy.get('@file-input').selectFile(['cypress/fixtures/images/cat.jpg', 'cypress/fixtures/images/traffic.jpg'], { force:true })
cy.get('.uppy-StatusBar-actionBtn--upload').click()

cy.intercept({
method: 'GET',
url: '/assemblies/*',
}).as('assemblyPolling')
cy.intercept(
{ method: 'PATCH', pathname: '/files/*', times: 1 },
{ statusCode: 204, body: {} },
)
cy.intercept(
{ method: 'DELETE', pathname: '/resumable/files/*', times: 2 },
{ statusCode: 204, body: {} },
).as('fileDeletion')
cy.intercept(
{ method: 'DELETE', pathname: '/assemblies/*', times: 1 },
).as('assemblyDeletion')
cy.wait('@assemblyPolling')
cy.window().then(({ uppy }) => {
uppy.on('transloadit:assembly-cancelled', spy)
})
cy.get('button[data-cy=cancel]').click()

cy.wait('@assemblyDeletion').then(() => {
expect(spy).to.be.calledOnce
})
})

it('should close assembly polling when all files are removed', FLAKY, () => {
const spy = cy.spy()

cy.get('@file-input').selectFile(['cypress/fixtures/images/cat.jpg', 'cypress/fixtures/images/traffic.jpg'], { force:true })
cy.get('.uppy-StatusBar-actionBtn--upload').click()

cy.intercept({
method: 'GET',
url: '/assemblies/*',
}).as('assemblyPolling')
cy.intercept(
{ method: 'PATCH', pathname: '/files/*', times: 1 },
{ statusCode: 204, body: {} },
)
cy.intercept(
{ method: 'DELETE', pathname: '/resumable/files/*', times: 2 },
{ statusCode: 204, body: {} },
).as('fileDeletion')
cy.intercept(
{ method: 'DELETE', pathname: '/assemblies/*', times: 1 },
).as('assemblyDeletion')
cy.wait('@assemblyPolling')
cy.window().then(({ uppy }) => {
uppy.on('transloadit:assembly-cancelled', spy)
expect(Object.values(uppy.getPlugin('Transloadit').activeAssemblies).every((a: any) => a.pollInterval)).to.equal(true)

const { files } = uppy.getState()
uppy.removeFiles(Object.keys(files))

cy.wait('@assemblyDeletion').then(() => {
expect(Object.values(uppy.getPlugin('Transloadit').activeAssemblies).some((a: any) => a.pollInterval)).to.equal(false)
expect(spy).to.be.calledOnce
})
})
})

it('should not create assembly when all individual files have been cancelled', () => {
cy.get('@file-input').selectFile(['cypress/fixtures/images/cat.jpg', 'cypress/fixtures/images/traffic.jpg'], { force:true })
cy.get('.uppy-StatusBar-actionBtn--upload').click()
Expand Down