Huge News!Announcing our $40M Series B led by Abstract Ventures.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.16.4 to 4.0.0

31

CHANGELOG.md

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

# [4.0.0](https://github.com/lerna/lerna/compare/v3.22.1...v4.0.0) (2021-02-10)
### Features
* **deps:** Bump dependencies ([affed1c](https://github.com/lerna/lerna/commit/affed1ce0fce91f01b0a9eafe357db2d985b974f))
* Consume named exports of sibling modules ([63499e3](https://github.com/lerna/lerna/commit/63499e33652bc78fe23751875d74017e2f16a689))
* Expose named export ([c1303f1](https://github.com/lerna/lerna/commit/c1303f13adc4cf15f96ff25889b52149f8224c0e))
* Remove default export ([e2f1ec3](https://github.com/lerna/lerna/commit/e2f1ec3dd049d2a89880029908a2aa7c66f15082))
* **deps:** npm-packlist@^2.1.4 ([c63fabd](https://github.com/lerna/lerna/commit/c63fabdc09bae34d8f8d907e5d21a996ac01daef))
* **deps:** tar@^6.0.5 ([fce3e77](https://github.com/lerna/lerna/commit/fce3e778276cbab99301b6caba414efd3b4a78ea))
* **deps:** temp-write@^4.0.0 ([7bbfb70](https://github.com/lerna/lerna/commit/7bbfb7020fbbf1fd7f2ebea38ac2718bea5a0646))
* **pack-directory:** Remove figgy-pudding ([640faa5](https://github.com/lerna/lerna/commit/640faa54cbbc5faeb6b13322c8d4f48bf035a1f7))
* Drop support for Node v6.x & v8.x ([ff4bb4d](https://github.com/lerna/lerna/commit/ff4bb4da215555e3bb136f5af09b5cbc631e57bb))
### BREAKING CHANGES
* The default export has been removed, please use a named export instead.
* Node v6.x & v8.x are no longer supported. Please upgrade to the latest LTS release.
Here's the gnarly one-liner I used to make these changes:
```
npx lerna exec --concurrency 1 --stream -- 'json -I -f package.json -e '"'"'this.engines=this.engines||{};this.engines.node=">= 10.18.0"'"'"
```
(requires `npm i -g json` beforehand)
## [3.16.4](https://github.com/lerna/lerna/compare/v3.16.3...v3.16.4) (2019-07-24)

@@ -8,0 +39,0 @@

45

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

@@ -9,19 +8,27 @@ const log = require("npmlog");

const tempWrite = require("temp-write");
const getPacked = require("@lerna/get-packed");
const Package = require("@lerna/package");
const runLifecycle = require("@lerna/run-lifecycle");
const { getPacked } = require("@lerna/get-packed");
const { Package } = require("@lerna/package");
const { runLifecycle } = require("@lerna/run-lifecycle");
module.exports = packDirectory;
module.exports.packDirectory = packDirectory;
const PackConfig = figgyPudding({
log: { default: log },
"lerna-command": { default: "pack" },
lernaCommand: "lerna-command",
"ignore-prepublish": {},
ignorePrepublish: "ignore-prepublish",
});
/**
* @typedef {object} PackConfig
* @property {typeof log} [log]
* @property {string} [lernaCommand] If "publish", run "prepublishOnly" lifecycle
* @property {boolean} [ignorePrepublish]
*/
function packDirectory(_pkg, dir, _opts) {
/**
* Pack a directory suitable for publishing, writing tarball to a tempfile.
* @param {Package|string} _pkg Package instance or path to manifest
* @param {string} dir to pack
* @param {PackConfig} options
*/
function packDirectory(_pkg, dir, options) {
const pkg = Package.lazy(_pkg, dir);
const opts = PackConfig(_opts);
const opts = {
log,
...options,
};

@@ -47,3 +54,3 @@ opts.log.verbose("pack-directory", path.relative(".", pkg.contents));

chain = chain.then(() => packlist({ path: pkg.contents }));
chain = chain.then(files =>
chain = chain.then((files) =>
tar.create(

@@ -62,8 +69,8 @@ {

// and any such future "features" by prepending `./`
files.map(f => `./${f}`)
files.map((f) => `./${f}`)
)
);
chain = chain.then(stream => tempWrite(stream, getTarballName(pkg)));
chain = chain.then(tarFilePath =>
getPacked(pkg, tarFilePath).then(packed =>
chain = chain.then((stream) => tempWrite(stream, getTarballName(pkg)));
chain = chain.then((tarFilePath) =>
getPacked(pkg, tarFilePath).then((packed) =>
Promise.resolve()

@@ -70,0 +77,0 @@ .then(() => runLifecycle(pkg, "postpack", opts))

{
"name": "@lerna/pack-directory",
"version": "3.16.4",
"version": "4.0.0",
"description": "Pack a directory into an npm package tarball",

@@ -30,12 +30,14 @@ "keywords": [

"dependencies": {
"@lerna/get-packed": "3.16.0",
"@lerna/package": "3.16.0",
"@lerna/run-lifecycle": "3.16.2",
"figgy-pudding": "^3.5.1",
"npm-packlist": "^1.4.4",
"@lerna/get-packed": "4.0.0",
"@lerna/package": "4.0.0",
"@lerna/run-lifecycle": "4.0.0",
"npm-packlist": "^2.1.4",
"npmlog": "^4.1.2",
"tar": "^4.4.10",
"temp-write": "^3.4.0"
"tar": "^6.1.0",
"temp-write": "^4.0.0"
},
"gitHead": "bb048cb306b5cfcb039aa98f667cf3751cf0ad20"
"engines": {
"node": ">= 10.18.0"
},
"gitHead": "4582c476e07dddddd6b2e3ab6e7f52c1f9eed59a"
}
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