Skip to content

Commit

Permalink
Upgrade to TypeScript 3 (#22792)
Browse files Browse the repository at this point in the history
LGTM 🎉 🎉 🎉
  • Loading branch information
Spencer authored and azasypkin committed Sep 11, 2018
1 parent 9555b8f commit 6ded193
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 49 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
"@types/has-ansi": "^3.0.0",
"@types/jest": "^23.3.1",
"@types/joi": "^10.4.4",
"@types/jquery": "3.3.1",
"@types/jquery": "^3.3.6",
"@types/js-yaml": "^3.11.1",
"@types/listr": "^0.13.0",
"@types/lodash": "^3.10.1",
Expand Down Expand Up @@ -324,11 +324,11 @@
"tree-kill": "^1.1.0",
"ts-jest": "^23.1.4",
"ts-loader": "^3.5.0",
"ts-node": "^6.0.3",
"tslint": "^5.10.0",
"tslint-config-prettier": "^1.12.0",
"ts-node": "^7.0.1",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0",
"tslint-plugin-prettier": "^1.3.0",
"typescript": "^2.9.2",
"typescript": "^3.0.3",
"vinyl-fs": "^3.0.2",
"xml2js": "^0.4.19",
"xmlbuilder": "9.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-pm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"strong-log-transformer": "^1.0.6",
"tempy": "^0.2.1",
"ts-loader": "^3.5.0",
"typescript": "^2.9.2",
"typescript": "^3.0.3",
"webpack": "^3.11.0",
"wrap-ansi": "^3.0.1",
"write-pkg": "^3.1.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/kbn-pm/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3592,9 +3592,9 @@ typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"

typescript@^2.9.2:
version "2.9.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c"
typescript@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8"

uglify-js@^2.8.29:
version "2.8.29"
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-system-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
},
"devDependencies": {
"@types/jest": "^23.3.1",
"typescript": "^2.9.2"
"typescript": "^3.0.3"
}
}
6 changes: 3 additions & 3 deletions packages/kbn-system-loader/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
version "23.3.1"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.1.tgz#a4319aedb071d478e6f407d1c4578ec8156829cf"

