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 fdc8931
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 29 deletions.
4 changes: 2 additions & 2 deletions lib/third-party-libs.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ declare module "semver" {
}
}

declare module "source-map" {
declare module "source-map-js" {
declare export type SourceMap = {
version: 3,
file: ?string,
Expand Down Expand Up @@ -161,7 +161,7 @@ declare module "source-map" {
}

declare module "convert-source-map" {
import type { SourceMap, SourceMapGenerator } from "source-map";
import type { SourceMap, SourceMapGenerator } from "source-map-js";

declare class Converter {
toJSON(): string;
Expand Down
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-cli/src/babel/file.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import convertSourceMap from "convert-source-map";
import sourceMap from "source-map";
import sourceMap from "source-map-js";
import slash from "slash";
import path from "path";
import fs from "fs";
Expand Down
5 changes: 2 additions & 3 deletions packages/babel-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,14 @@
"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:*",
"@babel/plugin-transform-modules-commonjs": "workspace:*",
"@types/convert-source-map": "^1.5.1",
"@types/debug": "^4.1.0",
"@types/resolve": "^1.3.2",
"@types/semver": "^5.4.0",
"@types/source-map": "^0.5.0"
"@types/semver": "^5.4.0"
}
}
2 changes: 1 addition & 1 deletion packages/babel-core/src/transformation/file/merge-map.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
type SourceMap = any;
import sourceMap from "source-map";
import sourceMap from "source-map-js";

export default function mergeSourceMap(
inputMap: SourceMap,
Expand Down
2 changes: 1 addition & 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
5 changes: 2 additions & 3 deletions packages/babel-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@
"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:*",
"@babel/parser": "workspace:*",
"@types/jsesc": "^2.5.0",
"@types/source-map": "^0.5.0"
"@types/jsesc": "^2.5.0"
}
}
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
2 changes: 1 addition & 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
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
default as getFixtures,
resolveOptionPluginOrPreset,
} from "@babel/helper-fixtures";
import sourceMap from "source-map";
import sourceMap from "source-map-js";
import { codeFrameColumns } from "@babel/code-frame";
import * as helpers from "./helpers";
import assert from "assert";
Expand Down
24 changes: 11 additions & 13 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-js: ^0.6.2
peerDependencies:
"@babel/core": ^7.0.0-0
dependenciesMeta:
Expand Down Expand Up @@ -222,13 +222,12 @@ __metadata:
"@types/debug": ^4.1.0
"@types/resolve": ^1.3.2
"@types/semver": ^5.4.0
"@types/source-map": ^0.5.0
convert-source-map: ^1.7.0
debug: ^4.1.0
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 @@ -340,9 +339,8 @@ __metadata:
"@babel/parser": "workspace:*"
"@babel/types": "workspace:^7.14.2"
"@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-js: ^0.6.2
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -817,7 +815,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 @@ -4269,13 +4267,6 @@ __metadata:
languageName: node
linkType: hard

"@types/source-map@npm:^0.5.0":
version: 0.5.2
resolution: "@types/source-map@npm:0.5.2"
checksum: 228e1ef7c7f9c126cf38afdef2c3ccfb1224523c3692da6148abb9bb81095269645495773e94477e8512e1f652419b471cc8c30997f6bd222185e931f6d97acc
languageName: node
linkType: hard

"@types/stack-utils@npm:^2.0.0":
version: 2.0.0
resolution: "@types/stack-utils@npm:2.0.0"
Expand Down Expand Up @@ -13612,6 +13603,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 Down

0 comments on commit fdc8931

Please sign in to comment.