Skip to content

feat(build): Add exports to make package usable as a library#196

Open
AntonioVentilii wants to merge 7 commits intomainfrom
feat-build/Add-exports-to-make-package-usable-as-a-library
Open

feat(build): Add exports to make package usable as a library#196
AntonioVentilii wants to merge 7 commits intomainfrom
feat-build/Add-exports-to-make-package-usable-as-a-library

Conversation

@AntonioVentilii
Copy link
Copy Markdown
Collaborator

@AntonioVentilii AntonioVentilii commented Feb 11, 2026

Motivation

As per @marceljuenemann's PR #194:

Currently there are no .d.ts files in the published package. This means you can't use this package as a library.

Thank you for that!!!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 aims to make @dfinity/ic-pub-key usable as a TypeScript/JavaScript library by publishing TypeScript declaration files and defining explicit package entrypoints via exports.

Changes:

  • Enable TypeScript declaration (.d.ts) and declaration map generation in tsconfig.json.
  • Update package.json to publish dist/, point main/types at dist/, and add exports for root and selected subpaths (./ecdsa, ./schnorr, ./signer).

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.

File Description
tsconfig.json Turns on declaration + declaration maps so the build emits typings into dist/.
package.json Publishes dist/ as the package output and adds conditional exports for library consumption.

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

Comment thread package.json Outdated
Comment thread package.json
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.

2 participants