typescript@^2.9.2:
version "2.9.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c"
typescript@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8"
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ test('`append()` correctly formats records and pushes them to console.', () => {

for (const record of records) {
appender.append(record);
// tslint:disable-next-line no-console
expect(console.log).toHaveBeenCalledWith(`mock-${JSON.stringify(record)}`);
}

// tslint:disable-next-line no-console
expect(console.log).toHaveBeenCalledTimes(records.length);
});
2 changes: 1 addition & 1 deletion src/core/utils/url.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('modifyUrl()', () => {
test('supports changing port', () => {
expect(
modifyUrl('http://localhost:5601', parsed => {
parsed.port = (Number.parseInt(parsed.port!) + 1).toString();
parsed.port = (Number(parsed.port!) + 1).toString();
return parsed;
})
).toEqual('http://localhost:5602/');
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
"forceConsistentCasingInFileNames": true,

// Disable the breaking keyof behaviour introduced in TS 2.9.2 until EUI is updated to support that too
"keyofStringsOnly": true
"keyofStringsOnly": true,

// Forbid unused local variables as the rule was deprecated by ts-lint
"noUnusedLocals": true,
},
"include": [
"src/**/*"
Expand Down
1 change: 0 additions & 1 deletion tslint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ rulesDirectory:

rules:
prettier: true
no-unused-variable: true
object-literal-sort-keys: false
interface-name: false
no-default-export: true
Expand Down
2 changes: 1 addition & 1 deletion x-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"supertest-as-promised": "^4.0.2",
"tmp": "0.0.31",
"tree-kill": "^1.1.0",
"typescript": "^2.9.2",
"typescript": "^3.0.3",
"vinyl-fs": "^3.0.2",
"xml-crypto": "^0.10.1",
"xml2js": "^0.4.19",
Expand Down
6 changes: 3 additions & 3 deletions x-pack/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7854,9 +7854,9 @@ typedarray@^0.0.6, typedarray@~0.0.5:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"

typescript@^2.9.2:
version "2.9.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c"
typescript@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8"

ua-parser-js@^0.7.9:
version "0.7.17"
Expand Down
55 changes: 26 additions & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,9 @@
version "10.6.2"
resolved "https://registry.yarnpkg.com/@types/joi/-/joi-10.6.2.tgz#0e7d632fe918c337784e87b16c7cc0098876179a"

"@types/[email protected].1":
version "3.3.1"
resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.3.1.tgz#55758d44d422756d6329cbf54e6d41931d7ba28f"
"@types/jquery@^3.3.6":
version "3.3.6"
resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.3.6.tgz#5932ead926307ca21e5b36808257f7c926b06565"

"@types/js-yaml@^3.11.1":
version "3.11.2"
Expand Down Expand Up @@ -2243,6 +2243,10 @@ buffer-from@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.0.0.tgz#4cb8832d23612589b0406e9e2956c17f06fdf531"

buffer-from@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"

buffer-xor@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9"
Expand Down Expand Up @@ -12225,13 +12229,6 @@ source-map-support@^0.4.15, source-map-support@^0.4.2:
dependencies:
source-map "^0.5.6"

source-map-support@^0.5.3:
version "0.5.6"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13"
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"

source-map-support@^0.5.6:
version "0.5.9"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f"
Expand Down Expand Up @@ -13189,25 +13186,25 @@ ts-jest@^23.1.4:

ts-loader@^3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-3.5.0.tgz#151d004dcddb4cf8e381a3bf9d6b74c2d957a9c0"
resolved "http://registry.npmjs.org/ts-loader/-/ts-loader-3.5.0.tgz#151d004dcddb4cf8e381a3bf9d6b74c2d957a9c0"
dependencies:
chalk "^2.3.0"
enhanced-resolve "^3.0.0"
loader-utils "^1.0.2"
micromatch "^3.1.4"
semver "^5.0.1"

ts-node@^6.0.3:
version "6.0.3"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-6.0.3.tgz#28bf74bcad134fad17f7469dad04638ece03f0f4"
ts-node@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-7.0.1.tgz#9562dc2d1e6d248d24bc55f773e3f614337d9baf"
dependencies:
arrify "^1.0.0"
chalk "^2.3.0"
buffer-from "^1.1.0"
diff "^3.1.0"
make-error "^1.1.1"
minimist "^1.2.0"
mkdirp "^0.5.1"
source-map-support "^0.5.3"
source-map-support "^0.5.6"
yn "^2.0.0"

tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1:
Expand All @@ -13218,9 +13215,9 @@ tslib@^1.9.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"

tslint-config-prettier@^1.12.0:
version "1.12.0"
resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.12.0.tgz#bc8504f286ecf42b906f3d1126a093114f5729cc"
tslint-config-prettier@^1.15.0:
version "1.15.0"
resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.15.0.tgz#76b9714399004ab6831fdcf76d89b73691c812cf"

tslint-plugin-prettier@^1.3.0:
version "1.3.0"
Expand All @@ -13229,9 +13226,9 @@ tslint-plugin-prettier@^1.3.0:
eslint-plugin-prettier "^2.2.0"
tslib "^1.7.1"

tslint@^5.10.0:
version "5.10.0"
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.10.0.tgz#11e26bccb88afa02dd0d9956cae3d4540b5f54c3"
tslint@^5.11.0:
version "5.11.0"
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.11.0.tgz#98f30c02eae3cde7006201e4c33cb08b48581eed"
dependencies:
babel-code-frame "^6.22.0"
builtin-modules "^1.1.1"
Expand All @@ -13244,11 +13241,11 @@ tslint@^5.10.0:
resolve "^1.3.2"
semver "^5.3.0"
tslib "^1.8.0"
tsutils "^2.12.1"
tsutils "^2.27.2"

tsutils@^2.12.1:
version "2.27.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.27.0.tgz#9efb252b188eaa0ca3ade41dc410d6ce7eaab816"
tsutils@^2.27.2:
version "2.29.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99"
dependencies:
tslib "^1.8.1"

Expand Down Expand Up @@ -13305,9 +13302,9 @@ typedarray@^0.0.6, typedarray@~0.0.5:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"

typescript@^2.9.2:
version "2.9.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c"
typescript@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8"

ua-parser-js@^0.7.9:
version "0.7.17"
Expand Down

0 comments on commit 6ded193

Please sign in to comment.