Skip to content

Commit

Permalink
update typescript to 4.7 (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
silesky authored Feb 26, 2023
1 parent 984d588 commit afb027a
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .changeset/brown-boxes-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@segment/analytics-next': patch
'@segment/analytics-core': patch
---

Upgrade typescript
2 changes: 1 addition & 1 deletion examples/with-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@vitejs/plugin-react": "^1.3.0",
"typescript": "^4.6.4",
"typescript": "^4.7.0",
"vite": "^2.9.13"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"ts-jest": "^28.0.4",
"ts-node": "^10.8.0",
"turbo": "^1.3.1",
"typescript": "^4.6.4"
"typescript": "^4.7.0"
},
"resolutions": {
"@segment/analytics-next": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { cdnSettingsMinimal } from './cdn-settings'
export const createMockFetchImplementation = (
cdnSettings: Partial<LegacySettings> = {}
) => {
return (url: RequestInfo, req?: RequestInit) => {
return (...[url, req]: Parameters<typeof fetch>) => {
const reqUrl = url.toString()
if (!req || (req.method === 'get' && reqUrl.includes('cdn.segment.com'))) {
// GET https://cdn.segment.com/v1/projects/{writeKey}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/utils/pick.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const pickBy = <T, K extends keyof T>(
export const pickBy = <T extends object, K extends keyof T>(
obj: T,
fn: (key: K, v: T[K]) => boolean
) => {
Expand Down
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ __metadata:
"@vitejs/plugin-react": ^1.3.0
react: ^18.0.0
react-dom: ^18.0.0
typescript: ^4.6.4
typescript: ^4.7.0
vite: ^2.9.13
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -4350,7 +4350,7 @@ __metadata:
ts-jest: ^28.0.4
ts-node: ^10.8.0
turbo: ^1.3.1
typescript: ^4.6.4
typescript: ^4.7.0
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -13520,23 +13520,23 @@ __metadata:
languageName: node
linkType: hard

"typescript@npm:^4.6.4":
version: 4.6.4
resolution: "typescript@npm:4.6.4"
"typescript@npm:^4.7.0":
version: 4.9.5
resolution: "typescript@npm:4.9.5"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: e7bfcc39cd4571a63a54e5ea21f16b8445268b9900bf55aee0e02ad981be576acc140eba24f1af5e3c1457767c96cea6d12861768fb386cf3ffb34013718631a
checksum: ee000bc26848147ad423b581bd250075662a354d84f0e06eb76d3b892328d8d4440b7487b5a83e851b12b255f55d71835b008a66cbf8f255a11e4400159237db
languageName: node
linkType: hard

"typescript@patch:typescript@^4.6.4#~builtin<compat/typescript>":
version: 4.6.4
resolution: "typescript@patch:typescript@npm%3A4.6.4#~builtin<compat/typescript>::version=4.6.4&hash=7ad353"
"typescript@patch:typescript@^4.7.0#~builtin<compat/typescript>":
version: 4.9.5
resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin<compat/typescript>::version=4.9.5&hash=7ad353"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 1cb434fbc637d347be90e3a0c6cd05e33c38f941713c8786d3031faf1842c2c148ba91d2fac01e7276b0ae3249b8633f1660e32686cc7a8c6a8fd5361dc52c66
checksum: 2eee5c37cad4390385db5db5a8e81470e42e8f1401b0358d7390095d6f681b410f2c4a0c496c6ff9ebd775423c7785cdace7bcdad76c7bee283df3d9718c0f20
languageName: node
linkType: hard

Expand Down

0 comments on commit afb027a

Please sign in to comment.