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/v8.1.4 #4066

Merged
merged 25 commits into from
Nov 18, 2021
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2256454
chore: update to latest eslint and linting rules
wraithgar Nov 4, 2021
203fedf
chore: [email protected] @npmcli/[email protected]
wraithgar Nov 8, 2021
2039184
docs: By default npm ignores .gitignore and .npmignore
danielcobo Nov 7, 2021
b8d6089
chore: refactor pack tests
wraithgar Nov 8, 2021
7887fb3
fix: don't try to open file:/// urls
wraithgar Nov 9, 2021
cd6d3a9
fix: explicitly allow `npm help` to open file:/// man pages
wraithgar Nov 9, 2021
5cf6068
fix: clean up birthday command
wraithgar Nov 10, 2021
ac4f9e4
chore: clean up snapshots
wraithgar Nov 8, 2021
72ca4a4
fix: command completion
wraithgar Nov 10, 2021
b789491
fix(install): command completion with single match
wraithgar Nov 9, 2021
ea352f5
chore: switch to true static attributes
wraithgar Nov 3, 2021
201df17
chore: refactor audit tests
wraithgar Nov 10, 2021
9868e7e
docs: turn off smart quotes, update doctype and charset
Nov 15, 2021
ea2906c
docs: fix typo in npm install docs
MansurAliKoroglu Nov 17, 2021
44e39ce
separate github actions for workspaces
fritzy Nov 16, 2021
654908f
chore: more faithfully mock global.process in test
isaacs Nov 18, 2021
7b4aa59
deps: [email protected], [email protected]
isaacs Nov 17, 2021
0801585
deps: [email protected]
wraithgar Nov 16, 2021
ca59987
chore(docs): [email protected]
wraithgar Nov 15, 2021
4496ac4
chore(docs): [email protected]
wraithgar Nov 15, 2021
088c116
deps: [email protected]
wraithgar Nov 15, 2021
44bfa37
dep: @npmcli/arborist 4.0.5
fritzy Nov 18, 2021
986e7c4
docs: changelog for v8.1.4
fritzy Nov 18, 2021
e219397
update AUTHORS
fritzy Nov 18, 2021
940ba87
8.1.4
fritzy Nov 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: refactor pack tests
Uses the real npm object and doesn't mock anything.

PR-URL: #4018
Credit: @wraithgar
Close: #4018
Reviewed-by: @lukekarrys
wraithgar committed Nov 9, 2021
commit b8d608929f395d2d2fca4cb05905c5ef712c0faa
78 changes: 78 additions & 0 deletions tap-snapshots/test/lib/commands/pack.js.test.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/* IMPORTANT
* This snapshot file is auto-generated, but designed for humans.
* It should be checked into source control and tracked carefully.
* Re-generate by setting TAP_SNAPSHOT=1 and running tests.
* Make sure to inspect the output below. Do not ignore changes!
*/
'use strict'
exports[`test/lib/commands/pack.js TAP dry run > logs pack contents 1`] = `
Array [
undefined,
"package: [email protected]",
undefined,
"41B package.json",
undefined,
String(
name: test-package
version: 1.0.0
filename: test-package-1.0.0.tgz
package size: 136 B
unpacked size: 41 B
shasum: a92a0679a70a450f14f98a468756948a679e4107
integrity: sha512-Gka9ZV/Bryxky[...]LgMJ+0F+FhXMA==
total files: 1
),
"",
]
`

exports[`test/lib/commands/pack.js TAP should log output as valid json > logs pack contents 1`] = `
Array []
`

exports[`test/lib/commands/pack.js TAP should log output as valid json > outputs as json 1`] = `
Array [
Array [
Object {
"bundled": Array [],
"entryCount": 1,
"filename": "test-package-1.0.0.tgz",
"files": Array [
Object {
"mode": 420,
"path": "package.json",
"size": 41,
},
],
"id": "[email protected]",
"integrity": "sha512-Gka9ZV/BryxkypfvMpTvLfaJE1AUi7PK1EAbYqnVzqtucf6QvUK4CFsLVzagY1GwZVx2T1jwWLgMJ+0F+FhXMA==",
"name": "test-package",
"shasum": "a92a0679a70a450f14f98a468756948a679e4107",
"size": 136,
"unpackedSize": 41,
"version": "1.0.0",
},
],
]
`

exports[`test/lib/commands/pack.js TAP should pack current directory with no arguments > logs pack contents 1`] = `
Array [
undefined,
"package: [email protected]",
undefined,
"41B package.json",
undefined,
String(
name: test-package
version: 1.0.0
filename: test-package-1.0.0.tgz
package size: 136 B
unpacked size: 41 B
shasum: a92a0679a70a450f14f98a468756948a679e4107
integrity: sha512-Gka9ZV/Bryxky[...]LgMJ+0F+FhXMA==
total files: 1
),
"",
]
`
1 change: 1 addition & 0 deletions test/fixtures/mock-npm.js
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@ const RealMockNpm = (t, otherMocks = {}) => {
mock.joinedOutput = () => {
return mock.outputs.map(o => o.join(' ')).join('\n')
}
mock.filteredLogs = title => mock.logs.filter(([t]) => t === title).map(([, , msg]) => msg)
const Npm = t.mock('../../lib/npm.js', otherMocks)
class MockNpm extends Npm {
constructor () {
Loading