Skip to content

Commit 341814a

Browse files
authored
Merge pull request #3 from daiscog/feature/angular-13
Feature/angular 13
2 parents ce58484 + 84dafda commit 341814a

15 files changed

+4156
-6534
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
!.vscode/extensions.json
2626

2727
# misc
28+
/.angular/cache
2829
/.sass-cache
2930
/connect.lock
3031
/coverage

angular.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@
133133
"builder": "@nrwl/angular:package",
134134
"options": {
135135
"tsConfig": "libs/ngx-http-request-state/tsconfig.lib.json",
136-
"project": "libs/ngx-http-request-state/ng-package.json"
136+
"project": "libs/ngx-http-request-state/ng-package.json",
137+
"updateBuildableProjectDepsInPackageJson": false
137138
},
138139
"configurations": {
139140
"production": {

apps/examples/jest.config.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@ module.exports = {
1515
'jest-preset-angular/build/serializers/ng-snapshot',
1616
'jest-preset-angular/build/serializers/html-comment',
1717
],
18-
transform: { '^.+\\.(ts|js|html)$': 'jest-preset-angular' },
18+
transform: {
19+
'^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
20+
},
21+
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
1922
};

apps/examples/src/polyfills.ts

-12
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,6 @@
1818
* BROWSER POLYFILLS
1919
*/
2020

21-
/**
22-
* IE11 requires the following for NgClass support on SVG elements
23-
*/
24-
// import 'classlist.js'; // Run `npm install --save classlist.js`.
25-
26-
/**
27-
* Web Animations `@angular/platform-browser/animations`
28-
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
29-
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
30-
*/
31-
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
32-
3321
/**
3422
* By default, zone.js will patch all possible macroTask and DomEvents
3523
* user can disable parts of macroTask/DomEvents patch by setting following flags

apps/examples/src/test-setup.ts

+13
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
11
import 'jest-preset-angular/setup-jest';
2+
3+
import { getTestBed } from '@angular/core/testing';
4+
import {
5+
BrowserDynamicTestingModule,
6+
platformBrowserDynamicTesting,
7+
} from '@angular/platform-browser-dynamic/testing';
8+
9+
getTestBed().resetTestEnvironment();
10+
getTestBed().initTestEnvironment(
11+
BrowserDynamicTestingModule,
12+
platformBrowserDynamicTesting(),
13+
{ teardown: { destroyAfterEach: false } }
14+
);

apps/examples/tsconfig.spec.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"types": ["jest", "node"]
77
},
88
"files": ["src/test-setup.ts"],
9-
"include": ["**/*.spec.ts", "**/*.d.ts"]
9+
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts"]
1010
}

libs/ngx-http-request-state/jest.config.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ module.exports = {
1717
'jest-preset-angular/build/serializers/ng-snapshot',
1818
'jest-preset-angular/build/serializers/html-comment',
1919
],
20-
transform: { '^.+\\.(ts|js|html)$': 'jest-preset-angular' },
20+
transform: {
21+
'^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
22+
},
23+
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
2124
};

libs/ngx-http-request-state/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"loading",
99
"error"
1010
],
11-
"version": "1.1.0",
11+
"version": "1.2.0",
1212
"peerDependencies": {
13-
"@angular/common": "^8 || ^9 || ^10 || ^11 || ^12",
14-
"rxjs": "^6.2.0"
13+
"@angular/common": "^8 || ^9 || ^10 || ^11 || ^12 || ^13",
14+
"rxjs": "^6.2.0 || ^7.4.0"
1515
},
1616
"dependencies": {
1717
"tslib": "^2.0.0"
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
11
import 'jest-preset-angular/setup-jest';
2+
3+
import { getTestBed } from '@angular/core/testing';
4+
import {
5+
BrowserDynamicTestingModule,
6+
platformBrowserDynamicTesting,
7+
} from '@angular/platform-browser-dynamic/testing';
8+
9+
getTestBed().resetTestEnvironment();
10+
getTestBed().initTestEnvironment(
11+
BrowserDynamicTestingModule,
12+
platformBrowserDynamicTesting(),
13+
{ teardown: { destroyAfterEach: false } }
14+
);

libs/ngx-http-request-state/tsconfig.lib.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
"strictMetadataEmit": true,
1515
"enableResourceInlining": true
1616
},
17-
"exclude": ["src/test-setup.ts", "**/*.spec.ts"],
17+
"exclude": ["src/test-setup.ts", "**/*.spec.ts", "**/*.test.ts"],
1818
"include": ["**/*.ts"]
1919
}
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
21
{
32
"extends": "./tsconfig.lib.json",
43
"compilerOptions": {
54
"declarationMap": false
65
},
76
"angularCompilerOptions": {
8-
"enableIvy": false
7+
"compilationMode": "partial"
98
}
109
}

libs/ngx-http-request-state/tsconfig.spec.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"types": ["jest", "node"]
77
},
88
"files": ["src/test-setup.ts"],
9-
"include": ["**/*.spec.ts", "**/*.d.ts"]
9+
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts"]
1010
}

nx.json

+2-13
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,11 @@
1414
"default": {
1515
"runner": "@nrwl/workspace/tasks-runners/default",
1616
"options": {
17-
"cacheableOperations": ["build", "lint", "test", "e2e"]
17+
"cacheableOperations": ["build", "lint", "test", "e2e"],
18+
"parallel": 1
1819
}
1920
}
2021
},
21-
"projects": {
22-
"examples": {
23-
"tags": []
24-
},
25-
"examples-e2e": {
26-
"tags": [],
27-
"implicitDependencies": ["examples"]
28-
},
29-
"ngx-http-request-state": {
30-
"tags": []
31-
}
32-
},
3322
"targetDependencies": {
3423
"build": [
3524
{

0 commit comments

Comments
 (0)