Skip to content

Type imports from fast-glob are incorrect #268

@moltar

Description

@moltar

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/[email protected]/node_modules/fast-glob/out/index.d.ts", imported by "../../node_modules/.pnpm/[email protected][email protected]/node_modules/globby/index.d.ts".
at getRollupError (.../node_modules/.pnpm/[email protected]/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions