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/core17-declarations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ylfjuk-core/types": patch
---

Publish generated `.d.ts` files instead of TypeScript source and remove the TypeScript peer dependency. Type exports are unchanged; consumers still need a compiler that supports the declaration syntax they use. The development source export remains available in the repository.
2 changes: 1 addition & 1 deletion packages/types/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ TypeScript utility types used by [`@ylfjuk/core`](../core/README.md).
pnpm add @ylfjuk-core/types
```

The package is type-only, uses ESM package metadata, and requires TypeScript 7.
This package is type-only.

```ts
import type { Result } from "@ylfjuk-core/types";
Expand Down
11 changes: 4 additions & 7 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,20 @@
"directory": "packages/types"
},
"files": [
"src"
"dist"
],
"type": "module",
"sideEffects": false,
"types": "./src/index.ts",
"types": "./dist/index.d.ts",
"exports": {
".": {
"@ylfjuk-core/dev.src": "./src/index.ts",
"types": "./src/index.ts"
"types": "./dist/index.d.ts"
}
},
"scripts": {
"build": "pnpm run test && pnpm run test:types && publint && attw --pack --profile esm-only",
"build": "tsdown",
"test": "vitest run --typecheck",
"test:types": "tsc -p tsconfig.test.json"
},
"peerDependencies": {
"typescript": "^7.0.2"
}
}
13 changes: 13 additions & 0 deletions packages/types/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig } from "tsdown";

export default defineConfig({
attw: {
profile: "esm-only",
},
dts: {
emitDtsOnly: true,
},
entry: ["src/index.ts"],
fixedExtension: false,
publint: true,
});
8 changes: 8 additions & 0 deletions packages/types/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"build": {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Does it inherit the root config's output value?

"dependsOn": ["test", "test:types", "^build"]
}
}
}
6 changes: 1 addition & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading