Skip to content

feat: Add per-function granular exports for all groups#1668

Open
nunomarks wants to merge 2 commits intotoss:mainfrom
nunomarks:feat/more-granular-exports
Open

feat: Add per-function granular exports for all groups#1668
nunomarks wants to merge 2 commits intotoss:mainfrom
nunomarks:feat/more-granular-exports

Conversation

@nunomarks
Copy link
Copy Markdown

Context

Changes

Enable deep imports like `es-toolkit/function/debounce` for all main groups (error, function, map, math, object, predicate, promise, set, string, util).

  • Add wildcard entries to both dev and publishConfig exports
  • Filter wildcard patterns from rollup entrypoint resolution
  • Expand .attw.json to validate sample granular entrypoints

Copilot AI review requested due to automatic review settings March 28, 2026 22:03
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
es-toolkit Ready Ready Preview, Comment Apr 21, 2026 8:50am

Request Review

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

Adds wildcard subpath exports to support per-function deep imports (e.g. es-toolkit/function/debounce) across the main groups, and updates build/test tooling to accommodate these new export patterns.

Changes:

  • Add ./<group>/* wildcard entries to exports and publishConfig.exports for granular imports.
  • Update Rollup entrypoint resolution to ignore wildcard export targets.
  • Expand .attw.json entrypoint sampling for types validation.

Reviewed changes

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

File Description
package.json Adds wildcard subpath exports for each group (and corresponding published dist mappings).
rollup.config.mjs Filters wildcard export targets out of Rollup entrypoint discovery.
tests/check-dist.spec.ts Updates expected export subpaths to include the new wildcards.
.attw.json Adds representative granular entrypoints for type-check tooling.

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

Comment thread package.json
Comment thread tests/check-dist.spec.ts
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.

Allow individual function imports

2 participants