New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lerna/pack-directory

Package Overview
Dependencies
Maintainers
2
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lerna/pack-directory - npm Package Compare versions

Comparing version 3.7.1 to 3.7.2

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [3.7.2](https://github.com/lerna/lerna/compare/v3.7.1...v3.7.2) (2018-12-21)
### Bug Fixes
* **pack-directory:** Accept lazy Package, passing directory as second parameter ([c6819c0](https://github.com/lerna/lerna/commit/c6819c0))
## [3.7.1](https://github.com/lerna/lerna/compare/v3.7.0...v3.7.1) (2018-12-20)

@@ -8,0 +19,0 @@

28

lib/pack-directory.js
"use strict";
const path = require("path");
const figgyPudding = require("figgy-pudding");

@@ -9,2 +10,3 @@ const packlist = require("npm-packlist");

const getPacked = require("@lerna/get-packed");
const Package = require("@lerna/package");
const runLifecycle = require("@lerna/run-lifecycle");

@@ -22,17 +24,11 @@

function packDirectory(pkg, _opts) {
function packDirectory(_pkg, dir, _opts) {
const pkg = Package.lazy(_pkg, dir);
const opts = PackConfig(_opts);
const dir = pkg.location;
const name =
pkg.name[0] === "@"
? // scoped packages get special treatment
pkg.name.substr(1).replace(/\//g, "-")
: pkg.name;
const outputFileName = `${name}-${pkg.version}.tgz`;
opts.log.verbose("packDirectory", dir);
opts.log.verbose("pack-directory", path.relative(".", dir));
let chain = Promise.resolve();
if (opts.ignorePrepublish !== false) {
if (opts.ignorePrepublish !== true) {
chain = chain.then(() => runLifecycle(pkg, "prepublish", opts));

@@ -69,3 +65,3 @@ }

);
chain = chain.then(stream => tempWrite(stream, outputFileName));
chain = chain.then(stream => tempWrite(stream, getTarballName(pkg)));
chain = chain.then(tarFilePath =>

@@ -81,1 +77,11 @@ getPacked(pkg, tarFilePath).then(packed =>

}
function getTarballName(pkg) {
const name =
pkg.name[0] === "@"
? // scoped packages get special treatment
pkg.name.substr(1).replace(/\//g, "-")
: pkg.name;
return `${name}-${pkg.version}.tgz`;
}
{
"name": "@lerna/pack-directory",
"version": "3.7.1",
"version": "3.7.2",
"description": "Pack a directory into an npm package tarball",

@@ -30,2 +30,3 @@ "keywords": [

"@lerna/get-packed": "^3.7.0",
"@lerna/package": "^3.7.2",
"@lerna/run-lifecycle": "^3.7.1",

@@ -38,3 +39,3 @@ "figgy-pudding": "^3.5.1",

},
"gitHead": "284aa4747dad26977790d6730ab2f640eb099cb4"
"gitHead": "52796f674ad3f2642270e942e96443437c54ff72"
}
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