Backed out changeset 7f51bc3757d9 (bug 1497839) for ESlint failure at build-debugger.js. CLOSED TREE
authorBrindusan Cristian <cbrindusan@mozilla.com>
Wed, 06 Mar 2019 06:46:38 +0200
changeset 520424 09dd6c2c111962afd8ef36a50184b4b3fa740c7e
parent 520423 bdf395eb0c640b4deea7a122ffdd5d1b5bc20c11
child 520425 d9bc0e4940579d50952ea8db78fb3f69dfc2b443
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1497839
milestone67.0a1
backs out7f51bc3757d9d196730d75d719199b29c21fbe0b
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 7f51bc3757d9 (bug 1497839) for ESlint failure at build-debugger.js. CLOSED TREE
devtools/client/debugger/new/build/babel.js
devtools/client/debugger/new/build/copy-module.js
devtools/client/debugger/new/moz.build
devtools/client/debugger/new/node-templates.mozbuild
devtools/client/debugger/new/src/actions/ast/moz.build
devtools/client/debugger/new/src/actions/breakpoints/moz.build
devtools/client/debugger/new/src/actions/moz.build
devtools/client/debugger/new/src/actions/pause/moz.build
devtools/client/debugger/new/src/actions/sources/moz.build
devtools/client/debugger/new/src/actions/utils/middleware/moz.build
devtools/client/debugger/new/src/actions/utils/moz.build
devtools/client/debugger/new/src/client/chrome/moz.build
devtools/client/debugger/new/src/client/firefox/moz.build
devtools/client/debugger/new/src/client/moz.build
devtools/client/debugger/new/src/components/Editor/Preview/moz.build
devtools/client/debugger/new/src/components/Editor/menus/moz.build
devtools/client/debugger/new/src/components/Editor/moz.build
devtools/client/debugger/new/src/components/PrimaryPanes/moz.build
devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/moz.build
devtools/client/debugger/new/src/components/SecondaryPanes/Frames/moz.build
devtools/client/debugger/new/src/components/SecondaryPanes/moz.build
devtools/client/debugger/new/src/components/moz.build
devtools/client/debugger/new/src/components/shared/Button/moz.build
devtools/client/debugger/new/src/components/shared/Button/styles/moz.build
devtools/client/debugger/new/src/components/shared/moz.build
devtools/client/debugger/new/src/moz.build
devtools/client/debugger/new/src/reducers/moz.build
devtools/client/debugger/new/src/selectors/moz.build
devtools/client/debugger/new/src/utils/breakpoint/moz.build
devtools/client/debugger/new/src/utils/editor/moz.build
devtools/client/debugger/new/src/utils/moz.build
devtools/client/debugger/new/src/utils/pause/frames/moz.build
devtools/client/debugger/new/src/utils/pause/mapScopes/moz.build
devtools/client/debugger/new/src/utils/pause/moz.build
devtools/client/debugger/new/src/utils/pause/scopes/moz.build
devtools/client/debugger/new/src/utils/sources-tree/moz.build
devtools/client/debugger/new/src/workers/moz.build
devtools/client/debugger/new/src/workers/parser/moz.build
devtools/client/debugger/new/src/workers/pretty-print/moz.build
devtools/client/debugger/new/src/workers/search/moz.build
devtools/client/shared/build/babel.js
devtools/client/shared/build/build-debugger.js
devtools/client/shared/build/build.js
devtools/client/shared/build/node-templates.mozbuild
python/mozbuild/mozbuild/action/node.py
tools/rewriting/ThirdPartyPaths.txt
rename from devtools/client/shared/build/babel.js
rename to devtools/client/debugger/new/build/babel.js
rename from devtools/client/shared/build/build-debugger.js
rename to devtools/client/debugger/new/build/copy-module.js
--- a/devtools/client/shared/build/build-debugger.js
+++ b/devtools/client/debugger/new/build/copy-module.js
@@ -1,22 +1,22 @@
 /* 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/>. */
-/* globals process, __filename, __dirname */
 
 const Babel = require("./babel");
 const fs = require("fs");
 const _path = require("path");
+const { execFileSync } = require("child_process");
 
 const EXCLUDED_FILES = {
   "../assets/panel/debugger.properties": "devtools/shared/flags",
   "devtools-connection": "devtools/shared/flags",
   "chrome-remote-interface": "devtools/shared/flags",
-  "devtools-launchpad": "devtools/shared/flags",
+  "devtools-launchpad": "devtools/shared/flags"
 };
 
 const mappings =  Object.assign(
   {
     "./source-editor": "devtools/client/shared/sourceeditor/editor",
     "../editor/source-editor": "devtools/client/shared/sourceeditor/editor",
     "./test-flag": "devtools/shared/flags",
     "./fronts-device": "devtools/shared/fronts/device",
@@ -41,16 +41,20 @@ const mappingValues = Object.values(mapp
 // webpack bundles.
 mappings["devtools-reps"] = "devtools/client/shared/components/reps/reps.js";
 mappings["devtools-source-map"] = "devtools/client/shared/source-map/index.js";
 
 function isRequire(t, node) {
   return node && t.isCallExpression(node) && node.callee.name == "require";
 }
 
+function isImport(t, node) {
+  return node && t.isImportDeclaration(node);
+}
+
 // List of vendored modules.
 // Should be synchronized with vendors.js
 const VENDORS = [
   "classnames",
   "devtools-components",
   "devtools-config",
   "devtools-contextmenu",
   "devtools-environment",
@@ -66,28 +70,28 @@ const VENDORS = [
 ];
 
 const moduleMapping = {
   Telemetry: "devtools/client/shared/telemetry",
   asyncStorage: "devtools/shared/async-storage"
 };
 
 /*
-* Updates devtools-modules imports such as
-* `import { Telemetry } from "devtools-modules"`
-* so that we can customize how we resolve certain modules in the package
-*
-* In the case of multiple declarations we need to move
-* the telemetry module into its own import.
-*/
+ * Updates devtools-modules imports such as
+ * `import { Telemetry } from "devtools-modules"`
+ * so that we can customize how we resolve certain modules in the package
+ *
+ * In the case of multiple declarations we need to move
+ * the telemetry module into its own import.
+ */
 function updateDevtoolsModulesImport(path, t) {
   const specifiers = path.node.specifiers;
 
   for (let i = 0; i < specifiers.length; i++) {
-    const specifier = specifiers[i];
+    let specifier = specifiers[i];
     const localName = specifier.local.name;
     if (localName in moduleMapping) {
       const newImport = t.importDeclaration(
         [t.importDefaultSpecifier(specifier.local)],
         t.stringLiteral(moduleMapping[localName])
       );
 
       if (specifiers.length > 1) {
@@ -99,19 +103,19 @@ function updateDevtoolsModulesImport(pat
           path.replaceWith(newImport);
         }
       }
     }
   }
 }
 
 /**
-* This Babel plugin is used to transpile a single Debugger module into a module that
-* can be loaded in Firefox via the regular DevTools loader.
-*/
+ * This Babel plugin is used to transpile a single Debugger module into a module that
+ * can be loaded in Firefox via the regular DevTools loader.
+ */
 function transformMC({ types: t }) {
   return {
     visitor: {
       ModuleDeclaration(path, state) {
         const source = path.node.source;
         const value = source && source.value;
         if (value && value.includes(".css")) {
           path.remove();
@@ -186,27 +190,50 @@ function transformMC({ types: t }) {
         const depPath = _path.join(dir, `${value}.js`);
         const exists = fs.existsSync(depPath);
         if (
           !exists &&
           !value.endsWith("index") &&
           !(value.startsWith("devtools") || mappingValues.includes(value))
         ) {
           path.replaceWith(t.stringLiteral(`${value}/index`));
+          return;
         }
-      },
-    },
+      }
+    }
   };
 };
 
 Babel.registerPlugin("transform-mc", transformMC);
 
-module.exports = function(filePath) {
-  return [
-    "transform-flow-strip-types",
-    "syntax-trailing-function-commas",
-    "transform-class-properties",
-    "transform-es2015-modules-commonjs",
-    "transform-react-jsx",
-    "syntax-object-rest-spread",
-    ["transform-mc", { mappings, vendors: VENDORS, filePath }],
-  ];
-}
\ No newline at end of file
+function transform(filePath) {
+  const doc = fs.readFileSync(filePath, "utf8");
+  const out = Babel.transform(doc, {
+    plugins: [
+			"transform-flow-strip-types",
+			"syntax-trailing-function-commas",
+			"transform-class-properties",
+			"transform-es2015-modules-commonjs",
+			"transform-react-jsx",
+      			"syntax-object-rest-spread",
+      ["transform-mc", { mappings, vendors: VENDORS, filePath }]
+    ]
+  });
+
+  return out.code;
+}
+
+const deps = [
+  __filename,
+  _path.resolve(__dirname, "babel.js")
+];
+
+for (let i = 2; i < process.argv.length; i++) {
+  const srcPath = process.argv[i];
+  const code = transform(srcPath);
+  const filePath = _path.basename(srcPath);
+  fs.writeFileSync(filePath, code);
+  deps.push(srcPath);
+}
+
+// Print all dependencies prefixed with 'dep:' in order to help node.py, the script that
+// calls this module, to report back the precise list of all dependencies.
+console.log(deps.map(file => "dep:" + file).join("\n"));
--- a/devtools/client/debugger/new/moz.build
+++ b/devtools/client/debugger/new/moz.build
@@ -4,13 +4,13 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
   'dist',
   'images',
   'src',
 ]
 
-include('../../shared/build/node-templates.mozbuild')
+include('node-templates.mozbuild')
 
 DevToolsModules(
     'panel.js',
 )
new file mode 100644
--- /dev/null
+++ b/devtools/client/debugger/new/node-templates.mozbuild
@@ -0,0 +1,35 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# 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/.
+
+@template
+def DebuggerModules(*modules):
+    # Compute where to put transpiled files into omni.ja package
+    # All DevTools modules are used via resource://devtools/ URI
+    # See devtools/shared/jar.mn for how this resource is mapped into jar package.
+    base = FINAL_TARGET_FILES.chrome.devtools.modules
+
+    # Now, navigate to the right sub-directory into devtools root modules folder
+    for dir in RELATIVEDIR.split('/'):
+        base = base[dir]
+
+    size = 0
+    for m in modules:
+        base += ["!" + m]
+        size += 1
+
+    if size == 0:
+      return
+
+    # For the same reason as https://searchfox.org/mozilla-central/source/mobile/android/base/moz.build#180-184
+    # we have to insert a first entry as recursivemake overrides the first entry and we end up with empty files
+    # for the first file only.
+    outputs = tuple(("node.stub",) + modules)
+    GENERATED_FILES += [outputs]
+
+    bundle = GENERATED_FILES[outputs]
+    bundle.script = '/python/mozbuild/mozbuild/action/node.py:generate'
+    bundle.inputs = ['/devtools/client/debugger/new/build/copy-module.js']
+    bundle.inputs.extend(modules)
--- a/devtools/client/debugger/new/src/actions/ast/moz.build
+++ b/devtools/client/debugger/new/src/actions/ast/moz.build
@@ -2,11 +2,11 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'setInScopeLines.js',
 )
--- a/devtools/client/debugger/new/src/actions/breakpoints/moz.build
+++ b/devtools/client/debugger/new/src/actions/breakpoints/moz.build
@@ -2,15 +2,15 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'addBreakpoint.js',
     'breakpointPositions.js',
     'index.js',
     'remapLocations.js',
     'syncBreakpoint.js',
 )
--- a/devtools/client/debugger/new/src/actions/moz.build
+++ b/devtools/client/debugger/new/src/actions/moz.build
@@ -6,17 +6,17 @@
 DIRS += [
     'ast',
     'breakpoints',
     'pause',
     'sources',
     'utils',
 ]
 
-CompiledModules(
+DebuggerModules(
     'ast.js',
     'debuggee.js',
     'event-listeners.js',
     'expressions.js',
     'file-search.js',
     'index.js',
     'navigation.js',
     'preview.js',
--- a/devtools/client/debugger/new/src/actions/pause/moz.build
+++ b/devtools/client/debugger/new/src/actions/pause/moz.build
@@ -2,17 +2,17 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'breakOnNext.js',
     'commands.js',
     'continueToHere.js',
     'fetchScopes.js',
     'index.js',
     'mapFrames.js',
     'mapScopes.js',
     'paused.js',
--- a/devtools/client/debugger/new/src/actions/sources/moz.build
+++ b/devtools/client/debugger/new/src/actions/sources/moz.build
@@ -2,16 +2,16 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'blackbox.js',
     'index.js',
     'loadSourceText.js',
     'newSources.js',
     'prettyPrint.js',
     'select.js',
 )
--- a/devtools/client/debugger/new/src/actions/utils/middleware/moz.build
+++ b/devtools/client/debugger/new/src/actions/utils/middleware/moz.build
@@ -2,16 +2,16 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'history.js',
     'log.js',
     'promise.js',
     'thunk.js',
     'timing.js',
     'wait-service.js',
 )
--- a/devtools/client/debugger/new/src/actions/utils/moz.build
+++ b/devtools/client/debugger/new/src/actions/utils/moz.build
@@ -2,11 +2,11 @@
 # 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/.
 
 DIRS += [
     'middleware',
 ]
 
-CompiledModules(
+DebuggerModules(
     'create-store.js',
 )
--- a/devtools/client/debugger/new/src/client/chrome/moz.build
+++ b/devtools/client/debugger/new/src/client/chrome/moz.build
@@ -2,13 +2,13 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'commands.js',
     'create.js',
     'events.js',
 )
--- a/devtools/client/debugger/new/src/client/firefox/moz.build
+++ b/devtools/client/debugger/new/src/client/firefox/moz.build
@@ -2,14 +2,14 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'commands.js',
     'create.js',
     'events.js',
     'workers.js',
 )
--- a/devtools/client/debugger/new/src/client/moz.build
+++ b/devtools/client/debugger/new/src/client/moz.build
@@ -3,13 +3,13 @@
 # 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/.
 
 DIRS += [
     'chrome',
     'firefox',
 ]
 
-CompiledModules(
+DebuggerModules(
     'chrome.js',
     'firefox.js',
     'index.js',
 )
--- a/devtools/client/debugger/new/src/components/Editor/Preview/moz.build
+++ b/devtools/client/debugger/new/src/components/Editor/Preview/moz.build
@@ -2,12 +2,12 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'index.js',
     'Popup.js',
 )
--- a/devtools/client/debugger/new/src/components/Editor/menus/moz.build
+++ b/devtools/client/debugger/new/src/components/Editor/menus/moz.build
@@ -2,13 +2,13 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'breakpoints.js',
     'editor.js',
     'source.js',
 )
--- a/devtools/client/debugger/new/src/components/Editor/moz.build
+++ b/devtools/client/debugger/new/src/components/Editor/moz.build
@@ -3,17 +3,17 @@
 # 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/.
 
 DIRS += [
     'menus',
     'Preview',
 ]
 
-CompiledModules(
+DebuggerModules(
     'Breakpoint.js',
     'Breakpoints.js',
     'ColumnBreakpoint.js',
     'ColumnBreakpoints.js',
     'ConditionalPanel.js',
     'DebugLine.js',
     'EditorMenu.js',
     'EmptyLines.js',
--- a/devtools/client/debugger/new/src/components/PrimaryPanes/moz.build
+++ b/devtools/client/debugger/new/src/components/PrimaryPanes/moz.build
@@ -2,15 +2,15 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'index.js',
     'Outline.js',
     'OutlineFilter.js',
     'SourcesTree.js',
     'SourcesTreeItem.js',
 )
--- a/devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/moz.build
+++ b/devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/moz.build
@@ -2,16 +2,16 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'Breakpoint.js',
     'BreakpointHeading.js',
     'BreakpointHeadingsContextMenu.js',
     'BreakpointsContextMenu.js',
     'ExceptionOption.js',
     'index.js',
 )
