Skip to content

Maintenance: Replace fast-glob with glob() from node:fs/promises #1495

@Greenheart

Description

@Greenheart

Proposed change

As of Node.js v24, the glob API is stable. It doesn't support all features of fast-glob. Given that there only are few places in the Keystatic monorepo where fast-glob, and since all of them are used for development and testing only, they can all be replaced with the built-in API.

Affected modules:

  • design-system/primitives/scripts/build.ts
  • design-system/primitives/scripts/buildTokens.ts
  • packages/keystatic/test/test-utils.ts

Why make this change

This would primarily reduce the packages to install for development and testing, while also reducing the surface for supply chain attacks.

How to implement glob from node:fs/promises

https://nodejs.org/docs/v24.12.0/api/fs.html#fspromisesglobpattern-options

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions