mirror of
https://github.com/danbulant/pngjs
synced 2026-06-20 23:11:19 +00:00
drop support for node < 4
This commit is contained in:
parent
f49e99aa28
commit
96c67ea08d
6 changed files with 12 additions and 32 deletions
|
|
@ -1,10 +1,7 @@
|
|||
language: node_js
|
||||
before_script:
|
||||
- if [ "$TRAVIS_NODE_VERSION" = "0.10" ]; then npm i node-zlib-backport; fi
|
||||
after_success:
|
||||
- if [ "$TRAVIS_NODE_VERSION" = "5" ]; then npm run coverage && npm i coveralls@2 && npm run coveralls; fi
|
||||
- if [ "$TRAVIS_NODE_VERSION" = "6" ]; then npm run coverage && npm i coveralls@2 && npm run coveralls; fi
|
||||
node_js:
|
||||
- "0.10"
|
||||
- "0.12"
|
||||
- "4"
|
||||
- "5"
|
||||
- "6"
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ Known lack of support for:
|
|||
Requirements
|
||||
============
|
||||
|
||||
* Async - Node.js 0.10 / 0.12 / IO.js
|
||||
* Sync - Node.js 0.12 / IO.js (0.10 with [node-zlib-backport](https://www.npmjs.com/package/node-zlib-backport) dependency)
|
||||
* Node.js v4 (use older v2.3.0 for 0.10/0.12/iojs support)
|
||||
|
||||
Comparison Table
|
||||
================
|
||||
|
|
@ -268,6 +267,9 @@ PNG.adjustGamma(png);
|
|||
Changelog
|
||||
============
|
||||
|
||||
### 3.0.0 - 03/08/2016
|
||||
- Drop support for node below v4 and iojs. Pin to 2.3.0 to use with old, unsupported or patched node versions.
|
||||
|
||||
### 2.3.0 - 22/04/2016
|
||||
- Support for sync in node 0.10
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ clone_depth: 10
|
|||
environment:
|
||||
matrix:
|
||||
- nodejs_version: '4'
|
||||
- nodejs_version: ''
|
||||
- nodejs_version: '6'
|
||||
|
||||
install:
|
||||
- ps: Install-Product node $env:nodejs_version
|
||||
|
|
|
|||
|
|
@ -2,22 +2,13 @@
|
|||
|
||||
var hasSyncZlib = true;
|
||||
var zlib = require('zlib');
|
||||
if (!zlib.deflateSync) {
|
||||
// Backwards compatibility with 0.10.
|
||||
try {
|
||||
zlib = require('node-zlib-backport');
|
||||
}
|
||||
catch(ex) {
|
||||
hasSyncZlib = false;
|
||||
}
|
||||
}
|
||||
var constants = require('./constants');
|
||||
var Packer = require('./packer');
|
||||
|
||||
module.exports = function(metaData, opt) {
|
||||
|
||||
if (!hasSyncZlib) {
|
||||
throw new Error('To use the sync capability of this library in old node versions, please also add a dependency on node-zlb-backport');
|
||||
throw new Error('To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0');
|
||||
}
|
||||
|
||||
var options = opt || {};
|
||||
|
|
|
|||
|
|
@ -2,15 +2,6 @@
|
|||
|
||||
var hasSyncZlib = true;
|
||||
var zlib = require('zlib');
|
||||
if (!zlib.deflateSync) {
|
||||
// Backwards compatibility with 0.10.
|
||||
try {
|
||||
zlib = require('node-zlib-backport');
|
||||
}
|
||||
catch(ex) {
|
||||
hasSyncZlib = false;
|
||||
}
|
||||
}
|
||||
var SyncReader = require('./sync-reader');
|
||||
var FilterSync = require('./filter-parse-sync');
|
||||
var Parser = require('./parser');
|
||||
|
|
@ -21,7 +12,7 @@ var formatNormaliser = require('./format-normaliser');
|
|||
module.exports = function(buffer, options) {
|
||||
|
||||
if (!hasSyncZlib) {
|
||||
throw new Error('To use the sync capability of this library in old node versions, please also add a dependency on node-zlb-backport');
|
||||
throw new Error('To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0');
|
||||
}
|
||||
|
||||
var err;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "pngjs",
|
||||
"version": "2.3.1",
|
||||
"version": "3.0.0",
|
||||
"description": "PNG encoder/decoder in pure JS, supporting any bit size & interlace, async & sync with full test suite.",
|
||||
"contributors": [
|
||||
"Alexandre Paré",
|
||||
|
|
@ -27,8 +27,7 @@
|
|||
"pngjs"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=0.10.0",
|
||||
"iojs": ">= 1.0.0"
|
||||
"node": ">=4.0.0"
|
||||
},
|
||||
"main": "./lib/png.js",
|
||||
"directories": {
|
||||
|
|
@ -53,7 +52,7 @@
|
|||
"buffer-equal": "1.0.0",
|
||||
"connect": "^3.4.0",
|
||||
"eslint": "^2.5.0",
|
||||
"istanbul": "^0.4.1",
|
||||
"istanbul": "^0.4.4",
|
||||
"phantomjs-prebuilt": "^2.1.7",
|
||||
"serve-static": "^1.10.0",
|
||||
"tap-dot": "^1.0.0",
|
||||
|
|
|
|||
Loading…
Reference in a new issue