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

@typescript-tools/lerna-utils

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typescript-tools/lerna-utils - npm Package Compare versions

Comparing version 1.4.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/lerna-utils@1.4.0...@typescript-tools/lerna-utils@2.0.0) (2021-01-23)
**Note:** Version bump only for package @typescript-tools/lerna-utils
# [1.4.0](https://github.com/typescript-tools/typescript-tools/compare/@typescript-tools/lerna-utils@1.3.0...@typescript-tools/lerna-utils@1.4.0) (2021-01-17)

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

11

dist/src/lerna-utils.d.ts

@@ -7,10 +7,5 @@ /**

import * as fs from 'fs';
import * as F from 'fluture';
import { LernaPackage } from '@typescript-tools/io-ts/dist/lib/LernaPackage';
export declare const readFile: (file: fs.PathLike) => F.FutureInstance<NodeJS.ErrnoException, string>;
export declare const writeFile: (file: fs.PathLike) => (contents: string) => F.FutureInstance<NodeJS.ErrnoException, void>;
/**
* Get list of all lerna packages from `lerna list --all`.
*/
export declare function lernaPackages(root: string): F.FutureInstance<unknown, LernaPackage[]>;
import * as TE from 'fp-ts/TaskEither';
export declare const readFile: (a: string | number | Buffer | import("url").URL) => TE.TaskEither<NodeJS.ErrnoException, string>;
export declare const writeFile: (filename: fs.PathLike) => (contents: string) => TE.TaskEither<NodeJS.ErrnoException, void>;
//# sourceMappingURL=lerna-utils.d.ts.map

@@ -25,35 +25,11 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.lernaPackages = exports.writeFile = exports.readFile = void 0;
exports.writeFile = exports.readFile = void 0;
const fs = __importStar(require("fs"));
const t = __importStar(require("io-ts"));
const E = __importStar(require("fp-ts/Either"));
const F = __importStar(require("fluture"));
const execa_1 = __importDefault(require("execa"));
const function_1 = require("fp-ts/lib/function");
const LernaPackage_1 = require("@typescript-tools/io-ts/dist/lib/LernaPackage");
const StringifiedJSON_1 = require("@typescript-tools/io-ts/dist/lib/StringifiedJSON");
const readFile = (file) => F.node(done => fs.readFile(file, 'utf8', done));
exports.readFile = readFile;
const writeFile = (file) => (contents) => F.node(done => fs.writeFile(file, contents, done));
const TE = __importStar(require("fp-ts/TaskEither"));
const function_1 = require("fp-ts/function");
exports.readFile = function_1.flow(TE.taskify(fs.readFile), TE.map(buffer => buffer.toString()));
const writeFile = (filename) => (contents) => write(filename, contents, {});
exports.writeFile = writeFile;
// TODO: pull into its own package
/**
* Get list of all lerna packages from `lerna list --all`.
*/
function lernaPackages(root) {
return F.Future((reject, resolve) => {
const subcommand = execa_1.default.command('npx lerna list --all --json', { cwd: root });
subcommand
.then(({ stdout }) => function_1.pipe(stdout, StringifiedJSON_1.StringifiedJSON(t.array(LernaPackage_1.LernaPackage)).decode.bind(null), E.fold(reject, resolve)))
.catch(reject);
return function onCancel() {
subcommand.cancel();
};
});
}
exports.lernaPackages = lernaPackages;
const write = TE.taskify(fs.writeFile);
//# sourceMappingURL=lerna-utils.js.map
{
"name": "@typescript-tools/lerna-utils",
"version": "1.4.0",
"version": "2.0.0",
"description": "Internal utilities for interacting with a lerna monorepo",

@@ -49,5 +49,3 @@ "main": "dist/src/lerna-utils.js",

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

@@ -101,3 +99,3 @@ },

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

Sorry, the diff of this file is not supported yet

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