Skip to content

Commit f99e707

Browse files
chore: update dependencies to Angular version 8.0.0 (#16)
BREAKING CHANGE: This version requires Angular version 8
1 parent 5da50f3 commit f99e707

14 files changed

+3062
-2810
lines changed

.npmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
registry=http://registry.npmjs.org/
1+
registry=http://registry.npmjs.org/
File renamed without changes.

jest.base.config.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
module.exports = {
22
preset: 'jest-preset-angular',
33
rootDir: '../',
4-
setupTestFrameworkScriptFile: '<rootDir>/test.ts',
4+
setupFilesAfterEnv: ['<rootDir>/test.ts'],
55
testURL: 'http://localhost',
66
globals: {
77
'ts-jest': {
8-
tsConfigFile: './tsconfig.spec.json',
8+
tsConfig: './tsconfig.spec.json',
9+
stringifyContentPathRegex: '\\.html$',
10+
astTransformers: [require.resolve('jest-preset-angular/InlineHtmlStripStylesTransformer')],
911
},
10-
__TRANSFORM_HTML__: true,
1112
},
13+
transform: {
14+
'^.+\\.(ts|js|html)$': 'ts-jest',
15+
},
16+
snapshotSerializers: [
17+
'jest-preset-angular/AngularSnapshotSerializer.js',
18+
'jest-preset-angular/HTMLCommentSerializer.js',
19+
],
1220
};

package.json

+31-31
Original file line numberDiff line numberDiff line change
@@ -26,41 +26,41 @@
2626
"pkgRoot": "dist/@angular-extensions/testing-library"
2727
},
2828
"dependencies": {
29-
"@angular/animations": "^7.0.0",
30-
"@angular/common": "^7.0.0",
31-
"@angular/compiler": "^7.0.0",
32-
"@angular/core": "^7.0.0",
33-
"@angular/forms": "^7.0.0",
34-
"@angular/http": "^7.0.0",
35-
"@angular/platform-browser": "^7.0.0",
36-
"@angular/platform-browser-dynamic": "^7.0.0",
37-
"@angular/router": "^7.0.0",
29+
"@angular/animations": "^8.0.0",
30+
"@angular/common": "^8.0.0",
31+
"@angular/compiler": "^8.0.0",
32+
"@angular/core": "^8.0.0",
33+
"@angular/forms": "^8.0.0",
34+
"@angular/platform-browser": "^8.0.0",
35+
"@angular/platform-browser-dynamic": "^8.0.0",
36+
"@angular/router": "^8.0.0",
3837
"@phenomnomnominal/tsquery": "^3.0.0",
39-
"core-js": "^2.5.4",
40-
"dom-testing-library": "^4.0.1",
41-
"rxjs": "^6.3.3",
38+
"core-js": "^3.1.3",
39+
"dom-testing-library": "^4.1.1",
40+
"rxjs": "^6.5.2",
4241
"tslint": "^5.16.0",
43-
"zone.js": "^0.8.26"
42+
"zone.js": "~0.9.1"
4443
},
4544
"devDependencies": {
46-
"@angular-devkit/build-angular": "~0.10.0",
47-
"@angular-devkit/build-ng-packagr": "~0.7.1",
48-
"@angular/cli": "~7.0.2",
49-
"@angular/compiler-cli": "^7.0.0",
50-
"@angular/language-service": "^7.0.0",
51-
"@types/node": "~10.5.4",
52-
"codelyzer": "~4.4.2",
53-
"husky": "^0.14.3",
54-
"jest": "^23.4.2",
55-
"jest-preset-angular": "^6.0.1",
56-
"lint-staged": "^7.2.0",
57-
"ng-packagr": "^3.0.6",
58-
"prettier": "^1.13.7",
45+
"@angular-devkit/build-angular": "~0.800.0",
46+
"@angular-devkit/build-ng-packagr": "~0.800.0",
47+
"@angular/cli": "~8.0.0",
48+
"@angular/compiler-cli": "^8.0.0",
49+
"@angular/language-service": "^8.0.0",
50+
"@types/node": "~12.0.3",
51+
"@types/jest": "~24.0.11",
52+
"codelyzer": "^5.0.1",
53+
"husky": "^2.3.0",
54+
"jest": "^24.1.0",
55+
"jest-preset-angular": "^7.1.1",
56+
"lint-staged": "^8.1.7",
57+
"ng-packagr": "^5.2.0",
58+
"prettier": "^1.17.1",
5959
"rimraf": "^2.6.3",
60-
"semantic-release": "^15.8.1",
61-
"ts-node": "~7.0.0",
62-
"tsickle": "0.32.1",
63-
"tslib": "^1.9.3",
64-
"typescript": "~3.1.3"
60+
"semantic-release": "^15.13.12",
61+
"ts-node": "~8.2.0",
62+
"tsickle": "0.35.0",
63+
"tslib": "^1.9.0",
64+
"typescript": "~3.4.5"
6565
}
6666
}

