Skip to content

Commit

Permalink
Merge pull request #579 from heapifyman/update-to-angular-19
Browse files Browse the repository at this point in the history
Update to angular 19
  • Loading branch information
werthdavid authored Nov 20, 2024
2 parents af3688f + 785ea5b commit a0db63c
Show file tree
Hide file tree
Showing 11 changed files with 3,323 additions and 4,058 deletions.
27 changes: 13 additions & 14 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/zxing-scanner-demo",
"outputPath": {
"base": "dist/zxing-scanner-demo"
},
"index": "projects/zxing-scanner-demo/src/index.html",
"main": "projects/zxing-scanner-demo/src/main.ts",
"polyfills": "projects/zxing-scanner-demo/src/polyfills.ts",
"polyfills": [
"projects/zxing-scanner-demo/src/polyfills.ts"
],
"tsConfig": "projects/zxing-scanner-demo/tsconfig.app.json",
"assets": [
"projects/zxing-scanner-demo/src/favicon.ico",
Expand All @@ -57,12 +60,11 @@
"projects/zxing-scanner-demo/src/styles.css"
],
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
"namedChunks": true,
"browser": "projects/zxing-scanner-demo/src/main.ts"
},
"configurations": {
"production": {
Expand All @@ -76,8 +78,6 @@
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
Expand All @@ -89,27 +89,26 @@
"maximumWarning": "6kb"
}
],
"serviceWorker": true,
"ngswConfigPath": "projects/zxing-scanner-demo/ngsw-config.json"
"serviceWorker": "projects/zxing-scanner-demo/ngsw-config.json"
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "zxing-scanner-demo:build"
"buildTarget": "zxing-scanner-demo:build"
},
"configurations": {
"production": {
"browserTarget": "zxing-scanner-demo:build:production"
"buildTarget": "zxing-scanner-demo:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "zxing-scanner-demo:build"
"buildTarget": "zxing-scanner-demo:build"
}
},
"test": {
Expand Down
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,30 +46,30 @@
"deploy:demo:ngh": "npm run build:gh-pages && npx ngh --dir=dist/gh-pages"
},
"dependencies": {
"@angular/animations": "^18.0.0",
"@angular/cdk": "^18.0.0",
"@angular/common": "^18.0.0",
"@angular/core": "^18.0.0",
"@angular/forms": "^18.0.0",
"@angular/material": "^18.0.0",
"@angular/platform-browser": "^18.0.0",
"@angular/platform-browser-dynamic": "^18.0.0",
"@angular/router": "^18.0.0",
"@angular/service-worker": "^18.0.0",
"@angular/animations": "^19.0.0",
"@angular/cdk": "^19.0.0",
"@angular/common": "^19.0.0",
"@angular/core": "^19.0.0",
"@angular/forms": "^19.0.0",
"@angular/material": "^19.0.0",
"@angular/platform-browser": "^19.0.0",
"@angular/platform-browser-dynamic": "^19.0.0",
"@angular/router": "^19.0.0",
"@angular/service-worker": "^19.0.0",
"@zxing/browser": "^0.1.5",
"@zxing/library": "^0.21.0",
"rxjs": "^7.8.1",
"tslib": "^2.6.2"
},
"devDependencies": {
"@angular-devkit/architect": "^0.1800.1",
"@angular-devkit/build-angular": "^18.0.1",
"@angular-devkit/core": "^18.0.1",
"@angular-devkit/schematics": "^18.0.1",
"@angular/cli": "^18.0.1",
"@angular/compiler": "^18.0.0",
"@angular/compiler-cli": "^18.0.0",
"@angular/language-service": "^18.0.0",
"@angular-devkit/architect": "^0.1900.0",
"@angular-devkit/build-angular": "^19.0.0",
"@angular-devkit/core": "^19.0.0",
"@angular-devkit/schematics": "^19.0.0",
"@angular/cli": "^19.0.0",
"@angular/compiler": "^19.0.0",
"@angular/compiler-cli": "^19.0.0",
"@angular/language-service": "^19.0.0",
"@compodoc/compodoc": "^1.1.24",
"@types/jasmine": "^5.1.4",
"@types/jasminewd2": "~2.0.13",
Expand All @@ -83,12 +83,12 @@
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.1.0",
"ng-packagr": "^18.0.0",
"ng-packagr": "^19.0.0",
"protractor": "^7.0.0",
"ts-node": "^10.9.2",
"tslint": "^6.1.3",
"typescript": "5.4.5",
"zone.js": "~0.14.6"
"typescript": "5.6.3",
"zone.js": "~0.15.0"
},
"collective": {
"type": "opencollective",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';

@Component({
selector: 'app-info-dialog',
templateUrl: './app-info-dialog.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-info-dialog',
templateUrl: './app-info-dialog.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false
})
export class AppInfoDialogComponent {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Component, Input, VERSION, ChangeDetectionStrategy } from '@angular/core';

@Component({
selector: 'app-info',
templateUrl: './app-info.component.html',
styleUrls: ['./app-info.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-info',
templateUrl: './app-info.component.html',
styleUrls: ['./app-info.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false
})
export class AppInfoComponent {

Expand Down
7 changes: 4 additions & 3 deletions projects/zxing-scanner-demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import { FormatsDialogComponent } from './formats-dialog/formats-dialog.componen
import { AppInfoDialogComponent } from './app-info-dialog/app-info-dialog.component';

@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
styleUrls: ['./app.component.scss']
selector: 'app-root',
templateUrl: 'app.component.html',
styleUrls: ['./app.component.scss'],
standalone: false
})
export class AppComponent {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import { BarcodeFormat } from '@zxing/library';
import { formatNames, formatsAvailable } from '../barcode-formats';

@Component({
selector: 'app-formats-dialog',
templateUrl: './formats-dialog.component.html',
styleUrls: ['./formats-dialog.component.scss']
selector: 'app-formats-dialog',
templateUrl: './formats-dialog.component.html',
styleUrls: ['./formats-dialog.component.scss'],
standalone: false
})
export class FormatsDialogComponent {

Expand Down
8 changes: 4 additions & 4 deletions projects/zxing-scanner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"private": false,
"license": "MIT",
"peerDependencies": {
"@angular/common": "^11.2.11 || ^12.0.4 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0",
"@angular/core": "^11.2.11 || ^12.0.4 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0",
"@angular/forms": "^11.2.11 || ^12.0.4 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0",
"@angular/common": "^11.2.11 || ^12.0.4 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"@angular/core": "^11.2.11 || ^12.0.4 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"@angular/forms": "^11.2.11 || ^12.0.4 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"@zxing/browser": "^0.1.4",
"@zxing/library": "^0.21.0",
"rxjs": "^6.6.3 || ^7.0.0"
}
}
}
9 changes: 5 additions & 4 deletions projects/zxing-scanner/src/lib/zxing-scanner.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ import { ResultAndError } from './ResultAndError';


@Component({
selector: 'zxing-scanner',
templateUrl: './zxing-scanner.component.html',
styleUrls: ['./zxing-scanner.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
selector: 'zxing-scanner',
templateUrl: './zxing-scanner.component.html',
styleUrls: ['./zxing-scanner.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false
})
export class ZXingScannerComponent implements OnInit, OnDestroy {

Expand Down
9 changes: 5 additions & 4 deletions projects/zxing-scanner/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
platformBrowserDynamicTesting(),
{
teardown: { destroyAfterEach: false },
},
);
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"downlevelIteration": true,
"outDir": "./dist/out-tsc",
"esModuleInterop": true,
"sourceMap": true,
"declaration": false,
"module": "esnext",
Expand Down
Loading

0 comments on commit a0db63c

Please sign in to comment.