Skip to content

Commit 1bb7ccd

Browse files
committed
Bug 1881816 - Rename ActorConstants.sys.mjs to ActorConstants.mjs. r=amy,omc-reviewers,aminomancer
This better reflects the file is being accessed from both content and system scopes. Differential Revision: https://phabricator.services.mozilla.com/D203401
1 parent d1d1eca commit 1bb7ccd

12 files changed

+19
-23
lines changed

browser/components/asrouter/actors/ASRouterChild.sys.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111

1212
// eslint-disable-next-line mozilla/use-static-import
1313
const { MESSAGE_TYPE_LIST, MESSAGE_TYPE_HASH: msg } =
14-
ChromeUtils.importESModule(
15-
"resource:///modules/asrouter/ActorConstants.sys.mjs"
16-
);
14+
ChromeUtils.importESModule("resource:///modules/asrouter/ActorConstants.mjs");
1715

1816
const VALID_TYPES = new Set(MESSAGE_TYPE_LIST);
1917

browser/components/asrouter/content-src/asrouter-utils.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
33
* You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
// eslint-disable-next-line mozilla/reject-import-system-module-from-non-system
6-
import { MESSAGE_TYPE_HASH as msg } from "../modules/ActorConstants.sys.mjs";
5+
import { MESSAGE_TYPE_HASH as msg } from "../modules/ActorConstants.mjs";
76
import { actionCreators as ac } from "../../newtab/common/Actions.mjs";
87

98
export const ASRouterUtils = {

browser/components/asrouter/content/asrouter-admin.bundle.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ __webpack_require__.r(__webpack_exports__);
1616
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1717
/* harmony export */ ASRouterUtils: () => (/* binding */ ASRouterUtils)
1818
/* harmony export */ });
19-
/* harmony import */ var _modules_ActorConstants_sys_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
19+
/* harmony import */ var _modules_ActorConstants_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
2020
/* harmony import */ var _newtab_common_Actions_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
2121
/* This Source Code Form is subject to the terms of the Mozilla Public
2222
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
2323
* You can obtain one at http://mozilla.org/MPL/2.0/. */
2424

25-
// eslint-disable-next-line mozilla/reject-import-system-module-from-non-system
2625

2726

2827

@@ -45,49 +44,49 @@ const ASRouterUtils = {
4544
},
4645
blockById(id, options) {
4746
return ASRouterUtils.sendMessage({
48-
type: _modules_ActorConstants_sys_mjs__WEBPACK_IMPORTED_MODULE_0__.MESSAGE_TYPE_HASH.BLOCK_MESSAGE_BY_ID,
47+
type: _modules_ActorConstants_mjs__WEBPACK_IMPORTED_MODULE_0__.MESSAGE_TYPE_HASH.BLOCK_MESSAGE_BY_ID,
4948
data: { id, ...options },
5049
});
5150
},
5251
modifyMessageJson(content) {
5352
return ASRouterUtils.sendMessage({
54-
type: _modules_ActorConstants_sys_mjs__WEBPACK_IMPORTED_MODULE_0__.MESSAGE_TYPE_HASH.MODIFY_MESSAGE_JSON,
53+
type: _modules_ActorConstants_mjs__WEBPACK_IMPORTED_MODULE_0__.MESSAGE_TYPE_HASH.MODIFY_MESSAGE_JSON,
5554
data: { content },
5655
});
5756
},
5857
executeAction(button_action) {
5958
return ASRouterUtils.sendMessage({
60-
type: _modules_ActorConstants_sys_mjs__WEBPACK_IMPORTED_MODULE_0__.MESSAGE_TYPE_HASH.USER_ACTION,
59+
type: _modules_ActorConstants_mjs__WEBPACK_IMPORTED_MODULE_0__.MESSAGE_TYPE_HASH.USER_ACTION,
6160
data: button_action,
6261
});
6362
},
6463
unblockById(id) {
6564
return ASRouterUtils.sendMessage({
66-
type: _modules_ActorConstants_sys_mjs__WEBPACK_IMPORTED_MODULE_0__.MESSAGE_TYPE_HASH.UNBLOCK_MESSAGE_BY_ID,
65+
type: _modules_ActorConstants_mjs__WEBPACK_IMPORTED_MODULE_0__.MESSAGE_TYPE_HASH.UNBLOCK_MESSAGE_BY_ID,
6766
data: { id },
6867
});
6968
},
7069
blockBundle(bundle) {
7170
return ASRouterUtils.sendMessage({
72-
type: _modules_ActorConstants_sys_mjs__WEBPACK_IMPORTED_MODULE_0__.MESSAGE_TYPE_HASH.BLOCK_BUNDLE,
71+
type: _modules_ActorConstants_mjs__WEBPACK_IMPORTED_MODULE_0__.MESSAGE_TYPE_HASH.BLOCK_BUNDLE,
7372
data: { bundle },
7473
});
7574
},
7675
unblockBundle(bundle) {
7776
return ASRouterUtils.sendMessage({
78-
type: _modules_ActorConstants_sys_mjs__WEBPACK_IMPORTED_MODULE_0__.MESSAGE_TYPE_HASH.UNBLOCK_BUNDLE,
77+
type: _modules_ActorConstants_mjs__WEBPACK_IMPORTED_MODULE_0__.MESSAGE_TYPE_HASH.UNBLOCK_BUNDLE,
7978
data: { bundle },
8079
});
8180
},
8281
overrideMessage(id) {
8382
return ASRouterUtils.sendMessage({
84-
type: _modules_ActorConstants_sys_mjs__WEBPACK_IMPORTED_MODULE_0__.MESSAGE_TYPE_HASH.OVERRIDE_MESSAGE,
83+
type: _modules_ActorConstants_mjs__WEBPACK_IMPORTED_MODULE_0__.MESSAGE_TYPE_HASH.OVERRIDE_MESSAGE,
8584
data: { id },
8685
});
8786
},
8887
editState(key, value) {
8988
return ASRouterUtils.sendMessage({
90-
type: _modules_ActorConstants_sys_mjs__WEBPACK_IMPORTED_MODULE_0__.MESSAGE_TYPE_HASH.EDIT_STATE,
89+
type: _modules_ActorConstants_mjs__WEBPACK_IMPORTED_MODULE_0__.MESSAGE_TYPE_HASH.EDIT_STATE,
9190
data: { [key]: value },
9291
});
9392
},

