Skip to content

Commit 9abbf24

Browse files
Fe 231 actualizar v2.2 to angular 10 (#315)
1 parent a1fdadc commit 9abbf24

26 files changed

+5098
-2982
lines changed

.browserslistrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# You can see what browsers were selected by your queries by running:
6+
# npx browserslist
7+
8+
> 0.5%
9+
last 2 versions
10+
Firefox ESR
11+
not dead
12+
not IE 9-11 # For IE 9-11 support, remove 'not'.

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var_1: &cache_key yarn-cache-{{ checksum "yarn.lock" }}
55
jobs:
66
lint:
77
docker:
8-
- image: circleci/node:8.11.4
8+
- image: circleci/node:12.16.2
99
steps:
1010
- checkout
1111
- restore_cache:
@@ -23,7 +23,7 @@ jobs:
2323

2424
test:
2525
docker:
26-
- image: circleci/node:8.11.4
26+
- image: circleci/node:12.16.2
2727
steps:
2828
- checkout
2929
- restore_cache:

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
## [2.3.0] - 2021-05-19
10+
11+
### Changed
12+
13+
- Angular version upgraded to 10, and vulnerabilities updated. ([#306](https://github.com/reyesoft/ngx-jsonapi/pull/306))
14+
915
## [2.2.2] - 2021-05-19
1016

1117
### Fixed

angular.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"build": {
1212
"builder": "@angular-devkit/build-angular:browser",
1313
"options": {
14+
"aot": true,
1415
"outputPath": "demo-dist",
1516
"index": "demo/index.html",
1617
"main": "demo/main.ts",
@@ -26,6 +27,12 @@
2627
},
2728
"configurations": {
2829
"production": {
30+
"budgets": [
31+
{
32+
"type": "anyComponentStyle",
33+
"maximumWarning": "6kb"
34+
}
35+
],
2936
"optimization": true,
3037
"outputHashing": "all",
3138
"sourceMap": false,
@@ -103,9 +110,9 @@
103110
"inlineStyle": true,
104111
"inlineTemplate": true,
105112
"flat": true,
106-
"spec": false,
113+
"skipTests": true,
107114
"prefix": "bc",
108-
"styleext": "css"
115+
"style": "css"
109116
},
110117
"@schematics/angular:directive": {
111118
"prefix": "bc"

demo/app/app.module.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import { SharedModule } from './shared/shared.module';
1313

1414
import { StoreService } from 'ngx-jsonapi/sources/store.service';
1515
import { JsonRipper } from 'ngx-jsonapi/services/json-ripper';
16+
import { AuthorsModule } from './authors/authors.module';
17+
import { BooksModule } from './books/books.module';
1618

1719
const appRoutes: Routes = [
1820
{
@@ -22,11 +24,11 @@ const appRoutes: Routes = [
2224
},
2325
{
2426
path: 'authors',
25-
loadChildren: './authors/authors.module#AuthorsModule'
27+
loadChildren: (): Promise<AuthorsModule> => import('./authors/authors.module').then((m): AuthorsModule => m.AuthorsModule)
2628
},
2729
{
2830
path: 'books',
29-
loadChildren: './books/books.module#BooksModule'
31+
loadChildren: (): Promise<BooksModule> => import('./books/books.module').then((m): BooksModule => m.BooksModule)
3032
}
3133
];
3234

demo/app/authors/components/authors.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h3>Authors</h3>
2424
<td *ngIf="author.relationships.books.data.length > 0">
2525
<a [routerLink]="['/books', author.relationships.books.data[0].id]">{{ author.relationships.books.data[0].attributes.title }}</a>
2626
<span *ngIf="author.relationships.books.data.length > 1">
27-
and {{ author.relationships.books.data.length}} more...
27+
and {{ author.relationships.books.data.length }} more...
2828
</span>
2929
</td>
3030
<td>

demo/app/authors/components/authors.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
22
import { RouterTestingModule } from '@angular/router/testing';
33

44
import { AuthorsService } from '../authors.service';
@@ -9,7 +9,7 @@ describe('AuthorsComponent', () => {
99
let component: AuthorsComponent;
1010
let fixture: ComponentFixture<AuthorsComponent>;
1111

12-
beforeEach(async(() => {
12+
beforeEach(waitForAsync(() => {
1313
TestBed.configureTestingModule({
1414
imports: [RouterTestingModule, NgxJsonapiModule],
1515
declarations: [AuthorsComponent],

demo/polyfills.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import 'core-js/es6/regexp';
1414
import 'core-js/es6/map';
1515
import 'core-js/es6/set';
1616
import 'core-js/es6/reflect';
17-
18-
import 'core-js/es7/reflect';
1917
import 'zone.js/dist/zone';
2018

2119
import 'hammerjs';

demo/tsconfig.app.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"downlevelIteration": true,
34
"sourceMap": true,
45
"declaration": false,
56
"moduleResolution": "node",
@@ -10,8 +11,8 @@
1011
"dom"
1112
],
1213
"outDir": "../out-tsc/app",
13-
"target": "es5",
14-
"module": "es2015",
14+
"target": "es2015",
15+
"module": "es2020",
1516
"types": [],
1617
"baseUrl": ".",
1718
"rootDir": "../",
@@ -20,9 +21,11 @@
2021
"ngx-jsonapi/*": [ "../src/*" ]
2122
}
2223
},
23-
"exclude": [
24-
"../node_modules",
25-
"test.ts",
26-
"**/*.spec.ts"
24+
"files": [
25+
"main.ts",
26+
"polyfills.ts"
27+
],
28+
"include": [
29+
"demo/**/*.d.ts"
2730
]
2831
}

0 commit comments

Comments
 (0)