Socket
Socket
Sign inDemoInstall

@pact-foundation/pact-node

Package Overview
Dependencies
Maintainers
4
Versions
187
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pact-foundation/pact-node - npm Package Compare versions

Comparing version 10.11.7 to 10.11.8

DEVELOPER.md

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [10.11.8](https://github.com/pact-foundation/pact-node/compare/v10.11.7...v10.11.8) (2021-02-09)
### Fixes and Improvements
* **install:** Use the current working directory instead of the installed directory when finding package.json (Fixes [#234](https://github.com/pact-foundation/pact-node/issues/234)) ([30c41dc](https://github.com/pact-foundation/pact-node/commit/30c41dc422e466b67ecf79ba31408f1caca999df))
### [10.11.7](https://github.com/pact-foundation/pact-node/compare/v10.11.6...v10.11.7) (2021-02-02)

@@ -7,0 +14,0 @@

2

package.json
{
"name": "@pact-foundation/pact-node",
"version": "10.11.7",
"version": "10.11.8",
"description": "A wrapper for the Ruby version of Pact to work within Node",

@@ -5,0 +5,0 @@ "main": "src/index.js",

export declare const PACT_STANDALONE_VERSION = "1.88.37";
export declare function createConfig(): Config;
export declare function createConfig(location?: string): Config;
export declare function getBinaryEntry(platform?: string, arch?: string): BinaryEntry;

@@ -4,0 +4,0 @@ export declare function downloadChecksums(): Promise<void>;

@@ -56,4 +56,5 @@ "use strict";

}
function createConfig() {
var packageConfig = findPackageConfig(path.resolve(__dirname, '..', '..'));
function createConfig(location) {
if (location === void 0) { location = process.cwd(); }
var packageConfig = findPackageConfig(location);
var PACT_BINARY_LOCATION = packageConfig.binaryLocation || PACT_DEFAULT_LOCATION;

@@ -158,3 +159,3 @@ var CHECKSUM_SUFFIX = '.checksum';

.pipe(fs.createWriteStream(filepath))
.on('finish', function () { return resolve(); });
.on('finish', resolve);
}).catch(function (e) {

@@ -161,0 +162,0 @@ return retry-- === 0 ? throwError(e) : downloadFileRetry(url, filepath, retry);

@@ -20,3 +20,3 @@ "use strict";

describe('Install', function () {
var packageBasePath = path.resolve(__dirname, '../..');
var packageBasePath = path.resolve(__dirname, '__fixtures__');
var packagePath = path.resolve(packageBasePath, 'package.json');

@@ -28,4 +28,4 @@ beforeEach(function () {

});
function createConfig() {
return require('./install').createConfig();
function createConfig(at) {
return require('./install').createConfig(at);
}

@@ -44,7 +44,6 @@ describe('Package.json Configuration', function () {

function setBinaryLocation(location, expectation) {
packageConfig.config = {
pact_binary_location: location,
};
fs.writeFileSync(packagePath, JSON.stringify(packageConfig));
var config = createConfig();
fs.writeFileSync(packagePath, JSON.stringify(__assign({}, packageConfig, { config: {
pact_binary_location: location,
} })));
var config = createConfig(packageBasePath);
config.binaries.forEach(function (entry) {

@@ -70,7 +69,4 @@ expect(entry.downloadLocation).to.be.equal(expectation || location);

var doNotTrack = true;
packageConfig.config = {
pact_do_not_track: doNotTrack,
};
fs.writeFileSync(packagePath, JSON.stringify(packageConfig));
var config = createConfig();
fs.writeFileSync(packagePath, JSON.stringify(__assign({}, packageConfig, { config: { pact_do_not_track: doNotTrack } })));
var config = createConfig(packageBasePath);
expect(config.doNotTrack).to.be.equal(doNotTrack);

@@ -83,3 +79,3 @@ });

process.env.PACT_DO_NOT_TRACK = "" + doNotTrack;
var config = createConfig();
var config = createConfig(packageBasePath);
expect(config.doNotTrack).to.be.equal(doNotTrack);

@@ -86,0 +82,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc