Skip to content

Commit

Permalink
Merge branch '4.x' into transloadit-single-assembly
Browse files Browse the repository at this point in the history
* 4.x:
  meta: fix AWS test suite (#5229)
  Release: [email protected] (#5225)
  Release: [email protected] (#5223)
  meta: remove Companion's `prepublishOnly` (#5220)
  docs: document clearUploadedFiles (#5204)
  @uppy/webcam: add missing types for `recordedVideo` (#5208)
  @uppy/core: check capabilities in clearUploadedFiles (#5201)
  PartialTree - change the `maxTotalFileSize` error (#5203)
  @uppy/transloadit: remove `updateNumberOfFilesInAssembly` (#5202)
  @uppy/aws-s3: resolve all headers on response (#5195)
  Improve provider docs: OneDrive (#5196)
  • Loading branch information
Murderlon committed Jun 5, 2024
2 parents 23911d0 + 04fd43f commit d32e0ab
Show file tree
Hide file tree
Showing 67 changed files with 398 additions and 108 deletions.
6 changes: 6 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ Now let’s create the version & tag:
mkdir -p .git && npm version --workspaces-update=false --tag-version-prefix='@uppy/companion@' patch
```

**Important:** Build Companion lib folder

```bash
yarn run build
```

Run a “dry-run” first:

```bash
Expand Down
2 changes: 1 addition & 1 deletion BUNDLE-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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/v4.0.0-beta.9/uppy.min.js"></script>`)
(`<script src="https://releases.transloadit.com/uppy/v4.0.0-beta.10/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
Expand Down
90 changes: 90 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,76 @@ Please add your entries in this format:

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

## 4.0.0-beta.10

Released: 2024-06-04

| Package | Version | Package | Version |
| ---------------------- | ------------- | ---------------------- | ------------- |
| @uppy/angular | 0.7.0-beta.5 | @uppy/instagram | 4.0.0-beta.6 |
| @uppy/audio | 2.0.0-beta.6 | @uppy/locales | 4.0.0-beta.2 |
| @uppy/aws-s3 | 4.0.0-beta.5 | @uppy/onedrive | 4.0.0-beta.6 |
| @uppy/aws-s3-multipart | 4.0.0-beta.6 | @uppy/provider-views | 4.0.0-beta.7 |
| @uppy/box | 3.0.0-beta.6 | @uppy/status-bar | 4.0.0-beta.9 |
| @uppy/companion | 5.0.0-beta.9 | @uppy/transloadit | 4.0.0-beta.7 |
| @uppy/companion-client | 4.0.0-beta.7 | @uppy/tus | 4.0.0-beta.6 |
| @uppy/core | 4.0.0-beta.9 | @uppy/unsplash | 4.0.0-beta.7 |
| @uppy/dashboard | 4.0.0-beta.9 | @uppy/url | 4.0.0-beta.7 |
| @uppy/drop-target | 3.0.0-beta.5 | @uppy/utils | 6.0.0-beta.8 |
| @uppy/dropbox | 4.0.0-beta.7 | @uppy/webcam | 4.0.0-beta.8 |
| @uppy/facebook | 4.0.0-beta.6 | @uppy/xhr-upload | 4.0.0-beta.6 |
| @uppy/form | 4.0.0-beta.4 | @uppy/zoom | 3.0.0-beta.6 |
| @uppy/golden-retriever | 4.0.0-beta.5 | uppy | 4.0.0-beta.10 |
| @uppy/google-drive | 4.0.0-beta.6 | | |

- @uppy/audio: remove unused component props (Antoine du Hamel / #5209)
- @uppy/angular: fix invalid char in `package.json` (Antoine du Hamel / #5224)
- meta: use default argument value instead of `defaultProps` (Antoine du Hamel / #5222)
- @uppy/angular: upgrade to Angular 18 (Antoine du Hamel / #5215)
- @uppy/utils: remove unused `settle` (Antoine du Hamel / #5210)
- @uppy/form: move internal property to private field (Antoine du Hamel / #5214)
- @uppy/dashboard: remove unused component props (Antoine du Hamel / #5213)
- @uppy/status-bar: remove unused component props (Antoine du Hamel / #5211)
- @uppy/audio: move internal property to private field (Antoine du Hamel / #5207)
- @uppy/aws-s3: remove todo (Mikael Finstad / #5200)
- @uppy/core: remove unnecessary todo (Mikael Finstad / #5200)
- @uppy/aws-s3: do not expose internal `assertHost` method (Mikael Finstad / #5200)
- @uppy/aws-s3: make passing `signal` consistent (Mikael Finstad / #5200)
- @uppy/core: remove `'upload-started'` event (Mikael Finstad / #5200)
- @uppy/aws-s3: remove `chunkState` getter (Mikael Finstad / #5200)
- @uppy/drop-target: remove `title` property (Mikael Finstad / #5200)
- @uppy/golden-retriever: remove unused `ready` setters (Mikael Finstad / #5200)
- @uppy/dashboard: remove deprecated `autoOpenFileEditor` option (Mikael Finstad / #5200)
- @uppy/aws-s3: remove `uploaderSockets` (Mikael Finstad / #5200)
- @uppy/locales: remove hacks for legacy bundle (Mikael Finstad / #5200)
- @uppy/status-bar: rename `StatusBar` to `StatusBarUI` (Mikael Finstad / #5200)
- @uppy/url: remove unused error handler (Mikael Finstad / #5200)
- @uppy/aws-s3,@uppy/tus,@uppy/utils,@uppy/xhr-upload: remove `uploader` from `upload-progress` event (Mikael Finstad / #5200)
- @uppy/webcam: remove `facingMode` option (Mikael Finstad / #5200)
- @uppy/companion: invert some internal boolean options (Mikael Finstad / #5198)
- @uppy/companion: rename `authProvider` to `oauthProvider` (Mikael Finstad / #5198)
- @uppy/companion: remove unused headers (Mikael Finstad / #5198)
- @uppy/companion: remove sanitizing of metadata (Mikael Finstad / #5198)
- @uppy/companion-client: do not allow boolean `RequestOptions` (Mikael Finstad / #5198)
- @uppy/companion-client: remove deprecated options (Mikael Finstad / #5198)
- @uppy/companion: remove `error.extraData` (Mikael Finstad / #5198)
- @uppy/companion-client: make `supportsRefreshToken` default (Mikael Finstad / #5198)
- @uppy/companion-client: remove optional chaining (Mikael Finstad / #5198)
- @uppy/companion: capitalize POST (Mikael Finstad / #5198)
- @uppy/companion: simplify code by using modern Node.js APIs (Mikael Finstad / #5198)
- @uppy/companion-client: remove `Socket` (Mikael Finstad / #5198)
- @uppy/companion: rename `getExtraConfig` to `getExtraGrantConfig` (Mikael Finstad / #5198)
- @uppy/companion: change `COMPANION_ENABLE_URL_ENDPOINT` default (Mikael Finstad / #5198)
- @uppy/companion: change default value for Redis session prefix (Mikael Finstad / #5198)
- examples: make React example up-to-date (Merlijn Vos / #5205)
- @uppy/core: add type tests (Merlijn Vos / #5153)
- @uppy/provider-views: PartialTree - get rid of `.onFirstRender()` (Evgenia Karunus / #5187)
- @uppy/core: pass file to events consistently (Merlijn Vos / #5136)
- docs: assume tree-shaking bundler is the most common case (Antoine du Hamel / #5160)
- @uppy/core: remove `reason` (Antoine du Hamel / #5159)
- @uppy/core: remove `resetProgress` and `reset-progress` (Mikael Finstad / #5221)


## 4.0.0-beta.9

Released: 2024-05-23
Expand Down Expand Up @@ -350,6 +420,26 @@ Released: 2024-03-28
- @uppy/vue: [v4.x] remove manual types (Antoine du Hamel / #4803)
- meta: prepare release workflow for beta versions (Antoine du Hamel)

## 3.26.0

Released: 2024-06-04

| Package | Version | Package | Version |
| ---------------------- | ------- | ---------------------- | ------- |
| @uppy/aws-s3-multipart | 3.12.0 | @uppy/webcam | 3.4.2 |
| @uppy/core | 3.12.0 | uppy | 3.26.0 |
| @uppy/transloadit | 3.7.0 | | |

- meta: remove Companion's `prepublishOnly` (Mikael Finstad / #5220)
- docs: document clearUploadedFiles (Merlijn Vos / #5204)
- @uppy/webcam: add missing types for `recordedVideo` (Antoine du Hamel / #5208)
- @uppy/core: check capabilities in clearUploadedFiles (Merlijn Vos / #5201)
- @uppy/core: PartialTree - change the `maxTotalFileSize` error (Evgenia Karunus / #5203)
- @uppy/transloadit: remove `updateNumberOfFilesInAssembly` (Merlijn Vos / #5202)
- @uppy/aws-s3: resolve all headers on response (Merlijn Vos / #5195)
- docs: Improve provider docs: OneDrive (Evgenia Karunus / #5196)


## 3.25.5

Released: 2024-05-23
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ npm install @uppy/core @uppy/dashboard @uppy/tus
```

Add CSS
[uppy.min.css](https://releases.transloadit.com/uppy/v4.0.0-beta.9/uppy.min.css),
[uppy.min.css](https://releases.transloadit.com/uppy/v4.0.0-beta.10/uppy.min.css),
either to your HTML page’s `<head>` or include in JS, if your bundler of choice
supports it.

Expand All @@ -94,7 +94,7 @@ object.
```html
<!-- 1. Add CSS to `<head>` -->
<link
href="https://releases.transloadit.com/uppy/v4.0.0-beta.9/uppy.min.css"
href="https://releases.transloadit.com/uppy/v4.0.0-beta.10/uppy.min.css"
rel="stylesheet"
/>

Expand All @@ -105,7 +105,7 @@ object.
Uppy,
Dashboard,
Tus,
} from 'https://releases.transloadit.com/uppy/v4.0.0-beta.9/uppy.min.mjs'
} from 'https://releases.transloadit.com/uppy/v4.0.0-beta.10/uppy.min.mjs'
const uppy = new Uppy()
uppy.use(Dashboard, { target: '#files-drag-drop' })
Expand Down
10 changes: 9 additions & 1 deletion docs/sources/companion-plugins/onedrive.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,15 @@ If you are using Transloadit hosted Companion:
https://api2.transloadit.com/companion/onedrive/redirect
```

Microsoft will give you an OAuth client ID and client secret.
Go to the “Manifest” tab, and find the `"signInAudience"` key.
Change it to `"signInAudience": "AzureADandPersonalMicrosoftAccount"`, and click
“Save”.

Go to the “Overview” tab.
Copy the `Application (client) ID` field - this will be your Oauth client ID.

Go to the “Certificates & secrets” tab, and click “+ New client secret”.
Copy the `Value` field - this will be your OAuth client secret.

Configure the OneDrive key and secret in Companion. With the standalone
Companion server, specify environment variables:
Expand Down
7 changes: 7 additions & 0 deletions docs/uppy-core.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,13 @@ that upload.
uppy.removeFile('uppyteamkongjpg1501851828779');
```
#### `clear()`
Clear the state. Can be useful for manually resetting Uppy after a successful
upload.
Upload plugins may choose to throw an error if called during an upload.
#### `getFile(fileID)`
Get a specific [Uppy file](#working-with-uppy-files) by its ID.
Expand Down
58 changes: 20 additions & 38 deletions e2e/cypress/integration/dashboard-transloadit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,58 +170,40 @@ describe('Dashboard with Transloadit', () => {
})
})

// Not working, the upstream changes have not landed yet.
it.skip('should create assembly if there is still one file to upload', () => {
cy.get('@file-input').selectFile(
[
'cypress/fixtures/images/cat.jpg',
'cypress/fixtures/images/traffic.jpg',
],
{ force: true },
)
cy.get('.uppy-StatusBar-actionBtn--upload').click()

it('should not create assembly when all individual files have been cancelled', () => {
cy.window().then(({ uppy }) => {
cy.get('@file-input').selectFile(
[
'cypress/fixtures/images/cat.jpg',
'cypress/fixtures/images/traffic.jpg',
],
{ force: true },
)
// eslint-disable-next-line
// @ts-ignore fix me
expect(
Object.values(uppy.getPlugin('Transloadit').activeAssemblies).length,
).to.equal(0)

cy.get('.uppy-StatusBar-actionBtn--upload').click()

const { files } = uppy.getState()
const [fileID] = Object.keys(files)
uppy.removeFile(fileID)
// eslint-disable-next-line
// @ts-ignore fix me
uppy.removeFiles(Object.keys(files))

cy.wait('@createAssemblies').then(() => {
cy.wait('@resumable')
cy.get('.uppy-StatusBar-statusPrimary').should('contain', 'Complete')
// eslint-disable-next-line
// @ts-ignore fix me
expect(
Object.values(uppy.getPlugin('Transloadit').activeAssemblies).some(
(a: any) => a.pollInterval,
),
).to.equal(false)
})
})
})

// Not working, the upstream changes have not landed yet.
it.skip('should complete upload if one gets cancelled mid-flight', () => {
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.wait('@createAssemblies')
cy.wait('@resumable')

cy.window().then(({ uppy }) => {
const { files } = uppy.getState()
const [fileID] = Object.keys(files)
uppy.removeFile(fileID)

cy.get('.uppy-StatusBar-statusPrimary').should('contain', 'Complete')
})
})

it('should not emit error if upload is cancelled right away', () => {
cy.intercept({ path: '/assemblies', method: 'POST' }).as('createAssemblies')

Expand Down
4 changes: 2 additions & 2 deletions examples/aws-nodejs/public/drag.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" />
<title>Uppy</title>
<link
href="https://releases.transloadit.com/uppy/v4.0.0-beta.9/uppy.min.css"
href="https://releases.transloadit.com/uppy/v4.0.0-beta.10/uppy.min.css"
rel="stylesheet"
/>
</head>
Expand All @@ -22,7 +22,7 @@ <h5>Uploaded files:</h5>
DragDrop,
ProgressBar,
AwsS3,
} from 'https://releases.transloadit.com/uppy/v4.0.0-beta.9/uppy.min.mjs'
} from 'https://releases.transloadit.com/uppy/v4.0.0-beta.10/uppy.min.mjs'

// Function for displaying uploaded files
const onUploadSuccess = (elForUploadedFiles) => (file, response) => {
Expand Down
4 changes: 2 additions & 2 deletions examples/aws-nodejs/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" />
<title>Uppy – AWS upload example</title>
<link
href="https://releases.transloadit.com/uppy/v4.0.0-beta.9/uppy.min.css"
href="https://releases.transloadit.com/uppy/v4.0.0-beta.10/uppy.min.css"
rel="stylesheet"
/>
</head>
Expand All @@ -16,7 +16,7 @@ <h1>AWS upload example</h1>
Uppy,
Dashboard,
AwsS3,
} from 'https://releases.transloadit.com/uppy/v4.0.0-beta.9/uppy.min.mjs'
} from 'https://releases.transloadit.com/uppy/v4.0.0-beta.10/uppy.min.mjs'
/**
* This generator transforms a deep object into URL-encodable pairs
* to work with `URLSearchParams` on the client and `body-parser` on the server.
Expand Down
4 changes: 2 additions & 2 deletions examples/cdn-example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
href="https://releases.transloadit.com/uppy/v4.0.0-beta.9/uppy.min.css"
href="https://releases.transloadit.com/uppy/v4.0.0-beta.10/uppy.min.css"
rel="stylesheet"
/>
</head>
Expand All @@ -19,7 +19,7 @@
Dashboard,
Webcam,
Tus,
} from 'https://releases.transloadit.com/uppy/v4.0.0-beta.9/uppy.min.mjs'
} from 'https://releases.transloadit.com/uppy/v4.0.0-beta.10/uppy.min.mjs'

const uppy = new Uppy({ debug: true, autoProceed: false })
.use(Dashboard, { trigger: '#uppyModalOpener' })
Expand Down
4 changes: 2 additions & 2 deletions examples/uppy-with-companion/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
href="https://releases.transloadit.com/uppy/v4.0.0-beta.9/uppy.min.css"
href="https://releases.transloadit.com/uppy/v4.0.0-beta.10/uppy.min.css"
rel="stylesheet"
/>
</head>
Expand All @@ -19,7 +19,7 @@
Instagram,
GoogleDrive,
Tus,
} from 'https://releases.transloadit.com/uppy/v4.0.0-beta.9/uppy.min.mjs'
} from 'https://releases.transloadit.com/uppy/v4.0.0-beta.10/uppy.min.mjs'

const uppy = new Uppy({ debug: true, autoProceed: false })
.use(Dashboard, { trigger: '#uppyModalOpener' })
Expand Down
8 changes: 8 additions & 0 deletions packages/@uppy/angular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @uppy/angular

## 0.7.0-beta.5

Released: 2024-06-04
Included in: Uppy v4.0.0-beta.10

- @uppy/angular: fix invalid char in `package.json` (Antoine du Hamel / #5224)
- @uppy/angular: upgrade to Angular 18 (Antoine du Hamel / #5215)

## 0.7.0-beta.2

Released: 2024-04-11
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/angular/projects/uppy/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@uppy/angular",
"description": "Angular component wrappers around Uppy's official UI plugins.",
"version": "0.7.0-beta.4",
"version": "0.7.0-beta.5",
"license": "MIT",
"homepage": "https://uppy.io",
"keywords": [
Expand Down
8 changes: 8 additions & 0 deletions packages/@uppy/audio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @uppy/audio

## 2.0.0-beta.6

Released: 2024-06-04
Included in: Uppy v4.0.0-beta.10

- @uppy/audio: remove unused component props (Antoine du Hamel / #5209)
- @uppy/audio: move internal property to private field (Antoine du Hamel / #5207)

## 2.0.0-beta.5

Released: 2024-05-03
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/audio/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@uppy/audio",
"description": "Uppy plugin that records audio using the device’s microphone.",
"version": "2.0.0-beta.5",
"version": "2.0.0-beta.6",
"license": "MIT",
"main": "lib/index.js",
"style": "dist/style.min.css",
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/aws-s3-multipart/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@uppy/aws-s3-multipart",
"description": "Upload to Amazon S3 with Uppy and S3's Multipart upload strategy",
"version": "4.0.0-beta.5",
"version": "4.0.0-beta.6",
"license": "MIT",
"main": "lib/index.js",
"type": "module",
Expand Down
Loading

0 comments on commit d32e0ab

Please sign in to comment.