forked from mirrors/gecko-dev
		
	Bug 1669956 - [devtools] Fix require paths in reps folder. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D93358
This commit is contained in:
		
							parent
							
								
									7d6dc35518
								
							
						
					
					
						commit
						15547ae76c
					
				
					 15 changed files with 28 additions and 28 deletions
				
			
		|  | @ -4,7 +4,7 @@ | ||||||
| 
 | 
 | ||||||
| const { MODE } = require("./reps/constants"); | const { MODE } = require("./reps/constants"); | ||||||
| const { REPS, getRep } = require("./reps/rep"); | const { REPS, getRep } = require("./reps/rep"); | ||||||
| const objectInspector = require("./object-inspector"); | const objectInspector = require("./object-inspector/index"); | ||||||
| 
 | 
 | ||||||
| const { | const { | ||||||
|   parseURLEncodedText, |   parseURLEncodedText, | ||||||
|  |  | ||||||
|  | @ -2,8 +2,12 @@ | ||||||
|  * License, v. 2.0. If a copy of the MPL was not distributed with this |  * 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/>. */
 |  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 | ||||||
| 
 | 
 | ||||||
| const { Component, createFactory, createElement } = require("react"); | const { | ||||||
| const { connect } = require("react-redux"); |   Component, | ||||||
|  |   createFactory, | ||||||
|  |   createElement, | ||||||
|  | } = require("devtools/client/shared/vendor/react"); | ||||||
|  | const { connect } = require("devtools/client/shared/vendor/react-redux"); | ||||||
| const actions = require("../actions"); | const actions = require("../actions"); | ||||||
| 
 | 
 | ||||||
| const selectors = require("../reducer"); | const selectors = require("../reducer"); | ||||||
|  | @ -14,8 +18,7 @@ require("./ObjectInspector.css"); | ||||||
| 
 | 
 | ||||||
| const ObjectInspectorItem = createFactory(require("./ObjectInspectorItem")); | const ObjectInspectorItem = createFactory(require("./ObjectInspectorItem")); | ||||||
| 
 | 
 | ||||||
| 
 | const Utils = require("../utils/index"); | ||||||
| const Utils = require("../utils"); |  | ||||||
| const { renderRep, shouldRenderRootsInReps } = Utils; | const { renderRep, shouldRenderRootsInReps } = Utils; | ||||||
| const { | const { | ||||||
|   getChildrenWithEvaluations, |   getChildrenWithEvaluations, | ||||||
|  |  | ||||||
|  | @ -2,16 +2,15 @@ | ||||||
|  * License, v. 2.0. If a copy of the MPL was not distributed with this |  * 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/>. */
 |  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 | ||||||
| 
 | 
 | ||||||
| const { Component } = require("react"); | const { Component } = require("devtools/client/shared/vendor/react"); | ||||||
| const dom = require("react-dom-factories"); | const dom = require("devtools/client/shared/vendor/react-dom-factories"); | ||||||
| 
 | 
 | ||||||
| import Services from "devtools-services"; | const Services = require("Services"); | ||||||
| const { appinfo } = Services; | const isMacOS = Services.appinfo.OS === "Darwin"; | ||||||
| const isMacOS = appinfo.OS === "Darwin"; |  | ||||||
| 
 | 
 | ||||||
| const { MODE } = require("../../reps/constants"); | const { MODE } = require("../../reps/constants"); | ||||||
| 
 | 
 | ||||||
| const Utils = require("../utils"); | const Utils = require("../utils/index"); | ||||||
| 
 | 
 | ||||||
| const { | const { | ||||||
|   getValue, |   getValue, | ||||||
|  |  | ||||||
|  | @ -3,7 +3,7 @@ | ||||||
|  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 |  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 | ||||||
| 
 | 
 | ||||||
| const ObjectInspector = require("./components/ObjectInspector"); | const ObjectInspector = require("./components/ObjectInspector"); | ||||||
| const utils = require("./utils"); | const utils = require("./utils/index"); | ||||||
| const reducer = require("./reducer"); | const reducer = require("./reducer"); | ||||||
| const actions = require("./actions"); | const actions = require("./actions"); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -3,12 +3,10 @@ | ||||||
|  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 |  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 | ||||||
| 
 | 
 | ||||||
| const { mount } = require("enzyme"); | const { mount } = require("enzyme"); | ||||||
| const React = require("react"); | const { createFactory } = require("devtools/client/shared/vendor/react"); | ||||||
| 
 | 
 | ||||||
| const { createFactory } = React; | const { Provider } = require("devtools/client/shared/vendor/react-redux"); | ||||||
| 
 | const { combineReducers } = require("devtools/client/shared/vendor/redux"); | ||||||
| const { Provider } = require("react-redux"); |  | ||||||
| const { combineReducers } = require("redux"); |  | ||||||
| 
 | 
 | ||||||
| const { thunk } = require("../../shared/redux/middleware/thunk"); | const { thunk } = require("../../shared/redux/middleware/thunk"); | ||||||
| const { | const { | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
|  * License, v. 2.0. If a copy of the MPL was not distributed with this |  * 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/>. */
 |  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 | ||||||
| 
 | 
 | ||||||
| const Utils = require("../../utils"); | const Utils = require("../../utils/index"); | ||||||
| const { createNode, getChildren, makeNodesForEntries } = Utils.node; | const { createNode, getChildren, makeNodesForEntries } = Utils.node; | ||||||
| 
 | 
 | ||||||
| const { shouldLoadItemEntries } = Utils.loadProperties; | const { shouldLoadItemEntries } = Utils.loadProperties; | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
|  * License, v. 2.0. If a copy of the MPL was not distributed with this |  * 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/>. */
 |  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 | ||||||
| 
 | 
 | ||||||
| const Utils = require("../../utils"); | const Utils = require("../../utils/index"); | ||||||
| const { createNode } = Utils.node; | const { createNode } = Utils.node; | ||||||
| const { shouldLoadItemFullText } = Utils.loadProperties; | const { shouldLoadItemFullText } = Utils.loadProperties; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
|  * License, v. 2.0. If a copy of the MPL was not distributed with this |  * 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/>. */
 |  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 | ||||||
| 
 | 
 | ||||||
| const Utils = require("../../utils"); | const Utils = require("../../utils/index"); | ||||||
| const { | const { | ||||||
|   createNode, |   createNode, | ||||||
|   createGetterNode, |   createGetterNode, | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
|  * License, v. 2.0. If a copy of the MPL was not distributed with this |  * 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/>. */
 |  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 | ||||||
| 
 | 
 | ||||||
| const Utils = require("../../utils"); | const Utils = require("../../utils/index"); | ||||||
| const { | const { | ||||||
|   createNode, |   createNode, | ||||||
|   createGetterNode, |   createGetterNode, | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
|  * License, v. 2.0. If a copy of the MPL was not distributed with this |  * 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/>. */
 |  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 | ||||||
| 
 | 
 | ||||||
| const Utils = require("../../utils"); | const Utils = require("../../utils/index"); | ||||||
| const { | const { | ||||||
|   createNode, |   createNode, | ||||||
|   createGetterNode, |   createGetterNode, | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
|  * License, v. 2.0. If a copy of the MPL was not distributed with this |  * 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/>. */
 |  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 | ||||||
| 
 | 
 | ||||||
| const Utils = require("../../utils"); | const Utils = require("../../utils/index"); | ||||||
| const { | const { | ||||||
|   createNode, |   createNode, | ||||||
|   createGetterNode, |   createGetterNode, | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
|  * License, v. 2.0. If a copy of the MPL was not distributed with this |  * 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/>. */
 |  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 | ||||||
| 
 | 
 | ||||||
| const Utils = require("../../utils"); | const Utils = require("../../utils/index"); | ||||||
| const { shouldRenderRootsInReps } = Utils; | const { shouldRenderRootsInReps } = Utils; | ||||||
| 
 | 
 | ||||||
| const nullStubs = require("../../../reps/stubs/null"); | const nullStubs = require("../../../reps/stubs/null"); | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
|  * License, v. 2.0. If a copy of the MPL was not distributed with this |  * 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/>. */
 |  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 | ||||||
| 
 | 
 | ||||||
| function documentHasSelection(doc = document): boolean { | function documentHasSelection(doc = document) { | ||||||
|   const selection = doc.defaultView.getSelection(); |   const selection = doc.defaultView.getSelection(); | ||||||
|   if (!selection) { |   if (!selection) { | ||||||
|     return false; |     return false; | ||||||
|  |  | ||||||
|  | @ -11,7 +11,7 @@ const { expectActorAttribute } = require("./test-helpers"); | ||||||
| const { ErrorRep } = REPS; | const { ErrorRep } = REPS; | ||||||
| const { MODE } = require("../constants"); | const { MODE } = require("../constants"); | ||||||
| const stubs = require("../stubs/error"); | const stubs = require("../stubs/error"); | ||||||
| const dom = require("react-dom-factories"); | const dom = require("devtools/client/shared/vendor/react-dom-factories"); | ||||||
| 
 | 
 | ||||||
| describe("Error - Simple error", () => { | describe("Error - Simple error", () => { | ||||||
|   // Test object = `new Error("Error message")`
 |   // Test object = `new Error("Error message")`
 | ||||||
|  |  | ||||||
|  | @ -2,13 +2,13 @@ | ||||||
|  * License, v. 2.0. If a copy of the MPL was not distributed with this |  * 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/>. */
 |  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 | ||||||
| 
 | 
 | ||||||
| const PropTypes = require("prop-types"); | const PropTypes = require("devtools/client/shared/vendor/react-prop-types"); | ||||||
| 
 | 
 | ||||||
| const { wrapRender } = require("../reps/rep-utils"); | const { wrapRender } = require("../reps/rep-utils"); | ||||||
| const { MODE } = require("../reps/constants"); | const { MODE } = require("../reps/constants"); | ||||||
| const { ModePropType } = require("../reps/array"); | const { ModePropType } = require("../reps/array"); | ||||||
| 
 | 
 | ||||||
| const dom = require("react-dom-factories"); | const dom = require("devtools/client/shared/vendor/react-dom-factories"); | ||||||
| const { span } = dom; | const { span } = dom; | ||||||
| 
 | 
 | ||||||
| GripLengthBubble.propTypes = { | GripLengthBubble.propTypes = { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Nicolas Chevobbe
						Nicolas Chevobbe