compress-commons
Advanced tools
Comparing version 4.0.2 to 4.1.0
## Changelog | ||
**4.1.0** — <small>_March 2, 2021_</small> — [Diff](https://github.com/archiverjs/node-compress-commons/compare/4.0.1...4.1.0) | ||
## Features | ||
- Allow prepending forward slash in entry name (#63) | ||
## Maintenance | ||
- Bump actions/setup-node from v2.1.2 to v2.1.4 (#58) | ||
**4.0.1** — <small>_July 20, 2020_</small> — [Diff](https://github.com/archiverjs/node-compress-commons/compare/4.0.0...4.0.1) | ||
@@ -4,0 +14,0 @@ |
@@ -307,6 +307,13 @@ /** | ||
* @param name | ||
* @param prependSlash | ||
*/ | ||
ZipArchiveEntry.prototype.setName = function(name) { | ||
name = normalizePath(name, false).replace(/^\w+:/, '').replace(/^(\.\.\/|\/)+/, ''); | ||
ZipArchiveEntry.prototype.setName = function(name, prependSlash = false) { | ||
name = normalizePath(name, false) | ||
.replace(/^\w+:/, '') | ||
.replace(/^(\.\.\/|\/)+/, ''); | ||
if (prependSlash) { | ||
name = `/${name}`; | ||
} | ||
if (Buffer.byteLength(name) !== name.length) { | ||
@@ -313,0 +320,0 @@ this.getGeneralPurposeBit().useUTF8ForNames(true); |
{ | ||
"name": "compress-commons", | ||
"version": "4.0.2", | ||
"version": "4.1.0", | ||
"description": "a library that defines a common interface for working with archive formats within node", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/archiverjs/node-compress-commons", |
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
37832
1072