Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit 81192f6

Browse files
Update dependency typescript to v5.6.2 (#71)
* Update dependency typescript to v5.6.2 * Fix TS errors --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Florian Duros <[email protected]>
1 parent 34d1875 commit 81192f6

File tree

5 files changed

+34
-19
lines changed

5 files changed

+34
-19
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
"stylelint-config-standard": "^36.0.0",
236236
"stylelint-scss": "^6.0.0",
237237
"ts-node": "^10.9.1",
238-
"typescript": "5.5.4",
238+
"typescript": "5.6.2",
239239
"web-streams-polyfill": "^4.0.0"
240240
},
241241
"peerDependencies": {

src/utils/location/parseGeoUri.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const parseGeoUri = (uri: string): GeolocationCoordinates | undefined =>
3232
return;
3333
}
3434

35-
return {
35+
const geoCoords = {
3636
latitude: latitude!,
3737
longitude: longitude!,
3838
altitude: parse(coords[2]),
@@ -41,4 +41,9 @@ export const parseGeoUri = (uri: string): GeolocationCoordinates | undefined =>
4141
heading: null,
4242
speed: null,
4343
};
44+
45+
return {
46+
toJSON: () => geoCoords,
47+
...geoCoords,
48+
};
4449
};

test/test-utils/beacon.ts

+14-13
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,20 @@ export const makeGeolocationPosition = ({
110110
}: {
111111
timestamp?: number;
112112
coords?: Partial<GeolocationCoordinates>;
113-
}): GeolocationPosition => ({
114-
timestamp: timestamp ?? 1647256791840,
115-
coords: {
116-
accuracy: 1,
117-
latitude: 54.001927,
118-
longitude: -8.253491,
119-
altitude: null,
120-
altitudeAccuracy: null,
121-
heading: null,
122-
speed: null,
123-
...coords,
124-
},
125-
});
113+
}): GeolocationPosition =>
114+
({
115+
timestamp: timestamp ?? 1647256791840,
116+
coords: {
117+
accuracy: 1,
118+
latitude: 54.001927,
119+
longitude: -8.253491,
120+
altitude: null,
121+
altitudeAccuracy: null,
122+
heading: null,
123+
speed: null,
124+
...coords,
125+
},
126+
}) as unknown as GeolocationPosition;
126127

127128
/**
128129
* Creates a basic mock of Geolocation

test/utils/location/parseGeoUri-test.ts

+9
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ describe("parseGeoUri", () => {
3838
altitudeAccuracy: null,
3939
heading: null,
4040
speed: null,
41+
toJSON: expect.any(Function),
4142
});
4243
});
4344

@@ -50,6 +51,7 @@ describe("parseGeoUri", () => {
5051
altitudeAccuracy: null,
5152
heading: null,
5253
speed: null,
54+
toJSON: expect.any(Function),
5355
});
5456
});
5557

@@ -62,6 +64,7 @@ describe("parseGeoUri", () => {
6264
altitudeAccuracy: null,
6365
heading: null,
6466
speed: null,
67+
toJSON: expect.any(Function),
6568
});
6669
});
6770

@@ -74,6 +77,7 @@ describe("parseGeoUri", () => {
7477
altitudeAccuracy: null,
7578
heading: null,
7679
speed: null,
80+
toJSON: expect.any(Function),
7781
});
7882
});
7983

@@ -86,6 +90,7 @@ describe("parseGeoUri", () => {
8690
altitudeAccuracy: null,
8791
heading: null,
8892
speed: null,
93+
toJSON: expect.any(Function),
8994
});
9095
});
9196

@@ -98,6 +103,7 @@ describe("parseGeoUri", () => {
98103
altitudeAccuracy: null,
99104
heading: null,
100105
speed: null,
106+
toJSON: expect.any(Function),
101107
});
102108
});
103109

@@ -110,6 +116,7 @@ describe("parseGeoUri", () => {
110116
altitudeAccuracy: null,
111117
heading: null,
112118
speed: null,
119+
toJSON: expect.any(Function),
113120
});
114121
});
115122

@@ -122,6 +129,7 @@ describe("parseGeoUri", () => {
122129
altitudeAccuracy: null,
123130
heading: null,
124131
speed: null,
132+
toJSON: expect.any(Function),
125133
});
126134
});
127135

@@ -134,6 +142,7 @@ describe("parseGeoUri", () => {
134142
altitudeAccuracy: null,
135143
heading: null,
136144
speed: null,
145+
toJSON: expect.any(Function),
137146
});
138147
});
139148
});

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -9246,10 +9246,10 @@ typed-array-length@^1.0.6:
92469246
is-typed-array "^1.1.13"
92479247
possible-typed-array-names "^1.0.0"
92489248

9249-
typescript@5.5.4:
9250-
version "5.5.4"
9251-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba"
9252-
integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==
9249+
typescript@5.6.2:
9250+
version "5.6.2"
9251+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0"
9252+
integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==
92539253

92549254
ua-parser-js@^1.0.2:
92559255
version "1.0.38"

0 commit comments

Comments
 (0)