diff --git a/benchmark/old.js b/benchmark/old.js index 5c7629e3..d79f866c 100644 --- a/benchmark/old.js +++ b/benchmark/old.js @@ -2636,7 +2636,7 @@ if (!exports.browser) { // We assume environment is node.js // And prevent from including source-map by browserify - SourceNode = require('source-map').SourceNode; + SourceNode = require('source-map-js').SourceNode; } else { SourceNode = global.sourceMap.SourceNode; } diff --git a/escodegen.js b/escodegen.js index 82417cd7..e2939066 100644 --- a/escodegen.js +++ b/escodegen.js @@ -2609,7 +2609,7 @@ if (!exports.browser) { // We assume environment is node.js // And prevent from including source-map by browserify - SourceNode = require('source-map').SourceNode; + SourceNode = require('source-map-js').SourceNode; } else { SourceNode = global.sourceMap.SourceNode; } diff --git a/package.json b/package.json index c99562f9..d03fc120 100644 --- a/package.json +++ b/package.json @@ -32,10 +32,8 @@ "dependencies": { "estraverse": "^5.2.0", "esutils": "^2.0.2", - "esprima": "^4.0.1" - }, - "optionalDependencies": { - "source-map": "~0.6.1" + "esprima": "^4.0.1", + "source-map-js": "^1.0.0" }, "devDependencies": { "acorn": "^8.0.4", diff --git a/test/source-map.js b/test/source-map.js index 8f6f2150..df24a699 100644 --- a/test/source-map.js +++ b/test/source-map.js @@ -27,7 +27,7 @@ var esprima = require('./3rdparty/esprima-1.0.0-dev'), escodegen = require('./loader'), - sourcemap = require('source-map'), + sourcemap = require('source-map-js'), chai = require('chai'), expect = chai.expect;