Skip to content

feat: migrate to angular 13 with Ivy distribution #284

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ speed-measure-plugin.json
.history/*

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
37 changes: 10 additions & 27 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@
"src/styles.scss",
"node_modules/bootstrap/dist/css/bootstrap.css"
],
"scripts": []
"scripts": [],
"aot": false,
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand All @@ -56,7 +63,8 @@
}
]
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
Expand Down Expand Up @@ -92,19 +100,6 @@
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
Expand Down Expand Up @@ -139,18 +134,6 @@
"tsConfig": "projects/ngx-sortablejs/tsconfig.spec.json",
"karmaConfig": "projects/ngx-sortablejs/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/ngx-sortablejs/tsconfig.lib.json",
"projects/ngx-sortablejs/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
Expand Down
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"ng": "ng",
"start": "ng serve",
"build:app": "ng build --prod --baseHref /ngx-sortablejs/",
"build:app": "ng build --configuration production --baseHref /ngx-sortablejs/",
"build:lib": "ng build ngx-sortablejs",
"test:app": "ng test ngx-sortablejs-app",
"test:app:ci": "ng test ngx-sortablejs-app --watch=false --progress=false --browsers=ChromeHeadlessCI",
Expand All @@ -22,26 +22,26 @@
},
"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.4.0",
"@angular/common": "~13.4.0",
"@angular/compiler": "~13.4.0",
"@angular/core": "~13.4.0",
"@angular/forms": "~13.4.0",
"@angular/platform-browser": "~13.4.0",
"@angular/platform-browser-dynamic": "~13.4.0",
"@angular/router": "~13.4.0",
"bootstrap": "^4.4.1",
"ngx-bootstrap": "^4.3.0",
"rxjs": "~6.5.4",
"sortablejs": "^1.10.2",
"tslib": "^2.0.0",
"zone.js": "~0.10.3"
"tslib": "^2.6.2",
"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.11",
"@angular/cli": "~13.3.11",
"@angular/compiler-cli": "~13.4.0",
"@angular/language-service": "~13.4.0",
"@semantic-release/changelog": "^3.0.6",
"@semantic-release/git": "^7.0.18",
"@types/jasmine": "~3.6.0",
Expand All @@ -53,18 +53,18 @@
"cpr": "^3.0.1",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.1.1",
"karma": "~6.4.2",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "^2.0.6",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "^11.0.3",
"ng-packagr": "^13.3.1",
"ngx-spec": "^2.1.4",
"protractor": "~7.0.0",
"semantic-release": "^15.14.0",
"ts-node": "~7.0.0",
"tsickle": "^0.39.1",
"tslint": "~6.1.3",
"typescript": "~4.0.3"
"typescript": "~4.6.4"
}
}
4 changes: 2 additions & 2 deletions projects/ngx-sortablejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"access": "public"
},
"peerDependencies": {
"@angular/common": "^11.0.0",
"@angular/core": "^11.0.0",
"@angular/common": "^13.0.0",
"@angular/core": "^13.0.0",
"sortablejs": ">=1.7.0"
},
"main": "src/public-api.ts"
Expand Down
8 changes: 5 additions & 3 deletions projects/ngx-sortablejs/src/test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

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 @@ -13,7 +13,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
4 changes: 2 additions & 2 deletions projects/ngx-sortablejs/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"compilationMode": "partial",
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableResourceInlining": true,
"enableIvy": false
"enableResourceInlining": true

},
"exclude": [
Expand Down
2 changes: 1 addition & 1 deletion src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
12 changes: 1 addition & 11 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@
* BROWSER POLYFILLS
*/

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

/**
* 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 Down Expand Up @@ -55,7 +45,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.

/***************************************************************************************************
* APPLICATION IMPORTS
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 @@ -7,7 +7,6 @@
"declaration": false,
"module": "esnext",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"importHelpers": true,
Expand Down
Loading