Skip to content

Commit

Permalink
Move from source-map to source-map-sync
Browse files Browse the repository at this point in the history
  • Loading branch information
7rulnik committed May 30, 2021
1 parent 813f2a3 commit 8975b3c
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/babel-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"glob": "^7.0.0",
"make-dir": "^2.1.0",
"slash": "condition:BABEL_8_BREAKING ? ^3.0.0 : ^2.0.0",
"source-map": "^0.5.0"
"source-map-js": "^0.6.2"
},
"optionalDependencies": {
"@nicolo-ribaudo/chokidar-2": "condition:BABEL_8_BREAKING ? : 2.1.8-no-fsevents",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"gensync": "^1.0.0-beta.2",
"json5": "^2.1.2",
"semver": "condition:BABEL_8_BREAKING ? ^7.3.4 : ^6.3.0",
"source-map": "^0.5.0"
"source-map-js": "^0.6.2"
},
"devDependencies": {
"@babel/helper-transform-fixture-test-runner": "workspace:*",
Expand Down
4 changes: 3 additions & 1 deletion packages/babel-core/test/api.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as babel from "../lib/index";
import sourceMap from "source-map";
import sourceMap from "source-map-js";
import path from "path";
import Plugin from "../lib/config/plugin";
import generator from "@babel/generator";
Expand Down Expand Up @@ -516,6 +516,8 @@ describe("api", function () {
line: 1,
column: 6,
});

consumer.destroy();
});

