Skip to content

node

Documentation / @wtf/project-resolve / node

Node’s platform, as the readers of ./workspace take one (nodePlatform): the disk, from its root, as read-only handles of the WHATWG File System Standard over Node’s own fs/promises, and the paths of node:path. The hook of ./register reads the workspace by it, and so do the Vitest configs, which run in Node.

import { nodePlatform } from '@wtf/project-resolve/node'
import { packagesOf, workspaceRootOf } from '@wtf/project-resolve/workspace'
const platform = nodePlatform()
const root = await workspaceRootOf(process.cwd(), { platform })
const packages = await packagesOf(root, { platform })

Functions