Skip to content

Commit

Permalink
Check packed files when globbing exports
Browse files Browse the repository at this point in the history
fix #61
  • Loading branch information
bluwy committed Aug 19, 2023
1 parent 1ca90ab commit 313d6d2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,9 @@ export async function publint({ pkgDir, vfs, level, strict, _packedFiles }) {
async function getExportsFiles(exports) {
const exportsPath = vfs.pathJoin(pkgDir, exports)
const isGlob = exports.includes('*')
return isGlob ? await exportsGlob(exportsPath, vfs) : [exportsPath]
return isGlob
? await exportsGlob(exportsPath, vfs, _packedFiles)
: [exportsPath]
}

/**
Expand Down
1 change: 1 addition & 0 deletions pkg/tests/fixtures/test-2/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib/publish-excluded.js
Empty file.

0 comments on commit 313d6d2

Please sign in to comment.