Skip to content

Commit 9774b80

Browse files
authored
Merge pull request #857 from ghiscoding/feat/angular13
BREAKING CHANGE: upgrade Angular 13 using Ivy build without UMD bundles
2 parents 64c4b7e + 5659890 commit 9774b80

14 files changed

+1885
-3193
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
.chrome
2828

2929
# misc
30+
/.angular/cache
3031
/.sass-cache
3132
/connect.lock
3233
/coverage

angular.json

+2-79
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"angular-slickgrid": {
77
"root": "",
88
"sourceRoot": "src",
9-
"projectType": "application",
9+
"projectType": "library",
1010
"architect": {
1111
"build": {
1212
"builder": "@angular-devkit/build-angular:browser",
@@ -119,84 +119,6 @@
119119
}
120120
}
121121
},
122-
"extract-i18n": {
123-
"builder": "@angular-devkit/build-angular:extract-i18n",
124-
"options": {
125-
"browserTarget": "angular-slickgrid:build"
126-
}
127-
},
128-
"test": {
129-
"builder": "@angular-devkit/build-angular:karma",
130-
"options": {
131-
"main": "src/test.ts",
132-
"karmaConfig": "./karma.conf.js",
133-
"polyfills": "src/polyfills.ts",
134-
"tsConfig": "tsconfig.spec.json",
135-
"styles": [
136-
"node_modules/bootstrap/dist/css/bootstrap.css",
137-
"node_modules/font-awesome/css/font-awesome.css",
138-
"node_modules/flatpickr/dist/flatpickr.css",
139-
"src/assets/lib/multiple-select/multiple-select.css",
140-
"node_modules/@ng-select/ng-select/themes/default.theme.css",
141-
"src/styles.scss",
142-
"src/slickgrid-styles.scss"
143-
],
144-
"scripts": [
145-
"node_modules/jquery/dist/jquery.js",
146-
"node_modules/jquery-ui-dist/jquery-ui.min.js",
147-
"node_modules/slickgrid/lib/jquery.event.drag-2.3.0.js",
148-
"node_modules/bootstrap/dist/js/bootstrap.js",
149-
"src/assets/lib/multiple-select/multiple-select.js"
150-
],
151-
"assets": [
152-
"src/assets",
153-
"src/favicon.ico",
154-
{
155-
"glob": "**/*",
156-
"input": "src/assets/i18n",
157-
"output": "/assets/i18n"
158-
},
159-
{
160-
"glob": "*",
161-
"input": "src/assets/i18n",
162-
"output": "/assets/i18n"
163-
},
164-
{
165-
"glob": "*/",
166-
"input": "src/assets/i18n",
167-
"output": "/assets/i18n"
168-
},
169-
{
170-
"glob": "**/*",
171-
"input": "src/assets/i18n",
172-
"output": "/assets/i18n"
173-
}
174-
]
175-
}
176-
},
177-
"lint": {
178-
"builder": "@angular-eslint/builder:lint",
179-
"options": {
180-
"lintFilePatterns": [
181-
"src/**/*.ts",
182-
"src/**/*.html"
183-
]
184-
}
185-
}
186-
}
187-
},
188-
"angular-slickgrid-e2e": {
189-
"root": "e2e",
190-
"sourceRoot": "e2e",
191-
"projectType": "application",
192-
"architect": {
193-
"e2e": {
194-
"builder": "@angular-devkit/build-angular:protractor",
195-
"options": {
196-
"protractorConfig": "./protractor.conf.js",
197-
"devServerTarget": "angular-slickgrid:serve"
198-
}
199-
},
200122
"lint": {
201123
"builder": "@angular-eslint/builder:lint",
202124
"options": {
@@ -220,6 +142,7 @@
220142
}
221143
},
222144
"cli": {
145+
"packageManager": "yarn",
223146
"defaultCollection": "@angular-eslint/schematics"
224147
}
225148
}

package.json

+32-48
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,7 @@
6666
],
6767
"dest": "dist",
6868
"lib": {
69-
"entryFile": "src/public_api.ts",
70-
"umdModuleIds": {
71-
"@ngx-translate/core": "ngx-translate-core",
72-
"@ngx-translate/core/index": "ngx-translate-core",
73-
"assignDeep": "assign-deep",
74-
"dequal": "dequal",
75-
"dequal-lite": "dequal-lite",
76-
"dompurify": "dompurify",
77-
"excel-builder-webpacker": "excelBuilderWebpacker",
78-
"flatpickr": "flatpickr",
79-
"jquery": "jquery",
80-
"moment-mini": "moment",
81-
"text-encoding-utf-8": "textEncodingUtf8"
82-
}
69+
"entryFile": "src/public_api.ts"
8370
}
8471
},
8572
"dependencies": {
@@ -100,45 +87,42 @@
10087
"rxjs": ">=7.0.0"
10188
},
10289
"peerDependencies": {
103-
"@angular/core": ">=12.1.2",
104-
"@ngx-translate/core": ">=13.0.0",
105-
"@ngx-translate/http-loader": ">=6.0.0",
106-
"typescript": ">=4.3.5"
90+
"@ngx-translate/core": ">=14.0.0"
10791
},
10892
"devDependencies": {
109-
"@angular-devkit/build-angular": "~12.2.13",
110-
"@angular-eslint/builder": "12.6.1",
111-
"@angular-eslint/eslint-plugin": "12.6.1",
112-
"@angular-eslint/eslint-plugin-template": "12.6.1",
113-
"@angular-eslint/schematics": "12.6.1",
114-
"@angular-eslint/template-parser": "12.6.1",
115-
"@angular/animations": "^12.2.13",
116-
"@angular/cli": "^12.2.13",
117-
"@angular/common": "^12.2.13",
118-
"@angular/compiler": "^12.2.12",
119-
"@angular/compiler-cli": "^12.2.13",
120-
"@angular/core": "^12.2.13",
121-
"@angular/forms": "^12.2.13",
122-
"@angular/language-service": "^12.2.13",
123-
"@angular/platform-browser": "^12.2.13",
124-
"@angular/platform-browser-dynamic": "^12.2.13",
125-
"@angular/router": "^12.2.13",
126-
"@ng-select/ng-select": "^7.4.0",
127-
"@ngx-translate/core": "^13.0.0",
128-
"@ngx-translate/http-loader": "^6.0.0",
93+
"@angular-devkit/build-angular": "~13.0.3",
94+
"@angular-eslint/builder": "13.0.1",
95+
"@angular-eslint/eslint-plugin": "13.0.1",
96+
"@angular-eslint/eslint-plugin-template": "13.0.1",
97+
"@angular-eslint/schematics": "13.0.1",
98+
"@angular-eslint/template-parser": "13.0.1",
99+
"@angular/animations": "^13.0.2",
100+
"@angular/cli": "^13.0.3",
101+
"@angular/common": "^13.0.2",
102+
"@angular/compiler": "^13.0.2",
103+
"@angular/compiler-cli": "^13.0.2",
104+
"@angular/core": "^13.0.2",
105+
"@angular/forms": "^13.0.2",
106+
"@angular/language-service": "^13.0.2",
107+
"@angular/platform-browser": "^13.0.2",
108+
"@angular/platform-browser-dynamic": "^13.0.2",
109+
"@angular/router": "^13.0.2",
110+
"@ng-select/ng-select": "^8.1.1",
111+
"@ngx-translate/core": "^14.0.0",
112+
"@ngx-translate/http-loader": "^7.0.0",
129113
"@slickgrid-universal/composite-editor-component": "^0.19.2",
130114
"@slickgrid-universal/custom-tooltip-plugin": "^0.19.2",
131115
"@slickgrid-universal/excel-export": "^0.19.2",
132116
"@slickgrid-universal/graphql": "^0.19.2",
133117
"@slickgrid-universal/odata": "^0.19.2",
134118
"@slickgrid-universal/text-export": "^0.19.2",
135119
"@types/flatpickr": "^3.1.2",
136-
"@types/jest": "^27.0.2",
120+
"@types/jest": "^27.0.3",
137121
"@types/moment": "^2.13.0",
138-
"@types/node": "^16.11.7",
122+
"@types/node": "^16.11.9",
139123
"@types/text-encoding-utf-8": "^1.0.2",
140-
"@typescript-eslint/eslint-plugin": "^4.33.0",
141-
"@typescript-eslint/parser": "^4.33.0",
124+
"@typescript-eslint/eslint-plugin": "^5.4.0",
125+
"@typescript-eslint/parser": "^5.4.0",
142126
"autoprefixer": "^10.4.0",
143127
"bootstrap": "^5.1.3",
144128
"codecov": "^3.8.3",
@@ -149,11 +133,11 @@
149133
"custom-event-polyfill": "^1.0.7",
150134
"del": "^6.0.0",
151135
"del-cli": "^4.0.1",
152-
"eslint": "^7.32.0",
136+
"eslint": "^8.2.0",
153137
"jest": "^27.3.1",
154138
"jest-extended": "^1.1.0",
155-
"jest-preset-angular": "^10.1.0",
156-
"ng-packagr": "^12.2.5",
139+
"jest-preset-angular": "^11.0.0",
140+
"ng-packagr": "^13.0.6",
157141
"ngx-bootstrap": "^7.1.0",
158142
"npm-run-all": "^4.1.5",
159143
"postcss": "^8.3.11",
@@ -166,12 +150,12 @@
166150
"stream-browserify": "^3.0.0",
167151
"ts-node": "^10.4.0",
168152
"tslib": "^2.3.1",
169-
"typescript": "~4.3.5",
153+
"typescript": "~4.4.4",
170154
"yargs": "^17.2.1",
171155
"zone.js": "~0.11.4"
172156
},
173157
"engines": {
174-
"node": ">=14.15.0",
158+
"node": ">=14.17.0",
175159
"npm": ">=6.14.8"
176160
}
177-
}
161+
}

