Skip to content

Commit

Permalink
Merge branch '4.x' into drop-vue-2
Browse files Browse the repository at this point in the history
* 4.x:
  @uppy/angular,meta: upgrade to Angular 17.x and to TS 5.4 (#5008)
  @uppy/svelte: remove UMD output and make it use newer types (#5023)
  fix type imports (#5038)
  @uppy/aws-s3-multipart: mark `opts` as optional (#5039)
  e2e: bump Cypress version (#5034)
  @uppy/react: remove `prop-types` dependency (#5031)
  @uppy/progress-bar: remove default target (#4971)
  @uppy/status-bar: remove default target (#4970)
  @uppy/react: remove `Wrapper.ts` (#5032)
  @uppy/react: refactor to TS (#5012)
  @uppy/core: refine type of private variables (#5028)
  @uppy/dashboard: refine type of private variables (#5027)
  @uppy/drag-drop: refine type of private variables (#5026)
  @uppy/status-bar: refine type of private variables (#5025)
  • Loading branch information
Murderlon committed Mar 28, 2024
2 parents 43a4a04 + 4f91a0d commit 143a0a1
Show file tree
Hide file tree
Showing 98 changed files with 3,381 additions and 3,269 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ module.exports = {
'react/prefer-stateless-function': 'error',
'react/sort-comp': 'error',
'react/style-prop-object': 'error',
'react/static-property-placement': 'off',

// accessibility
'jsx-a11y/alt-text': 'error',
Expand Down
2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"prompts": "^2.4.2",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"typescript": "~5.1",
"typescript": "~5.4",
"vue": "^3.2.33"
}
}
2 changes: 2 additions & 0 deletions examples/angular-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ This project was generated with [Angular CLI](https://github.com/angular/angular

```
corepack yarn install
corepack yarn build:clean
corepack yarn build
rm packages/@uppy/*/tsconfig.json
corepack yarn workspace @uppy/angular prepublishOnly
corepack yarn workspace @uppy-example/angular start
```
Expand Down
6 changes: 3 additions & 3 deletions examples/angular-example/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "angular-example:build:production"
"buildTarget": "angular-example:build:production"
},
"development": {
"browserTarget": "angular-example:build:development"
"buildTarget": "angular-example:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "angular-example:build"
"buildTarget": "angular-example:build"
}
},
"test": {
Expand Down
46 changes: 23 additions & 23 deletions examples/angular-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^16.2.0",
"@angular/common": "^16.2.0",
"@angular/compiler": "^16.2.0",
"@angular/core": "^16.2.0",
"@angular/forms": "^16.2.0",
"@angular/platform-browser": "^16.2.0",
"@angular/platform-browser-dynamic": "^16.2.0",
"@angular/router": "^16.2.0",
"@angular/animations": "^17.3.0",
"@angular/common": "^17.3.0",
"@angular/compiler": "^17.3.0",
"@angular/core": "^17.3.0",
"@angular/forms": "^17.3.0",
"@angular/platform-browser": "^17.3.0",
"@angular/platform-browser-dynamic": "^17.3.0",
"@angular/router": "^17.3.0",
"@uppy/angular": "workspace:*",
"@uppy/core": "workspace:*",
"@uppy/drag-drop": "workspace:*",
Expand All @@ -28,27 +28,27 @@
"@uppy/webcam": "workspace:*",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.13.0"
"zone.js": "~0.14.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.2.0",
"@angular-eslint/builder": "16.1.1",
"@angular-eslint/eslint-plugin": "16.1.1",
"@angular-eslint/eslint-plugin-template": "16.1.1",
"@angular-eslint/schematics": "16.1.1",
"@angular-eslint/template-parser": "16.1.1",
"@angular/cli": "~16.2.0",
"@angular/compiler-cli": "^16.2.0",
"@types/jasmine": "~4.3.0",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"eslint": "^8.0.0",
"jasmine-core": "~4.6.0",
"@angular-devkit/build-angular": "^17.3.0",
"@angular-eslint/builder": "17.3.0",
"@angular-eslint/eslint-plugin": "17.3.0",
"@angular-eslint/eslint-plugin-template": "17.3.0",
"@angular-eslint/schematics": "17.3.0",
"@angular-eslint/template-parser": "17.3.0",
"@angular/cli": "~17.3.0",
"@angular/compiler-cli": "^17.3.0",
"@types/jasmine": "~5.1.0",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"eslint": "^8.57.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.1"
"typescript": "~5.4"
}
}
3 changes: 2 additions & 1 deletion examples/angular-example/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export class AppComponent implements OnInit {
},
}

uppy: Uppy = new Uppy({ debug: true, autoProceed: true })
// eslint-disable-next-line @typescript-eslint/no-explicit-any
uppy: Uppy<any, any> = new Uppy({ debug: true, autoProceed: true })

ngOnInit(): void {
this.uppy
Expand Down
2 changes: 1 addition & 1 deletion examples/svelte-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"svelte-check": "^1.6.0",
"svelte-preprocess": "^5.0.0",
"tslib": "^2.0.0",
"typescript": "~5.1"
"typescript": "~5.4"
},
"dependencies": {
"@uppy/core": "workspace:*",
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"stylelint-config-standard": "^34.0.0",
"stylelint-config-standard-scss": "^10.0.0",
"tar": "^6.1.0",
"typescript": "~5.1",
"typescript": "~5.4",
"vitest": "^1.2.1",
"vue-template-compiler": "workspace:*"
},
Expand All @@ -119,11 +119,11 @@
"build:css": "yarn node ./bin/build-css.js",
"build:svelte": "yarn workspace @uppy/svelte build",
"build:angular": "yarn workspace angular build",
"build:js": "npm-run-all build:lib build:companion build:locale-pack build:svelte build:bundle",
"build:ts": "yarn workspaces list --no-private --json | yarn node ./bin/build-ts.mjs",
"build:js": "npm-run-all build:lib build:companion build:locale-pack build:svelte build:angular build:bundle",
"build:ts": "yarn workspaces list --no-private --json | yarn node ./bin/build-ts.mjs && yarn workspace @uppy/svelte validate",
"build:lib": "yarn node ./bin/build-lib.js",
"build:locale-pack": "yarn workspace @uppy-dev/locale-pack build && eslint packages/@uppy/locales/src/en_US.js --fix && yarn workspace @uppy-dev/locale-pack test unused",
"build": "npm-run-all --parallel build:ts build:js build:css --serial size",
"build": "npm-run-all --serial build:ts --parallel build:js build:css --serial size",
"contributors:save": "yarn node ./bin/update-contributors.mjs",
"dev:with-companion": "npm-run-all --parallel start:companion dev",
"dev": "yarn workspace @uppy-dev/dev dev",
Expand Down Expand Up @@ -153,7 +153,7 @@
"test:locale-packs:warnings": "yarn workspace @uppy-dev/locale-pack test warnings",
"test:unit": "yarn run build:lib && yarn test:watch --run",
"test:watch": "vitest --environment jsdom --dir packages/@uppy",
"test": "npm-run-all lint test:locale-packs:unused test:unit test:type test:companion",
"test": "npm-run-all lint test:locale-packs:unused test:unit test:companion",
"uploadcdn": "yarn node ./bin/upload-to-cdn.js",
"version": "yarn node ./bin/after-version-bump.js",
"watch:css": "onchange 'packages/{@uppy/,}*/src/*.scss' --initial --verbose -- yarn run build:css",
Expand Down
46 changes: 23 additions & 23 deletions packages/@uppy/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,37 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^16.2.0",
"@angular/common": "^16.2.0",
"@angular/compiler": "^16.2.0",
"@angular/core": "^16.2.0",
"@angular/forms": "^16.2.0",
"@angular/platform-browser": "^16.2.0",
"@angular/platform-browser-dynamic": "^16.2.0",
"@angular/router": "^16.2.0",
"@angular/animations": "^17.3.0",
"@angular/common": "^17.3.0",
"@angular/compiler": "^17.3.0",
"@angular/core": "^17.3.0",
"@angular/forms": "^17.3.0",
"@angular/platform-browser": "^17.3.0",
"@angular/platform-browser-dynamic": "^17.3.0",
"@angular/router": "^17.3.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.13.0"
"zone.js": "~0.14.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.2.0",
"@angular-eslint/builder": "16.1.1",
"@angular-eslint/eslint-plugin": "16.1.1",
"@angular-eslint/eslint-plugin-template": "16.1.1",
"@angular-eslint/schematics": "16.1.1",
"@angular-eslint/template-parser": "16.1.1",
"@angular/cli": "~16.2.0",
"@angular/compiler-cli": "^16.2.0",
"@types/jasmine": "~4.3.0",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"jasmine-core": "~4.6.0",
"@angular-devkit/build-angular": "^17.3.0",
"@angular-eslint/builder": "17.3.0",
"@angular-eslint/eslint-plugin": "17.3.0",
"@angular-eslint/eslint-plugin-template": "17.3.0",
"@angular-eslint/schematics": "17.3.0",
"@angular-eslint/template-parser": "17.3.0",
"@angular/cli": "~17.3.0",
"@angular/compiler-cli": "^17.3.0",
"@types/jasmine": "~5.1.0",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"ng-packagr": "^16.2.0",
"typescript": "~5.1"
"ng-packagr": "^17.3.0",
"typescript": "~5.4"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Component, ChangeDetectionStrategy } from '@angular/core';
// @ts-expect-error
import * as Dashboard from '@uppy/dashboard';
// @ts-expect-error
import { Uppy } from '@uppy/core';
import { Body, Meta } from '@uppy/utils/lib/UppyFile';

@Component({
selector: 'uppy-dashboard-demo',
Expand All @@ -12,7 +11,7 @@ import { Uppy } from '@uppy/core';
></uppy-dashboard-modal>`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DashboardModalDemoComponent {
uppy: Uppy = new Uppy({ debug: true, autoProceed: true });
props: Dashboard.DashboardOptions;
export class DashboardModalDemoComponent<M extends Meta, B extends Body> {
uppy: Uppy<M, B> = new Uppy({ debug: true, autoProceed: true });
props?: Dashboard.DashboardOptions<M, B>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,23 @@ import {
OnChanges,
SimpleChanges,
} from '@angular/core';
// @ts-expect-error
import Dashboard from '@uppy/dashboard';
// @ts-expect-error
import type { DashboardOptions } from '@uppy/dashboard';
// @ts-expect-error
import { Uppy } from '@uppy/core';
import { UppyAngularWrapper } from '../../utils/wrapper';
import { Body, Meta } from '@uppy/utils/lib/UppyFile';

@Component({
selector: 'uppy-dashboard-modal',
template: '',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DashboardModalComponent
extends UppyAngularWrapper<Dashboard>
export class DashboardModalComponent<M extends Meta, B extends Body>
extends UppyAngularWrapper<M, B, DashboardOptions<M, B>, Dashboard<M, B>>
implements OnDestroy, OnChanges
{
@Input() uppy: Uppy = new Uppy();
@Input() props: DashboardOptions = {};
@Input() uppy: Uppy<M, B> = new Uppy();
@Input() props: DashboardOptions<M, B> = {};
@Input() open: boolean = false;

constructor(public el: ElementRef) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { Component, ChangeDetectionStrategy } from '@angular/core';
// @ts-expect-error
import * as Dashboard from '@uppy/dashboard';
// @ts-expect-error
import { Uppy } from '@uppy/core';
import { Body, Meta } from '@uppy/utils/lib/UppyFile';

@Component({
selector: 'uppy-dashboard-demo',
template: `<uppy-dashboard [uppy]="uppy" [props]="props"></uppy-dashboard>`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DashboardDemoComponent {
uppy: Uppy = new Uppy({ debug: true, autoProceed: true });
props: Dashboard.DashboardOptions;
export class DashboardDemoComponent<M extends Meta, B extends Body> {
uppy: Uppy<M, B> = new Uppy({ debug: true, autoProceed: true });
props?: Dashboard.DashboardOptions<M, B>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,23 @@ import {
OnChanges,
SimpleChanges,
} from '@angular/core';
// @ts-expect-error
import Dashboard from '@uppy/dashboard';
// @ts-expect-error
import type { DashboardOptions } from '@uppy/dashboard';
// @ts-expect-error
import { Uppy } from '@uppy/core';
import { UppyAngularWrapper } from '../../utils/wrapper';
import { Body, Meta } from '@uppy/utils/lib/UppyFile';

@Component({
selector: 'uppy-dashboard',
template: '',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DashboardComponent
extends UppyAngularWrapper
export class DashboardComponent<M extends Meta, B extends Body>
extends UppyAngularWrapper<M, B, DashboardOptions<M,B>>
implements OnDestroy, OnChanges
{
@Input() uppy: Uppy = new Uppy();
@Input() props: DashboardOptions = {};
@Input() uppy: Uppy<M, B> = new Uppy();
@Input() props: DashboardOptions<M, B> = {};

constructor(public el: ElementRef) {
super();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { Component, ChangeDetectionStrategy } from '@angular/core';
// @ts-expect-error
import * as DragDrop from '@uppy/drag-drop';
// @ts-expect-error
import { Uppy } from '@uppy/core';
import { Body, Meta } from '@uppy/utils/lib/UppyFile';

@Component({
selector: 'uppy-drag-drop-demo',
template: ` <uppy-drag-drop [uppy]="uppy" [props]="props"></uppy-drag-drop> `,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DragDropDemoComponent {
uppy: Uppy = new Uppy({ debug: true, autoProceed: true });
export class DragDropDemoComponent<M extends Meta, B extends Body> {
uppy: Uppy<M, B> = new Uppy({ debug: true, autoProceed: true });
props: DragDrop.DragDropOptions = {};
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,22 @@ import {
SimpleChanges,
ElementRef,
} from '@angular/core';
// @ts-expect-error
import { Uppy } from '@uppy/core';
// @ts-expect-error
import DragDrop from '@uppy/drag-drop';
// @ts-expect-error
import type { DragDropOptions } from '@uppy/drag-drop';
import { Body, Meta } from '@uppy/utils/lib/UppyFile';
import { UppyAngularWrapper } from '../../utils/wrapper';

@Component({
selector: 'uppy-drag-drop',
template: '',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DragDropComponent
extends UppyAngularWrapper
export class DragDropComponent<M extends Meta, B extends Body>
extends UppyAngularWrapper<M, B, DragDropOptions>
implements OnDestroy, OnChanges
{
@Input() uppy: Uppy = new Uppy();
@Input() uppy: Uppy<M, B> = new Uppy();
@Input() props: DragDropOptions = {};

constructor(public el: ElementRef) {
Expand Down
Loading

0 comments on commit 143a0a1

Please sign in to comment.