Skip to content

Commit 6709435

Browse files
committed
update version for adding naming for backwards compatibility
1 parent 2f2b5ef commit 6709435

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Full 7zip Console Commands.
146146
The `7z` and `7za` binary on your system is located in directory: ...\...\node-7z-archive\binaries\...
147147
```
148148

149-
> ____This package is a rewrite of [node-7z-forall](https://github.com/techno-express/node-7z-forall)____. The original author has removed the version it was a fork of [node-7z](https://github.com/quentinrossetti/node-7z).
149+
> ____This package is a rewrite of [node-7z-forall](https://github.com/techno-express/node-7z-forall)____. The original author has removed the version it was a fork of [node-7z](https://github.com/quentinrossetti/node-7z). The methods are still backwards compatible with previous naming of `add`, `delete`, `extract`, `extractFull`, `list`, `rename`, `test`, `update`.
150150
151151
API
152152
---

lib/index.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Files, ReplaceNativeSeparator, Run } from './utility.js';
66
import { createSfx } from './createSfx.js';
77
import { isWindows } from 'node-sys';
88

9-
function retry(command, options, override, progress, onprogress, resolve, reject, archive, noRetry = false) {
9+
function retry(command, options, override, progress, onprogress, resolve, reject, archive) {
1010
// Start the command
1111
return Run('7z', command, options, override)
1212
.progress(function (data) {
@@ -50,7 +50,7 @@ function retry(command, options, override, progress, onprogress, resolve, reject
5050
*
5151
* @returns {Promise} Promise
5252
*/
53-
export const createArchive = SevenZip.createArchive = function (filepath, files, options, override = false) {
53+
export const createArchive = SevenZip.createArchive = SevenZip.add = function (filepath, files, options, override = false) {
5454
return when.promise(function (resolve, reject, progress) {
5555
/**
5656
* When a stdout is emitted, parse each line and search for a pattern.When
@@ -91,7 +91,7 @@ export const createArchive = SevenZip.createArchive = function (filepath, files,
9191
*
9292
* @returns {Promise} Promise
9393
*/
94-
export const deleteArchive = SevenZip.deleteArchive = function (filepath, files, options, override = false) {
94+
export const deleteArchive = SevenZip.deleteArchive = SevenZip.delete = function (filepath, files, options, override = false) {
9595
return new Promise(function (resolve, reject) {
9696

9797
// Convert array of files into a string if needed.
@@ -136,7 +136,7 @@ export const deleteArchive = SevenZip.deleteArchive = function (filepath, files,
136136
*
137137
* @returns {Promise} Promise
138138
*/
139-
export const extractArchive = SevenZip.extractArchive = function (filepath, dest = '*', options = {}, override = false) {
139+
export const extractArchive = SevenZip.extractArchive = SevenZip.extract = function (filepath, dest = '*', options = {}, override = false) {
140140
return when.promise(function (resolve, reject, progress) {
141141
/**
142142
* When a stdout is emitted, parse each line and search for a pattern.When
@@ -175,7 +175,7 @@ export const extractArchive = SevenZip.extractArchive = function (filepath, dest
175175
*
176176
* @returns {Promise} Promise
177177
*/
178-
export const fullArchive = SevenZip.fullArchive = function (filepath, dest = '*', options = {}, override = false) {
178+
export const fullArchive = SevenZip.fullArchive = SevenZip.extractFull = function (filepath, dest = '*', options = {}, override = false) {
179179
return when.promise(function (resolve, reject, progress) {
180180
/**
181181
* When a stdout is emitted, parse each line and search for a pattern.When
@@ -212,7 +212,7 @@ export const fullArchive = SevenZip.fullArchive = function (filepath, dest = '*'
212212
*
213213
* @returns {Promise} Promise
214214
*/
215-
export const listArchive = SevenZip.listArchive = function (filepath, options, override = false) {
215+
export const listArchive = SevenZip.listArchive = SevenZip.list = function (filepath, options, override = false) {
216216
return when.promise(function (resolve, reject, progress) {
217217
let spec = {};
218218
/* jshint maxlen: 130 */
@@ -310,7 +310,7 @@ export const listArchive = SevenZip.listArchive = function (filepath, options, o
310310
*
311311
* @returns {Promise} Promise
312312
*/
313-
export const onlyArchive = SevenZip.onlyArchive = function (filepath, dest, files, options = {}, override = false) {
313+
export const onlyArchive = SevenZip.onlyArchive = SevenZip.only = function (filepath, dest, files, options = {}, override = false) {
314314
return when.promise(function (resolve, reject, progress) {
315315
options = Object.assign(options, { files: files });
316316

@@ -351,7 +351,7 @@ export const onlyArchive = SevenZip.onlyArchive = function (filepath, dest, file
351351
*
352352
* @returns {Promise} Promise
353353
*/
354-
export const renameArchive = SevenZip.renameArchive = function (filepath, files, options, override = false) {
354+
export const renameArchive = SevenZip.renameArchive = SevenZip.rename = function (filepath, files, options, override = false) {
355355
return when.promise(function (resolve, reject, progress) {
356356
/**
357357
* When a stdout is emitted, parse each line and search for a pattern.When
@@ -392,7 +392,7 @@ export const renameArchive = SevenZip.renameArchive = function (filepath, files,
392392
*
393393
* @returns {Promise} Promise
394394
*/
395-
export const testArchive = SevenZip.testArchive = function (filepath, options, override = false) {
395+
export const testArchive = SevenZip.testArchive = SevenZip.test = function (filepath, options, override = false) {
396396
return when.promise(function (resolve, reject, progress) {
397397
/**
398398
* When a stdout is emitted, parse each line and search for a pattern.When
@@ -431,7 +431,7 @@ export const testArchive = SevenZip.testArchive = function (filepath, options, o
431431
*
432432
* @returns {Promise} Promise
433433
*/
434-
export const updateArchive = SevenZip.updateArchive = function (filepath, files, options, override = false) {
434+
export const updateArchive = SevenZip.updateArchive = SevenZip.update = function (filepath, files, options, override = false) {
435435
return when.promise(function (resolve, reject, progress) {
436436
/**
437437
* When a stdout is emitted, parse each line and search for a pattern.When

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-7z-archive",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "ESM front-end to 7-Zip, featuring alternative full 7z CLI tools, binaries for Linux, Windows, Mac OSX, seamlessly create 7zip SFX self extracting archives targeting different platforms.",
55
"type": "module",
66
"main": "lib/index.js",

0 commit comments

Comments
 (0)