refactor(domain): extract source-map envelope walk and disambiguate stringValue (#828)
Move the indexed sections walk shared by the browser fetcher and the artifact reader into domain/sourceMapEnvelope with the fetchers stricter offset validation as an option; both validators keep their leaf strictness. Rename the browser CDP stringValue to cdpStringValue across its 18 files, fold the fingerprint duplicate into the static helper, and rename the version-keys shadow to nonEmptyString.
This commit is contained in:
@@ -4,6 +4,7 @@ import * as t from "@babel/types";
|
||||
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { propertyName } from "./javascriptAstValues.js";
|
||||
import { stringValue } from "./javascriptStaticAnalysisHelpers.js";
|
||||
|
||||
/** Static CommonJS export names. */
|
||||
export interface StaticExports {
|
||||
@@ -123,6 +124,3 @@ const memberPath = (node: t.Node | null | undefined): string => {
|
||||
}
|
||||
return "";
|
||||
};
|
||||
|
||||
const stringValue = (node: t.Node | null | undefined): string | undefined =>
|
||||
t.isStringLiteral(node) ? node.value : undefined;
|
||||
|
||||
Reference in New Issue
Block a user