@netlify/run-utils 1.0.7 → 4.0.0
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/README.md +1 -1
- package/package.json +8 -6
- package/src/main.js +4 -12
- package/CHANGELOG.md +0 -15
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[](https://codecov.io/gh/netlify/build)
|
|
2
2
|
[](https://github.com/netlify/build/actions)
|
|
3
3
|
|
|
4
4
|
Utility for running commands inside Netlify Build. Currently, there is just one utility, `run`, which is a thin wrapper
|
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/run-utils",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Utility for running commands inside Netlify Build",
|
|
5
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": "./src/main.js",
|
|
7
|
+
"main": "./src/main.js",
|
|
6
8
|
"files": [
|
|
7
9
|
"src/**/*.js"
|
|
8
10
|
],
|
|
@@ -43,13 +45,13 @@
|
|
|
43
45
|
},
|
|
44
46
|
"license": "MIT",
|
|
45
47
|
"dependencies": {
|
|
46
|
-
"execa": "^
|
|
48
|
+
"execa": "^5.1.1"
|
|
47
49
|
},
|
|
48
50
|
"devDependencies": {
|
|
49
|
-
"ava": "^
|
|
50
|
-
"semver": "^
|
|
51
|
+
"ava": "^3.15.0",
|
|
52
|
+
"semver": "^7.0.0"
|
|
51
53
|
},
|
|
52
54
|
"engines": {
|
|
53
|
-
"node": ">=
|
|
55
|
+
"node": "^12.20.0 || ^14.14.0 || >=16.0.0"
|
|
54
56
|
}
|
|
55
57
|
}
|
package/src/main.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import process from 'process'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const execa = require('execa')
|
|
3
|
+
import execa from 'execa'
|
|
6
4
|
|
|
7
5
|
// Run a command, with arguments being an array
|
|
8
|
-
const run = function (file, args, options) {
|
|
6
|
+
export const run = function (file, args, options) {
|
|
9
7
|
const [argsA, optionsA] = parseArgs(args, options)
|
|
10
8
|
const optionsB = { ...DEFAULT_OPTIONS, ...optionsA }
|
|
11
9
|
const childProcess = execa(file, argsA, optionsB)
|
|
@@ -14,7 +12,7 @@ const run = function (file, args, options) {
|
|
|
14
12
|
}
|
|
15
13
|
|
|
16
14
|
// Run a command, with file + arguments being a single string
|
|
17
|
-
const runCommand = function (command, options) {
|
|
15
|
+
export const runCommand = function (command, options) {
|
|
18
16
|
const optionsA = { ...DEFAULT_OPTIONS, ...options }
|
|
19
17
|
const childProcess = execa.command(command, optionsA)
|
|
20
18
|
redirectOutput(childProcess, optionsA)
|
|
@@ -46,9 +44,3 @@ const redirectOutput = function (childProcess, { stdio, stdout, stderr }) {
|
|
|
46
44
|
childProcess.stdout.pipe(process.stdout)
|
|
47
45
|
childProcess.stderr.pipe(process.stderr)
|
|
48
46
|
}
|
|
49
|
-
|
|
50
|
-
// Needed to add a property to the function
|
|
51
|
-
// eslint-disable-next-line fp/no-mutation
|
|
52
|
-
run.command = runCommand
|
|
53
|
-
|
|
54
|
-
module.exports = run
|
package/CHANGELOG.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
### [1.0.7](https://www.github.com/netlify/build/compare/v1.0.6...v1.0.7) (2021-03-09)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
### Bug Fixes
|
|
7
|
-
|
|
8
|
-
* fix `semver` version with Node 8 ([#2362](https://www.github.com/netlify/build/issues/2362)) ([c72ecd8](https://www.github.com/netlify/build/commit/c72ecd8c8525e269180b427489991d9ec3238022))
|
|
9
|
-
|
|
10
|
-
### [1.0.6](https://www.github.com/netlify/build/compare/run-utils-v1.0.5...v1.0.6) (2021-02-18)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
### Bug Fixes
|
|
14
|
-
|
|
15
|
-
* fix `files` in `package.json` with `npm@7` ([#2278](https://www.github.com/netlify/build/issues/2278)) ([e9df064](https://www.github.com/netlify/build/commit/e9df0645f3083a0bb141c8b5b6e474ed4e27dbe9))
|