Skip to content

Commit d7d67e1

Browse files
authored
build: update to latest ts-node version (#19399)
The dev-infra package has an optional peer dependency on `ts-node` for supporting TypeScript-based configurations. This highlighted that we currently are behind the latest version by a good amount. We should update so that the peer dependency is satisified and generally for the sake of benefiting from the latest `ts-node` changes (like better diagnostic messaging). This commit additionally fixes compilation issues in the caretaker-resync script and in the breaking changes script.
1 parent b6358b2 commit d7d67e1

File tree

4 files changed

+44
-44
lines changed

4 files changed

+44
-44
lines changed

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,26 @@
2424
"lint": "yarn -s tslint && yarn -s stylelint && yarn -s bazel:format-lint && yarn -s ownerslint",
2525
"e2e": "bazel test //src/... --test_tag_filters=e2e",
2626
"deploy-dev-app": "node ./scripts/deploy-dev-app.js",
27-
"breaking-changes": "ts-node --project scripts scripts/breaking-changes.ts",
27+
"breaking-changes": "ts-node --project scripts/tsconfig.json scripts/breaking-changes.ts",
2828
"gulp": "gulp",
29-
"stage-release": "ts-node --project tools/release/ tools/release/stage-release.ts",
30-
"publish-release": "ts-node --project tools/release/ tools/release/publish-release.ts",
29+
"stage-release": "ts-node --project tools/release/tsconfig.json tools/release/stage-release.ts",
30+
"publish-release": "ts-node --project tools/release/tsconfig.json tools/release/publish-release.ts",
3131
"check-entry-point-setup": "node ./scripts/check-entry-point-setup.js",
32-
"check-release-output": "ts-node --project tools/release tools/release/check-release-output.ts",
33-
"check-rollup-globals": "ts-node --project scripts/ scripts/check-rollup-globals.ts",
34-
"changelog": "ts-node --project tools/release tools/release/changelog.ts",
32+
"check-release-output": "ts-node --project tools/release/tsconfig.json tools/release/check-release-output.ts",
33+
"check-rollup-globals": "ts-node --project scripts/tsconfig.json scripts/check-rollup-globals.ts",
34+
"changelog": "ts-node --project tools/release/tsconfig.json tools/release/changelog.ts",
3535
"preinstall": "node ./tools/npm/check-npm.js",
3636
"format:ts": "git-clang-format HEAD $(git diff HEAD --name-only | grep -v \"\\.d\\.ts\")",
3737
"format:bazel": "yarn -s bazel:buildifier --lint=fix --mode=fix",
3838
"format": "yarn -s format:ts && yarn -s format:bazel",
39-
"cherry-pick-patch": "ts-node --project tools/cherry-pick-patch/ tools/cherry-pick-patch/cherry-pick-patch.ts",
40-
"ownerslint": "ts-node --project scripts/ scripts/ownerslint.ts",
39+
"cherry-pick-patch": "ts-node --project tools/cherry-pick-patch/tsconfig.json tools/cherry-pick-patch/cherry-pick-patch.ts",
40+
"ownerslint": "ts-node --project scripts/tsconfig.json scripts/ownerslint.ts",
4141
"tslint": "tslint -c tslint.json --project ./tsconfig.json",
4242
"stylelint": "stylelint \"src/**/*.+(css|scss)\" --config .stylelintrc.json --syntax scss",
43-
"resync-caretaker-app": "ts-node --project scripts scripts/caretaking/resync-caretaker-app-prs.ts",
43+
"resync-caretaker-app": "ts-node --project scripts/tsconfig.json scripts/caretaking/resync-caretaker-app-prs.ts",
4444
"ts-circular-deps:check": "yarn -s ts-circular-deps check --config ./src/circular-deps-test.conf.js",
4545
"ts-circular-deps:approve": "yarn -s ts-circular-deps approve --config ./src/circular-deps-test.conf.js",
46-
"merge": "ts-node --project scripts scripts/merge-script/cli.ts --config ./merge-config.js",
46+
"merge": "ts-node --project scripts/tsconfig.json scripts/merge-script/cli.ts --config ./merge-config.js",
4747
"approve-api": "node ./scripts/approve-api-golden.js"
4848
},
4949
"version": "10.0.0-next.1",
@@ -157,7 +157,7 @@
157157
"stylelint": "^13.3.1",
158158
"terser": "^4.3.9",
159159
"ts-api-guardian": "^0.5.0",
160-
"ts-node": "^3.0.4",
160+
"ts-node": "^8.10.1",
161161
"tsickle": "0.38.1",
162162
"tslint": "^6.1.0",
163163
"tsutils": "^3.17.1",

scripts/breaking-changes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {join, relative} from 'path';
22
import {readFileSync} from 'fs';
33
import chalk from 'chalk';
4-
import * as ts from 'typescript-3.8'; // TODO(crisbeto): switch back to `typescript` once 3.9 is out
4+
import * as ts from 'typescript';
55
import * as tsutils from 'tsutils';
66

77
const projectRoot = process.cwd();

scripts/caretaking/resync-caretaker-app-prs.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Octokit} from '@octokit/rest';
1+
import * as Octokit from '@octokit/rest';
22
import * as fetch from 'node-fetch';
33

44
const github = new Octokit({auth: process.env.TOKEN});
@@ -9,11 +9,11 @@ async function resync() {
99
let hasNext = true;
1010
while (hasNext) {
1111
const response = await github.pulls.list({
12-
owner: 'angular',
12+
owner: 'angular',
1313
repo: 'components',
1414
per_page: 100,
1515
page
16-
});
16+
});
1717
pulls.push(...response.data);
1818
hasNext = !!response.data.length;
1919
page++;

