diff --git a/configs/oxlint/package.json b/configs/oxlint/package.json index f1d53e0..bd87274 100644 --- a/configs/oxlint/package.json +++ b/configs/oxlint/package.json @@ -1,6 +1,6 @@ { "name": "@robonen/oxlint", - "version": "0.0.1", + "version": "0.0.2", "license": "Apache-2.0", "description": "Composable oxlint configuration presets", "keywords": [ @@ -40,6 +40,7 @@ "devDependencies": { "@robonen/oxlint": "workspace:*", "@robonen/tsconfig": "workspace:*", + "@robonen/tsdown": "workspace:*", "oxlint": "catalog:", "tsdown": "catalog:" }, diff --git a/configs/oxlint/tsconfig.json b/configs/oxlint/tsconfig.json index 077d6a1..ab255ac 100644 --- a/configs/oxlint/tsconfig.json +++ b/configs/oxlint/tsconfig.json @@ -1,6 +1,3 @@ { - "extends": "@robonen/tsconfig/tsconfig.json", - "compilerOptions": { - "rootDir": "." - } + "extends": "@robonen/tsconfig/tsconfig.json" } diff --git a/configs/oxlint/tsdown.config.ts b/configs/oxlint/tsdown.config.ts index f5f5059..ae9657f 100644 --- a/configs/oxlint/tsdown.config.ts +++ b/configs/oxlint/tsdown.config.ts @@ -1,9 +1,7 @@ import { defineConfig } from 'tsdown'; +import { sharedConfig } from '@robonen/tsdown'; export default defineConfig({ + ...sharedConfig, entry: ['src/index.ts'], - format: ['esm', 'cjs'], - dts: true, - clean: true, - hash: false, }); diff --git a/configs/tsdown/package.json b/configs/tsdown/package.json new file mode 100644 index 0000000..44a7213 --- /dev/null +++ b/configs/tsdown/package.json @@ -0,0 +1,30 @@ +{ + "name": "@robonen/tsdown", + "version": "0.0.1", + "private": true, + "license": "Apache-2.0", + "description": "Shared tsdown configuration for @robonen packages", + "keywords": [ + "tsdown", + "config", + "build" + ], + "author": "Robonen Andrew ", + "repository": { + "type": "git", + "url": "git+https://github.com/robonen/tools.git", + "directory": "configs/tsdown" + }, + "packageManager": "pnpm@10.29.3", + "engines": { + "node": ">=24.13.1" + }, + "type": "module", + "exports": { + ".": "./src/index.ts" + }, + "devDependencies": { + "@robonen/tsconfig": "workspace:*", + "tsdown": "catalog:" + } +} diff --git a/configs/tsdown/src/index.ts b/configs/tsdown/src/index.ts new file mode 100644 index 0000000..4f69eb2 --- /dev/null +++ b/configs/tsdown/src/index.ts @@ -0,0 +1,13 @@ +import type { Options } from 'tsdown'; + +const BANNER = '/*! @robonen/tools | (c) 2026 Robonen Andrew | Apache-2.0 */'; + +export const sharedConfig = { + format: ['esm', 'cjs'], + dts: true, + clean: true, + hash: false, + outputOptions: { + banner: BANNER, + }, +} satisfies Options; diff --git a/configs/tsdown/tsconfig.json b/configs/tsdown/tsconfig.json new file mode 100644 index 0000000..ab255ac --- /dev/null +++ b/configs/tsdown/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@robonen/tsconfig/tsconfig.json" +} diff --git a/core/platform/package.json b/core/platform/package.json index ba37fee..d12a24f 100644 --- a/core/platform/package.json +++ b/core/platform/package.json @@ -1,6 +1,6 @@ { "name": "@robonen/platform", - "version": "0.0.3", + "version": "0.0.4", "license": "Apache-2.0", "description": "Platform dependent utilities for javascript development", "keywords": [ @@ -47,6 +47,7 @@ "devDependencies": { "@robonen/oxlint": "workspace:*", "@robonen/tsconfig": "workspace:*", + "@robonen/tsdown": "workspace:*", "oxlint": "catalog:", "tsdown": "catalog:" } diff --git a/core/platform/tsdown.config.ts b/core/platform/tsdown.config.ts index a7ed8dd..1b37543 100644 --- a/core/platform/tsdown.config.ts +++ b/core/platform/tsdown.config.ts @@ -1,12 +1,10 @@ import { defineConfig } from 'tsdown'; +import { sharedConfig } from '@robonen/tsdown'; export default defineConfig({ + ...sharedConfig, entry: { browsers: 'src/browsers/index.ts', multi: 'src/multi/index.ts', }, - format: ['esm', 'cjs'], - dts: true, - clean: true, - hash: false, }); \ No newline at end of file diff --git a/core/stdlib/package.json b/core/stdlib/package.json index 6b0c7d1..077068c 100644 --- a/core/stdlib/package.json +++ b/core/stdlib/package.json @@ -1,6 +1,6 @@ { "name": "@robonen/stdlib", - "version": "0.0.8", + "version": "0.0.9", "license": "Apache-2.0", "description": "A collection of tools, utilities, and helpers for TypeScript", "keywords": [ @@ -42,6 +42,7 @@ "devDependencies": { "@robonen/oxlint": "workspace:*", "@robonen/tsconfig": "workspace:*", + "@robonen/tsdown": "workspace:*", "oxlint": "catalog:", "tsdown": "catalog:" } diff --git a/core/stdlib/tsdown.config.ts b/core/stdlib/tsdown.config.ts index 773b664..6dd0139 100644 --- a/core/stdlib/tsdown.config.ts +++ b/core/stdlib/tsdown.config.ts @@ -1,9 +1,7 @@ import { defineConfig } from 'tsdown'; +import { sharedConfig } from '@robonen/tsdown'; export default defineConfig({ + ...sharedConfig, entry: ['src/index.ts'], - format: ['esm', 'cjs'], - dts: true, - clean: true, - hash: false, }); \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d9ed0e3..7873084 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -56,6 +56,9 @@ importers: scule: specifier: ^1.3.0 version: 1.3.0 + tsdown: + specifier: 'catalog:' + version: 0.12.9(typescript@5.8.3) vitest: specifier: 'catalog:' version: 4.0.18(@opentelemetry/api@1.9.0)(@types/node@24.10.13)(@vitest/ui@4.0.18)(jiti@2.6.1)(jsdom@28.0.0)(terser@5.44.0)(yaml@2.8.2) @@ -68,6 +71,9 @@ importers: '@robonen/tsconfig': specifier: workspace:* version: link:../tsconfig + '@robonen/tsdown': + specifier: workspace:* + version: link:../tsdown oxlint: specifier: 'catalog:' version: 1.47.0 @@ -77,6 +83,15 @@ importers: configs/tsconfig: {} + configs/tsdown: + devDependencies: + '@robonen/tsconfig': + specifier: workspace:* + version: link:../tsconfig + tsdown: + specifier: 'catalog:' + version: 0.12.9(typescript@5.8.3) + core/platform: devDependencies: '@robonen/oxlint': @@ -85,6 +100,9 @@ importers: '@robonen/tsconfig': specifier: workspace:* version: link:../../configs/tsconfig + '@robonen/tsdown': + specifier: workspace:* + version: link:../../configs/tsdown oxlint: specifier: 'catalog:' version: 1.47.0 @@ -100,6 +118,9 @@ importers: '@robonen/tsconfig': specifier: workspace:* version: link:../../configs/tsconfig + '@robonen/tsdown': + specifier: workspace:* + version: link:../../configs/tsdown oxlint: specifier: 'catalog:' version: 1.47.0 @@ -131,6 +152,9 @@ importers: '@robonen/tsconfig': specifier: workspace:* version: link:../../configs/tsconfig + '@robonen/tsdown': + specifier: workspace:* + version: link:../../configs/tsdown '@vue/test-utils': specifier: 'catalog:' version: 2.4.6 diff --git a/web/vue/package.json b/web/vue/package.json index 8c6b258..fd8326f 100644 --- a/web/vue/package.json +++ b/web/vue/package.json @@ -1,6 +1,6 @@ { "name": "@robonen/vue", - "version": "0.0.11", + "version": "0.0.12", "license": "Apache-2.0", "description": "Collection of powerful tools for Vue", "keywords": [ @@ -40,6 +40,7 @@ "devDependencies": { "@robonen/oxlint": "workspace:*", "@robonen/tsconfig": "workspace:*", + "@robonen/tsdown": "workspace:*", "@vue/test-utils": "catalog:", "oxlint": "catalog:", "tsdown": "catalog:" diff --git a/web/vue/tsdown.config.ts b/web/vue/tsdown.config.ts index 0a70680..afc29c6 100644 --- a/web/vue/tsdown.config.ts +++ b/web/vue/tsdown.config.ts @@ -1,11 +1,9 @@ import { defineConfig } from 'tsdown'; +import { sharedConfig } from '@robonen/tsdown'; export default defineConfig({ + ...sharedConfig, entry: ['src/index.ts'], - format: ['esm', 'cjs'], - dts: true, - clean: true, - hash: false, external: ['vue'], noExternal: [/^@robonen\//], }); \ No newline at end of file