Skip to content

feat: export tsdown version#976

Merged
sxzz merged 2 commits into
rolldown:mainfrom
userquin:export-tsdown-version
Jun 18, 2026
Merged

feat: export tsdown version#976
sxzz merged 2 commits into
rolldown:mainfrom
userquin:export-tsdown-version

Conversation

@userquin

Copy link
Copy Markdown
Contributor
  • This PR contains AI-generated code, but I have carefully reviewed it myself. Otherwise, my PR may be closed.

Description

This PR exports the version, It is a pain to load tsdown version when required from the package.json:

Linked Issues

Additional context

Copilot AI review requested due to automatic review settings June 18, 2026 13:01
@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for tsdown-main ready!

Name Link
🔨 Latest commit d87766f
🔍 Latest deploy log https://app.netlify.com/projects/tsdown-main/deploys/6a33ee31c512af0008fc0c11
😎 Deploy Preview https://deploy-preview-976--tsdown-main.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Jun 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

tsdown

pnpm add https://pkg.pr.new/tsdown@976 -D
npm i https://pkg.pr.new/tsdown@976 -D
yarn add https://pkg.pr.new/tsdown@976.tgz -D

create-tsdown

pnpm add https://pkg.pr.new/create-tsdown@976 -D
npm i https://pkg.pr.new/create-tsdown@976 -D
yarn add https://pkg.pr.new/create-tsdown@976.tgz -D

@tsdown/css

pnpm add https://pkg.pr.new/@tsdown/css@976 -D
npm i https://pkg.pr.new/@tsdown/css@976 -D
yarn add https://pkg.pr.new/@tsdown/css@976.tgz -D

@tsdown/exe

pnpm add https://pkg.pr.new/@tsdown/exe@976 -D
npm i https://pkg.pr.new/@tsdown/exe@976 -D
yarn add https://pkg.pr.new/@tsdown/exe@976.tgz -D

tsdown-migrate

pnpm add https://pkg.pr.new/tsdown-migrate@976 -D
npm i https://pkg.pr.new/tsdown-migrate@976 -D
yarn add https://pkg.pr.new/tsdown-migrate@976.tgz -D

commit: d87766f

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR exposes the tsdown package version as a normal named export (version), avoiding the need for downstream consumers to read/import package.json to access the version string.

Changes:

  • Inject import.meta.TSDOWN_VERSION at build time from package.json’s version.
  • Add TSDOWN_VERSION to the ImportMeta shim typings.
  • Export version from the public entrypoint and update API snapshots accordingly.

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsdown.config.ts Adds a build-time define for import.meta.TSDOWN_VERSION sourced from package.json.
src/shims.d.ts Extends ImportMeta typing to include TSDOWN_VERSION?: string.
src/index.ts Adds export const version to the public API.
snapshots/tsnapi/index.snapshot.js Updates API snapshot to include version export.
snapshots/tsnapi/index.snapshot.d.ts Updates API snapshot typings to include version: string.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sxzz sxzz enabled auto-merge (squash) June 18, 2026 13:10
@sxzz sxzz merged commit a09384c into rolldown:main Jun 18, 2026
16 checks passed
@userquin userquin deleted the export-tsdown-version branch June 18, 2026 13:11
sxzz pushed a commit to spokodev/tsdown that referenced this pull request Jun 18, 2026
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.

3 participants