Socket
Socket
Sign inDemoInstall

tar

Package Overview
Dependencies
27
Maintainers
6
Versions
123
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.2.1 to 7.0.0

dist/commonjs/create.d.ts

295

package.json

@@ -5,3 +5,3 @@ {

"description": "tar for node",
"version": "6.2.1",
"version": "7.0.0",
"repository": {

@@ -14,15 +14,21 @@ "type": "git",

"snap": "tap",
"test": "tap"
"test": "tap",
"pretest": "npm run prepare",
"presnap": "npm run prepare",
"prepare": "tshy",
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"format": "prettier --write . --loglevel warn",
"typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
},
"dependencies": {
"chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
"@isaacs/fs-minipass": "^4.0.0",
"chownr": "^3.0.0",
"minipass": "^5.0.0",
"minizlib": "^2.1.1",
"mkdirp": "^1.0.3",
"yallist": "^4.0.0"
"minizlib": "^3.0.1",
"mkdirp": "^3.0.1",
"yallist": "^5.0.0"
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.0",
"chmodr": "^1.2.0",

@@ -32,42 +38,251 @@ "end-of-stream": "^1.4.3",

"mutate-fs": "^2.1.1",
"nock": "^13.2.9",
"rimraf": "^3.0.2",
"tap": "^16.0.1"
"nock": "^13.5.4",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"tap": "^18.7.2",
"tshy": "^1.13.1",
"typedoc": "^0.25.13"
},
"license": "ISC",
"engines": {
"node": ">=10"
"node": ">=18"
},
"files": [
"bin/",
"lib/",
"index.js"
"dist"
],
"tap": {
"coverage-map": "map.js",
"timeout": 0,
"nyc-arg": [
"--exclude",
"tap-snapshots/**"
]
"timeout": 0
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.11.0",
"content": "scripts/template-oss",
"engines": ">=10",
"distPaths": [
"index.js"
],
"allowPaths": [
"/index.js"
],
"ciVersions": [
"10.x",
"12.x",
"14.x",
"16.x",
"18.x"
]
}
"prettier": {
"semi": false,
"printWidth": 70,
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"jsxSingleQuote": false,
"bracketSameLine": true,
"arrowParens": "avoid",
"endOfLine": "lf"
},
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts",
"./c": "./src/create.ts",
"./create": "./src/create.ts",
"./replace": "./src/create.ts",
"./r": "./src/create.ts",
"./list": "./src/list.ts",
"./t": "./src/list.ts",
"./update": "./src/update.ts",
"./u": "./src/update.ts",
"./extract": "./src/extract.ts",
"./x": "./src/extract.ts",
"./pack": "./src/pack.ts",
"./unpack": "./src/unpack.ts",
"./parse": "./src/parse.ts",
"./read-entry": "./src/read-entry.ts",
"./write-entry": "./src/write-entry.ts",
"./header": "./src/header.ts",
"./pax": "./src/pax.ts",
"./types": "./src/types.ts"
}
},
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
},
"./c": {
"import": {
"types": "./dist/esm/create.d.ts",
"default": "./dist/esm/create.js"
},
"require": {
"types": "./dist/commonjs/create.d.ts",
"default": "./dist/commonjs/create.js"
}
},
"./create": {
"import": {
"types": "./dist/esm/create.d.ts",
"default": "./dist/esm/create.js"
},
"require": {
"types": "./dist/commonjs/create.d.ts",
"default": "./dist/commonjs/create.js"
}
},
"./replace": {
"import": {
"types": "./dist/esm/create.d.ts",
"default": "./dist/esm/create.js"
},
"require": {
"types": "./dist/commonjs/create.d.ts",
"default": "./dist/commonjs/create.js"
}
},
"./r": {
"import": {
"types": "./dist/esm/create.d.ts",
"default": "./dist/esm/create.js"
},
"require": {
"types": "./dist/commonjs/create.d.ts",
"default": "./dist/commonjs/create.js"
}
},
"./list": {
"import": {
"types": "./dist/esm/list.d.ts",
"default": "./dist/esm/list.js"
},
"require": {
"types": "./dist/commonjs/list.d.ts",
"default": "./dist/commonjs/list.js"
}
},
"./t": {
"import": {
"types": "./dist/esm/list.d.ts",
"default": "./dist/esm/list.js"
},
"require": {
"types": "./dist/commonjs/list.d.ts",
"default": "./dist/commonjs/list.js"
}
},
"./update": {
"import": {
"types": "./dist/esm/update.d.ts",
"default": "./dist/esm/update.js"
},
"require": {
"types": "./dist/commonjs/update.d.ts",
"default": "./dist/commonjs/update.js"
}
},
"./u": {
"import": {
"types": "./dist/esm/update.d.ts",
"default": "./dist/esm/update.js"
},
"require": {
"types": "./dist/commonjs/update.d.ts",
"default": "./dist/commonjs/update.js"
}
},
"./extract": {
"import": {
"types": "./dist/esm/extract.d.ts",
"default": "./dist/esm/extract.js"
},
"require": {
"types": "./dist/commonjs/extract.d.ts",
"default": "./dist/commonjs/extract.js"
}
},
"./x": {
"import": {
"types": "./dist/esm/extract.d.ts",
"default": "./dist/esm/extract.js"
},
"require": {
"types": "./dist/commonjs/extract.d.ts",
"default": "./dist/commonjs/extract.js"
}
},
"./pack": {
"import": {
"types": "./dist/esm/pack.d.ts",
"default": "./dist/esm/pack.js"
},
"require": {
"types": "./dist/commonjs/pack.d.ts",
"default": "./dist/commonjs/pack.js"
}
},
"./unpack": {
"import": {
"types": "./dist/esm/unpack.d.ts",
"default": "./dist/esm/unpack.js"
},
"require": {
"types": "./dist/commonjs/unpack.d.ts",
"default": "./dist/commonjs/unpack.js"
}
},
"./parse": {
"import": {
"types": "./dist/esm/parse.d.ts",
"default": "./dist/esm/parse.js"
},
"require": {
"types": "./dist/commonjs/parse.d.ts",
"default": "./dist/commonjs/parse.js"
}
},
"./read-entry": {
"import": {
"types": "./dist/esm/read-entry.d.ts",
"default": "./dist/esm/read-entry.js"
},
"require": {
"types": "./dist/commonjs/read-entry.d.ts",
"default": "./dist/commonjs/read-entry.js"
}
},
"./write-entry": {
"import": {
"types": "./dist/esm/write-entry.d.ts",
"default": "./dist/esm/write-entry.js"
},
"require": {
"types": "./dist/commonjs/write-entry.d.ts",
"default": "./dist/commonjs/write-entry.js"
}
},
"./header": {
"import": {
"types": "./dist/esm/header.d.ts",
"default": "./dist/esm/header.js"
},
"require": {
"types": "./dist/commonjs/header.d.ts",
"default": "./dist/commonjs/header.js"
}
},
"./pax": {
"import": {
"types": "./dist/esm/pax.d.ts",
"default": "./dist/esm/pax.js"
},
"require": {
"types": "./dist/commonjs/pax.d.ts",
"default": "./dist/commonjs/pax.js"
}
},
"./types": {
"import": {
"types": "./dist/esm/types.d.ts",
"default": "./dist/esm/types.js"
},
"require": {
"types": "./dist/commonjs/types.d.ts",
"default": "./dist/commonjs/types.js"
}
}
},
"type": "module",
"main": "./dist/commonjs/index.js",
"types": "./dist/commonjs/index.d.ts"
}

