@typescript-tools/lerna-utils
Advanced tools
Comparing version 1.4.0 to 2.0.0
@@ -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 @@ |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2
11005
42
+ Added@typescript-tools/io-ts@2.2.0(transitive)
- Removedexeca@^4.1.0
- Removedfluture@^13.0.1
- Removed@typescript-tools/io-ts@1.4.0(transitive)
- Removedcross-spawn@7.0.6(transitive)
- Removedend-of-stream@1.4.4(transitive)
- Removedexeca@4.1.0(transitive)
- Removedfluture@13.0.1(transitive)
- Removedget-stream@5.2.0(transitive)
- Removedhuman-signals@1.1.1(transitive)
- Removedis-stream@2.0.1(transitive)
- Removedisexe@2.0.0(transitive)
- Removedmerge-stream@2.0.0(transitive)
- Removedmimic-fn@2.1.0(transitive)
- Removednpm-run-path@4.0.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedonetime@5.1.2(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedpump@3.0.2(transitive)
- Removedsanctuary-show@2.0.0(transitive)
- Removedsanctuary-type-identifiers@3.0.0(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedstrip-final-newline@2.0.0(transitive)
- Removedwhich@2.0.2(transitive)
- Removedwrappy@1.0.2(transitive)