npq 2.5.0 → 2.5.2

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.
package/README.md CHANGED
@@ -100,6 +100,7 @@ Note: `npq` by default will offload all commands and their arguments to the `npm
100
100
  | license | Will show a warning if a package has been found without a license field | Checks the latest version for a license
101
101
  | expired domains | Will show a warning if a package has been found with one of its maintainers having an email address that includes an expired domain | Checks a dependency version for a maintainer with an expired domain
102
102
  | signatures | Will compare the package's signature as it shows on the registry's pakument with the keys published on the npmjs.com registry
103
+ | provenance | Will verify the package's attestations of provenance metadata for the published package
103
104
 
104
105
  ### Disabling Marshalls
105
106
 
@@ -9,6 +9,10 @@ jest.mock('pacote', () => {
9
9
  }
10
10
  })
11
11
 
12
+ jest.mock('node-fetch')
13
+
14
+ const fetch = require('node-fetch')
15
+
12
16
  const SignaturesMarshall = require('../lib/marshalls/signatures.marshall')
13
17
  const pacote = require('pacote')
14
18
 
@@ -46,7 +50,7 @@ describe('Signature test suites', () => {
46
50
  ]
47
51
  })
48
52
  }
49
- global.fetch = jest.fn().mockResolvedValue(mockResponse)
53
+ fetch.mockImplementationOnce(() => Promise.resolve(mockResponse))
50
54
 
51
55
  const testMarshall = new SignaturesMarshall({
52
56
  packageRepoUtils: {
@@ -103,7 +107,7 @@ describe('Signature test suites', () => {
103
107
  ]
104
108
  })
105
109
  }
106
- global.fetch = jest.fn().mockResolvedValue(mockResponse)
110
+ fetch.mockImplementationOnce(() => Promise.resolve(mockResponse))
107
111
 
108
112
  // the manifest() method should throw an error
109
113
  // in this jest mock to simulate a problem:
@@ -1,6 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  const BaseMarshall = require('./baseMarshall')
4
+ const fetch = require('node-fetch')
4
5
  const pacote = require('pacote')
5
6
 
6
7
  const MARSHALL_NAME = 'provenance'
@@ -1,6 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  const BaseMarshall = require('./baseMarshall')
4
+ const fetch = require('node-fetch')
4
5
  const pacote = require('pacote')
5
6
 
6
7
  const MARSHALL_NAME = 'signatures'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npq",
3
- "version": "2.5.0",
3
+ "version": "2.5.2",
4
4
  "description": "marshall your npm/npm package installs with high quality and class 🎖",
5
5
  "bin": {
6
6
  "npq": "./bin/npq.js",