Skip to content

Commit

Permalink
Drop support for node <4
Browse files Browse the repository at this point in the history
  • Loading branch information
danez committed Apr 30, 2018
1 parent 841c540 commit 8fdd4e2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 18 deletions.
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ os:
- osx
language: node_js
node_js:
- node
- '9'
- '10'
- '8'
- '7'
- '6'
- '5'
- '4'
- '0.12'
- '0.10'
6 changes: 2 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
environment:
matrix:
# node.js
- nodejs_version: "10.0"
- nodejs_version: "8.0"
- nodejs_version: "7.0"
- nodejs_version: "6.0"
- nodejs_version: "5.0"
- nodejs_version: "0.12"
- nodejs_version: "0.10"
- nodejs_version: "4.0"

# Install scripts. (runs after repo cloning)
install:
Expand Down
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* Module dependencies
*/

var extend = require('extend-shallow');
var unique = require('array-unique');
var toRegex = require('to-regex');

Expand Down Expand Up @@ -156,7 +155,7 @@ extglob.contains = function(str, pattern, options) {
return pattern === str;
}

var opts = extend({}, options, {contains: true});
var opts = Object.assign({}, options, {contains: true});
opts.strictClose = false;
opts.strictOpen = false;
return extglob.isMatch(str, pattern, opts);
Expand Down Expand Up @@ -246,7 +245,7 @@ extglob.create = function(pattern, options) {
*/

extglob.capture = function(pattern, str, options) {
var re = extglob.makeRe(pattern, extend({capture: true}, options));
var re = extglob.makeRe(pattern, Object.assign({capture: true}, options));

function match() {
return function(string) {
Expand Down Expand Up @@ -292,7 +291,7 @@ extglob.makeRe = function(pattern, options) {
}

function makeRe() {
var opts = extend({strictErrors: false}, options);
var opts = Object.assign({strictErrors: false}, options);
if (opts.strictErrors === true) opts.strict = true;
var res = extglob.create(pattern, opts);
return toRegex(res.output, opts);
Expand Down
3 changes: 1 addition & 2 deletions lib/extglob.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
var Snapdragon = require('snapdragon');
var capture = require('snapdragon-capture');
var define = require('define-property');
var extend = require('extend-shallow');

/**
* Local dependencies
Expand All @@ -21,7 +20,7 @@ var parsers = require('./parsers');
*/

function Extglob(options) {
this.options = extend({source: 'extglob'}, options);
this.options = Object.assign({source: 'extglob'}, options);
this.snapdragon = this.options.snapdragon || new Snapdragon(this.options);
this.snapdragon.use(capture());
this.snapdragon.patterns = this.snapdragon.patterns || {};
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
"node": ">=4.0.0"
},
"scripts": {
"test": "mocha"
Expand All @@ -33,7 +33,6 @@
"array-unique": "^0.3.2",
"define-property": "^2.0.2",
"expand-brackets": "^4.0.0",
"extend-shallow": "^3.0.2",
"fragment-cache": "^0.2.1",
"regex-not": "^1.0.0",
"snapdragon": "^0.12.0",
Expand Down

0 comments on commit 8fdd4e2

Please sign in to comment.