Skip to content

Commit 4d3fc76

Browse files
committed
fix: address review comments
Signed-off-by: Michael Dawson <[email protected]>
1 parent f97c232 commit 4d3fc76

File tree

34 files changed

+69
-69
lines changed

34 files changed

+69
-69
lines changed

lib/cli/commands/show.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict'
22
const support = require('../../../index.js')
3+
const Arborist = require('@npmcli/arborist')
34

45
// print out the information for a module and its
56
// children
@@ -35,7 +36,6 @@ module.exports = function (opts) {
3536
return yargs
3637
},
3738
handler: function (argv) {
38-
const Arborist = require('@npmcli/arborist')
3939
const arb = new Arborist()
4040
arb.loadActual().then(root => {
4141
printModule(root, 0, argv).then(() => {}, (e) => {

lib/cli/commands/validate.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ module.exports = function (opts) {
3232
console.log(errorInSupportElement)
3333
console.log('Support element should either be true or an Object matching the required schema')
3434
return
35-
} else {
36-
try {
37-
support.validateSupportElement({ support: supportData }, true)
38-
} catch (e) {
39-
console.log(errorInSupportElement)
40-
console.log(e.prettyValidationErrors)
41-
return
42-
}
35+
}
36+
37+
try {
38+
support.validateSupportElement({ support: supportData }, true)
39+
} catch (e) {
40+
console.log(errorInSupportElement)
41+
console.log(e.prettyValidationErrors)
42+
return
4343
}
4444

4545
// support element was ok so validate the data itself

lib/cli/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module.exports = (options = {}) => {
5757
'log-level': ['silent', 'verbose']
5858
})
5959
.option('canonical', {
60-
describe: 'Use canaonical support info even when local info is available',
60+
describe: 'Use canonical support info even when local info is available',
6161
type: 'boolean',
6262
group: 'preferences'
6363
})

test/cli/show-local-escape-ok/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@pkgjs/support-show-local-escape-ok",
33
"version": "0.0.1",
4-
"support": "../../artifacts/MySupportInfo.json",
4+
"support": "../../fixtures/my-support-info.json",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/pkgjs/support.git"

test/cli/show-local-escape/expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@pkgjs/support-show-local-escape(0.0.1) - https://github.com/pkgjs/support/blob/master/MySupportInfo.json
1+
@pkgjs/support-show-local-escape(0.0.1) - https://github.com/pkgjs/support/blob/master/my-support-info.json

test/cli/show-local-escape/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@pkgjs/support-show-local-escape",
33
"version": "0.0.1",
4-
"support": "../artifacts/MySupportInfo.json",
4+
"support": "../fixtures/my-support-info.json",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/pkgjs/support.git"

test/cli/show-local-path1/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@pkgjs/support-show-local-path1",
33
"version": "0.0.1",
4-
"support": "./MySupportInfo.json",
4+
"support": "./my-support-info.json",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/pkgjs/support-show-local-path1.git"

test/cli/show-local-path2/expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@pkgjs/show-local-path2(0.0.1) - https://github.com/pkgjs/show-local-path2/blob/master/subdir/MySupportInfo.json
1+
@pkgjs/show-local-path2(0.0.1) - https://github.com/pkgjs/show-local-path2/blob/master/subdir/my-support-info.json

test/cli/show-local-path2/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@pkgjs/show-local-path2",
33
"version": "0.0.1",
4-
"support": "./subdir/MySupportInfo.json",
4+
"support": "./subdir/my-support-info.json",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/pkgjs/show-local-path2.git"

0 commit comments

Comments
 (0)