refactor: move cmd-shim into the pnpm monorepo (#14893)

Import cmd-shim source, tests, and snapshots from pnpm/cmd-shim at
83f9b9449c2adeec26e1cc2d03ef0fe82d2e41ca. Maintaining the shim alongside
its consumers removes the need for coordinated changes across repositories.

Publish the package as `@pnpm/bins.cmd-shim` and replace external dependencies
with workspace links. Preserve the original BSD-2-Clause license, including
its copyright notice, and keep the manifest updater from replacing it with MIT.
Reuse `@pnpm/fs.graceful-fs` and integrate the existing Node.js tests with the
workspace test scripts. Retain the existing snapshots and align the version
with the TypeScript workspace's required 1100.x band.
This commit is contained in:
Zoltan Kochan authored and GitHub committed 2026-09-14 21:30:59 +02:00
1 parent a8ade4902f
commit 224aed744b
26 files changed
+3246 -43

No files matched your search

+3
View File
@@ -178,10 +178,13 @@ async function runScriptTask (pkg) {
try {
if (pkg.manifest.name === 'pd') {
await runCommand('node', ['pd.js', '--version'], { cwd: pkg.path })
} else if (pkg.manifest.name === '@pnpm/bins.cmd-shim') {
await runCommand('node', ['--test', 'test/test.js', 'test/e2e.test.js'], { cwd: pkg.path })
} else {
throw new Error(`Unsupported non-Jest .test script in ${relDir}: ${pkg.manifest.scripts['.test']}`)
}
} catch (err) {
console.error(err)
status = 'failure'
exitCode = err.exitCode ?? 1
}