Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

fix: bump typescript from 5.4.5 to 5.5.2 #2850

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"ts-node": "^10.9.2",
"tsup": "^8.1.0",
"turbo": "^2.0.5",
"typescript": "^5.4.5"
"typescript": "^5.5.2"
},
"engineStrict": true,
"engines": {
Expand Down
15 changes: 0 additions & 15 deletions packages/library-legacy/scripts/typegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,5 @@ pnpm tsc -p tsconfig.d.json -d
# Flatten typescript declarations
pnpm rollup -c rollup.config.types.mjs

# Replace export with closing brace for module declaration
sed -i.bak '$s/export {.*};/}/' lib/index.d.ts

# Replace declare's with export's
sed -i.bak 's/declare/export/g' lib/index.d.ts

# Prepend declare module line
sed -i.bak '2s;^;declare module "@solana/web3.js" {\n;' lib/index.d.ts
Comment on lines -9 to -16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@steveluscher steveluscher Jun 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case something brings us back here, the original context for this code.

solana-labs/solana#16219
solana-labs/solana#16207


# Remove backup file from `sed` above
rm lib/index.d.ts.bak

# Run prettier
pnpm prettier --write lib/index.d.ts

# Check result
pnpm tsc --types ./test/__shadow-jest-types.d.ts lib/index.d.ts
Comment on lines -24 to -25
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This never made any sense, and indeed no longer works in TS 5.5. tsc isn't designed to typecheck TypeScript definition files.

6 changes: 3 additions & 3 deletions packages/library-legacy/src/__forks__/browser/fetch-impl.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const Headers = globalThis.Headers;
export const Request = globalThis.Request;
export const Response = globalThis.Response;
export const Headers: typeof globalThis.Headers = globalThis.Headers;
export const Request: typeof globalThis.Request = globalThis.Request;
export const Response: typeof globalThis.Response = globalThis.Response;
export default globalThis.fetch;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const Headers = globalThis.Headers;
export const Request = globalThis.Request;
export const Response = globalThis.Response;
export const Headers: typeof globalThis.Headers = globalThis.Headers;
export const Request: typeof globalThis.Request = globalThis.Request;
export const Response: typeof globalThis.Response = globalThis.Response;
export default globalThis.fetch;
Loading
Loading