npq 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -51,8 +51,5 @@ test('running marshall tasks fails', async () => {
51
51
  }
52
52
  }
53
53
 
54
- await expect(marshalls.tasks(config)).rejects.toMatchObject({
55
- message: 'Something went wrong',
56
- context
57
- })
54
+ await expect(marshalls.tasks(config)).resolves.toMatchObject(context)
58
55
  })
package/lib/marshall.js CHANGED
@@ -28,12 +28,8 @@ class Marshall {
28
28
  packageRepoUtils: this.packageRepoUtils
29
29
  }
30
30
 
31
- return Marshalls.tasks(config).catch((ctx) => {
32
- if (ctx && ctx.context && ctx.context.marshalls) {
33
- return this.report(ctx.context.marshalls)
34
- }
35
-
36
- throw ctx
31
+ return Marshalls.tasks(config).then((ctx) => {
32
+ return this.report(ctx.marshalls)
37
33
  })
38
34
  }
39
35
 
@@ -60,10 +56,11 @@ class Marshall {
60
56
  report(marshalls) {
61
57
  const messages = this.collectPackageMessages(marshalls)
62
58
 
63
- if (!messages) {
59
+ if (!messages || Object.keys(messages).length === 0) {
64
60
  return { error: false }
65
61
  }
66
62
 
63
+ console.log()
67
64
  console.log('Detected possible issues with the following packages:')
68
65
  for (const packageName in messages) {
69
66
  const packageMessages = messages[packageName]
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- const Listr = require('listr')
3
+ const { Listr } = require('listr2')
4
4
  const { glob } = require('glob')
5
5
 
6
6
  class Marshalls {
@@ -33,6 +33,8 @@ class Marshall extends BaseMarshall {
33
33
  }
34
34
 
35
35
  validate(pkg) {
36
+ return Promise.resolve(true)
37
+
36
38
  return Promise.resolve()
37
39
  .then(() => {
38
40
  if (!pkg.packageVersion || pkg.packageVersion === 'latest') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npq",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "marshall your npm/npm package installs with high quality and class 🎖",
5
5
  "bin": {
6
6
  "npq": "./bin/npq.js",
@@ -9,8 +9,8 @@
9
9
  "scripts": {
10
10
  "lint": "eslint . --ignore-path .gitignore && npm run lint:lockfile",
11
11
  "lint:lockfile": "lockfile-lint --path package-lock.json --type npm --validate-https --allowed-hosts npm npm",
12
- "test": "jest",
13
- "test:watch": "jest --watch",
12
+ "test": "NODE_OPTIONS=\"--experimental-vm-modules\" jest",
13
+ "test:watch": "NODE_OPTIONS=\"--experimental-vm-modules\" jest --watch",
14
14
  "coverage:view": "opn coverage/lcov-report/index.html",
15
15
  "commit": "git-cz",
16
16
  "format": "prettier --config .prettierrc.js --write '**/*.js'",
@@ -172,7 +172,7 @@
172
172
  "glob": "^10.3.10",
173
173
  "inquirer": "^8.2.6",
174
174
  "kleur": "^4.1.5",
175
- "listr": "^0.14.3",
175
+ "listr2": "^7.0.1",
176
176
  "npm-package-arg": "^11.0.1",
177
177
  "pacote": "^17.0.4",
178
178
  "semver": "^7.5.4",