@yarnpkg/plugin-link
Advanced tools
Comparing version 2.0.0-rc.11 to 2.0.0-rc.12
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" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
14933
0
295
0
+ Addeddunder-proto@1.0.0(transitive)
- Removeddunder-proto@1.0.1(transitive)
Updated@yarnpkg/fslib@^2.0.0-rc.21