Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gzipper

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gzipper - npm Package Compare versions

Comparing version 3.3.0 to 3.4.0

test/resources/folder_to_compress/index.txt

2

dist/package.json
{
"name": "gzipper",
"version": "3.3.0",
"version": "3.4.0",
"description": "CLI for compressing files.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

export declare const VALID_EXTENSIONS: string[];
export declare const OUTPUT_FILE_FORMAT_REGEXP: RegExp;

@@ -14,3 +14,7 @@ "use strict";

'.csv',
'.txt',
'.xml',
'.ico',
];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFhLFFBQUEsZ0JBQWdCLEdBQUc7SUFDOUIsS0FBSztJQUNMLE1BQU07SUFDTixPQUFPO0lBQ1AsTUFBTTtJQUNOLE1BQU07SUFDTixPQUFPO0lBQ1AsT0FBTztJQUNQLE1BQU07SUFDTixPQUFPO0lBQ1AsTUFBTTtDQUNQLENBQUMifQ==
exports.OUTPUT_FILE_FORMAT_REGEXP = /(\[filename\]*)|(\[hash\]*)|(\[compressExt\]*)|(\[ext\]*)/g;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFhLFFBQUEsZ0JBQWdCLEdBQUc7SUFDOUIsS0FBSztJQUNMLE1BQU07SUFDTixPQUFPO0lBQ1AsTUFBTTtJQUNOLE1BQU07SUFDTixPQUFPO0lBQ1AsT0FBTztJQUNQLE1BQU07SUFDTixPQUFPO0lBQ1AsTUFBTTtJQUNOLE1BQU07SUFDTixNQUFNO0lBQ04sTUFBTTtDQUNQLENBQUM7QUFFVyxRQUFBLHlCQUF5QixHQUFHLDREQUE0RCxDQUFDIn0=

@@ -6,2 +6,3 @@ import { GlobalOptions } from './interfaces';

