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

@yarnpkg/plugin-link

Package Overview
Dependencies
Maintainers
5
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 2.0.0-rc.11 to 2.0.0-rc.12

4

lib/LinkFetcher.d.ts
import { Fetcher, FetchOptions, MinimalFetchOptions } from '@yarnpkg/core';
import { Locator } from '@yarnpkg/core';
import { JailFS, PortablePath } from '@yarnpkg/fslib';
import { CwdFS, JailFS, PortablePath } from '@yarnpkg/fslib';
export declare class LinkFetcher implements Fetcher {

@@ -8,3 +8,3 @@ supports(locator: Locator, opts: MinimalFetchOptions): boolean;

fetch(locator: Locator, opts: FetchOptions): Promise<{
packageFs: JailFS;
packageFs: CwdFS;
releaseFs: (() => void) | undefined;

@@ -11,0 +11,0 @@ prefixPath: PortablePath;

@@ -26,3 +26,3 @@ "use strict";

const parentFetch = fslib_1.ppath.isAbsolute(path)
? { packageFs: new fslib_1.NodeFS(), prefixPath: fslib_1.PortablePath.root, localPath: fslib_1.PortablePath.root }
? { packageFs: new fslib_1.CwdFS(fslib_1.PortablePath.root), prefixPath: fslib_1.PortablePath.dot, localPath: fslib_1.PortablePath.root }
: await opts.fetcher.fetch(parentLocator, opts);

@@ -32,3 +32,3 @@ // If the package fs publicized its "original location" (for example like

const effectiveParentFetch = parentFetch.localPath
? { packageFs: new fslib_1.NodeFS(), prefixPath: parentFetch.localPath }
? { packageFs: new fslib_1.CwdFS(fslib_1.PortablePath.root), prefixPath: fslib_1.ppath.relative(fslib_1.PortablePath.root, parentFetch.localPath) }
: parentFetch;

@@ -39,8 +39,8 @@ // Discard the parent fs unless we really need it to access the files

const sourceFs = effectiveParentFetch.packageFs;
const sourcePath = fslib_1.ppath.resolve(effectiveParentFetch.prefixPath, path);
const sourcePath = fslib_1.ppath.join(effectiveParentFetch.prefixPath, path);
if (parentFetch.localPath) {
return { packageFs: new fslib_1.JailFS(sourcePath, { baseFs: sourceFs }), releaseFs: effectiveParentFetch.releaseFs, prefixPath: fslib_1.PortablePath.root, localPath: sourcePath };
return { packageFs: new fslib_1.CwdFS(sourcePath, { baseFs: sourceFs }), releaseFs: effectiveParentFetch.releaseFs, prefixPath: fslib_1.PortablePath.dot, localPath: sourcePath };
}
else {
return { packageFs: new fslib_1.JailFS(sourcePath, { baseFs: sourceFs }), releaseFs: effectiveParentFetch.releaseFs, prefixPath: fslib_1.PortablePath.root };
return { packageFs: new fslib_1.JailFS(sourcePath, { baseFs: sourceFs }), releaseFs: effectiveParentFetch.releaseFs, prefixPath: fslib_1.PortablePath.dot };
}

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

@@ -41,5 +41,15 @@ "use strict";

}, packageFetch.releaseFs);
return Object.assign(Object.assign({}, locator), { version: manifest.version || `0.0.0`, languageName: opts.project.configuration.get(`defaultLanguageName`), linkType: core_2.LinkType.SOFT, dependencies: new Map([...manifest.dependencies, ...manifest.devDependencies]), peerDependencies: manifest.peerDependencies, dependenciesMeta: manifest.dependenciesMeta, peerDependenciesMeta: manifest.peerDependenciesMeta, bin: manifest.bin });
return {
...locator,
version: manifest.version || `0.0.0`,
languageName: opts.project.configuration.get(`defaultLanguageName`),
linkType: core_2.LinkType.SOFT,
dependencies: new Map([...manifest.dependencies, ...manifest.devDependencies]),
peerDependencies: manifest.peerDependencies,
dependenciesMeta: manifest.dependenciesMeta,
peerDependenciesMeta: manifest.peerDependenciesMeta,
bin: manifest.bin,
};
}
}
exports.LinkResolver = LinkResolver;
import { Fetcher, FetchOptions, MinimalFetchOptions } from '@yarnpkg/core';
import { Locator } from '@yarnpkg/core';
import { JailFS, PortablePath } from '@yarnpkg/fslib';
import { CwdFS, JailFS, PortablePath } from '@yarnpkg/fslib';
export declare class RawLinkFetcher implements Fetcher {

@@ -8,3 +8,3 @@ supports(locator: Locator, opts: MinimalFetchOptions): boolean;

fetch(locator: Locator, opts: FetchOptions): Promise<{
packageFs: JailFS;
packageFs: CwdFS;
releaseFs: (() => void) | undefined;

@@ -11,0 +11,0 @@ prefixPath: PortablePath;

@@ -26,3 +26,3 @@ "use strict";

const parentFetch = fslib_1.ppath.isAbsolute(path)
? { packageFs: new fslib_1.NodeFS(), prefixPath: fslib_1.PortablePath.root, localPath: fslib_1.PortablePath.root }
? { packageFs: new fslib_1.CwdFS(fslib_1.PortablePath.root), prefixPath: fslib_1.PortablePath.dot, localPath: fslib_1.PortablePath.root }
: await opts.fetcher.fetch(parentLocator, opts);

@@ -32,3 +32,3 @@ // If the package fs publicized its "original location" (for example like

const effectiveParentFetch = parentFetch.localPath
? { packageFs: new fslib_1.NodeFS(), prefixPath: parentFetch.localPath }
? { packageFs: new fslib_1.CwdFS(fslib_1.PortablePath.root), prefixPath: fslib_1.ppath.relative(fslib_1.PortablePath.root, parentFetch.localPath) }
: parentFetch;

@@ -39,8 +39,8 @@ // Discard the parent fs unless we really need it to access the files

const sourceFs = effectiveParentFetch.packageFs;
const sourcePath = fslib_1.ppath.resolve(effectiveParentFetch.prefixPath, path);
const sourcePath = fslib_1.ppath.join(effectiveParentFetch.prefixPath, path);
if (parentFetch.localPath) {
return { packageFs: new fslib_1.JailFS(sourcePath, { baseFs: sourceFs }), releaseFs: effectiveParentFetch.releaseFs, prefixPath: fslib_1.PortablePath.root, discardFromLookup: true, 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.root, discardFromLookup: true };
return { packageFs: new fslib_1.JailFS(sourcePath, { baseFs: sourceFs }), releaseFs: effectiveParentFetch.releaseFs, prefixPath: fslib_1.PortablePath.dot, discardFromLookup: true };
}

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

@@ -34,5 +34,15 @@ "use strict";

async resolve(locator, opts) {
return Object.assign(Object.assign({}, locator), { version: `0.0.0`, languageName: opts.project.configuration.get(`defaultLanguageName`), linkType: core_1.LinkType.SOFT, dependencies: new Map(), peerDependencies: new Map(), dependenciesMeta: new Map(), peerDependenciesMeta: new Map(), bin: new Map() });
return {
...locator,
version: `0.0.0`,
languageName: opts.project.configuration.get(`defaultLanguageName`),
linkType: core_1.LinkType.SOFT,
dependencies: new Map(),
peerDependencies: new Map(),
dependenciesMeta: new Map(),
peerDependenciesMeta: new Map(),
bin: new Map(),
};
}
}
exports.RawLinkResolver = RawLinkResolver;
{
"name": "@yarnpkg/plugin-link",
"version": "2.0.0-rc.11",
"version": "2.0.0-rc.12",
"license": "BSD-2-Clause",
"main": "./lib/index.js",
"dependencies": {
"@yarnpkg/fslib": "^2.0.0-rc.15"
"@yarnpkg/fslib": "^2.0.0-rc.21"
},
"peerDependencies": {
"@yarnpkg/core": "^2.0.0-rc.20"
"@yarnpkg/core": "^2.0.0-rc.28"
},
"devDependencies": {
"@yarnpkg/core": "^2.0.0-rc.20"
"@yarnpkg/core": "^2.0.0-rc.28"
},

@@ -29,3 +30,6 @@ "repository": {

],
"engines": {
"node": ">=10.19.0"
},
"typings": "./lib/index.d.ts"
}
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