Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 6.11.2 #238

Merged
merged 6 commits into from Aug 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 30 additions & 11 deletions .travis.yml
@@ -1,34 +1,53 @@
sudo: true
# need to declare the language as well as the matrix below
language: node_js

os:
- linux

node_js:
- 12
- 10
- 8

env: "DEPLOY_VERSION=testing"

# having top-level `env:` adds a phantom build
# https://github.com/travis-ci/travis-ci/issues/4681
#env: DEPLOY_VERSION=testing
matrix:
include:
# LTS is our most important target
# Run the sudotest, but only on Linux
- node_js: "12"
# DEPLOY_VERSION is used to set the couchapp setup mode for test/tap/registry.js
# only gather coverage info for LTS
env: DEPLOY_VERSION=testing COVERALLS_REPO_TOKEN="$COVERALLS_OPTIONAL_TOKEN"
script:
# run the sudo tests, with coverage enabled
- "sudo PATH=$PATH $(which node) . run tap -- \"test/tap/*.js\" --coverage"
# previous LTS is next most important
- "sudo PATH=$PATH $(which node) . run tap -- \"test/tap/*.js\" --coverage --timeout 600"

# also run standard and license checking
- node_js: "10"
env: DEPLOY_VERSION=testing
script:
- "npx standard"
- "node . run licenses"
- "node . run tap -- \"test/tap/*.js\""
- node_js: "8"
env: DEPLOY_VERSION=testing
- "npx standard"
- "node . run licenses"

# separate out node 6 so we can turn off caching, because that
# always breaks for some reason.
- node_js: "6"
env: DEPLOY_VERSION=testing
cache: false
env: "DEPLOY_VERSION=testing"

# only run one test on Windows, because it's hella slow
- node_js: "12"
os: "windows"
env: "DEPLOY_VERSION=testing"

notifications:
slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8

install:
- "node . install"

script:
- "node . run tap -- \"test/tap/*.js\""
- "node . run tap -- \"test/tap/*.js\" -t600 -Rclassic -c"
30 changes: 30 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,33 @@
## 6.11.2 (2019-08-22):

Fix a recent Windows regression, and two long-standing Windows bugs. Also,
get CI running on Windows, so these things are less likely in the future.

### DEPENDENCIES

* [`9778a1b87`](https://github.com/npm/cli/commit/9778a1b878aaa817af6e99385e7683c2a389570d)
`cmd-shim@3.0.3`: Fix regression where shims fail to preserve exit code
([@isaacs](https://github.com/isaacs))
* [`bf93e91d8`](https://github.com/npm/cli/commit/bf93e91d879c816a055d5913e6e4210d7299f299)
`npm-package-arg@6.1.1`: Properly handle git+file: urls on Windows when a
drive letter is included. ([@isaacs](https://github.com/isaacs))

### BUGFIXES

* [`6cc4cc66f`](https://github.com/npm/cli/commit/6cc4cc66f1fb050dc4113e35cab59197fd48e04a)
escape args properly on Windows Bash Despite being bash, Node.js running
on windows git mingw bash still executes child processes using cmd.exe.
As a result, arguments in this environment need to be escaped in the
style of cmd.exe, not bash. ([@isaacs](https://github.com/isaacs))

### TESTS

* [`291aba7b8`](https://github.com/npm/cli/commit/291aba7b821e247b96240b1ec037310ead69a594)
make tests pass on Windows ([@isaacs](https://github.com/isaacs))
* [`fea3a023a`](https://github.com/npm/cli/commit/fea3a023a80863f32a5f97f5132401b1a16161b8)
travis: run tests on Windows as well
([@isaacs](https://github.com/isaacs))

## 6.11.1 (2019-08-20):

Fix a regression for windows command shim syntax.
Expand Down
6 changes: 4 additions & 2 deletions lib/explore.js
Expand Up @@ -9,10 +9,11 @@ var npm = require('./npm.js')
var spawn = require('./utils/spawn')
var path = require('path')
var fs = require('graceful-fs')
var isWindowsShell = require('./utils/is-windows-shell.js')
var isWindows = require('./utils/is-windows.js')
var escapeExecPath = require('./utils/escape-exec-path.js')
var escapeArg = require('./utils/escape-arg.js')
var output = require('./utils/output.js')
var log = require('npmlog')

function explore (args, cb) {
if (args.length < 1 || !args[0]) return cb(explore.usage)
Expand All @@ -23,7 +24,7 @@ function explore (args, cb) {

var shellArgs = []
if (args) {
if (isWindowsShell) {
if (isWindows) {
var execCmd = escapeExecPath(args.shift())
var execArgs = [execCmd].concat(args.map(escapeArg))
opts.windowsVerbatimArguments = true
Expand All @@ -49,6 +50,7 @@ function explore (args, cb) {
)
}

log.silly('explore', {sh, shellArgs, opts})
var shell = spawn(sh, shellArgs, opts)
shell.on('close', function (er) {
// only fail if non-interactive.
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/escape-arg.js
@@ -1,6 +1,6 @@
'use strict'
var path = require('path')
var isWindowsShell = require('./is-windows-shell.js')
var isWindows = require('./is-windows.js')

/*
Escape the name of an executable suitable for passing to the system shell.
Expand All @@ -15,7 +15,7 @@ any single quotes in the filename.
module.exports = escapify

function escapify (str) {
if (isWindowsShell) {
if (isWindows) {
return '"' + path.normalize(str) + '"'
} else {
if (/[^-_.~/\w]/.test(str)) {
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/escape-exec-path.js
@@ -1,6 +1,6 @@
'use strict'
var path = require('path')
var isWindowsShell = require('./is-windows-shell.js')
var isWindows = require('./is-windows.js')

/*
Escape the name of an executable suitable for passing to the system shell.
Expand All @@ -20,7 +20,7 @@ function windowsQuotes (str) {
}

function escapify (str) {
if (isWindowsShell) {
if (isWindows) {
return path.normalize(str).split(/\\/).map(windowsQuotes).join('\\')
} else if (/[^-_.~/\w]/.test(str)) {
return "'" + str.replace(/'/g, "'\"'\"'") + "'"
Expand Down
4 changes: 2 additions & 2 deletions node_modules/cmd-shim/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions node_modules/cmd-shim/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions node_modules/npm-package-arg/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 12 additions & 6 deletions node_modules/npm-package-arg/npa.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 22 additions & 23 deletions node_modules/npm-package-arg/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.