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

@yarnpkg/plugin-link

Package Overview
Dependencies
Maintainers
6
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yarnpkg/plugin-link - npm Package Compare versions

Comparing version 3.0.0-rc.18 to 3.0.0-rc.20

lib/PortalFetcher.d.ts

4

lib/constants.d.ts

@@ -1,2 +0,2 @@

export declare const LINK_PROTOCOL = "portal:";
export declare const RAW_LINK_PROTOCOL = "link:";
export declare const PORTAL_PROTOCOL = "portal:";
export declare const LINK_PROTOCOL = "link:";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RAW_LINK_PROTOCOL = exports.LINK_PROTOCOL = void 0;
exports.LINK_PROTOCOL = `portal:`;
exports.RAW_LINK_PROTOCOL = `link:`;
exports.LINK_PROTOCOL = exports.PORTAL_PROTOCOL = void 0;
exports.PORTAL_PROTOCOL = `portal:`;
exports.LINK_PROTOCOL = `link:`;
import { Plugin } from '@yarnpkg/core';
import { LinkFetcher } from './LinkFetcher';
import { LinkResolver } from './LinkResolver';
import { PortalFetcher } from './PortalFetcher';
import { PortalResolver } from './PortalResolver';
export { PortalFetcher };
export { PortalResolver };
export { LinkFetcher };
export { LinkResolver };
declare const plugin: Plugin;
export default plugin;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LinkResolver = exports.LinkFetcher = exports.PortalResolver = exports.PortalFetcher = void 0;
const LinkFetcher_1 = require("./LinkFetcher");
Object.defineProperty(exports, "LinkFetcher", { enumerable: true, get: function () { return LinkFetcher_1.LinkFetcher; } });
const LinkResolver_1 = require("./LinkResolver");
const RawLinkFetcher_1 = require("./RawLinkFetcher");
const RawLinkResolver_1 = require("./RawLinkResolver");
Object.defineProperty(exports, "LinkResolver", { enumerable: true, get: function () { return LinkResolver_1.LinkResolver; } });
const PortalFetcher_1 = require("./PortalFetcher");
Object.defineProperty(exports, "PortalFetcher", { enumerable: true, get: function () { return PortalFetcher_1.PortalFetcher; } });
const PortalResolver_1 = require("./PortalResolver");
Object.defineProperty(exports, "PortalResolver", { enumerable: true, get: function () { return PortalResolver_1.PortalResolver; } });
const plugin = {
fetchers: [
RawLinkFetcher_1.RawLinkFetcher,
LinkFetcher_1.LinkFetcher,
PortalFetcher_1.PortalFetcher,
],
resolvers: [
RawLinkResolver_1.RawLinkResolver,
LinkResolver_1.LinkResolver,
PortalResolver_1.PortalResolver,
],

@@ -16,0 +21,0 @@ };

@@ -11,2 +11,3 @@ import { Fetcher, FetchOptions, MinimalFetchOptions } from '@yarnpkg/core';

prefixPath: PortablePath;
discardFromLookup: boolean;
localPath: PortablePath;

@@ -17,4 +18,5 @@ } | {

prefixPath: PortablePath;
discardFromLookup: boolean;
localPath?: undefined;
}>;
}

@@ -41,6 +41,6 @@ "use strict";

if (parentFetch.localPath) {
return { packageFs: new fslib_1.CwdFS(sourcePath, { baseFs: sourceFs }), releaseFs: effectiveParentFetch.releaseFs, prefixPath: fslib_1.PortablePath.dot, localPath: sourcePath };
return { packageFs: new fslib_1.CwdFS(sourcePath, { baseFs: sourceFs }), releaseFs: effectiveParentFetch.releaseFs, prefixPath: fslib_1.PortablePath.dot, discardFromLookup: true, localPath: sourcePath };
}
else {
return { packageFs: new fslib_1.JailFS(sourcePath, { baseFs: sourceFs }), releaseFs: effectiveParentFetch.releaseFs, prefixPath: fslib_1.PortablePath.dot };
return { packageFs: new fslib_1.JailFS(sourcePath, { baseFs: sourceFs }), releaseFs: effectiveParentFetch.releaseFs, prefixPath: fslib_1.PortablePath.dot, discardFromLookup: true };
}

@@ -47,0 +47,0 @@ }

@@ -1,3 +0,4 @@

import { Resolver, ResolveOptions, MinimalResolveOptions } from '@yarnpkg/core';
import { Descriptor, Locator, Package } from '@yarnpkg/core';
import { Resolver, ResolveOptions, MinimalResolveOptions, Package } from '@yarnpkg/core';
import { Descriptor, Locator } from '@yarnpkg/core';
import { LinkType } from '@yarnpkg/core';
export declare class LinkResolver implements Resolver {

@@ -14,3 +15,18 @@ supportsDescriptor(descriptor: Descriptor, opts: MinimalResolveOptions): boolean;

}>;
resolve(locator: Locator, opts: ResolveOptions): Promise<Package>;
resolve(locator: Locator, opts: ResolveOptions): Promise<{
version: string;
languageName: string;
linkType: LinkType;
conditions: null;
dependencies: Map<any, any>;
peerDependencies: Map<any, any>;
dependenciesMeta: Map<any, any>;
peerDependenciesMeta: Map<any, any>;
bin: Map<any, any>;
locatorHash: import("@yarnpkg/core").LocatorHash;
reference: string;
identHash: import("@yarnpkg/core").IdentHash;
scope: string | null;
name: string;
}>;
}

@@ -6,3 +6,2 @@ "use strict";

const core_2 = require("@yarnpkg/core");
const core_3 = require("@yarnpkg/core");
const fslib_1 = require("@yarnpkg/fslib");

@@ -25,4 +24,4 @@ const constants_1 = require("./constants");

bindDescriptor(descriptor, fromLocator, opts) {
return core_3.structUtils.bindDescriptor(descriptor, {
locator: core_3.structUtils.stringifyLocator(fromLocator),
return core_2.structUtils.bindDescriptor(descriptor, {
locator: core_2.structUtils.stringifyLocator(fromLocator),
});

@@ -35,3 +34,3 @@ }

const path = descriptor.range.slice(constants_1.LINK_PROTOCOL.length);
return [core_3.structUtils.makeLocator(descriptor, `${constants_1.LINK_PROTOCOL}${fslib_1.npath.toPortablePath(path)}`)];
return [core_2.structUtils.makeLocator(descriptor, `${constants_1.LINK_PROTOCOL}${fslib_1.npath.toPortablePath(path)}`)];
}

@@ -46,19 +45,13 @@ async getSatisfying(descriptor, dependencies, locators, opts) {

async resolve(locator, opts) {
if (!opts.fetchOptions)
throw new Error(`Assertion failed: This resolver cannot be used unless a fetcher is configured`);
const packageFetch = await opts.fetchOptions.fetcher.fetch(locator, opts.fetchOptions);
const manifest = await core_3.miscUtils.releaseAfterUseAsync(async () => {
return await core_1.Manifest.find(packageFetch.prefixPath, { baseFs: packageFetch.packageFs });
}, packageFetch.releaseFs);
return {
...locator,
version: manifest.version || `0.0.0`,
languageName: manifest.languageName || opts.project.configuration.get(`defaultLanguageName`),
linkType: core_2.LinkType.SOFT,
conditions: manifest.getConditions(),
dependencies: opts.project.configuration.normalizeDependencyMap(manifest.dependencies),
peerDependencies: manifest.peerDependencies,
dependenciesMeta: manifest.dependenciesMeta,
peerDependenciesMeta: manifest.peerDependenciesMeta,
bin: manifest.bin,
version: `0.0.0`,
languageName: opts.project.configuration.get(`defaultLanguageName`),
linkType: core_1.LinkType.SOFT,
conditions: null,
dependencies: new Map(),
peerDependencies: new Map(),
dependenciesMeta: new Map(),
peerDependenciesMeta: new Map(),
bin: new Map(),
};

@@ -65,0 +58,0 @@ }

{
"name": "@yarnpkg/plugin-link",
"version": "3.0.0-rc.18",
"version": "3.0.0-rc.20",
"license": "BSD-2-Clause",
"main": "./lib/index.js",
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
},
"dependencies": {
"@yarnpkg/fslib": "^3.0.0-rc.18",
"@yarnpkg/fslib": "^3.0.0-rc.20",
"tslib": "^2.4.0"
},
"peerDependencies": {
"@yarnpkg/core": "^4.0.0-rc.18"
"@yarnpkg/core": "^4.0.0-rc.20"
},
"devDependencies": {
"@yarnpkg/core": "^4.0.0-rc.18"
"@yarnpkg/core": "^4.0.0-rc.20"
},

@@ -27,3 +31,6 @@ "repository": {

"main": "./lib/index.js",
"typings": "./lib/index.d.ts"
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
},

@@ -36,4 +43,3 @@ "files": [

},
"stableVersion": "2.2.0",
"typings": "./lib/index.d.ts"
"stableVersion": "2.2.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