-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
2,909 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: '/' | ||
schedule: | ||
interval: daily | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
# Check for updates to GitHub Actions every weekday | ||
interval: 'daily' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: CI | ||
on: | ||
- push | ||
- pull_request | ||
jobs: | ||
test: | ||
name: Node.js ${{ matrix.node-version }} ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node: ['latest'] | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2.4.1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: git config --global user.name "Github Actions" | ||
- run: git config --global user.email "actions@users.noreply.github.com" | ||
- run: npm ci | ||
- run: npm run lint | ||
- run: npm run test:engines |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
module.exports = { | ||
spawn: require('./lib/spawn'), | ||
spawnSync: require('./lib/spawnSync'), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
var path = require('path'); | ||
var assign = require('object-assign'); | ||
var prepend = require('path-string-prepend'); | ||
var NODE = process.platform === 'win32' ? 'node.exe' : 'node'; | ||
var PATH_KEY = require('./env-path-key')(); | ||
|
||
var isWindows = process.platform === 'win32'; | ||
|
||
module.exports = function envForInstallPath(installPath, options) { | ||
var processEnv = process.env; | ||
var env = {}; | ||
env.npm_config_binroot = isWindows ? installPath : path.join(installPath, 'bin'); | ||
env.npm_config_root = isWindows ? installPath : path.join(installPath, 'lib'); | ||
env.npm_config_man = isWindows ? installPath : path.join(installPath, 'man'); | ||
env.npm_config_prefix = installPath; | ||
env.npm_node_execpath = path.join(env.npm_config_binroot, NODE); | ||
|
||
// copy the environment not for npm and skip case-insesitive additional paths | ||
for (var key in processEnv) { | ||
var lowerKey = key.toLowerCase(); | ||
if (lowerKey.indexOf('npm_') === 0) continue; | ||
if (lowerKey === 'path' && key !== PATH_KEY) continue; | ||
env[key] = processEnv[key]; | ||
} | ||
|
||
// override node | ||
if (env.NODE !== undefined) env.NODE = env.npm_node_execpath; | ||
|
||
// put the path to node and npm at the front and remove nvs | ||
env[PATH_KEY] = prepend(env[PATH_KEY] || '', env.npm_config_binroot); | ||
return assign({}, options, { cwd: process.cwd(), env: env, execPath: env.npm_node_execpath, path: env[PATH_KEY] }); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
var crossSpawn = require('cross-spawn-cb'); | ||
var spawnOptions = require('./spawnOptions'); | ||
|
||
module.exports = function spawnSync(installPath, command, args, options) { | ||
return crossSpawn.sync(command, args, spawnOptions(installPath, options)); | ||
}; |
Oops, something went wrong.