Skip to content
Open
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 dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@types/bun": "latest"
},
"peerDependencies": {
"typescript": "^5.0.0"
"typescript": "^6.0.3"
},
"dependencies": {
"@better-fetch/fetch": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"devDependencies": {
"bumpp": "^9.4.1",
"tsup": "^8.0.2"
"tsdown": "0.22.9"
},
"packageManager": "pnpm@11.1.1"
}
7 changes: 3 additions & 4 deletions packages/better-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"react-native": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"build": "tsdown",
"dev": "tsdown --watch",
"bump": "bumpp",
"lint": "biome check .",
"release": "bun run build && npm publish --access public",
Expand All @@ -33,8 +33,7 @@
"jsdom": "^24.0.0",
"listhen": "^1.7.2",
"mocha": "^10.4.0",
"tsup": "^8.0.2",
"typescript": "^5.4.5",
"typescript": "^6.0.3",
"vitest": "^1.5.0",
"zod": "^3.24.1"
},
Expand Down
5 changes: 4 additions & 1 deletion packages/better-fetch/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ export function getMethod(url: string, options?: BetterFetchOption) {
export function getTimeout(
options?: BetterFetchOption,
controller?: AbortController,
) {
): {
abortTimeout: ReturnType<typeof setTimeout> | undefined;
clearTimeout: () => void;
} {
let abortTimeout: ReturnType<typeof setTimeout> | undefined;
if (!options?.signal && options?.timeout) {
abortTimeout = setTimeout(() => controller?.abort(), options?.timeout);
Expand Down
2 changes: 1 addition & 1 deletion packages/better-fetch/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
"noEmit": true,
"moduleResolution": "bundler",
"lib": ["dom"]
"lib": ["ES2022", "DOM"]
},
"exclude": ["node_modules", "dist"]
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { defineConfig } from "tsup";
import { defineConfig } from "tsdown";

export default defineConfig({
entry: ["./src/index.ts"],
splitting: false,
target: "es2017",
platform: "neutral",
sourcemap: true,
format: ["esm", "cjs"],
dts: true,
clean: true,
external: ["zod"],
deps: {
neverBundle: ["zod"],
},
});
7 changes: 5 additions & 2 deletions packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@
"types": "./dist/index.d.ts",
"scripts": {
"bump": "bumpp",
"build": "tsup",
"build": "tsdown",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"consola": "^3.2.3"
},
"peerDependencies": {
"@better-fetch/fetch": "workspace:^"
},
Comment thread
bytaesu marked this conversation as resolved.
"devDependencies": {
"@better-fetch/fetch": "workspace:*",
"tsx": "^4.16.2",
"typescript": "^5.5.3",
"typescript": "^6.0.3",
"vitest": "^1.5.0"
},
"exports": {
Expand Down
4 changes: 3 additions & 1 deletion packages/logger/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"compilerOptions": {
"target": "ES2017",
"module": "commonjs",
"module": "ESNext",
"moduleResolution": "bundler",
"customConditions": ["node"],
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
Expand Down
13 changes: 13 additions & 0 deletions packages/logger/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig } from "tsdown";

export default defineConfig({
entry: ["./src/index.ts"],
target: "es2017",
platform: "neutral",
sourcemap: true,
format: ["esm", "cjs"],
dts: true,
deps: {
neverBundle: ["@better-fetch/fetch"],
},
});
11 changes: 0 additions & 11 deletions packages/logger/tsup.config.ts

This file was deleted.

Loading