Comparing version 0.33.0 to 0.34.0
@@ -36,2 +36,3 @@ import { CommandContext, CommandNamespace, BasicOptions, StrictBasicOptions } from './initCmd'; | ||
saveExact?: boolean; | ||
linkLocal?: boolean; | ||
}; | ||
@@ -49,3 +50,4 @@ export declare type StrictPublicInstallationOptions = StrictBasicOptions & { | ||
saveExact: boolean; | ||
linkLocal: boolean; | ||
}; | ||
export default function (fuzzyDeps: string[] | Dependencies, optsNullable: PublicInstallationOptions): Promise<void>; |
@@ -21,8 +21,10 @@ #!/usr/bin/env node | ||
const link_1 = require('../cmd/link'); | ||
const publish_1 = require('../cmd/publish'); | ||
const pnpmCmds = { | ||
install: install_1.default, | ||
uninstall: uninstall_1.default, | ||
link: link_1.default | ||
link: link_1.default, | ||
publish: publish_1.default | ||
}; | ||
const supportedCmds = new Set(['install', 'uninstall', 'help', 'link']); | ||
const supportedCmds = new Set(['install', 'uninstall', 'help', 'link', 'publish']); | ||
function run(argv) { | ||
@@ -103,2 +105,4 @@ const cli = meow({ | ||
return 'link'; | ||
case 'publish': | ||
return 'publish'; | ||
default: | ||
@@ -105,0 +109,0 @@ return cmd; |
@@ -12,4 +12,5 @@ "use strict"; | ||
logger: 'pretty', | ||
ignoreScripts: false | ||
ignoreScripts: false, | ||
linkLocal: false | ||
}; | ||
//# sourceMappingURL=defaults.js.map |
@@ -12,2 +12,3 @@ import { PackageDist } from '../resolve'; | ||
parentRoot?: string; | ||
linkLocal: boolean; | ||
}; | ||
@@ -31,2 +32,3 @@ export declare type PackageSpec = { | ||
optional: boolean; | ||
linkLocal: boolean; | ||
keypath: string[]; | ||
@@ -33,0 +35,0 @@ fullname: string; |
@@ -72,8 +72,22 @@ "use strict"; | ||
else { | ||
const res = yield resolve_1.default(spec, { log, got: ctx.got, root: options.parentRoot || ctx.root }); | ||
const res = yield resolve_1.default(spec, { | ||
log, | ||
got: ctx.got, | ||
root: options.parentRoot || ctx.root, | ||
linkLocal: options.linkLocal | ||
}); | ||
const freshPkg = saveResolution(res); | ||
log('resolved', freshPkg); | ||
const target = join(ctx.store, res.fullname); | ||
yield buildToStoreCached(ctx, target, freshPkg, log); | ||
const pkg = requireJson_1.default(join(target, '_', 'package.json')); | ||
yield mkdirp_1.default(modules); | ||
let pkg; | ||
if (res.dist.location === 'dir' && options.linkLocal) { | ||
pkg = requireJson_1.default(join(res.dist.tarball, 'package.json')); | ||
yield symlinkToModules(res.dist.tarball, modules); | ||
} | ||
else { | ||
const target = join(ctx.store, res.fullname); | ||
yield buildToStoreCached(ctx, target, freshPkg, log); | ||
pkg = requireJson_1.default(join(target, '_', 'package.json')); | ||
yield symlinkToModules(join(target, '_'), modules); | ||
} | ||
installedPkg = { | ||
@@ -86,4 +100,2 @@ pkg, | ||
}; | ||
yield mkdirp_1.default(modules); | ||
yield symlinkToModules(join(target, '_'), modules); | ||
log('package.json', pkg); | ||
@@ -109,2 +121,3 @@ } | ||
keypath, | ||
linkLocal: options.linkLocal, | ||
// Full name of package as it should be put in the store. Aim to make | ||
@@ -195,3 +208,4 @@ // this as friendly as possible as this will appear in stack traces. | ||
? path.dirname(buildInfo.dist.tarball) : undefined, | ||
optional: buildInfo.optional | ||
optional: buildInfo.optional, | ||
linkLocal: buildInfo.linkLocal | ||
}); | ||
@@ -198,0 +212,0 @@ // symlink itself; . -> node_modules/lodash@4.0.0 |
@@ -22,2 +22,3 @@ import { PackageSpec } from '../install'; | ||
root: string; | ||
linkLocal: boolean; | ||
}; | ||
@@ -24,0 +25,0 @@ /** |
@@ -32,2 +32,12 @@ "use strict"; | ||
} | ||
if (opts.linkLocal) { | ||
const localPkg = requireJson_1.default(path_1.resolve(dependencyPath, 'package.json')); | ||
return { | ||
fullname: getFullName(localPkg.name, dependencyPath), | ||
dist: { | ||
location: 'dir', | ||
tarball: dependencyPath, | ||
} | ||
}; | ||
} | ||
return resolveFolder(dependencyPath); | ||
@@ -34,0 +44,0 @@ }); |
{ | ||
"name": "pnpm", | ||
"description": "A fast implementation of npm install", | ||
"version": "0.33.0", | ||
"version": "0.34.0", | ||
"author": "Rico Sta. Cruz <rico@ricostacruz.com>", | ||
@@ -30,2 +30,3 @@ "bin": { | ||
"debug": "2.2.0", | ||
"delocalize-dependencies": "0.1.0", | ||
"got": "6.3.0", | ||
@@ -32,0 +33,0 @@ "gunzip-maybe": "1.3.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
195173
165
2853
39
+ Addeddelocalize-dependencies@0.1.0(transitive)