Skip to content

Commit

Permalink
fix(module-tools): upgrade remapping version to 2.2.1 (#5072)
Browse files Browse the repository at this point in the history
  • Loading branch information
10Derozan authored Dec 13, 2023
1 parent 2c087e8 commit eda89cb
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 27 deletions.
6 changes: 6 additions & 0 deletions .changeset/tall-pugs-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@modern-js/module-tools': patch
---

chore(module-tools): upgrade remapping version to 2.2.1
chore(module-tools): 更新 remapping 版本至 2.2.1
2 changes: 1 addition & 1 deletion packages/solutions/module-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"test:watch": "vitest dev"
},
"dependencies": {
"@ampproject/remapping": "1.0.2",
"@ampproject/remapping": "^2.2.1",
"@ast-grep/napi": "0.12.0",
"@modern-js/core": "workspace:*",
"@modern-js/new-action": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/solutions/module-tools/src/utils/map.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import convertSourceMap from 'convert-source-map';
import ampremapping from '@ampproject/remapping';
import { RawSourceMap } from '@ampproject/remapping/dist/types/types';
import type { RawSourceMap } from '@ampproject/remapping';
import type { SourceMap } from '../types';

interface Options {
Expand Down
18 changes: 3 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions tests/integration/module/fixtures/build/dts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@src/*": [
"./src/*"
]
"@src/*": ["./src/*"]
},
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "dist/bundleless/types"
},
"include": [
"src"
],
"include": ["src"],
"references": [
{
"path": "../dts-composite"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`sourcemap usage sourcemap is external 1`] = `
{
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,YAAY,CAAC,QAAQ,QAAQ,GAAG,MAAM,IAAI,GAAG;;;ADEnD,IAAM,QAAQ,SAAO,UAAU,UAAU,GAAG;",
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,YAAY,CAAC,QAAQ,QAAQ,GAAG,MAAM,IAAI,GAAG;;;ADEnD,IAAM,QAAQ,SAAO,UAAU,UAAU,GAAG",
"names": [],
"sources": [
"../../src/index.js",
Expand All @@ -22,7 +22,7 @@ export const debug = str => addPrefix('DEBUG:', str);

exports[`sourcemap usage sourcemap is true 1`] = `
{
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,YAAY,CAAC,QAAQ,QAAQ,GAAG,MAAM,IAAI,GAAG;;;ADEnD,IAAM,QAAQ,SAAO,UAAU,UAAU,GAAG;",
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,YAAY,CAAC,QAAQ,QAAQ,GAAG,MAAM,IAAI,GAAG;;;ADEnD,IAAM,QAAQ,SAAO,UAAU,UAAU,GAAG",
"names": [],
"sources": [
"../../src/index.js",
Expand All @@ -42,7 +42,7 @@ export const debug = str => addPrefix('DEBUG:', str);

exports[`sourcemap usage sourcemap with swc 1`] = `
{
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACAO,IAAMA,YAAY,CAACC,QAAQC,QAAQ,GAAGD,UAAUC;;;ADEhD,IAAMC,QAAQD,SAAOF,UAAU,UAAUE;",
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACAO,IAAMA,YAAY,CAACC,QAAQC,QAAQ,GAAGD,UAAUC;;;ADEhD,IAAMC,QAAQD,SAAOF,UAAU,UAAUE",
"names": [
"addPrefix",
"prefix",
Expand Down

0 comments on commit eda89cb

Please sign in to comment.