@typescript-tools/lerna-packages
Advanced tools
Comparing version 1.1.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-packages@1.1.0...@typescript-tools/lerna-packages@2.0.0) (2021-01-23) | ||
**Note:** Version bump only for package @typescript-tools/lerna-packages | ||
# 1.1.0 (2021-01-17) | ||
@@ -8,0 +16,0 @@ |
@@ -5,3 +5,3 @@ /** | ||
*/ | ||
import * as F from 'fluture'; | ||
import * as TE from 'fp-ts/TaskEither'; | ||
import { MonorepoRootErr } from '@typescript-tools/monorepo-root'; | ||
@@ -19,3 +19,3 @@ import { LernaPackage } from '@typescript-tools/io-ts/dist/lib/LernaPackage'; | ||
*/ | ||
export declare function lernaPackages(root?: string): F.FutureInstance<PackageDiscoveryError, LernaPackage[]>; | ||
export declare function lernaPackages(root?: string): TE.TaskEither<PackageDiscoveryError, LernaPackage[]>; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -31,4 +31,4 @@ "use strict"; | ||
const t = __importStar(require("io-ts")); | ||
const F = __importStar(require("fluture")); | ||
const E = __importStar(require("fp-ts/Either")); | ||
const TE = __importStar(require("fp-ts/TaskEither")); | ||
const function_1 = require("fp-ts/function"); | ||
@@ -43,3 +43,3 @@ const PathReporter_1 = require("io-ts/lib/PathReporter"); | ||
const monorepoRoot = () => function_1.pipe(monorepo_root_1.monorepoRoot(), E.mapLeft(error)); | ||
const decodeLernaPackages = (packages) => function_1.pipe(StringifiedJSON_1.StringifiedJSON(t.array(LernaPackage_1.LernaPackage)).decode(packages), E.mapLeft(errors => PathReporter_1.PathReporter.report(E.left(errors)).join('\n')), E.mapLeft(err => error({ type: 'unable to decode list of packages', err }))); | ||
const decodeLernaPackages = (packages) => function_1.pipe(StringifiedJSON_1.StringifiedJSON(t.array(LernaPackage_1.LernaPackage)).decode(packages), E.mapLeft(errors => PathReporter_1.PathReporter.report(E.left(errors)).join('\n')), E.mapLeft(err => error({ type: 'unable to decode list of packages', err })), TE.fromEither); | ||
/** | ||
@@ -49,13 +49,5 @@ * Search the monorepo and enumerate all internal packages. | ||
function lernaPackages(root) { | ||
return function_1.pipe(E.fromNullable(function_1.absurd)(root), E.orElse(monorepoRoot), E.map(root => F.Future((reject, resolve) => { | ||
const subcommand = execa_1.default.command('npx lerna list --all --json', { cwd: root }); | ||
subcommand | ||
.then(({ stdout }) => function_1.pipe(decodeLernaPackages(stdout), E.fold(reject, resolve))) | ||
.catch(err => reject(error({ type: 'unable to discover internal packages', err }))); | ||
return function onCancel() { | ||
subcommand.cancel(); | ||
}; | ||
})), E.mapLeft(error), E.getOrElseW(F.reject)); | ||
return function_1.pipe(E.fromNullable(function_1.absurd)(root), E.orElse(monorepoRoot), TE.fromEither, TE.chain(root => TE.tryCatch(() => execa_1.default.command('npx lerna list --all --json', { cwd: root }), err => error({ type: 'unable to discover internal packages', err }))), TE.map(({ stdout }) => stdout), TE.chain(decodeLernaPackages), TE.mapLeft(error)); | ||
} | ||
exports.lernaPackages = lernaPackages; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@typescript-tools/lerna-packages", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"description": "Discover internal packages", | ||
@@ -45,6 +45,5 @@ "homepage": "https://github.com/typescript-tools/typescript-tools", | ||
"dependencies": { | ||
"@typescript-tools/io-ts": "^1.4.0", | ||
"@typescript-tools/io-ts": "^2.0.0", | ||
"@typescript-tools/monorepo-root": "^1.2.0", | ||
"execa": "^4.1.0", | ||
"fluture": "^13.0.1", | ||
"fp-ts": "^2.9.3", | ||
@@ -102,3 +101,3 @@ "io-ts": "~2.1.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
5
9964
69
+ Added@typescript-tools/io-ts@2.2.0(transitive)
- Removedfluture@^13.0.1
- Removed@typescript-tools/io-ts@1.4.0(transitive)
- Removedfluture@13.0.1(transitive)
- Removedsanctuary-show@2.0.0(transitive)
- Removedsanctuary-type-identifiers@3.0.0(transitive)