🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@yarnpkg/plugin-http

Package Overview
Dependencies
Maintainers
5
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yarnpkg/plugin-http - npm Package Compare versions

Comparing version
2.0.0-rc.12
to
2.0.0-rc.13
+8
-8
lib/TarballHttpFetcher.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@yarnpkg/core");
const core_2 = require("@yarnpkg/core");
const constants_1 = require("./constants");

@@ -19,5 +18,6 @@ class TarballHttpFetcher {

const expectedChecksum = opts.checksums.get(locator.locatorHash) || null;
const [packageFs, releaseFs, checksum] = await opts.cache.fetchPackageFromCache(locator, expectedChecksum, async () => {
opts.report.reportInfoOnce(core_1.MessageName.FETCH_NOT_CACHED, `${core_2.structUtils.prettyLocator(opts.project.configuration, locator)} can't be found in the cache and will be fetched from the remote server`);
return await this.fetchFromNetwork(locator, opts);
const [packageFs, releaseFs, checksum] = await opts.cache.fetchPackageFromCache(locator, expectedChecksum, {
onHit: () => opts.report.reportCacheHit(locator),
onMiss: () => opts.report.reportCacheMiss(locator, `${core_1.structUtils.prettyLocator(opts.project.configuration, locator)} can't be found in the cache and will be fetched from the remote server`),
loader: () => this.fetchFromNetwork(locator, opts),
});

@@ -27,3 +27,3 @@ return {

releaseFs,
prefixPath: core_2.structUtils.getIdentVendorPath(locator),
prefixPath: core_1.structUtils.getIdentVendorPath(locator),
checksum,

@@ -33,8 +33,8 @@ };

async fetchFromNetwork(locator, opts) {
const sourceBuffer = await core_2.httpUtils.get(locator.reference, {
const sourceBuffer = await core_1.httpUtils.get(locator.reference, {
configuration: opts.project.configuration,
});
return await core_2.tgzUtils.convertToZip(sourceBuffer, {
return await core_1.tgzUtils.convertToZip(sourceBuffer, {
compressionLevel: opts.project.configuration.get(`compressionLevel`),
prefixPath: core_2.structUtils.getIdentVendorPath(locator),
prefixPath: core_1.structUtils.getIdentVendorPath(locator),
stripComponents: 1,

@@ -41,0 +41,0 @@ });

{
"name": "@yarnpkg/plugin-http",
"version": "2.0.0-rc.12",
"version": "2.0.0-rc.13",
"main": "./lib/index.js",
"dependencies": {
"@yarnpkg/fslib": "^2.0.0-rc.18"
"@yarnpkg/fslib": "^2.0.0-rc.20"
},
"peerDependencies": {
"@yarnpkg/core": "^2.0.0-rc.26"
"@yarnpkg/core": "^2.0.0-rc.27"
},
"devDependencies": {
"@yarnpkg/core": "^2.0.0-rc.26"
"@yarnpkg/core": "^2.0.0-rc.27"
},

@@ -14,0 +14,0 @@ "repository": {