@pnpm/default-reporter
Advanced tools
Comparing version 4.0.0-4 to 4.0.0
@@ -22,3 +22,3 @@ "use strict"; | ||
const outputMaxWidth = opts.reportingOptions && opts.reportingOptions.outputMaxWidth || process.stdout.columns && process.stdout.columns - 2 || 80; | ||
const output$ = toOutput$(Object.assign(Object.assign({}, opts), { reportingOptions: Object.assign(Object.assign({}, opts.reportingOptions), { outputMaxWidth }) })); | ||
const output$ = toOutput$({ ...opts, reportingOptions: { ...opts.reportingOptions, outputMaxWidth } }); | ||
if (opts.reportingOptions && opts.reportingOptions.appendOnly) { | ||
@@ -61,3 +61,3 @@ output$ | ||
const rootPushStream = new zen_push_1.default(); | ||
const packageJsonPushStream = new zen_push_1.default(); | ||
const packageManifestPushStream = new zen_push_1.default(); | ||
const linkPushStream = new zen_push_1.default(); | ||
@@ -101,4 +101,4 @@ const otherPushStream = new zen_push_1.default(); | ||
break; | ||
case 'pnpm:package-json': | ||
packageJsonPushStream.next(log); | ||
case 'pnpm:package-manifest': | ||
packageManifestPushStream.next(log); | ||
break; | ||
@@ -133,3 +133,3 @@ case 'pnpm:link': | ||
other: most.from(otherPushStream.observable), | ||
packageJson: most.from(packageJsonPushStream.observable), | ||
packageManifest: most.from(packageManifestPushStream.observable), | ||
progress: most.from(progressPushStream.observable), | ||
@@ -136,0 +136,0 @@ registry: most.from(registryPushStream.observable), |
@@ -15,3 +15,3 @@ import { Config } from '@pnpm/config'; | ||
root: most.Stream<logs.RootLog>; | ||
packageJson: most.Stream<logs.PackageJsonLog>; | ||
packageManifest: most.Stream<logs.PackageManifestLog>; | ||
link: most.Stream<logs.LinkLog>; | ||
@@ -18,0 +18,0 @@ other: most.Stream<logs.Log>; |
@@ -26,3 +26,3 @@ import * as logs from '@pnpm/core-loggers'; | ||
root: most.Stream<logs.RootLog>; | ||
packageJson: most.Stream<logs.PackageJsonLog>; | ||
packageManifest: most.Stream<logs.PackageManifestLog>; | ||
}, opts: { | ||
@@ -29,0 +29,0 @@ prefix: string; |
@@ -51,14 +51,14 @@ "use strict"; | ||
}); | ||
const packageJson$ = most.fromPromise(most.merge(log$.packageJson.filter((log) => log.prefix === opts.prefix), log$.summary.filter((log) => log.prefix === opts.prefix).constant({})) | ||
const packageManifest$ = most.fromPromise(most.merge(log$.packageManifest.filter((log) => log.prefix === opts.prefix), log$.summary.filter((log) => log.prefix === opts.prefix).constant({})) | ||
.take(2) | ||
.reduce(R.merge, {})); | ||
return most.combine((pkgsDiff, packageJsons) => { | ||
if (!packageJsons['initial'] || !packageJsons['updated']) | ||
return most.combine((pkgsDiff, packageManifests) => { | ||
if (!packageManifests['initial'] || !packageManifests['updated']) | ||
return pkgsDiff; | ||
const initialPackageJson = removeOptionalFromProdDeps(packageJsons['initial']); | ||
const updatedPackageJson = removeOptionalFromProdDeps(packageJsons['updated']); | ||
const initialPackageManifest = removeOptionalFromProdDeps(packageManifests['initial']); | ||
const updatedPackageManifest = removeOptionalFromProdDeps(packageManifests['updated']); | ||
for (const depType of ['peer', 'prod', 'optional', 'dev']) { | ||
const prop = exports.propertyByDependencyType[depType]; | ||
const initialDeps = Object.keys(initialPackageJson[prop] || {}); | ||
const updatedDeps = Object.keys(updatedPackageJson[prop] || {}); | ||
const initialDeps = Object.keys(initialPackageManifest[prop] || {}); | ||
const updatedDeps = Object.keys(updatedPackageManifest[prop] || {}); | ||
const removedDeps = R.difference(initialDeps, updatedDeps); | ||
@@ -70,3 +70,3 @@ for (const removedDep of removedDeps) { | ||
name: removedDep, | ||
version: initialPackageJson[prop][removedDep], | ||
version: initialPackageManifest[prop][removedDep], | ||
}; | ||
@@ -81,3 +81,3 @@ } | ||
name: addedDep, | ||
version: updatedPackageJson[prop][addedDep], | ||
version: updatedPackageManifest[prop][addedDep], | ||
}; | ||
@@ -88,3 +88,3 @@ } | ||
return pkgsDiff; | ||
}, pkgsDiff$, packageJson$); | ||
}, pkgsDiff$, packageManifest$); | ||
} | ||
@@ -91,0 +91,0 @@ exports.default = default_1; |
@@ -75,3 +75,8 @@ "use strict"; | ||
.forEach((log) => { | ||
previousProgressStatsByRequirer[log.requester] = Object.assign({ fetched: 0, resolved: 0, reused: 0 }, previousProgressStatsByRequirer[log.requester]); | ||
previousProgressStatsByRequirer[log.requester] = { | ||
fetched: 0, | ||
resolved: 0, | ||
reused: 0, | ||
...previousProgressStatsByRequirer[log.requester], | ||
}; | ||
switch (log.status) { | ||
@@ -78,0 +83,0 @@ case 'resolved': |
@@ -33,3 +33,3 @@ "use strict"; | ||
.filter((log) => log.prefix === opts.currentPrefix) | ||
.take((opts.cmd === 'install' || opts.cmd === 'update') ? 2 : 1) | ||
.take((opts.cmd === 'install' || opts.cmd === 'install-test' || opts.cmd === 'add' || opts.cmd === 'update') ? 2 : 1) | ||
.reduce((acc, log) => { | ||
@@ -83,3 +83,3 @@ if (typeof log['added'] === 'number') { | ||
else { | ||
const value = Object.assign(Object.assign({}, stats[log.prefix]), log); | ||
const value = { ...stats[log.prefix], ...log }; | ||
delete stats[log.prefix]; | ||
@@ -86,0 +86,0 @@ return { seed: stats, value }; |
import { Config } from '@pnpm/config'; | ||
import { DeprecationLog, PackageJsonLog, RootLog, SummaryLog } from '@pnpm/core-loggers'; | ||
import { DeprecationLog, PackageManifestLog, RootLog, SummaryLog } from '@pnpm/core-loggers'; | ||
import most = require('most'); | ||
@@ -8,3 +8,3 @@ declare const _default: (log$: { | ||
root: most.Stream<RootLog>; | ||
packageJson: most.Stream<PackageJsonLog>; | ||
packageManifest: most.Stream<PackageManifestLog>; | ||
}, opts: { | ||
@@ -11,0 +11,0 @@ cwd: string; |
{ | ||
"name": "@pnpm/default-reporter", | ||
"version": "4.0.0-4", | ||
"version": "4.0.0", | ||
"description": "The default reporter of pnpm", | ||
@@ -30,3 +30,3 @@ "main": "lib/index.js", | ||
"engines": { | ||
"node": ">=8.15" | ||
"node": ">=10" | ||
}, | ||
@@ -38,6 +38,6 @@ "license": "MIT", | ||
"dependencies": { | ||
"@pnpm/config": "4.0.0-4", | ||
"@pnpm/core-loggers": "3.0.3", | ||
"@pnpm/config": "4.0.0", | ||
"@pnpm/core-loggers": "4.0.0", | ||
"@pnpm/error": "1.0.0", | ||
"@pnpm/types": "3.2.0", | ||
"@pnpm/types": "4.0.0", | ||
"@zkochan/zen-push": "1.0.0", | ||
@@ -60,3 +60,3 @@ "ansi-diff": "1.1.1", | ||
"@pnpm/default-reporter": "link:", | ||
"@pnpm/logger": "2.1.1", | ||
"@pnpm/logger": "3.1.0", | ||
"@types/common-tags": "1.8.0", | ||
@@ -63,0 +63,0 @@ "@types/ramda": "0.26.21", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
64026
1560
1
+ Added@pnpm/config@4.0.0(transitive)
+ Added@pnpm/constants@2.0.0(transitive)
+ Added@pnpm/core-loggers@4.0.0(transitive)
+ Added@pnpm/logger@3.2.3(transitive)
+ Added@pnpm/types@4.0.0(transitive)
+ Added@zkochan/bole@3.0.4(transitive)
+ Addedwhich@2.0.1(transitive)
- Removed@pnpm/config@4.0.0-4(transitive)
- Removed@pnpm/constants@2.0.0-1(transitive)
- Removed@pnpm/core-loggers@3.0.3(transitive)
- Removed@pnpm/logger@2.1.1(transitive)
- Removed@pnpm/types@3.2.0(transitive)
- Removedbole@3.0.2(transitive)
- Removedwhich@1.3.1(transitive)
Updated@pnpm/config@4.0.0
Updated@pnpm/core-loggers@4.0.0
Updated@pnpm/types@4.0.0