Skip to content

Commit

Permalink
drop Node support < 6, and resolve acorn CVE npm-1488
Browse files Browse the repository at this point in the history
  • Loading branch information
nmccready committed Mar 9, 2020
1 parent bd0aeb0 commit 5c5055e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 19 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
@@ -1,11 +1,9 @@
sudo: false
language: node_js
node_js:
- '12'
- '10'
- '8'
- '6'
- '4'
- '0.12'
- '0.10'
after_script:
- npm run coveralls
4 changes: 1 addition & 3 deletions appveyor.yml
Expand Up @@ -4,12 +4,10 @@
environment:
matrix:
# node.js
- nodejs_version: "0.10"
- nodejs_version: "0.12"
- nodejs_version: "4"
- nodejs_version: "6"
- nodejs_version: "8"
- nodejs_version: "10"
- nodejs_version: "12"

install:
- ps: Install-Product node $env:nodejs_version
Expand Down
10 changes: 5 additions & 5 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "gulp-sourcemaps",
"version": "2.6.5",
"version": "3.0.0-0",
"description": "Sourcemap support for gulpjs.",
"homepage": "http://github.com/gulp-sourcemaps/gulp-sourcemaps",
"repository": "git://github.com/gulp-sourcemaps/gulp-sourcemaps.git",
Expand All @@ -21,9 +21,9 @@
"author": "Florian Reiterer <me@florianreiterer.com>",
"license": "ISC",
"dependencies": {
"@gulp-sourcemaps/identity-map": "^1.0.0",
"@gulp-sourcemaps/identity-map": "^2.0.1",
"@gulp-sourcemaps/map-sources": "^1.0.0",
"acorn": "^5.0.0",
"acorn": "^6.4.1",
"convert-source-map": "^1.0.0",
"css": "^2.0.0",
"debug-fabulous": "^1.0.0",
Expand All @@ -35,7 +35,7 @@
},
"devDependencies": {
"bootstrap": "^3.4.1",
"eslint": "^2.13.0",
"eslint": "^5.16.0",
"eslint-config-gulp": "^3.0.1",
"expect": "^1.20.2",
"gulp": "^4.0.0",
Expand All @@ -57,6 +57,6 @@
"src"
],
"engines": {
"node": ">= 0.10"
"node": ">= 6"
}
}
2 changes: 1 addition & 1 deletion src/utils.js
Expand Up @@ -18,7 +18,7 @@ See http://stackoverflow.com/questions/10229144/bug-with-regexp-in-javascript-wh
So we either need to use a new instance of a regex everywhere.
*/
function sourceMapUrlRegEx() {
return /\/\/\# sourceMappingURL\=.*/g;
return /\/\/# sourceMappingURL=.*/g;
}

var commentFormatters = {
Expand Down
14 changes: 7 additions & 7 deletions test/init.test.js
Expand Up @@ -159,7 +159,7 @@ describe('init', function() {
expect(data.sourceMap.sources[0]).toEqual('test.css');
expect(data.sourceMap.sourcesContent[0]).toEqual(helpers.sourceContentCSS);
expect(data.sourceMap.names).toEqual([]);
expect(data.sourceMap.mappings).toEqual('CAAC;GACE;GACA');
expect(data.sourceMap.mappings).toEqual('AAAA;EACE,gBAAgB;EAChB,WAAW;AACb');
}

pipe([
Expand Down Expand Up @@ -194,7 +194,7 @@ describe('init', function() {
], done);
});

it('should load external source map file referenced in comment with the \/\/# syntax', function(done) {
it('should load external source map file referenced in comment with the //# syntax', function(done) {
var file = helpers.makeFile();
file.contents = new Buffer(helpers.sourceContent + '\n//# sourceMappingURL=helloworld2.js.map');

Expand All @@ -214,7 +214,7 @@ describe('init', function() {
], done);
});

it('css: should load external source map file referenced in comment with the \/\/*# syntax', function(done) {
it('css: should load external source map file referenced in comment with the //*# syntax', function(done) {
var file = helpers.makeFileCSS();
file.contents = new Buffer(helpers.sourceContentCSS + '\n/*# sourceMappingURL=test.css.map */');

Expand All @@ -234,7 +234,7 @@ describe('init', function() {
], done);
});

it('should remove source map comment with the \/\/# syntax', function(done) {
it('should remove source map comment with the //# syntax', function(done) {
var file = helpers.makeFile();
file.contents = new Buffer(helpers.sourceContent + '\n//# sourceMappingURL=helloworld2.js.map');

Expand All @@ -250,7 +250,7 @@ describe('init', function() {
], done);
});

it('init: css: should remove source map comment with the \/\/*# syntax', function(done) {
it('init: css: should remove source map comment with the //*# syntax', function(done) {
var file = helpers.makeFileCSS();
file.contents = new Buffer(helpers.sourceContentCSS + '\n/*# sourceMappingURL=test.css.map */');

Expand All @@ -267,7 +267,7 @@ describe('init', function() {
], done);
});

it('should load external source map file referenced in comment with the \/*# *\/ syntax', function(done) {
it('should load external source map file referenced in comment with the /*# */ syntax', function(done) {
var file = helpers.makeFile();
file.contents = new Buffer(helpers.sourceContent + '\n/*# sourceMappingURL=helloworld2.js.map */');

Expand All @@ -287,7 +287,7 @@ describe('init', function() {
], done);
});

it('should remove source map comment with the \/\/# syntax', function(done) {
it('should remove source map comment with the //# syntax', function(done) {
var file = helpers.makeFile();
file.contents = new Buffer(helpers.sourceContent + '\n/*# sourceMappingURL=helloworld2.js.map */');

Expand Down

0 comments on commit 5c5055e

Please sign in to comment.