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

@oclif/plugin-update

Package Overview
Dependencies
Maintainers
2
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.12 to 4.4.13-dev.0

26

dist/update.js

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

import fileSize from 'filesize';
import { got } from 'got';
import { HTTPError, 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';

@@ -17,2 +18,19 @@ 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 {

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

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

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

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

@@ -346,3 +364,3 @@ return JSON.parse(body);

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

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

2

oclif.manifest.json

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

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

@@ -13,2 +13,3 @@ "bugs": "https://github.com/oclif/plugin-update/issues",

"got": "^13",
"proxy-agent": "^6.4.0",
"semver": "^7.6.3",

@@ -15,0 +16,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.12/src/commands/update.ts)_
_See code: [src/commands/update.ts](https://github.com/oclif/plugin-update/blob/v4.4.13-dev.0/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