Skip to content

Commit 5285f27

Browse files
committed
Extract FastStringArray into separate package
1 parent e2103a9 commit 5285f27

File tree

5 files changed

+18
-93
lines changed

5 files changed

+18
-93
lines changed

package-lock.json

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"typescript": "4.5.5"
5858
},
5959
"dependencies": {
60+
"@jridgewell/set-array": "^1.0.0",
6061
"@jridgewell/trace-mapping": "^0.3.0"
6162
}
6263
}

src/fast-string-array.ts

-38
This file was deleted.

src/source-map-tree.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FastStringArray, put } from './fast-string-array';
1+
import { SetArray, put } from '@jridgewell/set-array';
22
import { presortedDecodedMap, traceSegment, decodedMappings } from '@jridgewell/trace-mapping';
33

44
import type { TraceMap } from '@jridgewell/trace-mapping';
@@ -62,8 +62,8 @@ export function OriginalSource(source: string, content: string | null): Original
6262
*/
6363
export function traceMappings(tree: Sources): TraceMap {
6464
const mappings: SourceMapSegment[][] = [];
65-
const names = FastStringArray();
66-
const sources = FastStringArray();
65+
const names = new SetArray();
66+
const sources = new SetArray();
6767
const sourcesContent: (string | null)[] = [];
6868
const { sources: rootSources, map } = tree;
6969
const rootNames = map.names;

test/unit/fast-array-string.ts

-52
This file was deleted.

0 commit comments

Comments
 (0)