Skip to content
Merged
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 @@ -25,6 +25,7 @@
!.vscode/extensions.json

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
3 changes: 2 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@
"builder": "@nrwl/angular:package",
"options": {
"tsConfig": "libs/ngx-http-request-state/tsconfig.lib.json",
"project": "libs/ngx-http-request-state/ng-package.json"
"project": "libs/ngx-http-request-state/ng-package.json",
"updateBuildableProjectDepsInPackageJson": false
},
"configurations": {
"production": {
Expand Down
5 changes: 4 additions & 1 deletion apps/examples/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ module.exports = {
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
transform: { '^.+\\.(ts|js|html)$': 'jest-preset-angular' },
transform: {
'^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
},
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
};
12 changes: 0 additions & 12 deletions apps/examples/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@
* BROWSER POLYFILLS
*/

/**
* 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
13 changes: 13 additions & 0 deletions apps/examples/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
import 'jest-preset-angular/setup-jest';

import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';

getTestBed().resetTestEnvironment();
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(),
{ teardown: { destroyAfterEach: false } }
);
2 changes: 1 addition & 1 deletion apps/examples/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"types": ["jest", "node"]
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts"]
}
5 changes: 4 additions & 1 deletion libs/ngx-http-request-state/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ module.exports = {
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
transform: { '^.+\\.(ts|js|html)$': 'jest-preset-angular' },
transform: {
'^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
},
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
};
6 changes: 3 additions & 3 deletions libs/ngx-http-request-state/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"loading",
"error"
],
"version": "1.1.0",
"version": "1.2.0",
"peerDependencies": {
"@angular/common": "^8 || ^9 || ^10 || ^11 || ^12",
"rxjs": "^6.2.0"
"@angular/common": "^8 || ^9 || ^10 || ^11 || ^12 || ^13",
"rxjs": "^6.2.0 || ^7.4.0"
},
"dependencies": {
"tslib": "^2.0.0"
Expand Down
13 changes: 13 additions & 0 deletions libs/ngx-http-request-state/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
import 'jest-preset-angular/setup-jest';

import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';

getTestBed().resetTestEnvironment();
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(),
{ teardown: { destroyAfterEach: false } }
);
2 changes: 1 addition & 1 deletion libs/ngx-http-request-state/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": ["src/test-setup.ts", "**/*.spec.ts"],
"exclude": ["src/test-setup.ts", "**/*.spec.ts", "**/*.test.ts"],
"include": ["**/*.ts"]
}
3 changes: 1 addition & 2 deletions libs/ngx-http-request-state/tsconfig.lib.prod.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}
2 changes: 1 addition & 1 deletion libs/ngx-http-request-state/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"types": ["jest", "node"]
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts"]
}
15 changes: 2 additions & 13 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,11 @@
"default": {
"runner": "@nrwl/workspace/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"]
"cacheableOperations": ["build", "lint", "test", "e2e"],
"parallel": 1
}
}
},
"projects": {
"examples": {
"tags": []
},
"examples-e2e": {
"tags": [],
"implicitDependencies": ["examples"]
},
"ngx-http-request-state": {
"tags": []
}
},
"targetDependencies": {
"build": [
{
Expand Down
Loading