--- a/devtools/client/debugger/new/src/components/SecondaryPanes/Frames/moz.build
+++ b/devtools/client/debugger/new/src/components/SecondaryPanes/Frames/moz.build
@@ -2,16 +2,16 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'Frame.js',
     'FrameIndent.js',
     'FrameMenu.js',
     'Group.js',
     'index.js',
     'WhyPaused.js',
 )
--- a/devtools/client/debugger/new/src/components/SecondaryPanes/moz.build
+++ b/devtools/client/debugger/new/src/components/SecondaryPanes/moz.build
@@ -3,17 +3,17 @@
 # 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/.
 
 DIRS += [
     'Breakpoints',
     'Frames',
 ]
 
-CompiledModules(
+DebuggerModules(
     'CommandBar.js',
     'EventListeners.js',
     'Expressions.js',
     'index.js',
     'Scopes.js',
     'UtilsBar.js',
     'Worker.js',
     'Workers.js',
--- a/devtools/client/debugger/new/src/components/moz.build
+++ b/devtools/client/debugger/new/src/components/moz.build
@@ -5,16 +5,16 @@
 
 DIRS += [
     'Editor',
     'PrimaryPanes',
     'SecondaryPanes',
     'shared',
 ]
 
-CompiledModules(
+DebuggerModules(
     'A11yIntention.js',
     'App.js',
     'ProjectSearch.js',
     'QuickOpenModal.js',
     'ShortcutsModal.js',
     'WelcomeBox.js',
 )
--- a/devtools/client/debugger/new/src/components/shared/Button/moz.build
+++ b/devtools/client/debugger/new/src/components/shared/Button/moz.build
@@ -2,14 +2,14 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'CloseButton.js',
     'CommandBarButton.js',
     'index.js',
     'PaneToggleButton.js',
 )
--- a/devtools/client/debugger/new/src/components/shared/Button/styles/moz.build
+++ b/devtools/client/debugger/new/src/components/shared/Button/styles/moz.build
@@ -2,13 +2,13 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'CloseButton.css',
     'CommandBarButton.css',
     'PaneToggleButton.css',
 )
--- a/devtools/client/debugger/new/src/components/shared/moz.build
+++ b/devtools/client/debugger/new/src/components/shared/moz.build
@@ -2,17 +2,17 @@
 # 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/.
 
 DIRS += [
     'Button',
 ]
 
-CompiledModules(
+DebuggerModules(
     'AccessibleImage.js',
     'Accordion.js',
     'Badge.js',
     'BracketArrow.js',
     'Dropdown.js',
     'ManagedTree.js',
     'Modal.js',
     'Popover.js',
--- a/devtools/client/debugger/new/src/moz.build
+++ b/devtools/client/debugger/new/src/moz.build
@@ -8,13 +8,13 @@ DIRS += [
     'client',
     'components',
     'reducers',
     'selectors',
     'utils',
     'workers',
 ]
 
-CompiledModules(
+DebuggerModules(
     'main.development.js',
     'main.js',
     'vendors.js',
 )
--- a/devtools/client/debugger/new/src/reducers/moz.build
+++ b/devtools/client/debugger/new/src/reducers/moz.build
@@ -2,17 +2,17 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'ast.js',
     'async-requests.js',
     'breakpoints.js',
     'debuggee.js',
     'event-listeners.js',
     'expressions.js',
     'file-search.js',
     'index.js',
--- a/devtools/client/debugger/new/src/selectors/moz.build
+++ b/devtools/client/debugger/new/src/selectors/moz.build
@@ -2,17 +2,17 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'breakpointAtLocation.js',
     'breakpoints.js',
     'breakpointSources.js',
     'getCallStackFrames.js',
     'inComponent.js',
     'index.js',
     'isSelectedFrameVisible.js',
     'visibleBreakpoints.js',
--- a/devtools/client/debugger/new/src/utils/breakpoint/moz.build
+++ b/devtools/client/debugger/new/src/utils/breakpoint/moz.build
@@ -2,12 +2,12 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'astBreakpointLocation.js',
     'index.js',
 )
--- a/devtools/client/debugger/new/src/utils/editor/moz.build
+++ b/devtools/client/debugger/new/src/utils/editor/moz.build
@@ -2,17 +2,17 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'create-editor.js',
     'get-expression.js',
     'get-token-location.js',
     'index.js',
     'source-documents.js',
     'source-editor.js',
     'source-search.js',
     'token-events.js',
--- a/devtools/client/debugger/new/src/utils/moz.build
+++ b/devtools/client/debugger/new/src/utils/moz.build
@@ -5,17 +5,17 @@
 
 DIRS += [
     'breakpoint',
     'editor',
     'pause',
     'sources-tree',
 ]
 
-CompiledModules(
+DebuggerModules(
     'assert.js',
     'ast.js',
     'asyncStoreHelper.js',
     'bootstrap.js',
     'build-query.js',
     'clipboard.js',
     'connect.js',
     'dbg.js',
--- a/devtools/client/debugger/new/src/utils/pause/frames/moz.build
+++ b/devtools/client/debugger/new/src/utils/pause/frames/moz.build
@@ -2,16 +2,16 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'annotateFrames.js',
     'collapseFrames.js',
     'displayName.js',
     'getFrameUrl.js',
     'getLibraryFromUrl.js',
     'index.js',
 )
--- a/devtools/client/debugger/new/src/utils/pause/mapScopes/moz.build
+++ b/devtools/client/debugger/new/src/utils/pause/mapScopes/moz.build
@@ -2,17 +2,17 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'buildGeneratedBindingList.js',
     'filtering.js',
     'findGeneratedBindingFromPosition.js',
     'getApplicableBindingsForOriginalPosition.js',
     'index.js',
     'locColumn.js',
     'mappingContains.js',
     'positionCmp.js',
--- a/devtools/client/debugger/new/src/utils/pause/moz.build
+++ b/devtools/client/debugger/new/src/utils/pause/moz.build
@@ -4,12 +4,12 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
     'frames',
     'mapScopes',
     'scopes',
 ]
 
-CompiledModules(
+DebuggerModules(
     'index.js',
     'why.js',
 )
--- a/devtools/client/debugger/new/src/utils/pause/scopes/moz.build
+++ b/devtools/client/debugger/new/src/utils/pause/scopes/moz.build
@@ -2,14 +2,14 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'getScope.js',
     'getVariables.js',
     'index.js',
     'utils.js',
 )
--- a/devtools/client/debugger/new/src/utils/sources-tree/moz.build
+++ b/devtools/client/debugger/new/src/utils/sources-tree/moz.build
@@ -2,17 +2,17 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'addToTree.js',
     'collapseTree.js',
     'createTree.js',
     'formatTree.js',
     'getDirectories.js',
     'getURL.js',
     'index.js',
     'sortTree.js',
--- a/devtools/client/debugger/new/src/workers/moz.build
+++ b/devtools/client/debugger/new/src/workers/moz.build
@@ -4,11 +4,11 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
     'parser',
     'pretty-print',
     'search',
 ]
 
-CompiledModules(
+DebuggerModules(
 
 )
--- a/devtools/client/debugger/new/src/workers/parser/moz.build
+++ b/devtools/client/debugger/new/src/workers/parser/moz.build
@@ -2,11 +2,11 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'index.js',
 )
--- a/devtools/client/debugger/new/src/workers/pretty-print/moz.build
+++ b/devtools/client/debugger/new/src/workers/pretty-print/moz.build
@@ -2,11 +2,11 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'index.js',
 )
--- a/devtools/client/debugger/new/src/workers/search/moz.build
+++ b/devtools/client/debugger/new/src/workers/search/moz.build
@@ -2,11 +2,11 @@
 # 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/.
 
 DIRS += [
 
 ]
 
-CompiledModules(
+DebuggerModules(
     'index.js',
 )
deleted file mode 100644
--- a/devtools/client/shared/build/build.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 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/>. */
-/* globals process, __filename, __dirname */
-
-const Babel = require("./babel");
-const fs = require("fs");
-const _path = require("path");
-
-const defaultPlugins = [
-  "transform-flow-strip-types",
-  "transform-class-properties",
-  "transform-react-jsx",
-];
-
-function transform(filePath) {
-// Use the extra plugins only for the debugger
-  const plugins = filePath.includes("devtools/client/debugger/new")
-    ? require("./build-debugger")(filePath)
-    : defaultPlugins;
-
-  const doc = fs.readFileSync(filePath, "utf8");
-  const out = Babel.transform(doc, { plugins });
-
-  return out.code;
-}
-
-const deps = [
-  __filename,
-  _path.resolve(__dirname, "babel.js"),
-];
-
-for (let i = 2; i < process.argv.length; i++) {
-  const srcPath = process.argv[i];
-  const code = transform(srcPath);
-  const filePath = _path.basename(srcPath);
-  fs.writeFileSync(filePath, code);
-  deps.push(srcPath);
-}
-
-// Print all dependencies prefixed with 'dep:' in order to help node.py, the script that
-// calls this module, to report back the precise list of all dependencies.
-console.log(deps.map(file => "dep:" + file).join("\n"));
deleted file mode 100644
--- a/devtools/client/shared/build/node-templates.mozbuild
+++ /dev/null
@@ -1,41 +0,0 @@
-# vim: set filetype=python:
-# 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/.
-
-@template
-def CompiledModules(*modules):
-  # Compute where to put compiled files into omni.ja package
-  # All DevTools modules are used via resource://devtools/ URI
-  # See devtools/shared/jar.mn for how this resource is mapped into jar package.
-  base = FINAL_TARGET_FILES.chrome.devtools.modules
-
-  compiled_directory_whitelist = (
-    "devtools/client/debugger/new/src",
-  )
-
-  if not RELATIVEDIR.startswith(compiled_directory_whitelist):
-    error("File in directory provided to CompiledModules not allowed: " + RELATIVEDIR)
-
-  # Now, navigate to the right sub-directory into devtools root modules folder
-  for dir in RELATIVEDIR.split('/'):
-    base = base[dir]
-
-  size = 0
-  for m in modules:
-    base += ["!" + m]
-    size += 1
-
-  if size == 0:
-    return
-
-  # For the same reason as https://searchfox.org/mozilla-central/source/mobile/android/base/moz.build#180-184
-  # we have to insert a first entry as recursivemake overrides the first entry and we end up with empty files
-  # for the first file only.
-  outputs = tuple(("node.stub",) + modules)
-  GENERATED_FILES += [outputs]
-
-  bundle = GENERATED_FILES[outputs]
-  bundle.script = '/python/mozbuild/mozbuild/action/node.py:generate'
-  bundle.inputs = ['/devtools/client/shared/build/build.js',]
-  bundle.inputs.extend(modules)
--- a/python/mozbuild/mozbuild/action/node.py
+++ b/python/mozbuild/mozbuild/action/node.py
@@ -5,17 +5,17 @@
 from __future__ import absolute_import, unicode_literals, print_function
 
 import buildconfig
 import pipes
 import subprocess
 import sys
 
 SCRIPT_ALLOWLIST = [
-        buildconfig.topsrcdir + "/devtools/client/shared/build/build.js"
+        buildconfig.topsrcdir + "/devtools/client/debugger/new/build/copy-module.js"
     ]
 
 ALLOWLIST_ERROR = '''
 %s is not
 in SCRIPT_ALLOWLIST in python/mozbuild/mozbuild/action/node.py.
 Using NodeJS from moz.build is currently in beta, and node
 scripts to be executed need to be added to the allowlist and
 reviewed by a build peer so that we can get a better sense of
--- a/tools/rewriting/ThirdPartyPaths.txt
+++ b/tools/rewriting/ThirdPartyPaths.txt
@@ -1,11 +1,10 @@
 browser/components/translation/cld2/
 db/sqlite3/src/
-devtools/client/shared/build/babel.js
 devtools/client/shared/sourceeditor/codemirror/
 devtools/client/shared/sourceeditor/tern/
 devtools/shared/heapsnapshot/CoreDump.pb.cc
 devtools/shared/heapsnapshot/CoreDump.pb.h
 dom/canvas/test/webgl-conf/checkout/closure-library/
 dom/media/gmp/rlz/
 dom/media/gmp/widevine-adapter/content_decryption_module.h
 dom/media/gmp/widevine-adapter/content_decryption_module_export.h