src/app/app.component.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ describe('AppComponent', () => {
1010
AppComponent
1111
],
1212
providers: [],
13-
imports: [RouterTestingModule]
13+
imports: [RouterTestingModule],
14+
teardown: { destroyAfterEach: false }
1415
}).compileComponents();
1516
});
1617

src/app/examples/rowdetail-view.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ <h3>{{model?.title}}</h3>
33
<div class="row">
44
<div class="col-3"><label>Assignee:</label> <input class="form-control" [(ngModel)]="model.assignee" /></div>
55
<div class="col-3"><label>Reporter:</label> <span>{{model?.reporter}}</span></div>
6-
<div class="col-2"><label>Duration:</label> <span>{{model?.duration}}</span></div>
6+
<div class="col-2"><label>Duration:</label> <span>{{model?.duration | number : '1.2-2'}}</span></div>
77
<div class="col-2"><label>% Complete:</label> <span>{{model?.percentComplete}}</span></div>
88
</div>
99

src/app/modules/angular-slickgrid/components/__tests__/angular-slickgrid.component.spec.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,9 @@ describe('Angular-Slickgrid Custom Component instantiated via Constructor', () =
347347
sharedService = new SharedService();
348348
translaterService = new TranslaterServiceStub();
349349
await TestBed.configureTestingModule({
350-
imports: [TranslateModule.forRoot()]
351-
});
350+
imports: [TranslateModule.forRoot()],
351+
teardown: { destroyAfterEach: false }
352+
});
352353
translate = TestBed.inject(TranslateService);
353354

