libnpmexec 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Changelog
2
2
 
3
- ## 0.0.0-pre.0
3
+ ## v1.0.0
4
4
 
5
- - Initial pre-release.
5
+ - Initial implementation, moves the code that used to live in the **npm cli**,
6
+ ref: https://github.com/npm/cli/blob/release/v7.10.0/lib/exec.js into this
7
+ separate module, providing a programmatic API to the **npm exec** functionality.
6
8
 
package/README.md CHANGED
@@ -39,7 +39,7 @@ await libexec({
39
39
  - `packages`: A list of packages to be used (possibly fetch from the registry) **Array<String>**, defaults to `[]`
40
40
  - `path`: Location to where to read local project info (`package.json`) **String**, defaults to `.`
41
41
  - `runPath`: Location to where to execute the script **String**, defaults to `.`
42
- - `shell`: Default shell to be used **String**
42
+ - `scriptShell`: Default shell to be used **String**
43
43
  - `yes`: Should skip download confirmation prompt when fetching missing packages from the registry? **Boolean**
44
44
  - `registry`, `cache`, and more options that are forwarded to [@npmcli/arborist](https://github.com/npm/arborist/) and [pacote](https://github.com/npm/pacote/#options) **Object**
45
45
 
package/lib/index.js CHANGED
@@ -38,7 +38,7 @@ const exec = async (opts) => {
38
38
  packages: _packages = [],
39
39
  path = '.',
40
40
  runPath = '.',
41
- shell = undefined,
41
+ scriptShell = undefined,
42
42
  yes = undefined,
43
43
  ...flatOptions
44
44
  } = opts
@@ -58,7 +58,7 @@ const exec = async (opts) => {
58
58
  path,
59
59
  pathArr,
60
60
  runPath,
61
- shell,
61
+ scriptShell,
62
62
  })
63
63
 
64
64
  // nothing to maybe install, skip the arborist dance
package/lib/run-script.js CHANGED
@@ -23,10 +23,10 @@ const run = async ({
23
23
  path,
24
24
  pathArr,
25
25
  runPath,
26
- shell,
26
+ scriptShell,
27
27
  }) => {
28
28
  // turn list of args into command string
29
- const script = call || args.shift() || shell
29
+ const script = call || args.shift() || scriptShell
30
30
  const colorize = color ? chalk : nocolor
31
31
 
32
32
  // do the fakey runScript dance
@@ -45,7 +45,7 @@ const run = async ({
45
45
  log.disableProgress()
46
46
 
47
47
  try {
48
- if (script === shell) {
48
+ if (script === scriptShell) {
49
49
  const isTTY = !noTTY()
50
50
 
51
51
  if (isTTY) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libnpmexec",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "files": [
5
5
  "lib"
6
6
  ],