Skip to content

fix(types): publish declarations without a compiler peer - #32

Merged
YLfjuk merged 4 commits into
mainfrom
t3/publish-core-types
Nov 16, 2026
Merged

YLfjuk merged 4 commits into
mainfrom
t3/publish-core-types

Conversation

@YLfjuk

@YLfjuk YLfjuk commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Publish @ylfjuk-core/types as a type-only package using tsdown declaration-only mode. Keep dist-only packaging, declaration metadata and the development source condition; remove the compiler peer dependency. The README identifies the package as type-only.

The types config follows the existing tsdown configs and enables dts.emitDtsOnly, verified against installed tsdown 0.22.14 and rolldown-plugin-dts 0.27.14 documentation/source. Its distribution contains only dist/index.d.ts. Existing validation tests and the root TypeScript development dependency remain.

Validation: Node 24.19.0 / pnpm 11.22.0 frozen install; uncached builds, tests and owning type checks; publint and attw for all three packages; formatting and diff checks. Lint passes with ten existing warnings. Strict Bundler and NodeNext probes consume local tarballs throughout the dependency graph, with no paths, development conditions, skipLibCheck or consumer compiler installation. Compiler validation covers TypeScript 7.0.2 only; tsdown reports its existing experimental API warning.

PR36 owns validation deduplication and needs reconciliation onto this head, preserving tsdown. Broader consumer CI remains deferred.

@changeset-bot

changeset-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d319476

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@ylfjuk-core/types Patch
@ylfjuk/core Patch
@ylfjuk-core/utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread packages/types/README.md Outdated
```

The package is type-only, uses ESM package metadata, and requires TypeScript 7.
The package is type-only, uses ESM package metadata, and publishes declaration files without a TypeScript peer dependency.

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.

No need to say what the package doesn't need

Comment thread packages/types/README.md Outdated
```

The package is type-only, uses ESM package metadata, and requires TypeScript 7.
The package is type-only, uses ESM package metadata, and publishes declaration files without a TypeScript peer dependency.

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.

The packag is type only is enough - maybe not even that

Comment thread packages/types/package.json Outdated
},
"scripts": {
"build": "pnpm run test && pnpm run test:types && publint && attw --pack --profile esm-only",
"build": "pnpm run test && pnpm run test:types && tsc --emitDeclarationOnly --outDir dist --rootDir src && publint && attw --pack --profile esm-only",

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.

Use tsdown instead...

Comment thread packages/types/package.json Outdated
},
"scripts": {
"build": "pnpm run test && pnpm run test:types && publint && attw --pack --profile esm-only",
"build": "pnpm run test && pnpm run test:types && tsdown",

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.

Use turbo for the task dependencies instead of keeping them in the script

Comment thread turbo.json Outdated
"lint": {
"dependsOn": ["^lint"]
},
"@ylfjuk-core/types#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.

Prefer a scoped turbo config over declaring package specific dependencies in the root turbo config

Comment thread packages/types/turbo.json
{
"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?

@YLfjuk
YLfjuk marked this pull request as ready for review November 16, 2026 21:57
@YLfjuk
YLfjuk merged commit 9ce666c into main Nov 16, 2026
1 check passed
@YLfjuk
YLfjuk deleted the t3/publish-core-types branch November 16, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant