mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-15 11:04:43 +08:00
This checks in the InspectorBackendCommands in the source tree file and ensures that it is kept in sync whenever the third_party location has been updated. In the process, I discovered multiple misconfigurations in the formatting presubmit check. First of all, it was never running, because the .eslintignore had an empty line. Second of all, it was running twice, which is unnecessary since we now check for changed files at the end of the presubmit. Lastly, it was only formatting JS files, while it should check all files. I have also updated the _CheckGeneratedFiles check to only run if it is actually necessary. If there are no changes made to any affected of the files, it will skip the step. This should thus reduce the presubmit time and we will only pay the cost if we actually update any of the files. Lastly, it will now properly format and lint the generated files. This makes reading the code a lot easier and makes it easier to digest the diff when a protocol update goes through. I have verified that, in a full build, the files are still minified. Thus, this has no impact on the loading performance. DISABLE_THIRD_PARTY_CHECK=Updating protocol generation Fixed: 1056614 Change-Id: If49b0e749978ea1a7838992ec13507ee761ad76c Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2087765 Reviewed-by: Paul Lewis <aerotwist@chromium.org> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
21 lines
733 B
JavaScript
21 lines
733 B
JavaScript
// Copyright 2019 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import {registerCommands} from '../generated/InspectorBackendCommands.js';
|
|
import * as InspectorBackend from './InspectorBackend.js';
|
|
import * as NodeURL from './NodeURL.js';
|
|
|
|
export {
|
|
InspectorBackend,
|
|
NodeURL,
|
|
};
|
|
|
|
// Create the global here because registering commands will involve putting
|
|
// items onto the global.
|
|
self.Protocol = self.Protocol || {};
|
|
|
|
// FIXME: This instance of InspectorBackend should not be a side effect of importing this module.
|
|
export const inspectorBackend = new InspectorBackend.InspectorBackend();
|
|
registerCommands(inspectorBackend);
|