46

README.md

@@ -159,3 +159,3 @@ # node-tar

if you know how to use `tar(1)` in Unix, then you know how to use
`require('tar')` in JavaScript.
`import('tar')` in JavaScript.

@@ -165,3 +165,4 @@ To replicate `tar czf my-tarball.tgz files and folders`, you'd do:

```js
tar.c(
import { create } from 'tar'
create(
{

@@ -178,5 +179,8 @@ gzip: <true|gzip options>,

```js
tar.c( // or tar.create
// if you're familiar with the tar(1) cli flags, this can be nice
import * as tar from 'tar'
tar.c(
{
gzip: <true|gzip options>
// 'z' is alias for 'gzip' option
z: <true|gzip options>
},

@@ -190,5 +194,6 @@ ['some', 'files', 'and', 'folders']

```js
tar.x( // or tar.extract(
tar.x( // or `tar.extract`
{
file: 'my-tarball.tgz'
// or `file:`
f: 'my-tarball.tgz'
}

@@ -431,7 +436,11 @@ ).then(_=> { .. tarball has been dumped in cwd .. })

any warnings encountered. (See "Warnings and Errors")
- `noChmod` Set to true to omit calling `fs.chmod()` to ensure that the
extracted file matches the entry mode. This also suppresses the call to
`process.umask()` to determine the default umask value, since tar will
extract with whatever mode is provided, and let the process `umask` apply
normally.
- `chmod` Set to true to call `fs.chmod()` to ensure that the
extracted file matches the entry mode. This may necessitate a
call to the deprecated and thread-unsafe `process.umask()`
method to determine the default umask value, unless a
`processUmask` options is also provided. Otherwise tar will
extract with whatever mode is provided, and let the process
`umask` apply normally.
- `processUmask` Set to an explicit numeric value to avoid
calling `process.umask()` when `chmod: true` is set.
- `maxDepth` The maximum depth of subfolders to extract into. This

@@ -638,2 +647,3 @@ defaults to 1024. Anything deeper than the limit will raise a

from absolute paths.
- `linkCache` A Map object containing the device and inode value for

@@ -759,7 +769,11 @@ any file whose nlink is > 1, to identify hard links.

any warnings encountered. (See "Warnings and Errors")
- `noChmod` Set to true to omit calling `fs.chmod()` to ensure that the
extracted file matches the entry mode. This also suppresses the call to
`process.umask()` to determine the default umask value, since tar will
extract with whatever mode is provided, and let the process `umask` apply
normally.
- `chmod` Set to true to call `fs.chmod()` to ensure that the
extracted file matches the entry mode. This may necessitate a
call to the deprecated and thread-unsafe `process.umask()`
method to determine the default umask value, unless a
`processUmask` options is also provided. Otherwise tar will
extract with whatever mode is provided, and let the process
`umask` apply normally.
- `processUmask` Set to an explicit numeric value to avoid
calling `process.umask()` when `chmod: true` is set.
- `maxDepth` The maximum depth of subfolders to extract into. This

@@ -766,0 +780,0 @@ defaults to 1024. Anything deeper than the limit will raise a

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc