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/v7.7.5 #2967

Merged
merged 8 commits into from Mar 25, 2021
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
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -37,6 +37,48 @@ jobs:
- name: Run linting
run: node . run licenses

smoke-tests:
strategy:
fail-fast: false
matrix:
node-version: [10.x, 12.x, 14.x]
platform:
- os: ubuntu-latest
shell: bash
- os: macos-latest
shell: bash
- os: windows-latest
shell: bash
- os: windows-latest
shell: powershell

runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}

steps:
# Checkout the npm/cli repo
- uses: actions/checkout@v2

# Installs the specific version of Node.js
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

# Run the installer script
- name: Install dependencies
run: |
node . install --ignore-scripts --no-audit
node . rebuild

# Run the smoke tests
- name: Run Smoke tests
run: node . run --ignore-scripts smoke-tests -- --no-check-coverage -t600 -Rbase -c
env:
DEPLOY_VERSION: testing

build:
strategy:
fail-fast: false
Expand Down
4 changes: 4 additions & 0 deletions .npmignore
Expand Up @@ -39,3 +39,7 @@ docs/template.html
Session.vim
.nyc_output
/.editorconfig

# don't ship smoke tests
smoke-tests/
tap-snapshots/smoke-tests-index.js-TAP.test.js
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -767,3 +767,4 @@ Eric Chow <eric.zjp.chow@gmail.com>
kbayrhammer <klaus.bayrhammer@redbull.com>
James Chen-Smith <jameschensmith@gmail.com>
Yash Singh <saiansh2525@gmail.com>
Danielle Church <dani.church@gmail.com>
28 changes: 28 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,31 @@
## v7.7.5 (2021-03-25)

### BUG FIXES

* [`95ba87622`](https://github.com/npm/cli/commit/95ba87622e00d68270eda9e071b19737718fca16)
[#2949](https://github.com/npm/cli/issues/2949)
fix handling manual indexes in `npm help`
([@dmchurch](https://github.com/dmchurch))
* [`59cf37962`](https://github.com/npm/cli/commit/59cf37962a2286e0f7d3bd37fa9c8bc3bac94218)
[#2958](https://github.com/npm/cli/issues/2958)
always set `npm.command` to canonical command name
([@isaacs](https://github.com/isaacs))
* [`1415b4bde`](https://github.com/npm/cli/commit/1415b4bdeeaabb6e0ba12b6b1b0cc56502bd64ab)
[#2964](https://github.com/npm/cli/issues/2964)
fix(config): properly translate user-agent
([@wraithgar](https://github.com/wraithgar))
* [`59271936d`](https://github.com/npm/cli/commit/59271936d90fbd6956a41967119f578c0ba63db9)
[#2965](https://github.com/npm/cli/issues/2965)
fix(config): tie save-exact/save-prefix together
([@wraithgar](https://github.com/wraithgar))

### TESTS

* [`97b415287`](https://github.com/npm/cli/commit/97b41528739460b2e9e72e09000aded412418cb2)
[#2959](https://github.com/npm/cli/issues/2959)
add smoke tests
([@ruyadorno](https://github.com/ruyadorno))

## v7.7.4 (2021-03-24)

### BUG FIXES
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Expand Up @@ -76,6 +76,9 @@ docs/content/using-npm/config.md: scripts/config-doc.js lib/utils/config/*.js
test: dev-deps
node bin/npm-cli.js test

smoke-tests: dev-deps
node bin/npm-cli.js run smoke-tests

ls-ok:
node . ls --production >/dev/null

Expand All @@ -93,7 +96,7 @@ prune:
@[[ "$(shell git status -s)" != "" ]] && echo "ERR: found unpruned files" && exit 1 || echo "git status is clean"


publish: gitclean ls-ok link test docs prune
publish: gitclean ls-ok link test smoke-tests docs prune
@git push origin :v$(shell node bin/npm-cli.js --no-timing -v) 2>&1 || true
git push origin $(BRANCH) &&\
git push origin --tags &&\
Expand Down
2 changes: 1 addition & 1 deletion lib/help.js
Expand Up @@ -9,7 +9,7 @@ const BaseCommand = require('./base-command.js')
// Strips out the number from foo.7 or foo.7. or foo.7.tgz
// We don't currently compress our man pages but if we ever did this would
// seemlessly continue supporting it
const manNumberRegex = /\.(\d+)(\..*)?$/
const manNumberRegex = /\.(\d+)(\.[^/\\]*)?$/

class Help extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
Expand Down
2 changes: 1 addition & 1 deletion lib/npm.js
Expand Up @@ -25,7 +25,7 @@ const proxyCmds = new Proxy({}, {
// old way of doing things, until we can make breaking changes to the
// npm.commands[x] api
target[actual] = new Proxy(
(args, cb) => npm[_runCmd](cmd, impl, args, cb),
(args, cb) => npm[_runCmd](actual, impl, args, cb),
{
get: (target, attr, receiver) => {
return Reflect.get(impl, attr, receiver)
Expand Down
11 changes: 10 additions & 1 deletion lib/utils/config/definitions.js
Expand Up @@ -1526,7 +1526,10 @@ define('save-exact', {
Dependencies saved to package.json will be configured with an exact
version rather than using npm's default semver range operator.
`,
flatten,
flatten (key, obj, flatOptions) {
// just call the save-prefix flattener, it reads from obj['save-exact']
definitions['save-prefix'].flatten('save-prefix', obj, flatOptions)
},
})

define('save-optional', {
Expand Down Expand Up @@ -1595,6 +1598,7 @@ define('save-prefix', {
`,
flatten (key, obj, flatOptions) {
flatOptions.savePrefix = obj['save-exact'] ? '' : obj['save-prefix']
obj['save-prefix'] = flatOptions.savePrefix
},
})

Expand Down Expand Up @@ -1970,6 +1974,11 @@ define('user-agent', {
.replace(/\{arch\}/gi, process.arch)
.replace(/\{ci\}/gi, ciName ? `ci/${ciName}` : '')
.trim()
// user-agent is a unique kind of config item that gets set from a template
// and ends up translated. Because of this, the normal "should we set this
// to process.env also doesn't work
obj[key] = flatOptions.userAgent
process.env.npm_config_user_agent = flatOptions.userAgent
},
})

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
@@ -1,5 +1,5 @@
{
"version": "7.7.4",
"version": "7.7.5",
"name": "npm",
"description": "a package manager for JavaScript",
"keywords": [
Expand Down Expand Up @@ -207,7 +207,8 @@
"lint": "npm run eslint -- test/lib test/bin \"lib/**/*.js\"",
"lintfix": "npm run lint -- --fix",
"prelint": "rimraf test/npm_cache*",
"resetdeps": "bash scripts/resetdeps.sh"
"resetdeps": "bash scripts/resetdeps.sh",
"smoke-tests": "tap smoke-tests/index.js"
},
"//": [
"XXX temporarily only run unit tests while v7 beta is in progress",
Expand Down