Skip to content

Commit 2c8e585

Browse files
committed
chore: Upgrade TypeScript to latest version 5.7.2 in /ui
Lock the TypeScript minor version by using `~` instead of `^` in the version specifier, see fastify/fastify-type-provider-typebox#169 (comment). After upgrading, the TypeScript compiler complained that the `long` package has no default export. Related fixes: - Add the latest `long` version as a direct dependency since our code uses it directly; no compilation errors with the latest version - The `long` package exports a `Long` class, so use a capital first letter in the import name to match that Signed-off-by: Harri Lehtola <peruukki@hotmail.com>
1 parent ccc9aea commit 2c8e585

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

ui/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"@emotion/css": "^11.13.0",
2929
"@emotion/react": "^11.13.3",
3030
"inter-ui": "^3.19.3",
31+
"long": "^5.2.3",
3132
"moment": "^2.29.1",
3233
"protobufjs": "^7.1.1",
3334
"query-string": "^7.1.1",
@@ -119,7 +120,7 @@
119120
"source-map-loader": "^3.0.0",
120121
"style-loader": "^3.3.1",
121122
"terser-webpack-plugin": "^5.2.5",
122-
"typescript": "^4.9.5",
123+
"typescript": "~5.7.2",
123124
"webpack": "^5.64.4",
124125
"webpack-dev-server": "^4.6.0",
125126
"webpack-manifest-plugin": "^4.0.2",

ui/src/utils/timestamp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import long from 'long';
1+
import Long from 'long';
22
import { google } from '../protos';
33

44
export function toDate(ts: google.protobuf.ITimestamp) {
55
var seconds: number;
6-
if (ts.seconds instanceof long) {
6+
if (ts.seconds instanceof Long) {
77
seconds = ts.seconds.low
88
} else {
99
seconds = ts.seconds!;

ui/yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8266,10 +8266,10 @@ log-symbols@^4.1.0:
82668266
chalk "^4.1.0"
82678267
is-unicode-supported "^0.1.0"
82688268

8269-
long@^5.0.0:
8270-
version "5.2.0"
8271-
resolved "https://registry.yarnpkg.com/long/-/long-5.2.0.tgz#2696dadf4b4da2ce3f6f6b89186085d94d52fd61"
8272-
integrity sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w==
8269+
long@^5.0.0, long@^5.2.3:
8270+
version "5.2.3"
8271+
resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1"
8272+
integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==
82738273

82748274
loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
82758275
version "1.4.0"
@@ -11474,10 +11474,10 @@ typedarray-to-buffer@^3.1.5:
1147411474
dependencies:
1147511475
is-typedarray "^1.0.0"
1147611476

11477-
typescript@^4.9.5:
11478-
version "4.9.5"
11479-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
11480-
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
11477+
typescript@~5.7.2:
11478+
version "5.7.2"
11479+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6"
11480+
integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==
1148111481

1148211482
uc.micro@^2.0.0, uc.micro@^2.1.0:
1148311483
version "2.1.0"

0 commit comments

Comments
 (0)