mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-27 03:21:55 -04:00
Add n/prefer-node-protocol rule and autofix all bare builtin imports to use the node: prefix. Simplify the simple-import-sort builtins pattern to just ^node: since all imports now use the prefix.
11 lines
400 B
TypeScript
11 lines
400 B
TypeScript
import path from 'node:path'
|
|
|
|
import { readWantedLockfile } from '@pnpm/lockfile.fs'
|
|
|
|
import { makeVirtualNodeModules } from '../src/makeVirtualNodeModules.js'
|
|
|
|
test('makeVirtualNodeModules', async () => {
|
|
const lockfile = await readWantedLockfile(path.join(import.meta.dirname, '__fixtures__/simple'), { ignoreIncompatible: true })
|
|
expect(makeVirtualNodeModules(lockfile!)).toMatchSnapshot()
|
|
})
|