New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

syncpack

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

syncpack - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0

66

CHANGELOG.md

@@ -0,1 +1,27 @@

<a name="3.0.0"></a>
# [3.0.0](https://github.com/JamieMason/syncpack/compare/2.0.1...3.0.0) (2018-08-25)
### Features
- **bin:** override package locations using repeatable --source options ([5dbcfd4](https://github.com/JamieMason/syncpack/commit/5dbcfd4))
- **list-mismatches:** return exit code on finding mismatches ([06958c6](https://github.com/JamieMason/syncpack/commit/06958c6))
### BREAKING CHANGES
- **bin:** Previously the location of package.json files could be overridden like so:
```
syncpack list './package.json' './packages/*/package.json'
```
This is now done using a repeatable `--source` option:
```
syncpack list --source './package.json' --source './packages/*/package.json'
```
This change is to make way for new commands which will also require an
overridable `--target` option.
<a name="2.0.1"></a>

@@ -7,3 +33,3 @@

* **core:** ensure pattern overrides are read ([7513ba5](https://github.com/JamieMason/syncpack/commit/7513ba5))
- **core:** ensure pattern overrides are read ([7513ba5](https://github.com/JamieMason/syncpack/commit/7513ba5))

@@ -16,7 +42,7 @@ <a name="2.0.0"></a>

* **core:** support multiple glob patterns ([a2b5af0](https://github.com/JamieMason/syncpack/commit/a2b5af0)), closes [#5](https://github.com/JamieMason/syncpack/issues/5) [#6](https://github.com/JamieMason/syncpack/issues/6)
- **core:** support multiple glob patterns ([a2b5af0](https://github.com/JamieMason/syncpack/commit/a2b5af0)), closes [#5](https://github.com/JamieMason/syncpack/issues/5) [#6](https://github.com/JamieMason/syncpack/issues/6)
### BREAKING CHANGES
* **core:** --packages option replaced with variadic arguments
- **core:** --packages option replaced with variadic arguments

@@ -29,3 +55,3 @@ <a name="1.3.2"></a>

* **core:** add set-semver-ranges command ([4d206b9](https://github.com/JamieMason/syncpack/commit/4d206b9))
- **core:** add set-semver-ranges command ([4d206b9](https://github.com/JamieMason/syncpack/commit/4d206b9))

@@ -38,4 +64,4 @@ <a name="1.2.2"></a>

* **core:** add format command ([bae1133](https://github.com/JamieMason/syncpack/commit/bae1133))
* **core:** output current version ([e53cd99](https://github.com/JamieMason/syncpack/commit/e53cd99))
- **core:** add format command ([bae1133](https://github.com/JamieMason/syncpack/commit/bae1133))
- **core:** output current version ([e53cd99](https://github.com/JamieMason/syncpack/commit/e53cd99))

@@ -52,3 +78,3 @@ <a name="1.0.2"></a>

* **core:** correct paths to binaries ([5682cd6](https://github.com/JamieMason/syncpack/commit/5682cd6))
- **core:** correct paths to binaries ([5682cd6](https://github.com/JamieMason/syncpack/commit/5682cd6))

@@ -61,16 +87,16 @@ <a name="1.0.0"></a>

* **core:** correctly check a file is package.json ([d1da609](https://github.com/JamieMason/syncpack/commit/d1da609))
* **core:** handle missing dependency maps ([372aa68](https://github.com/JamieMason/syncpack/commit/372aa68))
* **core:** handle semver ranges containing 1.x.x ([a0f8f56](https://github.com/JamieMason/syncpack/commit/a0f8f56))
- **core:** correctly check a file is package.json ([d1da609](https://github.com/JamieMason/syncpack/commit/d1da609))
- **core:** handle missing dependency maps ([372aa68](https://github.com/JamieMason/syncpack/commit/372aa68))
- **core:** handle semver ranges containing 1.x.x ([a0f8f56](https://github.com/JamieMason/syncpack/commit/a0f8f56))
### Features
* **core:** add fix-mismatches command ([4793f1f](https://github.com/JamieMason/syncpack/commit/4793f1f))
* **core:** add list command ([3b29176](https://github.com/JamieMason/syncpack/commit/3b29176))
* **core:** add list-mismatches command ([735ad2b](https://github.com/JamieMason/syncpack/commit/735ad2b))
* **core:** update command line API ([de8dcb2](https://github.com/JamieMason/syncpack/commit/de8dcb2))
- **core:** add fix-mismatches command ([4793f1f](https://github.com/JamieMason/syncpack/commit/4793f1f))
- **core:** add list command ([3b29176](https://github.com/JamieMason/syncpack/commit/3b29176))
- **core:** add list-mismatches command ([735ad2b](https://github.com/JamieMason/syncpack/commit/735ad2b))
- **core:** update command line API ([de8dcb2](https://github.com/JamieMason/syncpack/commit/de8dcb2))
### BREAKING CHANGES
* **core:** The previous commands have been replaced.
- **core:** The previous commands have been replaced.

@@ -83,3 +109,3 @@ <a name="0.3.1"></a>

* **copy-values:** write results to disk ([a641de4](https://github.com/JamieMason/syncpack/commit/a641de4))
- **copy-values:** write results to disk ([a641de4](https://github.com/JamieMason/syncpack/commit/a641de4))

@@ -92,3 +118,3 @@ <a name="0.3.0"></a>

* **cli:** add copy-values command ([b51a2c9](https://github.com/JamieMason/syncpack/commit/b51a2c9))
- **cli:** add copy-values command ([b51a2c9](https://github.com/JamieMason/syncpack/commit/b51a2c9))

@@ -101,3 +127,3 @@ <a name="0.2.1"></a>

* **core:** update dependencies, fix lint warnings ([a65eef7](https://github.com/JamieMason/syncpack/commit/a65eef7))
- **core:** update dependencies, fix lint warnings ([a65eef7](https://github.com/JamieMason/syncpack/commit/a65eef7))

@@ -110,3 +136,3 @@ <a name="0.2.0"></a>

* **sync:** synchronise versions across multiple package.json ([7d5848a](https://github.com/JamieMason/syncpack/commit/7d5848a))
- **sync:** synchronise versions across multiple package.json ([7d5848a](https://github.com/JamieMason/syncpack/commit/7d5848a))

@@ -119,2 +145,2 @@ <a name="0.1.0"></a>

* **cli:** create scaffold cli ([f6dada7](https://github.com/JamieMason/syncpack/commit/f6dada7))
- **cli:** create scaffold cli ([f6dada7](https://github.com/JamieMason/syncpack/commit/f6dada7))

@@ -0,1 +1,2 @@

#!/usr/bin/env node
export {};

@@ -10,14 +10,9 @@ #!/usr/bin/env node

var manifests_1 = require("./manifests");
var packages = [];
program
.action(function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
packages = args.filter(function (arg) { return arg && typeof arg === 'string'; });
})
.parse(process.argv);
var patterns = packages.length ? packages : constants_1.FIX_MISMATCHES.defaultPatterns;
manifests_1.setVersionsToNewestMismatch.apply(void 0, patterns).then(function (descriptors) {
var collect = function (value, values) {
if (values === void 0) { values = []; }
return values.concat(value);
};
program.option(constants_1.OPTION_SOURCES.spec, constants_1.OPTION_SOURCES.description, collect).parse(process.argv);
var sources = program.source && program.source.length ? program.source : constants_1.OPTION_SOURCES["default"];
manifests_1.setVersionsToNewestMismatch.apply(void 0, sources).then(function (descriptors) {
_.each(descriptors, function (descriptor) {

@@ -24,0 +19,0 @@ console.log(chalk_1["default"].blue("./" + path_1.relative('.', descriptor.path)));

@@ -0,1 +1,2 @@

#!/usr/bin/env node
export {};

@@ -10,14 +10,9 @@ #!/usr/bin/env node

var manifests_1 = require("./manifests");
var packages = [];
program
.action(function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
packages = args.filter(function (arg) { return arg && typeof arg === 'string'; });
})
.parse(process.argv);
var patterns = packages.length ? packages : constants_1.FORMAT.defaultPatterns;
manifests_1.format.apply(void 0, patterns).then(function (descriptors) {
var collect = function (value, values) {
if (values === void 0) { values = []; }
return values.concat(value);
};
program.option(constants_1.OPTION_SOURCES.spec, constants_1.OPTION_SOURCES.description, collect).parse(process.argv);
var sources = program.source && program.source.length ? program.source : constants_1.OPTION_SOURCES["default"];
manifests_1.format.apply(void 0, sources).then(function (descriptors) {
_.each(descriptors, function (descriptor) {

@@ -24,0 +19,0 @@ console.log(chalk_1["default"].blue("./" + path_1.relative('.', descriptor.path)));

@@ -0,1 +1,2 @@

#!/usr/bin/env node
export {};

@@ -9,17 +9,15 @@ #!/usr/bin/env node

var manifests_1 = require("./manifests");
var packages = [];
program
.action(function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
packages = args.filter(function (arg) { return arg && typeof arg === 'string'; });
})
.parse(process.argv);
var patterns = packages.length ? packages : constants_1.LIST_MISMATCHES.defaultPatterns;
manifests_1.getMismatchedVersions.apply(void 0, patterns).then(function (versionByName) {
var collect = function (value, values) {
if (values === void 0) { values = []; }
return values.concat(value);
};
program.option(constants_1.OPTION_SOURCES.spec, constants_1.OPTION_SOURCES.description, collect).parse(process.argv);
var sources = program.source && program.source.length ? program.source : constants_1.OPTION_SOURCES["default"];
manifests_1.getMismatchedVersions.apply(void 0, sources).then(function (versionByName) {
_.each(versionByName, function (versions, name) {
console.log(chalk_1["default"].yellow(name), chalk_1["default"].dim(versions.join(', ')));
});
if (versionByName.length) {
process.exit(1);
}
});

@@ -0,1 +1,2 @@

#!/usr/bin/env node
export {};

@@ -9,14 +9,9 @@ #!/usr/bin/env node

var manifests_1 = require("./manifests");
var packages = [];
program
.action(function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
packages = args.filter(function (arg) { return arg && typeof arg === 'string'; });
})
.parse(process.argv);
var patterns = packages.length ? packages : constants_1.LIST.defaultPatterns;
manifests_1.getVersions.apply(void 0, patterns).then(function (versionByName) {
var collect = function (value, values) {
if (values === void 0) { values = []; }
return values.concat(value);
};
program.option(constants_1.OPTION_SOURCES.spec, constants_1.OPTION_SOURCES.description, collect).parse(process.argv);
var sources = program.source && program.source.length ? program.source : constants_1.OPTION_SOURCES["default"];
manifests_1.getVersions.apply(void 0, sources).then(function (versionByName) {
_.each(versionByName, function (versions, name) {

@@ -23,0 +18,0 @@ if (versions.length > 1) {

@@ -0,1 +1,2 @@

#!/usr/bin/env node
export {};

@@ -10,16 +10,13 @@ #!/usr/bin/env node

var manifests_1 = require("./manifests");
var packages = [];
var collect = function (value, values) {
if (values === void 0) { values = []; }
return values.concat(value);
};
program
.option(constants_1.OPTION_SEMVER_RANGE.spec, constants_1.OPTION_SEMVER_RANGE.description)
.action(function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
packages = args.filter(function (arg) { return arg && typeof arg === 'string'; });
})
.option(constants_1.OPTION_SOURCES.spec, constants_1.OPTION_SOURCES.description, collect)
.parse(process.argv);
var semverRange = program.semverRange || constants_1.OPTION_SEMVER_RANGE["default"];
var patterns = packages.length ? packages : constants_1.SET_SEMVER_RANGES.defaultPatterns;
manifests_1.setVersionRange.apply(void 0, [semverRange].concat(patterns)).then(function (descriptors) {
var sources = program.source && program.source.length ? program.source : constants_1.OPTION_SOURCES["default"];
manifests_1.setVersionRange.apply(void 0, [semverRange].concat(sources)).then(function (descriptors) {
_.each(descriptors, function (descriptor) {

@@ -26,0 +23,0 @@ console.log(chalk_1["default"].blue("./" + path_1.relative('.', descriptor.path)));

@@ -0,1 +1,2 @@

#!/usr/bin/env node
export {};

@@ -21,3 +21,2 @@ import { IManifestKey } from './typings';

command: string;
defaultPatterns: string[];
description: string;

@@ -27,3 +26,2 @@ };

command: string;
defaultPatterns: string[];
description: string;

@@ -33,3 +31,2 @@ };

command: string;
defaultPatterns: string[];
description: string;

@@ -39,3 +36,2 @@ };

command: string;
defaultPatterns: string[];
description: string;

@@ -45,3 +41,2 @@ };

command: string;
defaultPatterns: string[];
description: string;

@@ -54,1 +49,6 @@ };

};
export declare const OPTION_SOURCES: {
default: string[];
description: string;
spec: string;
};

@@ -32,27 +32,21 @@ "use strict";

var PACKAGES_PATTERN = './packages/*/package.json';
var PACKAGES_PATTERNS = [PACKAGES_PATTERN];
var ALL_PATTERNS = [MONOREPO_PATTERN, PACKAGES_PATTERN];
exports.FIX_MISMATCHES = {
command: 'fix-mismatches [packages...]',
defaultPatterns: PACKAGES_PATTERNS,
command: 'fix-mismatches',
description: 'set dependencies used with different versions to the same version'
};
exports.FORMAT = {
command: 'format [packages...]',
defaultPatterns: ALL_PATTERNS,
command: 'format',
description: 'sort and shorten properties according to a convention'
};
exports.LIST = {
command: 'list [packages...]',
defaultPatterns: ALL_PATTERNS,
command: 'list',
description: 'list every dependency used in your packages'
};
exports.LIST_MISMATCHES = {
command: 'list-mismatches [packages...]',
defaultPatterns: PACKAGES_PATTERNS,
command: 'list-mismatches',
description: 'list every dependency used with different versions in your packages'
};
exports.SET_SEMVER_RANGES = {
command: 'set-semver-ranges [packages...]',
defaultPatterns: ALL_PATTERNS,
command: 'set-semver-ranges',
description: 'set semver ranges to the given format'

@@ -66,1 +60,6 @@ };

};
exports.OPTION_SOURCES = {
"default": ALL_PATTERNS,
description: 'glob pattern for package.json files to read from',
spec: '-s, --source [pattern]'
};
"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};

@@ -34,4 +37,4 @@ exports.__esModule = true;

var key = _a[0], value = _a[1];
var _b;
return (__assign({}, next, (_b = {}, _b[key] = value, _b)));
var _b;
}, {});

@@ -64,4 +67,4 @@ };

var key = _a[0], value = _a[1];
var _b;
return (__assign({}, obj, (_b = {}, _b[key] = value, _b)));
var _b;
}, {});

@@ -68,0 +71,0 @@ };

@@ -8,3 +8,3 @@ import { IDictionary, IManifest } from '../../typings';

export declare const manifestData: {
format: (manifests: IManifest[]) => IManifest[];
format: import("./format").Format;
getMismatchedVersions: GetMismatchedVersions;

@@ -11,0 +11,0 @@ getVersions: GetVersions;

{
"name": "syncpack",
"description": "Manage multiple package.json files in Lerna Monorepos",
"version": "2.0.1",
"version": "3.0.0",
"author": "Jamie Mason <jamie@foldleft.io> (https://github.com/JamieMason)",

@@ -15,26 +15,30 @@ "bin": {

"bugs": "https://github.com/JamieMason/syncpack/issues",
"contributors": [
"Alex Hayton (https://github.com/AlexHayton)",
"Jamie Mason (https://github.com/JamieMason)"
],
"dependencies": {
"@types/fs-extra": "5.0.2",
"@types/globby": "6.1.0",
"@types/jest": "22.2.3",
"@types/lodash": "4.14.108",
"@types/fs-extra": "5.0.4",
"@types/globby": "8.0.0",
"@types/jest": "23.3.1",
"@types/lodash": "4.14.116",
"@types/mock-fs": "3.6.30",
"@types/node": "10.0.0",
"@types/node": "10.9.2",
"@types/semver": "5.5.0",
"chalk": "2.4.1",
"commander": "2.15.1",
"fs-extra": "5.0.0",
"commander": "2.17.1",
"fs-extra": "7.0.0",
"globby": "8.0.1",
"lodash": "4.17.10",
"semver": "5.5.0"
"semver": "5.5.1"
},
"devDependencies": {
"expect-more-jest": "1.0.1",
"jest": "22.4.3",
"mock-fs": "4.4.2",
"prettier": "1.12.1",
"expect-more-jest": "2.0.0",
"jest": "23.5.0",
"mock-fs": "4.6.0",
"prettier": "1.14.2",
"rimraf": "2.6.2",
"ts-jest": "22.4.4",
"tslint": "5.9.1",
"typescript": "2.8.3"
"ts-jest": "23.1.4",
"tslint": "5.11.0",
"typescript": "3.0.1"
},

@@ -41,0 +45,0 @@ "files": [

@@ -39,1 +39,67 @@ # syncpack

```
### fix-mismatches
Set dependencies used with different versions to the same version.
```
Usage: syncpack fix-mismatches [options]
Options:
-s, --source [pattern] glob pattern for package.json files to read from
-h, --help output usage information
```
### format
Sort and shorten properties according to a convention.
```
Usage: syncpack format [options]
Options:
-s, --source [pattern] glob pattern for package.json files to read from
-h, --help output usage information
```
### list
List every dependency used in your packages.
```
Usage: syncpack list [options]
Options:
-s, --source [pattern] glob pattern for package.json files to read from
-h, --help output usage information
```
### list-mismatches
List every dependency used with different versions in your packages.
```
Usage: syncpack list-mismatches [options]
Options:
-s, --source [pattern] glob pattern for package.json files to read from
-h, --help output usage information
```
### set-semver-ranges
Set semver ranges to the given format.
```
Usage: syncpack set-semver-ranges [options]
Options:
-r, --semver-range <range> <, <=, "", ~, ^, >=, >, or *. defaults to ""
-s, --source [pattern] glob pattern for package.json files to read from
-h, --help output usage information
```
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