Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type imports from fast-glob are incorrect #268

Closed
moltar opened this issue Jun 30, 2024 · 0 comments
Closed

Type imports from fast-glob are incorrect #268

moltar opened this issue Jun 30, 2024 · 0 comments

Comments

@moltar
Copy link

moltar commented Jun 30, 2024

globby/index.d.ts

Lines 1 to 2 in b0d7330

import type FastGlob from 'fast-glob'; // eslint-disable-line import/no-duplicates
import {type Options as FastGlobOptions, type Entry} from 'fast-glob'; // eslint-disable-line import/no-duplicates

The fast-glob package does not export the Entry type, which results in build failures when using Rollup:

RollupError: "Entry" is not exported by "../../node_modules/.pnpm/globby@14.0.1/node_modules/fast-glob/out/index.d.ts", imported by "../../node_modules/.pnpm/syncpack@12.3.3_typescript@5.4.5/node_modules/globby/index.d.ts".
at getRollupError (.../node_modules/.pnpm/rollup@4.18.0/node_modules/rollup/dist/shared/parseAst.js:282:41)

Because fast-glob exports a namespace:

declare namespace FastGlob {
    type Options = OptionsInternal;
    type Entry = EntryInternal;

Source: https://www.npmjs.com/package/fast-glob?activeTab=code

screenshot-20240630T105212-M3rH0eFb@2x

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

No branches or pull requests

1 participant