Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace source-map with source-map-sync #102

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ConcatSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

const Source = require("./Source");
const RawSource = require("./RawSource");
const { SourceNode, SourceMapConsumer } = require("source-map");
const { SourceNode, SourceMapConsumer } = require("source-map-sync");
const { SourceListMap, fromStringWithSourceMap } = require("source-list-map");
const { getSourceAndMap, getMap } = require("./helpers");

Expand Down
2 changes: 1 addition & 1 deletion lib/OriginalSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"use strict";

const Source = require("./Source");
const { SourceNode } = require("source-map");
const { SourceNode } = require("source-map-sync");
const { SourceListMap } = require("source-list-map");
const { getSourceAndMap, getMap } = require("./helpers");

Expand Down
2 changes: 1 addition & 1 deletion lib/PrefixSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

const Source = require("./Source");
const RawSource = require("./RawSource");
const { SourceNode } = require("source-map");
const { SourceNode } = require("source-map-sync");
const { getSourceAndMap, getMap } = require("./helpers");

const REPLACE_REGEX = /\n(?=.|\s)/g;
Expand Down
2 changes: 1 addition & 1 deletion lib/RawSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"use strict";

const Source = require("./Source");
const { SourceNode } = require("source-map");
const { SourceNode } = require("source-map-sync");
const { SourceListMap } = require("source-list-map");

class RawSource extends Source {
Expand Down
2 changes: 1 addition & 1 deletion lib/ReplaceSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"use strict";

const Source = require("./Source");
const { SourceNode } = require("source-map");
const { SourceNode } = require("source-map-sync");
const { getSourceAndMap, getMap, getNode, getListMap } = require("./helpers");

class Replacement {
Expand Down
2 changes: 1 addition & 1 deletion lib/SourceMapSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"use strict";

const Source = require("./Source");
const { SourceNode, SourceMapConsumer } = require("source-map");
const { SourceNode, SourceMapConsumer } = require("source-map-sync");
const { SourceListMap, fromStringWithSourceMap } = require("source-list-map");
const { getSourceAndMap, getMap } = require("./helpers");
const applySourceMap = require("./applySourceMap");
Expand Down
4 changes: 2 additions & 2 deletions lib/applySourceMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

"use strict";

const SourceNode = require("source-map").SourceNode;
const SourceMapConsumer = require("source-map").SourceMapConsumer;
const SourceNode = require("source-map-sync").SourceNode;
const SourceMapConsumer = require("source-map-sync").SourceMapConsumer;

const applySourceMap = function (
sourceNode,
Expand Down
2 changes: 1 addition & 1 deletion lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
"use strict";

const { SourceNode, SourceMapConsumer } = require("source-map");
const { SourceNode, SourceMapConsumer } = require("source-map-sync");
const { SourceListMap, fromStringWithSourceMap } = require("source-list-map");

exports.getSourceAndMap = (inputSource, options) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"source-list-map": "^2.0.1",
"source-map": "^0.6.1"
"source-map-sync": "^0.0.0"
},
"devDependencies": {
"coveralls": "^3.0.2",
Expand Down
2 changes: 1 addition & 1 deletion test/SourceMapSource.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const SourceMapSource = require("../").SourceMapSource;
const OriginalSource = require("../").OriginalSource;
const ConcatSource = require("../").ConcatSource;
const SourceNode = require("source-map").SourceNode;
const SourceNode = require("source-map-sync").SourceNode;

describe("SourceMapSource", () => {
it("map correctly", () => {
Expand Down
28 changes: 28 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3582,6 +3582,13 @@ source-map-support@^0.5.6:
buffer-from "^1.0.0"
source-map "^0.6.0"

source-map-sync@^0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/source-map-sync/-/source-map-sync-0.0.0.tgz#99424c1ce94a6656c5f2a5adde93a3bf93bf7609"
integrity sha512-brORCqrTKaSTOEBMiR+5m1p8LpIi3fJLBFFgIPZS1wmnEPQM5D3YR7M6aO8bBOzxiI5nxe5iXtypSEZBlSMDMw==
dependencies:
whatwg-url "^7.0.0"

source-map-url@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
Expand Down Expand Up @@ -3889,6 +3896,13 @@ tough-cookie@^3.0.1:
psl "^1.1.28"
punycode "^2.1.1"

tr46@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09"
integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=
dependencies:
punycode "^2.1.0"

tr46@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.0.2.tgz#03273586def1595ae08fedb38d7733cee91d2479"
Expand Down Expand Up @@ -4063,6 +4077,11 @@ walker@^1.0.7, walker@~1.0.5:
dependencies:
makeerror "1.0.x"

webidl-conversions@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==

webidl-conversions@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff"
Expand All @@ -4085,6 +4104,15 @@ whatwg-mimetype@^2.3.0:
resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf"
integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==

whatwg-url@^7.0.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06"
integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==
dependencies:
lodash.sortby "^4.7.0"
tr46 "^1.0.1"
webidl-conversions "^4.0.2"

whatwg-url@^8.0.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.1.0.tgz#c628acdcf45b82274ce7281ee31dd3c839791771"
Expand Down