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

@oclif/plugin-update

Package Overview
Dependencies
Maintainers
0
Versions
204
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oclif/plugin-update - npm Package Compare versions

Comparing version 4.4.13-dev.2 to 4.4.13

31

dist/update.js

@@ -5,7 +5,6 @@ import { Config, ux } from '@oclif/core';

import fileSize from 'filesize';
import { HTTPError, got } from 'got';
import { got } from 'got';
import { existsSync } from 'node:fs';
import { mkdir, readFile, readdir, rm, stat, symlink, utimes, writeFile } from 'node:fs/promises';
import { basename, dirname, join } from 'node:path';
import { ProxyAgent } from 'proxy-agent';
import { Extractor } from './tar.js';

@@ -18,19 +17,2 @@ import { ls, wait } from './util.js';

};
async function httpGet(url) {
debug(`[${url}] GET`);
return got
.get(url, {
agent: { https: new ProxyAgent() },
})
.then((res) => {
debug(`[${url}] ${res.statusCode}`);
return res;
})
.catch((error) => {
debug(`[${url}] ${error.response?.statusCode ?? error.code}`);
// constructing a new HTTPError here will produce a more actionable stack trace
debug(new HTTPError(error.response));
throw error;
});
}
export class Updater {

@@ -48,3 +30,3 @@ config;

try {
const { body } = await httpGet(newIndexUrl);
const { body } = await got.get(newIndexUrl);
return typeof body === 'string' ? JSON.parse(body) : body;

@@ -267,3 +249,3 @@ }

const url = config.s3Url(s3Key);
const { body } = await httpGet(url);
const { body } = await got.get(url);
if (typeof body === 'string') {

@@ -334,6 +316,3 @@ return JSON.parse(body);

}));
debug(`Streaming ${gzUrl} to ${output}`);
const stream = got.stream(gzUrl, {
agent: { https: new ProxyAgent() },
});
const stream = got.stream(gzUrl);
stream.pause();

@@ -368,3 +347,3 @@ const baseDir = manifest.baseDir ??

try {
const { body } = await httpGet(`${config.npmRegistry ?? 'https://registry.npmjs.org'}/${config.pjson.name}`);
const { body } = await got.get(`${config.npmRegistry ?? 'https://registry.npmjs.org'}/${config.pjson.name}`);
const tags = body['dist-tags'];

@@ -371,0 +350,0 @@ const tag = Object.keys(tags).find((v) => tags[v] === version) ?? channel;

2

oclif.manifest.json

@@ -99,3 +99,3 @@ {

},
"version": "4.4.13-dev.2"
"version": "4.4.13"
}
{
"name": "@oclif/plugin-update",
"version": "4.4.13-dev.2",
"version": "4.4.13",
"author": "Salesforce",

@@ -9,7 +9,6 @@ "bugs": "https://github.com/oclif/plugin-update/issues",

"@oclif/core": "^4",
"ansis": "^3.2.1",
"ansis": "^3.3.2",
"debug": "^4.3.5",
"filesize": "^6.1.0",
"got": "^13",
"proxy-agent": "^6.4.0",
"semver": "^7.6.3",

@@ -16,0 +15,0 @@ "tar-fs": "^2.1.1",

@@ -58,3 +58,3 @@ # @oclif/plugin-update

_See code: [src/commands/update.ts](https://github.com/oclif/plugin-update/blob/v4.4.13-dev.2/src/commands/update.ts)_
_See code: [src/commands/update.ts](https://github.com/oclif/plugin-update/blob/v4.4.13/src/commands/update.ts)_
<!-- commandsstop -->

@@ -61,0 +61,0 @@

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