yarn.lock

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,6 +1921,11 @@ are-we-there-yet@~1.1.2:
19211921
delegates "^1.0.0"
19221922
readable-stream "^2.0.6"
19231923

1924+
arg@^4.1.0:
1925+
version "4.1.3"
1926+
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
1927+
integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==
1928+
19241929
argparse@^1.0.7, argparse@~1.0.9:
19251930
version "1.0.10"
19261931
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
@@ -4068,7 +4073,7 @@ didyoumean@^1.2.1:
40684073
resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.1.tgz#e92edfdada6537d484d73c0172fd1eba0c4976ff"
40694074
integrity sha1-6S7f2tplN9SE1zwBcv0eugxJdv8=
40704075

4071-
diff@^3.1.0, diff@^3.2.0, diff@^3.5.0:
4076+
diff@^3.2.0, diff@^3.5.0:
40724077
version "3.5.0"
40734078
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
40744079
integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==
@@ -10691,13 +10696,21 @@ [email protected]:
1069110696
buffer-from "^1.0.0"
1069210697
source-map "^0.6.0"
1069310698

10694-
source-map-support@^0.4.0, source-map-support@^0.4.15, source-map-support@~0.4.0:
10699+
source-map-support@^0.4.15, source-map-support@~0.4.0:
1069510700
version "0.4.18"
1069610701
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f"
1069710702
integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==
1069810703
dependencies:
1069910704
source-map "^0.5.6"
1070010705

10706+
source-map-support@^0.5.17:
10707+
version "0.5.19"
10708+
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
10709+
integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
10710+
dependencies:
10711+
buffer-from "^1.0.0"
10712+
source-map "^0.6.0"
10713+
1070110714
source-map-support@~0.5.12:
1070210715
version "0.5.16"
1070310716
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042"
@@ -11085,7 +11098,7 @@ strip-indent@^3.0.0:
1108511098
dependencies:
1108611099
min-indent "^1.0.0"
1108711100

11088-
strip-json-comments@^2.0.0, strip-json-comments@~2.0.1:
11101+
strip-json-comments@~2.0.1:
1108911102
version "2.0.1"
1109011103
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
1109111104
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
@@ -11611,29 +11624,16 @@ ts-api-guardian@^0.5.0:
1161111624
diff "^3.5.0"
1161211625
minimist "^1.2.0"
1161311626

11614-
ts-node@^3.0.4:
11615-
version "3.3.0"
11616-
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-3.3.0.tgz#c13c6a3024e30be1180dd53038fc209289d4bf69"
11617-
integrity sha1-wTxqMCTjC+EYDdUwOPwgkonUv2k=
11627+
ts-node@^8.10.1:
11628+
version "8.10.1"
11629+
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.10.1.tgz#77da0366ff8afbe733596361d2df9a60fc9c9bd3"
11630+
integrity sha512-bdNz1L4ekHiJul6SHtZWs1ujEKERJnHs4HxN7rjTyyVOFf3HaJ6sLqe6aPG62XTzAB/63pKRh5jTSWL0D7bsvw==
1161811631
dependencies:
11619-
arrify "^1.0.0"
11620-
chalk "^2.0.0"
11621-
diff "^3.1.0"
11632+
arg "^4.1.0"
11633+
diff "^4.0.1"
1162211634
make-error "^1.1.1"
11623-
minimist "^1.2.0"
11624-
mkdirp "^0.5.1"
11625-
source-map-support "^0.4.0"
11626-
tsconfig "^6.0.0"
11627-
v8flags "^3.0.0"
11628-
yn "^2.0.0"
11629-
11630-
tsconfig@^6.0.0:
11631-
version "6.0.0"
11632-
resolved "https://registry.yarnpkg.com/tsconfig/-/tsconfig-6.0.0.tgz#6b0e8376003d7af1864f8df8f89dd0059ffcd032"
11633-
integrity sha1-aw6DdgA9evGGT434+J3QBZ/80DI=
11634-
dependencies:
11635-
strip-bom "^3.0.0"
11636-
strip-json-comments "^2.0.0"
11635+
source-map-support "^0.5.17"
11636+
yn "3.1.1"
1163711637

1163811638
[email protected], tsickle@^0.38.0:
1163911639
version "0.38.1"
@@ -12126,7 +12126,7 @@ v8flags@^2.0.2:
1212612126
dependencies:
1212712127
user-home "^1.1.1"
1212812128

12129-
v8flags@^3.0.0, v8flags@^3.0.1:
12129+
v8flags@^3.0.1:
1213012130
version "3.1.1"
1213112131
resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.1.1.tgz#42259a1461c08397e37fe1d4f1cfb59cad85a053"
1213212132
integrity sha512-iw/1ViSEaff8NJ3HLyEjawk/8hjJib3E7pvG4pddVXfUg1983s3VGsiClDjhK64MQVDGqc1Q8r18S4VKQZS9EQ==
@@ -12686,10 +12686,10 @@ [email protected]:
1268612686
resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"
1268712687
integrity sha1-AI4G2AlDIMNy28L47XagymyKxBk=
1268812688

12689-
yn@^2.0.0:
12690-
version "2.0.0"
12691-
resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a"
12692-
integrity sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=
12689+
yn@3.1.1:
12690+
version "3.1.1"
12691+
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
12692+
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
1269312693

1269412694
z-schema@~3.18.3:
1269512695
version "3.18.4"

0 commit comments

Comments
 (0)