export declare class Gzipper {
private readonly outputFileFormatRegexp;
private readonly nativeFs;

@@ -8,0 +9,0 @@ private readonly nativeStream;

@@ -52,3 +52,2 @@ "use strict";

var Deflate_1 = require("./compressions/Deflate");
var OUTPUT_FILE_FORMAT_REGEXP = /(\[filename\]*)|(\[hash\]*)|(\[compressExt\]*)|(\[ext\]*)/g;
/**

@@ -63,2 +62,3 @@ * Compressing files.

if (options === void 0) { options = {}; }
this.outputFileFormatRegexp = constants_1.OUTPUT_FILE_FORMAT_REGEXP;
this.nativeFs = {

@@ -282,3 +282,3 @@ stat: util_1.default.promisify(fs_1.default.stat),

artifactsMap.set('[hash]', null);
filename = this.options.outputFileFormat.replace(OUTPUT_FILE_FORMAT_REGEXP, function (artifact) {
filename = this.options.outputFileFormat.replace(this.outputFileFormatRegexp, function (artifact) {
if (artifactsMap.has(artifact)) {

@@ -308,5 +308,3 @@ // Need to generate hash only if we have appropriate param

if (includeExtensions) {
return constants_1.VALID_EXTENSIONS.filter(function (extension) {
return includeExtensions.includes(extension);
});
return includeExtensions;
}

@@ -318,2 +316,2 @@ return constants_1.VALID_EXTENSIONS;

exports.Gzipper = Gzipper;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR3ppcHBlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9HemlwcGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs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UMsQUFoUUQsSUFnUUM7QUFoUVksMEJBQU8ifQ==
{
"name": "gzipper",
"version": "3.3.0",
"version": "3.4.0",
"description": "CLI for compressing files.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -12,2 +12,7 @@ export const VALID_EXTENSIONS = [

'.csv',
'.txt',
'.xml',
'.ico',
];
export const OUTPUT_FILE_FORMAT_REGEXP = /(\[filename\]*)|(\[hash\]*)|(\[compressExt\]*)|(\[ext\]*)/g;

@@ -10,8 +10,6 @@ import fs from 'fs';

import { GzipCompression } from './compressions/Gzip';
import { VALID_EXTENSIONS } from './constants';
import { VALID_EXTENSIONS, OUTPUT_FILE_FORMAT_REGEXP } from './constants';
import { GlobalOptions } from './interfaces';
import { DeflateCompression } from './compressions/Deflate';
const OUTPUT_FILE_FORMAT_REGEXP = /(\[filename\]*)|(\[hash\]*)|(\[compressExt\]*)|(\[ext\]*)/g;
/**

@@ -21,2 +19,3 @@ * Compressing files.

export class Gzipper {
private readonly outputFileFormatRegexp = OUTPUT_FILE_FORMAT_REGEXP;
private readonly nativeFs = {

@@ -239,3 +238,3 @@ stat: util.promisify(fs.stat),

filename = this.options.outputFileFormat.replace(
OUTPUT_FILE_FORMAT_REGEXP,
this.outputFileFormatRegexp,
artifact => {

@@ -272,5 +271,3 @@ if (artifactsMap.has(artifact)) {

if (includeExtensions) {
return VALID_EXTENSIONS.filter(extension =>
includeExtensions.includes(extension),
);
return includeExtensions;
}

@@ -277,0 +274,0 @@

@@ -143,3 +143,3 @@ import assert from 'assert';

await gzipper.compress();
const files = await getFiles(COMPRESS_PATH);
const files = await getFiles(COMPRESS_PATH, ['!.sunny']);
const compressedFiles = await getFiles(COMPRESS_PATH_TARGET, ['.gz']);

@@ -368,7 +368,7 @@

const options = {
include: ['.js', '.css', '.html'],
include: ['.js', '.css', '.html', '.sunny'],
verbose: true,
threshold: 0,
};
const INCLUDED_FILES_COUNT = 10;
const INCLUDED_FILES_COUNT = 11;
const gzipper = new Gzipper(COMPRESS_PATH, null, options);

@@ -406,3 +406,3 @@ const loggerSuccessSpy = sinon.spy((gzipper as any).logger, 'success');

};
const EXCLUDED_FILES_COUNT = 2;
const EXCLUDED_FILES_COUNT = 3;
const beforeFiles = await getFiles(COMPRESS_PATH);

@@ -442,3 +442,3 @@ const gzipper = new Gzipper(COMPRESS_PATH, null, options);

};
const INCLUDED_FILES_COUNT = 5;
const INCLUDED_FILES_COUNT = 6;
const gzipper = new Gzipper(COMPRESS_PATH, null, options);

@@ -445,0 +445,0 @@ const loggerSuccessSpy = sinon.spy((gzipper as any).logger, 'success');

@@ -164,2 +164,29 @@ import sinon from 'sinon';

});
describe('getOutputPath', () => {
it('should returns finalized output path with prefixes', async () => {
const gzipper = new Gzipper(COMPRESS_PATH, null, {
outputFileFormat: 'iron-[hash]-[filename].[compressExt].[ext]',
threshold: 0,
});
const response = (gzipper as any).getOutputPath(
path.resolve(process.cwd(), 'amigo'),
'test.js',
);
assert.ok(/iron-.+-test\.gz\.js/g.test(response));
});
it("should returns default text if artifact wasn't found", async () => {
const gzipper = new Gzipper(COMPRESS_PATH, null, {
outputFileFormat: 'iron-[hash]-[filename].[compressExt].[ext].[wrong]',
threshold: 0,
});
(gzipper as any).outputFileFormatRegexp = /(\[filename\]*)|(\[hash\]*)|(\[compressExt\]*)|(\[ext\]*)|(\[wrong\]*)/g;
const response = (gzipper as any).getOutputPath(
path.resolve(process.cwd(), 'amigo'),
'test.js',
);
assert.ok(/iron-.+-test\.gz\.js.\[wrong\]/g.test(response));
});
});
});

@@ -46,2 +46,11 @@ import path from 'path';

function filterByExtension(extensions: string[], ext: string): boolean {
return !!extensions.find(fileExtension => {
if (fileExtension.startsWith('!')) {
return fileExtension.slice(1) !== ext;
}
return fileExtension === ext;
});
}
/**

@@ -107,3 +116,3 @@ * Clear directory, extensions = true (delete all files), extensions = [.js, .ts] (only specific files)

target: string,
filterByExtensions: string[] = [],
extensions: string[] = [],
): Promise<string[]> {

@@ -120,6 +129,6 @@ try {

if (isDirectory) {
files.push(...(await getFiles(filePath, filterByExtensions)));
files.push(...(await getFiles(filePath, extensions)));
} else if (isFile) {
if (filterByExtensions.length) {
filterByExtensions.includes(path.extname(filePath)) &&
if (extensions.length) {
filterByExtension(extensions, path.extname(filePath)) &&
files.push(filePath);

@@ -126,0 +135,0 @@ } else {

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