fs-gzip-blob-storage
Advanced tools
Comparing version 2.1.0 to 2.1.1
# Changelog | ||
## v2.1.1 2019-06-04 | ||
- Minor tweaks in README. | ||
- Added source map to the package. | ||
## v2.1.0 2019-05-15 | ||
* Uses `fs-blob-storage@2.1.0`. | ||
- Uses `fs-blob-storage@2.1.0`. | ||
## v2.0.2 2019-05-08 | ||
* Fix for dependencies. | ||
- Fix for dependencies. | ||
## v2.0.1 2019-05-08 | ||
* Fix for README. | ||
- Fix for README. | ||
## v2.0.0 2019-05-08 | ||
* Breaking change: dropped support for Node 8. | ||
- Breaking change: dropped support for Node 8. | ||
## v1.0.0 2018-09-07 | ||
* Rewritten in Typescript. | ||
* New syntax of import in plain Javascript. | ||
- Rewritten in Typescript. | ||
- New syntax of import in plain Javascript. | ||
## v0.4.0 2018-07-16 | ||
* New option `fs` with File System module. | ||
* Tests don't use `mock-fs` package anymore. | ||
* Tweaked jsdoc. | ||
* Pack only important files. | ||
- New option `fs` with File System module. | ||
- Tests don't use `mock-fs` package anymore. | ||
- Tweaked jsdoc. | ||
- Pack only important files. | ||
## v0.3.2 2018-05-24 | ||
* Uses `stream.pipeline-shim` package in examples. Thank you, "npm, inc", for | ||
- Uses `stream.pipeline-shim` package in examples. Thank you, "npm, inc", for | ||
making my life harder :-/ | ||
@@ -38,8 +43,8 @@ | ||
* Upgrade fs-blob-storage to v0.5.1: make storage compatible with Windows. | ||
- Upgrade fs-blob-storage to v0.5.1: make storage compatible with Windows. | ||
## v0.3.0 2018-05-19 | ||
* New constructor option `defaultExt` and `defaultPart`. | ||
* Typescript: return `Promise<Readable>` and `Promise<Writable>` instead | ||
- New constructor option `defaultExt` and `defaultPart`. | ||
- Typescript: return `Promise<Readable>` and `Promise<Writable>` instead | ||
`Promise<Pumpify>`. | ||
@@ -49,10 +54,10 @@ | ||
* Fixes jsdoc types. | ||
- Fixes jsdoc types. | ||
## v0.2.0 2018-05-18 | ||
* Uses `stream.pipeline` shim instead `pump` in example scripts. | ||
- Uses `stream.pipeline` shim instead `pump` in example scripts. | ||
## v0.1.0 2018-05-12 | ||
* Initial release | ||
- Initial release |
@@ -1,1 +0,1 @@ | ||
module.exports = require('./lib/fs-gzip-blob-storage') | ||
module.exports = require("./lib/fs-gzip-blob-storage") |
/// <reference types="node" /> | ||
import { Readable, Writable } from 'stream'; | ||
import zlib from 'zlib'; | ||
import { FsBlobStorageCommitOptions, FsBlobStorageOptions, FsBlobStorageReadStreamOptions, FsBlobStorageRemoveOptions, FsBlobStorageWriteStreamOptions } from 'fs-blob-storage'; | ||
import { Readable, Writable } from "stream"; | ||
import zlib from "zlib"; | ||
import { FsBlobStorageCommitOptions, FsBlobStorageOptions, FsBlobStorageReadStreamOptions, FsBlobStorageRemoveOptions, FsBlobStorageWriteStreamOptions } from "fs-blob-storage"; | ||
export interface FsGzipBlobStorageOptions extends FsBlobStorageOptions { | ||
@@ -6,0 +6,0 @@ gzipExt?: string; |
@@ -46,4 +46,5 @@ "use strict"; | ||
FsGzipBlobStorage.DEFAULT_PART = fs_blob_storage_1.FsBlobStorage.DEFAULT_PART; | ||
FsGzipBlobStorage.DEFAULT_GZIP_EXT = '.gz'; | ||
FsGzipBlobStorage.DEFAULT_GZIP_EXT = ".gz"; | ||
exports.FsGzipBlobStorage = FsGzipBlobStorage; | ||
exports.default = FsGzipBlobStorage; | ||
//# sourceMappingURL=fs-gzip-blob-storage.js.map |
{ | ||
"name": "fs-gzip-blob-storage", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Blob storage on filesystem, with gzip, streams and promises API", | ||
@@ -27,3 +27,3 @@ "main": "lib/fs-gzip-blob-storage.js", | ||
"dependencies": { | ||
"fs-blob-storage": "^2.1.0", | ||
"fs-blob-storage": "^2.1.1", | ||
"pumpify": "^1.5.1", | ||
@@ -34,13 +34,14 @@ "tslib": "^1.9.3" | ||
"@types/chai": "^4.1.7", | ||
"@types/chai-as-promised": "^7.1.0", | ||
"@types/mocha": "^5.2.6", | ||
"@types/node": "^12.0.2", | ||
"@types/dirty-chai": "^2.0.0", | ||
"@types/mocha": "^5.2.7", | ||
"@types/node": "^12.0.4", | ||
"@types/pumpify": "^1.4.1", | ||
"chai": "^4.2.0", | ||
"chai-as-promised": "^7.1.1", | ||
"coveralls": "^3.0.3", | ||
"cross-env": "^5.2.0", | ||
"dirty-chai": "^2.0.1", | ||
"eslint": "^5.16.0", | ||
"eslint-config-prettier": "^4.2.0", | ||
"eslint-plugin-import": "^2.17.2", | ||
"eslint-plugin-node": "^9.0.1", | ||
"eslint-config-prettier": "^4.3.0", | ||
"eslint-plugin-import": "^2.17.3", | ||
"eslint-plugin-node": "^9.1.0", | ||
"eslint-plugin-promise": "^4.1.1", | ||
@@ -51,32 +52,26 @@ "markdownlint-cli": "^0.16.0", | ||
"prettier": "^1.17.1", | ||
"promise-readable": "^4.2.0", | ||
"promise-writable": "^4.1.0", | ||
"promise-readable": "^4.2.1", | ||
"promise-writable": "^4.1.1", | ||
"shx": "^0.3.2", | ||
"stream.pipeline-shim": "^1.1.0", | ||
"ts-node": "^8.1.0", | ||
"tslint": "^5.16.0", | ||
"ts-node": "^8.2.0", | ||
"tslint": "^5.17.0", | ||
"tslint-config-prettier": "^1.18.0", | ||
"typescript": "^3.4.5" | ||
"typescript": "^3.5.1" | ||
}, | ||
"scripts": { | ||
"build": "npm run compile", | ||
"compile": "tsc --pretty", | ||
"clean": "shx rm -rf lib", | ||
"compile": "tsc --pretty --project .", | ||
"clean": "npm run clean:compile && npm run clean:coverage", | ||
"clean:compile": "shx rm -rf lib", | ||
"clean:coverage": "shx rm -rf coverage .nyc_output", | ||
"lint": "npm run compile && tsc --pretty -p examples && tsc --pretty -p test && eslint . && tslint -t stylish -p . && tslint -t stylish -p examples && tslint -t stylish -p test && prettier --ignore-path .gitignore --list-different '**/*.{js,json,md,ts,yml}' && markdownlint \"*.md\"", | ||
"postpublish": "git tag v$npm_package_version -a -m \"Release v$npm_package_version\" && git push --tags", | ||
"prepack": "npm run build", | ||
"pretest": "npm run build && tsc --pretty -p examples && tsc --pretty -p test && eslint . && tslint -t stylish -p . && tslint -t stylish -p examples && tslint -t stylish -p test && prettier --ignore-path .gitignore --list-different '**/*.js' '**/*.json' '**/*.ts' '**/*.yml' && markdownlint \"*.md\"", | ||
"prepack": "npm run compile", | ||
"prepublishOnly": "npm run test", | ||
"pretest": "npm run lint", | ||
"test": "npm run test:spec", | ||
"test:spec": "npm run ts-mocha -- \"test/*.ts\"", | ||
"test:coverage": "nyc --reporter json npm run test:spec && nyc report", | ||
"ts-mocha": "mocha --use_strict --throw-deprecation --require source-map-support/register --require ts-node/register --timeout 90000" | ||
}, | ||
"nyc": { | ||
"extension": [ | ||
".ts" | ||
], | ||
"exclude": [ | ||
".*.js", | ||
"**/*.d.ts" | ||
] | ||
"test:coverage": "npm run clean:coverage && cross-env NYC=\"nyc --no-clean --reporter=lcov\" npm run test:spec && nyc report --reporter=text-summary --color", | ||
"ts-mocha": "$NYC mocha --use_strict --throw-deprecation --require source-map-support/register --require ts-node/register --timeout 90000" | ||
} | ||
} |
# fs-gzip-blob-storage | ||
<!-- markdownlint-disable MD013 --> | ||
[![Build Status](https://secure.travis-ci.org/dex4er/js-fs-gzip-blob-storage.svg)](http://travis-ci.org/dex4er/js-fs-gzip-blob-storage) [![Coverage Status](https://coveralls.io/repos/github/dex4er/js-fs-gzip-blob-storage/badge.svg)](https://coveralls.io/github/dex4er/js-fs-gzip-blob-storage) [![npm](https://img.shields.io/npm/v/fs-gzip-blob-storage.svg)](https://www.npmjs.com/package/fs-gzip-blob-storage) | ||
<!-- markdownlint-enable MD013 --> | ||
@@ -28,18 +30,6 @@ | ||
Transpiling this module with own settings in `tsconfig.json`: | ||
```json | ||
{ | ||
"compilerOptions": { | ||
"paths": { | ||
"fs-gzip-blob-storage": ["node_modules/fs-gzip-blob-storage/src/fs-gzip-blob-storage"] | ||
} | ||
} | ||
} | ||
``` | ||
## Usage | ||
```js | ||
const {FsGzipBlobStorage} = require('fs-gzip-blob-storage') | ||
const {FsGzipBlobStorage} = require("fs-gzip-blob-storage") | ||
``` | ||
@@ -50,3 +40,5 @@ | ||
```ts | ||
import {FsGzipBlobStorage} from 'fs-gzip-blob-storage' | ||
import FsGzipBlobStorage from "fs-gzip-blob-storage" | ||
// or | ||
import {FsGzipBlobStorage} from "fs-gzip-blob-storage" | ||
``` | ||
@@ -74,10 +66,10 @@ | ||
* `ext` is a default `ext` argument for methods (optional, default: `DEFAULT_EXT`) | ||
* `part` is a default `part` argument for methods (optional, default: | ||
- `ext` is a default `ext` argument for methods (optional, default: `DEFAULT_EXT`) | ||
- `part` is a default `part` argument for methods (optional, default: | ||
`DEFAULT_PART`) | ||
* `exclusive` if is true then can't create new object if already exists with | ||
- `exclusive` if is true then can't create new object if already exists with | ||
the same key (optional, default: false) | ||
* `gzipExt` is an extra extension for gzipped files (optional, default: `DEFAULT_GZIP_EXT`) | ||
* `gzipOptions` is an object with options for gzip/gunzip (optional) | ||
* `path` is a directory path of the storage (optional, default: ".") | ||
- `gzipExt` is an extra extension for gzipped files (optional, default: `DEFAULT_GZIP_EXT`) | ||
- `gzipOptions` is an object with options for gzip/gunzip (optional) | ||
- `path` is a directory path of the storage (optional, default: ".") | ||
@@ -88,4 +80,4 @@ _Example:_ | ||
const storage = new FsGzipBlobStorage({ | ||
path: '/usr/share/man', | ||
exclusive: true | ||
path: "/usr/share/man", | ||
exclusive: true, | ||
}) | ||
@@ -102,6 +94,6 @@ ``` | ||
* `ext` is a default extension added to file name for the object (optional, | ||
default: `this.ext`) | ||
* `part` is a extension added to file name which can be later commited | ||
(optional, default: `this.part`) | ||
- `ext` is a default extension added to file name for the object (optional, | ||
default: `this.ext`) | ||
- `part` is a extension added to file name which can be later commited | ||
(optional, default: `this.part`) | ||
@@ -121,4 +113,4 @@ Creates a writable stream for a new object in the storage. Object is gzipped and | ||
* `ext` is a default extension added to file name for the object (optional, | ||
default: `this.ext`) | ||
- `ext` is a default extension added to file name for the object (optional, | ||
default: `this.ext`) | ||
@@ -136,6 +128,6 @@ Creates a readable stream for an existing, gunzipped object in the storage. | ||
* `ext` is a default extension added to file name for the object (optional, | ||
default: `this.ext`) | ||
* `part` is a extension added to file name which can be later commited | ||
(optional, default: `this.part`) | ||
- `ext` is a default extension added to file name for the object (optional, | ||
default: `this.ext`) | ||
- `part` is a extension added to file name which can be later commited | ||
(optional, default: `this.part`) | ||
@@ -154,4 +146,4 @@ Commits the object in the storage. It means that file name for the object is | ||
* `ext` is a default extension added to file name for the object (optional, | ||
default: `this.ext`) | ||
- `ext` is a default extension added to file name for the object (optional, | ||
default: `this.ext`) | ||
@@ -158,0 +150,0 @@ Removes the object from the storage. Throws an error if has occurred or the |
/// <reference types="node" /> | ||
import Pumpify from 'pumpify' | ||
import {Readable, Writable} from 'stream' | ||
import zlib from 'zlib' | ||
import Pumpify from "pumpify" | ||
import {Readable, Writable} from "stream" | ||
import zlib from "zlib" | ||
@@ -14,3 +14,3 @@ import { | ||
FsBlobStorageWriteStreamOptions, | ||
} from 'fs-blob-storage' | ||
} from "fs-blob-storage" | ||
@@ -37,3 +37,3 @@ export interface FsGzipBlobStorageOptions extends FsBlobStorageOptions { | ||
static readonly DEFAULT_GZIP_EXT = '.gz' | ||
static readonly DEFAULT_GZIP_EXT = ".gz" | ||
@@ -40,0 +40,0 @@ private storage: FsBlobStorage |
@@ -13,4 +13,5 @@ { | ||
"outDir": "./lib", | ||
"sourceMap": true, | ||
"strict": true, | ||
"target": "es2017", | ||
"strict": true, | ||
"typeRoots": ["node_modules/@types"] | ||
@@ -17,0 +18,0 @@ }, |
18431
10
169
26
150
Updatedfs-blob-storage@^2.1.1