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

feat(): upgrade to angular v13 #558

Closed
wants to merge 14 commits into from
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
!.vscode/extensions.json

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
34 changes: 9 additions & 25 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/ngx-uploader-demo",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles/app.sass"],
"scripts": []
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand All @@ -41,12 +46,12 @@
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
Expand Down Expand Up @@ -76,13 +81,6 @@
"scripts": [],
"assets": ["src/favicon.ico", "src/assets"]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
}
}
}
},
Expand All @@ -101,13 +99,6 @@
"devServerTarget": "ngx-uploader-demo:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": ["**/node_modules/**"]
}
}
}
},
Expand Down Expand Up @@ -137,13 +128,6 @@
"tsConfig": "projects/ngx-uploader/tsconfig.spec.json",
"karmaConfig": "projects/ngx-uploader/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["projects/ngx-uploader/tsconfig.lib.json", "projects/ngx-uploader/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
}
}
}
}
Expand Down
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-uploader-demo",
"version": "8.0.0",
"version": "13.0.0",
"repository": {
"type": "git",
"url": "git+https://github.com/bleenco/ngx-uploader.git"
Expand All @@ -17,32 +17,32 @@
"ng": "ng",
"start": "ng serve --open --proxy-config ./proxy.conf.json",
"build": "ng build",
"build:prod": "ng build ngx-uploader --prod && ng build ngx-uploader-demo --prod && tsc -p tsconfig.api.json",
"build:prod": "ng build ngx-uploader --configuration production && ng build ngx-uploader-demo --configuration production && tsc -p tsconfig.api.json",
"test": "ng test ngx-uploader",
"lint": "ng lint",
"e2e": "ng e2e",
"build:lib": "ng build ngx-uploader --prod"
"build:lib": "ng build ngx-uploader --configuration production"
},
"private": true,
"dependencies": {
"@angular/animations": "^11.0.5",
"@angular/common": "^11.0.5",
"@angular/compiler": "^11.0.5",
"@angular/core": "^11.0.5",
"@angular/forms": "^11.0.5",
"@angular/platform-browser": "^11.0.5",
"@angular/platform-browser-dynamic": "^11.0.5",
"@angular/router": "^11.0.5",
"@angular/animations": "^13.3.11",
"@angular/common": "^13.3.11",
"@angular/compiler": "^13.3.11",
"@angular/core": "^13.3.11",
"@angular/forms": "^13.3.11",
"@angular/platform-browser": "^13.3.11",
"@angular/platform-browser-dynamic": "^13.3.11",
"@angular/router": "^13.3.11",
"core-js": "^3.5.0",
"rxjs": "^6.6.0",
"tslib": "^2.0.0",
"zone.js": "~0.10.3"
"tslib": "^2.4.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1100.5",
"@angular/cli": "~11.0.5",
"@angular/compiler-cli": "^11.0.5",
"@angular/language-service": "^11.0.5",
"@angular-devkit/build-angular": "~13.3.8",
"@angular/cli": "~13.3.8",
"@angular/compiler-cli": "^13.3.11",
"@angular/language-service": "^13.3.11",
"@types/body-parser": "^1.17.1",
"@types/cors": "^2.8.6",
"@types/express": "^4.17.2",
Expand All @@ -59,18 +59,18 @@
"express": "^4.17.1",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.1.1",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"multer": "^1.4.2",
"ng-packagr": "^11.0.3",
"ng-packagr": "^13.3.1",
"prettier": "^2.0.5",
"protractor": "~7.0.0",
"rimraf": "^3.0.0",
"ts-node": "~8.5.4",
"tslint": "~6.1.0",
"typescript": ">=4.0 <4.1"
"typescript": "4.6.4"
}
}
}
6 changes: 3 additions & 3 deletions projects/ngx-uploader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-uploader",
"version": "11.0.0",
"version": "13.0.0",
"homepage": "https://ngx-uploader.com",
"repository": {
"type": "git",
Expand All @@ -14,8 +14,8 @@
"url": "https://github.com/bleenco/ngx-uploader/issues"
},
"peerDependencies": {
"@angular/common": ">= 10.0.0",
"@angular/core": ">= 10.0.0"
"@angular/common": ">= 13.0.0",
"@angular/core": ">= 13.0.0"
},
"dependencies": {
"tslib": "^2.0.0"
Expand Down
8 changes: 5 additions & 3 deletions projects/ngx-uploader/src/test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import 'core-js/es7/reflect';
import 'zone.js/dist/zone';
import 'zone.js/dist/zone-testing';
import 'zone.js';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
Expand All @@ -14,7 +14,9 @@ declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
Expand Down
1 change: 0 additions & 1 deletion projects/ngx-uploader/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"declaration": true,
"sourceMap": true,
"inlineSources": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-uploader/tsconfig.lib.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}
2 changes: 1 addition & 1 deletion src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ export const environment = {
* import the following file, but please comment it out in production mode
* because it will have performance impact when throw error
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
14 changes: 1 addition & 13 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,13 @@
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.

/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';


/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.



/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
**/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.

/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
Expand All @@ -71,7 +59,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js'; // Included with Angular CLI.



Expand Down
6 changes: 4 additions & 2 deletions src/test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import 'zone.js/dist/zone-testing';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
Expand All @@ -12,7 +12,9 @@ declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2015",
"typeRoots": ["node_modules/@types"],
Expand Down
Loading