it("default source map filename", function () {
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dependencies": {
"@babel/types": "workspace:^7.14.2",
"jsesc": "condition: BABEL_8_BREAKING ? ^3.0.2 : ^2.5.1",
"source-map": "^0.5.0"
"source-map-js": "^0.6.2"
},
"devDependencies": {
"@babel/helper-fixtures": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-generator/src/source-map.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import sourceMap from "source-map";
import sourceMap from "source-map-js";

/**
* Build a sourcemap.
Expand Down
6 changes: 5 additions & 1 deletion packages/babel-generator/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as t from "@babel/types";
import fs from "fs";
import path from "path";
import fixtures from "@babel/helper-fixtures";
import sourcemap from "source-map";
import sourcemap from "source-map-js";
import { fileURLToPath } from "url";

describe("generation", function () {
Expand Down Expand Up @@ -298,6 +298,8 @@ describe("generation", function () {
column: 0,
line: 2,
});

consumer.destroy();
});

it("newline in string literal", () => {
Expand All @@ -319,6 +321,8 @@ describe("generation", function () {
column: 0,
line: 2,
});

consumer.destroy();
});

it("lazy source map generation", function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"babel-check-duplicated-nodes": "^1.0.0",
"quick-lru": "5.1.0",
"regenerator-runtime": "^0.13.7",
"source-map": "^0.5.0"
"source-map-js": "^0.6.2"
},
"devDependencies": {
"@types/jest": "^25.2.2"
Expand Down
58 changes: 54 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ __metadata:
make-dir: ^2.1.0
rimraf: ^3.0.0
slash: "condition:BABEL_8_BREAKING ? ^3.0.0 : ^2.0.0"
source-map: ^0.5.0
source-map-sync: ^0.8.0-beta.1
peerDependencies:
"@babel/core": ^7.0.0-0
dependenciesMeta:
Expand Down Expand Up @@ -228,7 +228,7 @@ __metadata:
gensync: ^1.0.0-beta.2
json5: ^2.1.2
semver: "condition:BABEL_8_BREAKING ? ^7.3.4 : ^6.3.0"
source-map: ^0.5.0
source-map-js: ^0.6.2
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -342,7 +342,7 @@ __metadata:
"@types/jsesc": ^2.5.0
"@types/source-map": ^0.5.0
jsesc: "condition: BABEL_8_BREAKING ? ^3.0.2 : ^2.5.1"
source-map: ^0.5.0
source-map-sync: ^0.8.0-beta.1
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -817,7 +817,7 @@ __metadata:
babel-check-duplicated-nodes: ^1.0.0
quick-lru: 5.1.0
regenerator-runtime: ^0.13.7
source-map: ^0.5.0
source-map-js: ^0.6.2
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -10999,6 +10999,13 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"lodash.sortby@npm:^4.7.0":
version: 4.7.0
resolution: "lodash.sortby@npm:4.7.0"
checksum: 43cde11276c66da7b3eda5e9f00dc6edc276d2bcf0a5969ffc62b612cd1c4baf2eff5e84cee11383005722c460a9ca0f521fad4fa1cd2dc1ef013ee4da2dfe63
languageName: node
linkType: hard

"lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:^4.7.0":
version: 4.17.21
resolution: "lodash@npm:4.17.21"
Expand Down Expand Up @@ -13612,6 +13619,13 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"source-map-js@npm:^0.6.2":
version: 0.6.2
resolution: "source-map-js@npm:0.6.2"
checksum: 8e2f992cfbedb71286fa6f6e011e2fa756b7f4d944ea4b0f49e9ff6ea34ad0a17dc655f067fdddb32efa7b45000e8c59e47a2e875d91744c86a56329b5f58b32
languageName: node
linkType: hard

"source-map-resolve@npm:^0.5.0":
version: 0.5.2
resolution: "source-map-resolve@npm:0.5.2"
Expand All @@ -13635,6 +13649,15 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"source-map-sync@npm:^0.8.0-beta.1":
version: 0.8.0-beta.1
resolution: "source-map-sync@npm:0.8.0-beta.1"
dependencies:
whatwg-url: ^7.0.0
checksum: a45bf3b3075404b80794a890f43addd75d0eb1d7c2694f6d9c60284e5942945d051e66b13de6a7f13be5e99ca8b0b775ec334aff347a8a02cd21afc8b08268c2
languageName: node
linkType: hard

"source-map-url@npm:^0.4.0":
version: 0.4.0
resolution: "source-map-url@npm:0.4.0"
Expand Down Expand Up @@ -14461,6 +14484,15 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"tr46@npm:^1.0.1":
version: 1.0.1
resolution: "tr46@npm:1.0.1"
dependencies:
punycode: ^2.1.0
checksum: 66e2e4d6799d3c2fcc56ad6084e8ab7b3e744f138babc86100e5e2bfaf011231d00d229cfccfaf338da953b96c3ea9128d182274915c1516c5189ee75b7c0ad9
languageName: node
linkType: hard

"tr46@npm:^2.0.2":
version: 2.0.2
resolution: "tr46@npm:2.0.2"
Expand Down Expand Up @@ -15084,6 +15116,13 @@ typescript@~4.2.3:
languageName: node
linkType: hard

"webidl-conversions@npm:^4.0.2":
version: 4.0.2
resolution: "webidl-conversions@npm:4.0.2"
checksum: 75c2ada4262cda41410ec898178f4f2a31419a905415a98a0bd1b93441ce4a2b942bae2d0ac6d637b749b9d3b309be5a49dbc3b06aae9d9e65280554268a2c94
languageName: node
linkType: hard

"webidl-conversions@npm:^5.0.0":
version: 5.0.0
resolution: "webidl-conversions@npm:5.0.0"
Expand Down Expand Up @@ -15287,6 +15326,17 @@ typescript@~4.2.3:
languageName: node
linkType: hard

"whatwg-url@npm:^7.0.0":
version: 7.1.0
resolution: "whatwg-url@npm:7.1.0"
dependencies:
lodash.sortby: ^4.7.0
tr46: ^1.0.1
webidl-conversions: ^4.0.2
checksum: ccbf75d3dfa6d97a7705acc250a43041dfcfa0c9695a5148cac844c39a29657d7c07b3c4533ebabb2401fedcd5eb98626256add2760403b0889c9983ea1a76aa
languageName: node
linkType: hard

"whatwg-url@npm:^8.0.0, whatwg-url@npm:^8.5.0":
version: 8.5.0
resolution: "whatwg-url@npm:8.5.0"
Expand Down

0 comments on commit 8975b3c

Please sign in to comment.