Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@typescript-tools/internal-dependencies

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typescript-tools/internal-dependencies - npm Package Compare versions

Comparing version 1.3.0 to 2.0.0

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [2.0.0](https://github.com/typescript-tools/typescript-tools/compare/@typescript-tools/internal-dependencies@1.3.0...@typescript-tools/internal-dependencies@2.0.0) (2021-01-23)
**Note:** Version bump only for package @typescript-tools/internal-dependencies
# [1.3.0](https://github.com/typescript-tools/typescript-tools/compare/@typescript-tools/internal-dependencies@1.2.0...@typescript-tools/internal-dependencies@1.3.0) (2021-01-17)

@@ -8,0 +16,0 @@

17

dist/src/index.js

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

const t = __importStar(require("io-ts"));
const F = __importStar(require("fluture"));
const A = __importStar(require("fp-ts/Array"));
const E = __importStar(require("fp-ts/Either"));
const O = __importStar(require("fp-ts/Option"));
const T = __importStar(require("fp-ts/Task"));
const TE = __importStar(require("fp-ts/TaskEither"));
const IO = __importStar(require("fp-ts/IO"));
const Console = __importStar(require("fp-ts/Console"));
const Ord_1 = require("fp-ts/Ord");

@@ -63,10 +66,6 @@ const PathReporter_1 = require("io-ts/lib/PathReporter");

const unary = (f) => (a) => f(a);
// Temporary helper to infer types, see https://github.com/fluture-js/Fluture/issues/455
function map(mapper) {
return F.map(mapper);
}
// Widens the type of a particular Err into an Err
const error = (error) => error;
const decodeDocopt = (codec, docstring, options) => pipeable_1.pipe(io_ts_docopt_1.decodeDocopt(codec, docstring, options), E.mapLeft((err) => ({ type: 'docopt decode', err: PathReporter_1.PathReporter.report(E.left(err)).join('\n') })), E.map(options => F.resolve(options)), E.getOrElse(err => F.reject(err)));
const dependencyGraph = (root) => pipeable_1.pipe(dependency_graph_1.dependencyGraph(root), F.mapRej(error));
const decodeDocopt = (codec, docstring, options) => pipeable_1.pipe(io_ts_docopt_1.decodeDocopt(codec, docstring, options), E.mapLeft((err) => ({ type: 'docopt decode', err: PathReporter_1.PathReporter.report(E.left(err)).join('\n') })), TE.fromEither);
const dependencyGraph = function_1.flow(dependency_graph_1.dependencyGraph, TE.mapLeft(error));
function main() {

@@ -79,7 +78,7 @@ pipeable_1.pipe(decodeDocopt(CommandLineOptions, docstring, {

]
}), F.chain(options => pipeable_1.pipe(dependencyGraph(options.root), map(graph => pipeable_1.pipe(options.packages, A.chain(pkg => pipeable_1.pipe(O.fromNullable(graph.get(pkg)), O.getOrElseW(function_1.constant(A.empty)))))), map(dependencies => ts_pattern_1.match(options.mode)
}), TE.chain(options => pipeable_1.pipe(dependencyGraph(options.root), TE.map(graph => pipeable_1.pipe(options.packages, A.chain(pkg => pipeable_1.pipe(O.fromNullable(graph.get(pkg)), O.getOrElseW(function_1.constant(A.empty)))))), TE.map(dependencies => ts_pattern_1.match(options.mode)
.with('path', () => dependencies
.map(shades_1.get('location'))
.map(location => path.relative(options.root, location)))
.otherwise(() => dependencies.map(shades_1.get('name')))), map(A.uniq(Ord_1.ordString)), map((dependencies) => dependencies.forEach(unary(console.log))))), F.fork(error => (console.error(error), process.exit(1)))(function_1.constVoid));
.otherwise(() => dependencies.map(shades_1.get('name')))), TE.map(A.uniq(Ord_1.ordString)), TE.map((dependencies) => dependencies.forEach(unary(console.log))))), TE.fold(function_1.flow(Console.error, IO.chain(() => process.exit(1)), T.fromIO), function_1.constant(T.of(undefined))));
}

@@ -86,0 +85,0 @@ main();

{
"name": "@typescript-tools/internal-dependencies",
"version": "1.3.0",
"version": "2.0.0",
"description": "Calculate package dependencies living in the same monorepo",

@@ -52,5 +52,4 @@ "main": "dist/src/index.js",

"dependencies": {
"@typescript-tools/dependency-graph": "^1.4.0",
"@typescript-tools/io-ts": "^1.4.0",
"fluture": "^13.0.1",
"@typescript-tools/dependency-graph": "^2.0.0",
"@typescript-tools/io-ts": "^2.0.0",
"fp-ts": "^2.9.3",

@@ -113,3 +112,3 @@ "io-ts": "~2.1.3",

},
"gitHead": "f0613e503219af51d238a10b2d95fd008a5128be"
"gitHead": "48744f5830d8dbe95b9569516e434c8831eff7ee"
}

Sorry, the diff of this file is not supported yet

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