parseJsonl() was a private function inside json-viewer.mjs, a page entry-point that renders React and reads the JSONView content global at load time, so nothing else could import it. JsonlLineError lived in jsonview/, and the JSON Lines content types were spelled out inline in the sniffer and twice in fixSave(). The Netmonitor needs all three (bug 2059673), so move them to devtools/client/shared/jsonl-utils.mjs and have jsonview import from there. JsonlLineError also gains a Symbol.for() brand and an isInstance() helper, so consumers loading the module through a different global still recognise its instances. The only behaviour change: a line which fails to parse is reparsed preceded by the blank lines it comes after in the document, so that its error message points at the line in the document rather than at line 1. Differential Revision: https://phabricator.services.mozilla.com/D320918
68 lines
1.5 KiB
INI
68 lines
1.5 KiB
INI
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
BROWSER_CHROME_MANIFESTS += ["test/browser.toml"]
|
|
XPCSHELL_TESTS_MANIFESTS += ["test/xpcshell/xpcshell.toml"]
|
|
TEST_HARNESS_FILES.xpcshell.devtools.client.shared.test += [
|
|
"test/shared-head.js",
|
|
]
|
|
|
|
DIRS += [
|
|
"components",
|
|
"fluent-l10n",
|
|
"inplace-editor-utils",
|
|
"redux",
|
|
"remote-debugging",
|
|
"source-map-loader",
|
|
"sourceeditor",
|
|
"vendor",
|
|
"widgets",
|
|
]
|
|
|
|
DevToolsModules(
|
|
"async-store-helper.js",
|
|
"autocomplete-popup.js",
|
|
"classnames.js",
|
|
"css-angle.js",
|
|
"curl.js",
|
|
"devices.js",
|
|
"enum.js",
|
|
"events.js",
|
|
"focus.mjs",
|
|
"inplace-editor.js",
|
|
"jsonl-mime-types.mjs",
|
|
"jsonl-utils.mjs",
|
|
"key-shortcuts.js",
|
|
"keycodes.js",
|
|
"link.js",
|
|
"node-attribute-parser.js",
|
|
"output-parser.js",
|
|
"prefs.js",
|
|
"react-utils.js",
|
|
"react-utils.mjs",
|
|
"screenshot.js",
|
|
"scroll.mjs",
|
|
"source-utils.js",
|
|
"string-utils.js",
|
|
"stylesheet-utils.js",
|
|
"suggestion-picker.js",
|
|
"telemetry.js",
|
|
"theme.js",
|
|
"thread-utils.js",
|
|
"undo.js",
|
|
"unicode-url.js",
|
|
"view-source.js",
|
|
"WeakMapMap.js",
|
|
"webgl-utils.js",
|
|
"worker-utils.js",
|
|
"workers-listener.js",
|
|
"zoom-keys.js",
|
|
)
|
|
|
|
with Files("**"):
|
|
BUG_COMPONENT = ("DevTools", "General")
|
|
|
|
with Files("components/**"):
|
|
BUG_COMPONENT = ("DevTools", "Shared Components")
|