Skip to content

feat: support per-function imports like es-toolkit/array/chunk - #2173

Merged
raon0211 merged 1 commit into
mainfrom
feat/per-function-imports
Nov 2, 2026
Merged

raon0211 merged 1 commit into
mainfrom
feat/per-function-imports

Conversation

@raon0211

Copy link
Copy Markdown
Collaborator

Expose es-toolkit/{category}/{function} subpaths through wildcard exports that point straight at the unbundled dist files, exclude internal subdirectories with null exports, and verify every entry point in postbuild.

Expose `es-toolkit/{category}/{function}` subpaths through wildcard
exports that point straight at the unbundled dist files, exclude internal
subdirectories with `null` exports, and verify every entry point in
postbuild.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@raon0211
raon0211 requested a review from dayongkr as a code owner October 30, 2026 09:03
@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
es-toolkit Ready Ready Preview Oct 30, 2026 9:07am UTC

Request Review

@raon0211
raon0211 merged commit cc1586b into main Nov 2, 2026
13 checks passed
raon0211 pushed a commit that referenced this pull request Nov 5, 2026
…list

#2173 added wildcard exports such as ./array/* to publishConfig.exports,
but the tarball entrypoint test still expected the previous list, so the
test job on main has been failing.
raon0211 added a commit that referenced this pull request Nov 5, 2026
…nd-to-end (#2182)

* test[check-dist]: include per-function subpath exports in entrypoint list

#2173 added wildcard exports such as ./array/* to publishConfig.exports,
but the tarball entrypoint test still expected the previous list, so the
test job on main has been failing.

* test[check-dist]: verify blocked and wildcard subpath exports

Assert that the internal subpaths excluded with a null export are the
expected ones and cannot be resolved from the installed tarball, and
exercise each wildcard entrypoint through one of its modules in the
CJS/ESM parity check.

* test[check-dist]: keep ENTRYPOINTS and BLOCKED_ENTRYPOINTS disjoint

ENTRYPOINTS now lists only what can be loaded; subpaths excluded with a
null export live only in BLOCKED_ENTRYPOINTS. The packed exports are
split by null-ness and compared against each list.

* test[check-dist]: install the packed tarball with fixture-kit and load every entrypoint end-to-end

Each test now installs the packed tarball into a fresh @fixture-kit/core
fixture via npm, runs plain Node.js scripts inside it, and removes the
directory afterwards. The entrypoint test requires and imports every
loadable entrypoint (including one module per wildcard) and checks that
each exports something identical in CJS and ESM. The tar-based
package.json extraction and the hand-rolled tmpdir helper are replaced
by reading node_modules/es-toolkit from the fixture.

* test[check-dist]: dispose fixtures with await using

* test[check-dist]: use replaceAll when expanding wildcard entrypoints

---------

Co-authored-by: T3 Code Service User <t3code@raonserver-t3code.Maxio>
@raon0211 raon0211 mentioned this pull request Nov 6, 2026

This branch was successfully deployed

1 active deployment
Preview — a5b89dac Deployed Oct 30, 2026 by vercel[bot]
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