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

@pnpm/default-reporter

Package Overview
Dependencies
Maintainers
3
Versions
343
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/default-reporter - npm Package Compare versions

Comparing version 4.0.0-4 to 4.0.0

10

lib/index.js

@@ -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",

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