mirror of
https://github.com/pnpm/pnpm.git
synced 2026-01-06 22:18:17 -05:00
6
.changeset/spicy-fireants-sip.md
Normal file
6
.changeset/spicy-fireants-sip.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-script-runners": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
It should be possible to run exec/run/dlx with the `--use-node-version` option.
|
||||
@@ -1,6 +1,8 @@
|
||||
import renderHelp from 'render-help'
|
||||
import { docsUrl } from '@pnpm/cli-utils'
|
||||
import { types } from '@pnpm/config'
|
||||
import PnpmError from '@pnpm/error'
|
||||
import pick from 'ramda/src/pick.js'
|
||||
import * as dlx from './dlx'
|
||||
|
||||
export const commandNames = ['create']
|
||||
@@ -21,11 +23,17 @@ export async function handler (_opts: dlx.DlxCommandOptions, params: string[]) {
|
||||
}
|
||||
|
||||
export function rcOptionsTypes () {
|
||||
return {}
|
||||
return {
|
||||
...pick([
|
||||
'use-node-version',
|
||||
], types),
|
||||
}
|
||||
}
|
||||
|
||||
export function cliOptionsTypes () {
|
||||
return {}
|
||||
return {
|
||||
...rcOptionsTypes(),
|
||||
}
|
||||
}
|
||||
|
||||
export function help () {
|
||||
|
||||
@@ -2,7 +2,7 @@ import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { docsUrl } from '@pnpm/cli-utils'
|
||||
import { OUTPUT_OPTIONS } from '@pnpm/common-cli-options-help'
|
||||
import { Config } from '@pnpm/config'
|
||||
import { Config, types } from '@pnpm/config'
|
||||
import PnpmError from '@pnpm/error'
|
||||
import { add } from '@pnpm/plugin-commands-installation'
|
||||
import { fromDir as readPkgFromDir } from '@pnpm/read-package-json'
|
||||
@@ -10,16 +10,22 @@ import packageBins from '@pnpm/package-bins'
|
||||
import storePath from '@pnpm/store-path'
|
||||
import execa from 'execa'
|
||||
import omit from 'ramda/src/omit.js'
|
||||
import pick from 'ramda/src/pick.js'
|
||||
import renderHelp from 'render-help'
|
||||
import { makeEnv } from './makeEnv'
|
||||
|
||||
export const commandNames = ['dlx']
|
||||
|
||||
export function rcOptionsTypes () {
|
||||
return {}
|
||||
return {
|
||||
...pick([
|
||||
'use-node-version',
|
||||
], types),
|
||||
}
|
||||
}
|
||||
|
||||
export const cliOptionsTypes = () => ({
|
||||
...rcOptionsTypes(),
|
||||
package: [String, Array],
|
||||
})
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ export function rcOptionsTypes () {
|
||||
...pick([
|
||||
'bail',
|
||||
'sort',
|
||||
'use-node-version',
|
||||
'unsafe-perm',
|
||||
'workspace-concurrency',
|
||||
], types),
|
||||
|
||||
@@ -50,6 +50,7 @@ export function rcOptionsTypes () {
|
||||
return {
|
||||
...pick([
|
||||
'npm-path',
|
||||
'use-node-version',
|
||||
], allTypes),
|
||||
}
|
||||
}
|
||||
@@ -60,6 +61,7 @@ export function cliOptionsTypes () {
|
||||
'bail',
|
||||
'sort',
|
||||
'unsafe-perm',
|
||||
'use-node-version',
|
||||
'workspace-concurrency',
|
||||
'scripts-prepend-node-path',
|
||||
], allTypes),
|
||||
|
||||
Reference in New Issue
Block a user