projects/jest-utils/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
"url": "https://github.com/angular-extensions/testing-library/issues"
2323
},
2424
"homepage": "https://github.com/angular-extensions/testing-library#readme",
25+
"peerDependencies": {
26+
"jest": ">=23.4.0"
27+
},
2528
"publishConfig": {
2629
"access": "public"
2730
}

projects/jest-utils/tsconfig.lib.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"emitDecoratorMetadata": true,
1212
"experimentalDecorators": true,
1313
"importHelpers": true,
14+
"allowSyntheticDefaultImports": true,
1415
"types": [],
1516
"lib": ["dom", "es2015"]
1617
},

projects/testing-library/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
},
2424
"homepage": "https://github.com/testing-library/angular-testing-library#readme",
2525
"peerDependencies": {
26-
"@angular/common": "^7.0.0",
27-
"@angular/core": "^7.0.0"
26+
"@angular/common": "^8.0.0",
27+
"@angular/core": "^8.0.0"
2828
},
2929
"dependencies": {
30-
"dom-testing-library": "^4.0.1",
30+
"dom-testing-library": "^4.1.0",
3131
"@phenomnomnominal/tsquery": "^3.0.0",
3232
"tslint": "^5.16.0"
3333
},

projects/testing-library/tests/form/form.component.html

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
<label for="username-input">Username</label>
44
<input id="username-input" placeholder="Username..." name="username" formControlName="username" />
55
<label id="password-label">Password</label>
6-
<input placeholder="Password..." type="password" name="password" aria-labelledby="password-label" formControlName="password"
6+
<input
7+
placeholder="Password..."
8+
type="password"
9+
name="password"
10+
aria-labelledby="password-label"
11+
formControlName="password"
712
/>
813
<button type="submit">Submit</button>
914
</form>
10-
<div>
15+
<div></div>
16+
</div>

projects/testing-library/tests/form/form.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
66
templateUrl: './form.component.html',
77
})
88
export class LoginFormComponent {
9-
@Output()
10-
handleLogin = new EventEmitter<{ username: string; password: string }>();
9+
@Output() handleLogin = new EventEmitter<{ username: string; password: string }>();
1110

1211
loginForm: FormGroup;
1312
constructor(private fb: FormBuilder) {

projects/testing-library/tests/form/form.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { ReactiveFormsModule } from '@angular/forms';
1+
import { ReactiveFormsModule, FormGroup, FormBuilder, Validators } from '@angular/forms';
22
import { render } from '../../src/public_api';
3+
import { Component, Output, EventEmitter } from '@angular/core';
34
import { LoginFormComponent } from './form.component';
45

56
test('login form submits using the component syntax', async () => {
@@ -9,7 +10,6 @@ test('login form submits using the component syntax', async () => {
910
};
1011

1112
const { container, getByLabelText, getByText, input, submit } = await render(LoginFormComponent, {
12-
declarations: [LoginFormComponent],
1313
imports: [ReactiveFormsModule],
1414
componentProperties: {
1515
handleLogin: handleLogin as any,

src/tsconfig.app.json

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"extends": "../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/app",
5-
"module": "es2015",
65
"types": []
76
},
87
"exclude": [

tsconfig.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@
22
"compileOnSave": false,
33
"compilerOptions": {
44
"baseUrl": "./",
5+
"importHelpers": true,
6+
"module": "esnext",
57
"outDir": "./dist/out-tsc",
68
"sourceMap": true,
79
"declaration": false,
810
"moduleResolution": "node",
911
"emitDecoratorMetadata": true,
1012
"experimentalDecorators": true,
11-
"target": "es5",
13+
"target": "es2015",
1214
"typeRoots": ["node_modules/@types"],
1315
"lib": ["es2017", "dom"],
1416
"paths": {
15-
"@angular-extensions/testing-library": ["dist/testing-library"],
16-
"@angular-extensions/testing-library/*": ["dist/testing-library/*"]
17+
"@angular-extensions/testing-library": ["dist/@angular-extensions/testing-library"],
18+
"@angular-extensions/testing-library/*": ["dist/@angular-extensions/testing-library/*"]
1719
}
1820
}
1921
}

tslint.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@
6363
"variable-name": false,
6464
"whitespace": [true, "check-branch", "check-decl", "check-operator", "check-separator", "check-type"],
6565
"no-output-on-prefix": true,
66-
"use-input-property-decorator": true,
67-
"use-output-property-decorator": true,
68-
"use-host-property-decorator": true,
66+
"no-inputs-metadata-property": true,
67+
"no-outputs-metadata-property": true,
68+
"no-host-metadata-property": true,
6969
"no-input-rename": true,
7070
"no-output-rename": true,
71-
"use-life-cycle-interface": true,
71+
"use-lifecycle-interface": true,
7272
"use-pipe-transform-interface": true,
7373
"component-class-suffix": true,
7474
"directive-class-suffix": true

0 commit comments

Comments
 (0)