354355
mockChangeDetectorRef = {

src/app/modules/angular-slickgrid/extensions/__tests__/rowDetailViewExtension.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ describe('rowDetailViewExtension', () => {
124124
{ provide: RxJsFacade, useValue: rxjsResourceStub },
125125
{ provide: SortService, useValue: sortServiceStub },
126126
],
127-
imports: [TranslateModule.forRoot()]
127+
imports: [TranslateModule.forRoot()],
128+
teardown: { destroyAfterEach: false }
128129
});
129130
extension = TestBed.inject(RowDetailViewExtension);
130131
});

src/app/modules/angular-slickgrid/services/__tests__/angularUtilService.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ describe('AngularUtilService', () => {
4040
{ provide: ApplicationRef, useValue: applicationRefStub },
4141
{ provide: ComponentFactoryResolver, useValue: componentFactoryResolverStub },
4242
{ provide: Injector, useValue: injectorStub },
43-
]
43+
],
44+
teardown: { destroyAfterEach: false }
4445
});
4546
fixture = TestBed.createComponent(TestPreloadComponent);
4647
component = fixture.componentInstance;

src/app/modules/angular-slickgrid/services/__tests__/bsDropdown.service.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ describe('bsdropdown-service', () => {
4949
providers: [
5050
BsDropDownService,
5151
{ provide: AngularUtilService, useValue: angularUtilServiceStub },
52-
]
52+
],
53+
teardown: { destroyAfterEach: false }
5354
});
5455
fixture = TestBed.createComponent(TestComponent);
5556
component = fixture.componentInstance;

src/app/modules/angular-slickgrid/services/__tests__/translater.service.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ describe('Translater Service', () => {
1010

1111
beforeEach(async () => {
1212
await TestBed.configureTestingModule({
13-
imports: [TranslateModule.forRoot()]
13+
imports: [TranslateModule.forRoot()],
14+
teardown: { destroyAfterEach: false }
1415
});
1516
translate = TestBed.inject(TranslateService);
1617
service = new TranslaterService(translate);

src/polyfills.ts

-10
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,13 @@
2222
/** IE11 was throwing console errors without these (cannot find "includes") */
2323
// import 'core-js/es7/array';
2424

25-
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
26-
// import 'classlist.js'; // Run `npm install --save classlist.js`.
27-
2825
/** Evergreen browsers require these. **/
2926
// import 'core-js/es6/reflect';
3027

3128
/** Support Custom Event */
3229
import 'custom-event-polyfill'; // npm install custom-event-polyfill
3330

3431

35-
/**
36-
* Required to support Web Animations `@angular/animation`.
37-
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
38-
**/
39-
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
40-
41-
4232

4333
/***************************************************************************************************
4434
* Zone JS is required by Angular itself.

test/cypress/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"author": "Ghislain B.",
1111
"license": "MIT",
1212
"devDependencies": {
13-
"cypress": "^8.7.0",
13+
"cypress": "^9.0.0",
1414
"mocha": "^9.1.3",
15-
"mochawesome": "^6.3.1"
15+
"mochawesome": "^7.0.1"
1616
}
1717
}

0 commit comments

Comments
 (0)