diff --git a/examples/angular-example/.browserslistrc b/examples/angular-example/.browserslistrc deleted file mode 100644 index 4f9ac26980..0000000000 --- a/examples/angular-example/.browserslistrc +++ /dev/null @@ -1,16 +0,0 @@ -# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries - -# For the full list of supported browsers by the Angular framework, please see: -# https://angular.io/guide/browser-support - -# You can see what browsers were selected by your queries by running: -# npx browserslist - -last 1 Chrome version -last 1 Firefox version -last 2 Edge major versions -last 2 Safari major versions -last 2 iOS major versions -Firefox ESR diff --git a/examples/angular-example/.eslintrc.json b/examples/angular-example/.eslintrc.json index 6c64832b7b..0ed227af25 100644 --- a/examples/angular-example/.eslintrc.json +++ b/examples/angular-example/.eslintrc.json @@ -7,27 +7,13 @@ "files": [ "*.ts" ], - "parserOptions": { - "project": [ - "examples/angular-example/tsconfig.json", - "examples/angular-example/e2e/tsconfig.json" - ], - "createDefaultProgram": true - }, "extends": [ - "plugin:@angular-eslint/ng-cli-compat", - "plugin:@angular-eslint/ng-cli-compat--formatting-add-on", + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:@angular-eslint/recommended", "plugin:@angular-eslint/template/process-inline-templates" ], "rules": { - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ], "@angular-eslint/directive-selector": [ "error", { @@ -37,30 +23,26 @@ } ], "@typescript-eslint/semi": ["error", "never"], - "dot-notation": "error", "import/no-unresolved": "off", "import/prefer-default-export": "off", - "indent": "error", - "no-empty-function": "off", - "no-shadow": "error", - "no-unused-expressions": "error", - "no-use-before-define": "off", - "quotes": "error", + "@angular-eslint/component-selector": [ + "error", + { + "type": "element", + "prefix": "app", + "style": "kebab-case" + } + ], "semi": ["error", "never"] } }, - { - "files": ["e2e/**/*.ts"], - "rules": { - "import/no-extraneous-dependencies": "off" - } - }, { "files": [ "star.html" ], "extends": [ - "plugin:@angular-eslint/template/recommended" + "plugin:@angular-eslint/template/recommended", + "plugin:@angular-eslint/template/accessibility" ], "rules": {} } diff --git a/examples/angular-example/.vscode/launch.json b/examples/angular-example/.vscode/launch.json index 740e35a0c0..925af83705 100644 --- a/examples/angular-example/.vscode/launch.json +++ b/examples/angular-example/.vscode/launch.json @@ -4,7 +4,7 @@ "configurations": [ { "name": "ng serve", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "preLaunchTask": "npm: start", "url": "http://localhost:4200/" diff --git a/examples/angular-example/README.md b/examples/angular-example/README.md index 3be776e231..ae7777c3d9 100644 --- a/examples/angular-example/README.md +++ b/examples/angular-example/README.md @@ -1,6 +1,6 @@ # AngularExample -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.1.2. +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0. ## Development server @@ -8,7 +8,7 @@ This project was generated with [Angular CLI](https://github.com/angular/angular corepack yarn install corepack yarn build corepack yarn workspace @uppy/angular prepublishOnly -corepack yarn workspace @uppy-example/angular ng serve +corepack yarn workspace @uppy-example/angular start ``` Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. diff --git a/examples/angular-example/angular.json b/examples/angular-example/angular.json index e6ccb43b51..51f5b5714f 100644 --- a/examples/angular-example/angular.json +++ b/examples/angular-example/angular.json @@ -13,11 +13,12 @@ "build": { "builder": "@angular-devkit/build-angular:browser", "options": { - "preserveSymlinks": true, "outputPath": "dist/angular-example", "index": "src/index.html", "main": "src/main.ts", - "polyfills": "src/polyfills.ts", + "polyfills": [ + "zone.js" + ], "tsConfig": "tsconfig.app.json", "assets": [ "src/favicon.ico", @@ -42,12 +43,6 @@ "maximumError": "4kb" } ], - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" - } - ], "outputHashing": "all" }, "development": { @@ -82,10 +77,11 @@ "test": { "builder": "@angular-devkit/build-angular:karma", "options": { - "main": "src/test.ts", - "polyfills": "src/polyfills.ts", + "polyfills": [ + "zone.js", + "zone.js/testing" + ], "tsConfig": "tsconfig.spec.json", - "karmaConfig": "karma.conf.js", "assets": [ "src/favicon.ico", "src/assets" @@ -95,8 +91,22 @@ ], "scripts": [] } + }, + "lint": { + "builder": "@angular-eslint/builder:lint", + "options": { + "lintFilePatterns": [ + "src/**/*.ts", + "src/**/*.html" + ] + } } } } + }, + "cli": { + "schematicCollections": [ + "@angular-eslint/schematics" + ] } } diff --git a/examples/angular-example/karma.conf.js b/examples/angular-example/karma.conf.js deleted file mode 100644 index a30bf8247b..0000000000 --- a/examples/angular-example/karma.conf.js +++ /dev/null @@ -1,45 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -/* eslint-disable global-require */ -module.exports = (config) => { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage'), - require('@angular-devkit/build-angular/plugins/karma'), - ], - client: { - jasmine: { - // you can add configuration options for Jasmine here - // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html - // for example, you can disable the random execution with `random: false` - // or set a specific seed with `seed: 4321` - }, - clearContext: false, // leave Jasmine Spec Runner output visible in browser - }, - jasmineHtmlReporter: { - suppressAll: true, // removes the duplicated traces - }, - coverageReporter: { - dir: require('node:path').join(__dirname, './coverage/angular-example'), - subdir: '.', - reporters: [ - { type: 'html' }, - { type: 'text-summary' }, - ], - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false, - restartOnFileChange: true, - }) -} diff --git a/examples/angular-example/package.json b/examples/angular-example/package.json index 445d72f7d1..a7eb2a3872 100644 --- a/examples/angular-example/package.json +++ b/examples/angular-example/package.json @@ -6,18 +6,19 @@ "start": "ng serve", "build": "ng build", "watch": "ng build --watch --configuration development", - "test": "ng test" + "test": "ng test", + "lint": "ng lint" }, "private": true, "dependencies": { - "@angular/animations": "^14.1.0", - "@angular/common": "^14.1.0", - "@angular/compiler": "^14.1.0", - "@angular/core": "^14.1.0", - "@angular/forms": "^14.1.0", - "@angular/platform-browser": "^14.1.0", - "@angular/platform-browser-dynamic": "^14.1.0", - "@angular/router": "^14.1.0", + "@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", "@uppy/angular": "workspace:*", "@uppy/core": "workspace:*", "@uppy/drag-drop": "workspace:*", @@ -25,30 +26,29 @@ "@uppy/progress-bar": "workspace:*", "@uppy/tus": "workspace:*", "@uppy/webcam": "workspace:*", - "rxjs": "~7.5.0", + "rxjs": "~7.8.0", "tslib": "^2.3.0", - "zone.js": "~0.11.4" + "zone.js": "~0.13.0" }, "devDependencies": { - "@angular-devkit/build-angular": "^14.1.2", - "@angular-eslint/builder": "^14.0.2", - "@angular-eslint/eslint-plugin": "^14.0.2", - "@angular-eslint/eslint-plugin-template": "^14.0.2", - "@angular-eslint/schematics": "^14.0.2", - "@angular-eslint/template-parser": "^14.0.2", - "@angular/cli": "~14.2.0", - "@angular/compiler-cli": "^14.1.0", - "@types/jasmine": "~4.0.0", + "@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", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jsdoc": "^40.0.0", - "eslint-plugin-prefer-arrow": "^1.2.3", - "jasmine-core": "~4.2.0", + "jasmine-core": "~4.6.0", "karma": "~6.4.0", - "karma-chrome-launcher": "~3.1.0", + "karma-chrome-launcher": "~3.2.0", "karma-coverage": "~2.2.0", "karma-jasmine": "~5.1.0", - "karma-jasmine-html-reporter": "~2.0.0", - "typescript": "~4.8" + "karma-jasmine-html-reporter": "~2.1.0", + "typescript": "~5.1" } } diff --git a/examples/angular-example/src/app/app.component.ts b/examples/angular-example/src/app/app.component.ts index 18f6e5a437..2b047d069d 100644 --- a/examples/angular-example/src/app/app.component.ts +++ b/examples/angular-example/src/app/app.component.ts @@ -12,7 +12,7 @@ import GoogleDrive from '@uppy/google-drive'