@sprucelabs/spruce-mmp-vc-plugin 2.1.389 → 2.1.391

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,9 +22,8 @@ class MockAdjustMmpVcPlugin extends AdjustMmpVcPlugin_1.default {
22
22
  test_utils_1.assert.isTruthy(this.lastTrackedEvent, `You gotta call this.plugins.mmp.trackEvent(...)`);
23
23
  }
24
24
  assertTrackEventWasCalledWith(eventName, options) {
25
- var _a, _b, _c;
26
- test_utils_1.assert.isEqual(eventName, (_a = this.lastTrackedEvent) === null || _a === void 0 ? void 0 : _a.eventName, `this.plugins.mmp.trackEvent(...) was not called with the expected eventName. Expected: ${eventName}, got: ${(_b = this.lastTrackedEvent) === null || _b === void 0 ? void 0 : _b.eventName}`);
27
- test_utils_1.assert.isEqualDeep(options, (_c = this.lastTrackedEvent) === null || _c === void 0 ? void 0 : _c.options, `this.plugins.mmp.trackEvent(...) was not called with the expected options.`);
25
+ test_utils_1.assert.isEqual(eventName, this.lastTrackedEvent?.eventName, `this.plugins.mmp.trackEvent(...) was not called with the expected eventName. Expected: ${eventName}, got: ${this.lastTrackedEvent?.eventName}`);
26
+ test_utils_1.assert.isEqualDeep(options, this.lastTrackedEvent?.options, `this.plugins.mmp.trackEvent(...) was not called with the expected options.`);
28
27
  }
