Skip to content
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
5 changes: 5 additions & 0 deletions .changeset/migrate-to-tsdown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@smooai/fetch': patch
---

Migrate build tooling from tsup to tsdown — faster, oxc-based, drop-in replacement. The `esbuild-plugin-alias` shim used to swap `@smooai/logger` Node entries for browser variants is replaced with `@rollup/plugin-alias` (rolldown-compatible). Output extensions shift from `.js`/`.mjs`/`.d.ts` to `.cjs`/`.mjs`/`.d.cts`/`.d.mts` (tsdown defaults); the `exports` map is updated to match. No public API change.
73 changes: 50 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,44 +19,70 @@
"files": [
"dist/**"
],
"main": "./dist/index.js",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"types": "./dist/index.d.mts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"browser": {
"import": "./dist/browser/index.mjs",
"require": "./dist/browser/index.js",
"default": "./dist/browser/index.js"
"import": {
"types": "./dist/browser/index.d.mts",
"default": "./dist/browser/index.mjs"
},
"require": {
"types": "./dist/browser/index.d.cts",
"default": "./dist/browser/index.cjs"
},
"default": "./dist/browser/index.cjs"
},
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"default": "./dist/index.js"
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
},
"default": "./dist/index.cjs"
},
"./browser": {
"types": "./dist/browser/index.d.ts",
"import": "./dist/browser/index.mjs",
"require": "./dist/browser/index.js",
"default": "./dist/browser/index.js"
"import": {
"types": "./dist/browser/index.d.mts",
"default": "./dist/browser/index.mjs"
},
"require": {
"types": "./dist/browser/index.d.cts",
"default": "./dist/browser/index.cjs"
},
"default": "./dist/browser/index.cjs"
},
"./browser/*": {
"types": "./dist/browser/*.d.ts",
"import": "./dist/browser/*.mjs",
"require": "./dist/browser/*.js"
"import": {
"types": "./dist/browser/*.d.mts",
"default": "./dist/browser/*.mjs"
},
"require": {
"types": "./dist/browser/*.d.cts",
"default": "./dist/browser/*.cjs"
}
},
"./*": {
"types": "./dist/*.d.ts",
"import": "./dist/*.mjs",
"require": "./dist/*.js"
"import": {
"types": "./dist/*.d.mts",
"default": "./dist/*.mjs"
},
"require": {
"types": "./dist/*.d.cts",
"default": "./dist/*.cjs"
}
}
},
"publishConfig": {
"access": "public"
},
"scripts": {
"aibranch": "pnpm generate-git-branch",
"build": "pnpm tsup && pnpm run python:build && pnpm run rust:build && pnpm run go:build && pnpm run dotnet:build",
"build": "pnpm tsdown && pnpm run python:build && pnpm run rust:build && pnpm run go:build && pnpm run dotnet:build",
"check-all": "pnpm run typecheck && pnpm run lint && pnpm run format:check && pnpm run test && pnpm run python:typecheck && pnpm run python:lint && pnpm run python:format:check && pnpm run rust:fmt:check && pnpm run rust:lint && pnpm run rust:test && pnpm run go:fmt:check && pnpm run go:lint && pnpm run go:test && pnpm run dotnet:format:check && pnpm run dotnet:test && pnpm run build",
"ci:publish": "pnpm build && pnpm changeset publish && pnpm run version:sync",
"format": "oxfmt --write . && pnpm run python:format && pnpm run rust:fmt && pnpm run go:fmt && pnpm run dotnet:format",
Expand All @@ -66,7 +92,7 @@
"prepare": "husky",
"test": "vitest run --passWithNoTests && pnpm python:test && pnpm rust:test && pnpm go:test && pnpm dotnet:test",
"typecheck": "tsc --noEmit --skipLibCheck && pnpm run python:typecheck && pnpm run rust:check",
"watch": "tsup --watch",
"watch": "tsdown --watch",
"format:check": "oxfmt --check .",
"python:build": "(cd python && uv run poe build)",
"python:format": "(cd python && uv run poe format)",
Expand Down Expand Up @@ -105,16 +131,17 @@
},
"devDependencies": {
"@changesets/cli": "^2.28.1",
"@rollup/plugin-alias": "latest",
"@smooai/config-typescript": "^1.0.16",
"@types/lodash.merge": "^4.6.9",
"@types/node": "^22.13.10",
"esbuild-plugin-alias": "^0.2.1",
"husky": "^9.1.7",
"msw": "^2.7.3",
"oxfmt": "^0.28.0",
"oxlint": "^0.16.0",
"tsup": "^8.4.0",
"tsdown": "latest",
"typescript": "^5.8.2",
"unrun": "latest",
"vite": "^6.2.4",
"vite-node": "^3.1.1",
"vite-tsconfig-paths": "^5.1.4",
Expand Down
Loading
Loading