browser/components/asrouter/modules/ASRouterParentProcessMessageHandler.sys.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
55

66
import { ASRouterPreferences } from "resource:///modules/asrouter/ASRouterPreferences.sys.mjs";
7-
import { MESSAGE_TYPE_HASH as msg } from "resource:///modules/asrouter/ActorConstants.sys.mjs";
7+
import { MESSAGE_TYPE_HASH as msg } from "resource:///modules/asrouter/ActorConstants.mjs";
88

99
export class ASRouterParentProcessMessageHandler {
1010
constructor({

browser/components/asrouter/moz.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ FINAL_TARGET_FILES.actors += [
1515
]
1616

1717
EXTRA_JS_MODULES.asrouter += [
18-
"modules/ActorConstants.sys.mjs",
18+
"modules/ActorConstants.mjs",
1919
"modules/ASRouter.sys.mjs",
2020
"modules/ASRouterDefaultConfig.sys.mjs",
2121
"modules/ASRouterNewTabHook.sys.mjs",

browser/components/asrouter/tests/unit/ASRouterChild.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*eslint max-nested-callbacks: ["error", 10]*/
22
import { ASRouterChild } from "actors/ASRouterChild.sys.mjs";
3-
import { MESSAGE_TYPE_HASH as msg } from "modules/ActorConstants.sys.mjs";
3+
import { MESSAGE_TYPE_HASH as msg } from "modules/ActorConstants.mjs";
44

55
describe("ASRouterChild", () => {
66
let asRouterChild = null;

browser/components/asrouter/tests/unit/ASRouterParent.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ASRouterParent } from "actors/ASRouterParent.sys.mjs";
2-
import { MESSAGE_TYPE_HASH as msg } from "modules/ActorConstants.sys.mjs";
2+
import { MESSAGE_TYPE_HASH as msg } from "modules/ActorConstants.mjs";
33

44
describe("ASRouterParent", () => {
55
let asRouterParent = null;

browser/components/asrouter/tests/unit/ASRouterParentProcessMessageHandler.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ASRouterParentProcessMessageHandler } from "modules/ASRouterParentProcessMessageHandler.sys.mjs";
22
import { _ASRouter } from "modules/ASRouter.sys.mjs";
3-
import { MESSAGE_TYPE_HASH as msg } from "modules/ActorConstants.sys.mjs";
3+
import { MESSAGE_TYPE_HASH as msg } from "modules/ActorConstants.mjs";
44

55
describe("ASRouterParentProcessMessageHandler", () => {
66
let handler = null;

browser/components/asrouter/tests/unit/unit-entry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import FxMSCommonSchema from "../../content-src/schemas/FxMSCommon.schema.json";
1414
import {
1515
MESSAGE_TYPE_LIST,
1616
MESSAGE_TYPE_HASH,
17-
} from "modules/ActorConstants.sys.mjs";
17+
} from "modules/ActorConstants.mjs";
1818

1919
enzyme.configure({ adapter: new Adapter() });
2020

browser/components/newtab/lib/TelemetryFeed.sys.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
1818

1919
// eslint-disable-next-line mozilla/use-static-import
2020
const { MESSAGE_TYPE_HASH: msg } = ChromeUtils.importESModule(
21-
"resource:///modules/asrouter/ActorConstants.sys.mjs"
21+
"resource:///modules/asrouter/ActorConstants.mjs"
2222
);
2323

2424
import {

browser/components/newtab/test/xpcshell/test_TelemetryFeed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const { actionCreators: ac, actionTypes: at } = ChromeUtils.importESModule(
88
);
99

1010
const { MESSAGE_TYPE_HASH: msg } = ChromeUtils.importESModule(
11-
"resource:///modules/asrouter/ActorConstants.sys.mjs"
11+
"resource:///modules/asrouter/ActorConstants.mjs"
1212
);
1313

1414
const { updateAppInfo } = ChromeUtils.importESModule(

0 commit comments

Comments
 (0)