mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-31 21:42:15 -04:00
Revert the workaround that forced `pnpm self-update` to always install the `pnpm` package for v11+. Since `@pnpm/exe` works again from v11.0.0-alpha.7, `getCurrentPackageName()` now simply returns `@pnpm/exe` when running as an executable, without platform-specific package names.
24 lines
531 B
TypeScript
24 lines
531 B
TypeScript
import { getCurrentPackageName } from '@pnpm/cli-meta'
|
|
|
|
test('getCurrentPackageName()', () => {
|
|
expect(getCurrentPackageName({
|
|
platform: 'darwin',
|
|
arch: 'arm64',
|
|
})).toBe('pnpm')
|
|
expect(getCurrentPackageName({
|
|
pkg: '.',
|
|
platform: 'win32',
|
|
arch: 'ia32',
|
|
})).toBe('@pnpm/exe')
|
|
expect(getCurrentPackageName({
|
|
pkg: '.',
|
|
platform: 'darwin',
|
|
arch: 'arm64',
|
|
})).toBe('@pnpm/exe')
|
|
expect(getCurrentPackageName({
|
|
pkg: '.',
|
|
platform: 'linux',
|
|
arch: 'x64',
|
|
})).toBe('@pnpm/exe')
|
|
})
|