29
28
  assertSetupWasCalled() {
30
29
  test_utils_1.assert.isTruthy(this.lastSetupOptions, `You gotta call this.plugins.mmp.setup(...)`);
@@ -9,7 +9,7 @@ class SpruceError extends error_1.default {
9
9
  friendlyMessage() {
10
10
  const { options } = this;
11
11
  let message;
12
- switch (options === null || options === void 0 ? void 0 : options.code) {
12
+ switch (options?.code) {
13
13
  case 'ADJUST_NOT_SETUP':
14
14
  message =
15
15
  'Adjust is not setup yet. Try `this.plugins.adjustMmp.setup(...)`';
@@ -13,7 +13,7 @@ const mmpAssert = {
13
13
  views.addPlugin('mmp', mockPlugin);
14
14
  },
15
15
  async pluginIsSetup(options) {
16
- const { action, partner, setupOptions } = options !== null && options !== void 0 ? options : {};
16
+ const { action, partner, setupOptions } = options ?? {};
17
17
  assertBeforeEachCalled();
18
18
  (0, schema_1.assertOptions)({
19
19
  action,
@@ -21,9 +21,9 @@ const mmpAssert = {
21
21
  }, ['action', 'partner']);
22
22
  test_utils_1.assert.isEqual(partner, 'adjust', 'The partner you passed was invalid. For now I only support Adjust.');
23
23
  await action();
24
- mockPlugin === null || mockPlugin === void 0 ? void 0 : mockPlugin.assertSetupWasCalled();
24
+ mockPlugin?.assertSetupWasCalled();
25
25
  if (setupOptions) {
26
- mockPlugin === null || mockPlugin === void 0 ? void 0 : mockPlugin.assertSetupWasCalledWith(setupOptions);
26
+ mockPlugin?.assertSetupWasCalledWith(setupOptions);
27
27
  }
28
28
  },
29
29
  async didTrackEvent(options) {
@@ -33,8 +33,8 @@ const mmpAssert = {
33
33
  'eventName',
34
34
  ]);
35
35
  await action();
36
- mockPlugin === null || mockPlugin === void 0 ? void 0 : mockPlugin.assertTrackEventWasCalled();
37
- mockPlugin === null || mockPlugin === void 0 ? void 0 : mockPlugin.assertTrackEventWasCalledWith(eventName, trackOptions);
36
+ mockPlugin?.assertTrackEventWasCalled();
37
+ mockPlugin?.assertTrackEventWasCalledWith(eventName, trackOptions);
38
38
  },
39
39
  };
40
40
  exports.default = mmpAssert;
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "sprucebot",
14
14
  "sprucelabs"
15
15
  ],
16
- "version": "2.1.389",
16
+ "version": "2.1.391",
17
17
  "scripts": {
18
18
  "build.ci": "yarn run build.tsc && yarn run build.resolve-paths && yarn run lint",
19
19
  "build.copy-files": "mkdir -p build && rsync -avzq --exclude='*.ts' ./src/ ./build/",
@@ -41,14 +41,14 @@
41
41
  "watch.tsc": "tsc -w"
42
42
  },
43
43
  "devDependencies": {
44
- "@sprucelabs/esm-postbuild": "^6.0.461",
45
- "@sprucelabs/jest-json-reporter": "^8.0.477",
46
- "@sprucelabs/resolve-path-aliases": "^2.0.456",
44
+ "@sprucelabs/esm-postbuild": "^6.0.463",
45
+ "@sprucelabs/jest-json-reporter": "^8.0.481",
46
+ "@sprucelabs/resolve-path-aliases": "^2.0.458",
47
47
  "@sprucelabs/semantic-release": "^5.0.2",
48
- "@sprucelabs/spruce-test-fixtures": "^62.3.44",
49
- "@sprucelabs/test": "^9.0.50",
50
- "@sprucelabs/test-utils": "^5.1.427",
51
- "@types/node": "^22.7.5",
48
+ "@sprucelabs/spruce-test-fixtures": "^62.3.46",
49
+ "@sprucelabs/test": "^9.0.51",
50
+ "@sprucelabs/test-utils": "^5.1.433",
51
+ "@types/node": "^22.7.6",
52
52
  "chokidar-cli": "^3.0.0",
53
53
  "eslint": "^9.12.0",
54
54
  "eslint-config-spruce": "^11.2.26",
@@ -82,17 +82,17 @@
82
82
  }
83
83
  },
84
84
  "dependencies": {
85
- "@sprucelabs/error": "^6.0.477",
86
- "@sprucelabs/heartwood-view-controllers": "^110.12.154",
87
- "@sprucelabs/mercury-client": "^42.0.527",
88
- "@sprucelabs/mercury-core-events": "^24.3.289",
89
- "@sprucelabs/mercury-types": "^47.0.528",
90
- "@sprucelabs/schema": "^30.0.486",
91
- "@sprucelabs/spruce-core-schemas": "^40.1.472",
92
- "@sprucelabs/spruce-event-plugin": "^62.3.44",
93
- "@sprucelabs/spruce-event-utils": "^40.1.248",
94
- "@sprucelabs/spruce-permission-plugin": "^31.0.614",
95
- "@sprucelabs/spruce-skill-utils": "^31.0.545",
96
- "@sprucelabs/spruce-view-plugin": "^47.0.615"
85
+ "@sprucelabs/error": "^6.0.480",
86
+ "@sprucelabs/heartwood-view-controllers": "^110.12.161",
87
+ "@sprucelabs/mercury-client": "^42.0.529",
88
+ "@sprucelabs/mercury-core-events": "^24.3.291",
89
+ "@sprucelabs/mercury-types": "^47.0.530",
90
+ "@sprucelabs/schema": "^30.0.489",
91
+ "@sprucelabs/spruce-core-schemas": "^40.1.475",
92
+ "@sprucelabs/spruce-event-plugin": "^62.3.46",
93
+ "@sprucelabs/spruce-event-utils": "^40.1.250",
94
+ "@sprucelabs/spruce-permission-plugin": "^31.0.616",
95
+ "@sprucelabs/spruce-skill-utils": "^31.0.548",
96
+ "@sprucelabs/spruce-view-plugin": "^47.0.617"
97
97
  }
98
98
  }