Skip to content

Commit

Permalink
fixes #4 bump dep vers & bump our own version
Browse files Browse the repository at this point in the history
  • Loading branch information
seangarner committed Aug 31, 2016
1 parent 34a4550 commit e09c0fd
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# truncate-stream changelog
# stream-mmmagic changelog

## 1.0.0 (2016/08/31)
is backwards compatible with `0.2.0`; bump signifies this is now considered stable after being used 100,000s of times
in a production environment.

- add support for node 5 & 6

## 0.2.0 (2014/11/12)
**backwards incompatible** using semver; api not stable until 1.0.0
Expand All @@ -7,4 +13,4 @@
- fix many issues with edge case streams, especially small binary ones

## 0.1.0 (2014/11/06)
*don't use; broken for streams that emit more than 1 chunk*
*don't use; broken for streams that emit more than 1 chunk*
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014 Sean Garner
Copyright (c) 2016 Sean Garner

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ get the first 16KB of the stream then send that to mmmagic (which uses libmagic)
finished the peek stream will unshift the bytes it's received back onto the origin stream thereby
making it appear as if the origin stream was new.

```
```bash
npm install stream-mmmagic
```

## Use
```
```js
var magic = require('stream-mmmagic');

var input = fs.createReadStream('somefile.csv');
Expand All @@ -37,15 +37,11 @@ magic(input, function (err, mime, output) {
A magic file is bundled with the mmmagic npm module but if you want to use your own then set
`magic.config.magicFile` before calling `magic`.

```
```js
magic.config.magicFile = '/path/to/custom/magic/file';

magic(input, callback); // uses above magic file
```

## NOTICE
This uses [buffer-peek-stream](https://github.com/seangarner/node-buffer-peek-stream) under the
covers which is, at the moment, best described as experimental.

## LICENSE
MIT
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "stream-mmmagic",
"version": "0.3.0",
"description": "Node module to sniff the start of a stream (non-destructively) to detect the file type and encoding",
"version": "1.0.0",
"description": "sniff the start of a stream (non-destructively) to detect the file type and encoding",
"main": "lib/stream-mmmagic.js",
"scripts": {
"test": "mocha test.js"
Expand All @@ -26,7 +26,7 @@
},
"homepage": "https://github.com/seangarner/node-stream-mmmagic",
"dependencies": {
"buffer-peek-stream": "^0.2.0",
"mmmagic": "^0.3.11"
"buffer-peek-stream": "^1.0.0",
"mmmagic": "^0.4.0"
}
}

0 comments on commit e09c0fd

Please sign in to comment.