Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 8df97cc

Browse files
AnshulMalikjasonLaster
authored andcommitted
Make SourceRecord fields Read-Only (#5703)
1 parent c05f410 commit 8df97cc

File tree

26 files changed

+46
-41
lines changed

26 files changed

+46
-41
lines changed

src/actions/sources/loadSourceText.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { isLoaded } from "../../utils/source";
1212

1313
import defer from "../../utils/defer";
1414
import type { ThunkArgs } from "../types";
15-
import type { SourceRecord } from "../../reducers/types";
15+
import type { SourceRecord } from "../../types";
1616

1717
const requests = new Map();
1818
import { Services } from "devtools-modules";

src/components/App.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import {
2020
getOrientation
2121
} from "../selectors";
2222

23-
import type { SourceRecord, OrientationType } from "../reducers/types";
23+
import type { OrientationType } from "../reducers/types";
24+
import type { SourceRecord } from "../types";
2425

2526
import { KeyShortcuts, Services } from "devtools-modules";
2627
const shortcuts = new KeyShortcuts({ window });

src/components/Editor/Breakpoints.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import { getSelectedSource, getVisibleBreakpoints } from "../../selectors";
1212
import { makeLocationId } from "../../utils/breakpoint";
1313
import { isLoaded } from "../../utils/source";
1414

15-
import type { SourceRecord, BreakpointsMap } from "../../reducers/types";
15+
import type { BreakpointsMap } from "../../reducers/types";
16+
import type { SourceRecord } from "../../types";
1617

1718
type Props = {
1819
selectedSource: SourceRecord,

src/components/Editor/DebugLine.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ import {
1515
getSelectedSource
1616
} from "../../selectors";
1717

18-
import type { Frame, Why } from "../../types";
19-
import type { SourceRecord } from "../../reducers/types";
18+
import type { Frame, Why, SourceRecord } from "../../types";
2019

2120
type Props = {
2221
selectedFrame: Frame,

src/components/Editor/EmptyLines.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import { connect } from "react-redux";
66
import { Component } from "react";
77
import { getSelectedSource, getEmptyLines } from "../../selectors";
8-
import type { SourceRecord } from "../../reducers/types";
8+
import type { SourceRecord } from "../../types";
99
import { toEditorLine } from "../../utils/editor";
1010

1111
import "./EmptyLines.css";

src/components/Editor/Footer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { shouldShowFooter, shouldShowPrettyPrint } from "../../utils/editor";
2121

2222
import PaneToggleButton from "../shared/Button/PaneToggle";
2323

24-
import type { SourceRecord } from "../../reducers/sources";
24+
import type { SourceRecord } from "../../types";
2525

2626
import "./Footer.css";
2727

src/components/Editor/HighlightLine.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ import {
1515
getSelectedSource
1616
} from "../../selectors";
1717

18-
import type { SourceRecord } from "../../reducers/types";
19-
import type { Frame, Location } from "../../types";
18+
import type { Frame, Location, SourceRecord } from "../../types";
2019

2120
type Props = {
2221
selectedFrame: Frame,

src/components/Editor/Preview/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ import {
1818
import actions from "../../../actions";
1919
import { toEditorRange } from "../../../utils/editor";
2020

21-
import type { SelectedLocation, SourceRecord } from "../../../reducers/types";
21+
import type { SelectedLocation } from "../../../reducers/types";
22+
import type { SourceRecord } from "../../../types";
23+
2224
import type { Preview as PreviewType } from "../../../reducers/ast";
2325

2426
type Props = {

src/components/Editor/SearchBar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { removeOverlay } from "../../utils/editor";
2525
import { scrollList } from "../../utils/result-list";
2626
import classnames from "classnames";
2727

28-
import type { SourceRecord } from "../../reducers/sources";
28+
import type { SourceRecord } from "../../types";
2929
import type { ActiveSearchType } from "../../reducers/ui";
3030
import type { Modifiers, SearchResults } from "../../reducers/file-search";
3131

src/components/Editor/Tab.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { showMenu, buildMenu } from "devtools-contextmenu";
1313
import CloseButton from "../shared/Button/Close";
1414

1515
import type { List } from "immutable";
16-
import type { SourceRecord } from "../../reducers/sources";
16+
import type { SourceRecord } from "../../types";
1717
import type { SourceMetaDataType } from "../../reducers/ast";
1818

1919
import actions from "../../actions";

0 commit comments

Comments
 (0)