@atlaskit/editor-plugin-analytics 2.3.1 → 3.0.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,51 @@
1
1
  # @atlaskit/editor-plugin-analytics
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#181024](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/181024)
8
+ [`8e80c487ca307`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8e80c487ca307) - ##
9
+ Make `@atlaskit/editor-common` a peer dependency
10
+
11
+ **WHAT:** `@atlaskit/editor-common` has been moved from `dependencies` to `peerDependencies` in
12
+ all editor plugin packages.
13
+
14
+ **WHY:** This change ensures that only a single version of `@atlaskit/editor-common` is used in
15
+ consuming applications, preventing issues caused by multiple versions of singleton libraries (such
16
+ as context mismatches or duplicated state). This is especially important for packages that rely on
17
+ shared context or singletons.
18
+
19
+ **HOW TO ADJUST:**
20
+
21
+ - Consumers must now explicitly install `@atlaskit/editor-common` in their own project if they use
22
+ any of these editor plugins.
23
+ - Ensure the version you install matches the version required by the plugins.
24
+ - You can use the
25
+ [`check-peer-dependencies`](https://www.npmjs.com/package/check-peer-dependencies) package to
26
+ verify that all required peer dependencies are installed and compatible.
27
+ - Example install command:
28
+ ```
29
+ npm install @atlaskit/editor-common
30
+ ```
31
+ or
32
+ ```
33
+ yarn add @atlaskit/editor-common
34
+ ```
35
+
36
+ **Note:** This is a breaking change. If `@atlaskit/editor-common` is not installed at the
37
+ application level, you may see errors or unexpected behavior.
38
+
39
+ ### Patch Changes
40
+
41
+ - Updated dependencies
42
+
43
+ ## 2.3.2
44
+
45
+ ### Patch Changes
46
+
47
+ - Updated dependencies
48
+
3
49
  ## 2.3.1
4
50
 
5
51
  ### Patch Changes
@@ -238,9 +238,9 @@ var analyticsPlugin = exports.analyticsPlugin = function analyticsPlugin(_ref3)
238
238
  }
239
239
  var createAnalyticsEvent = pluginState.createAnalyticsEvent;
240
240
  var undoAnaltyicsEventTransformer = (0, _undoRedoInputSource.generateUndoRedoInputSoucePayload)(originalTransaction);
241
- steps.forEach(function (_ref10) {
242
- var payload = _ref10.payload,
243
- channel = _ref10.channel;
241
+ steps.forEach(function (_ref0) {
242
+ var payload = _ref0.payload,
243
+ channel = _ref0.channel;
244
244
  var nextPayload = undoAnaltyicsEventTransformer(payload);
245
245
  (0, _analytics.fireAnalyticsEvent)(createAnalyticsEvent)({
246
246
  payload: nextPayload,
@@ -250,10 +250,10 @@ var analyticsPlugin = exports.analyticsPlugin = function analyticsPlugin(_ref3)
250
250
  }
251
251
  };
252
252
  };
253
- function extendPayload(_ref11) {
254
- var payload = _ref11.payload,
255
- duration = _ref11.duration,
256
- distortedDuration = _ref11.distortedDuration;
253
+ function extendPayload(_ref1) {
254
+ var payload = _ref1.payload,
255
+ duration = _ref1.duration,
256
+ distortedDuration = _ref1.distortedDuration;
257
257
  return _objectSpread(_objectSpread({}, payload), {}, {
258
258
  attributes: _objectSpread(_objectSpread({}, payload.attributes), {}, {
259
259
  duration: duration,
@@ -230,9 +230,9 @@ var analyticsPlugin = function analyticsPlugin(_ref3) {
230
230
  }
231
231
  var createAnalyticsEvent = pluginState.createAnalyticsEvent;
232
232
  var undoAnaltyicsEventTransformer = generateUndoRedoInputSoucePayload(originalTransaction);
233
- steps.forEach(function (_ref10) {
234
- var payload = _ref10.payload,
235
- channel = _ref10.channel;
233
+ steps.forEach(function (_ref0) {
234
+ var payload = _ref0.payload,
235
+ channel = _ref0.channel;
236
236
  var nextPayload = undoAnaltyicsEventTransformer(payload);
237
237
  _fireAnalyticsEvent(createAnalyticsEvent)({
238
238
  payload: nextPayload,
@@ -242,10 +242,10 @@ var analyticsPlugin = function analyticsPlugin(_ref3) {
242
242
  }
243
243
  };
244
244
  };
245
- export function extendPayload(_ref11) {
246
- var payload = _ref11.payload,
247
- duration = _ref11.duration,
248
- distortedDuration = _ref11.distortedDuration;
245
+ export function extendPayload(_ref1) {
246
+ var payload = _ref1.payload,
247
+ duration = _ref1.duration,
248
+ distortedDuration = _ref1.distortedDuration;
249
249
  return _objectSpread(_objectSpread({}, payload), {}, {
250
250
  attributes: _objectSpread(_objectSpread({}, payload.attributes), {}, {
251
251
  duration: duration,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-analytics",
3
- "version": "2.3.1",
3
+ "version": "3.0.0",
4
4
  "description": "Analytics plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -9,8 +9,7 @@
9
9
  },
10
10
  "atlassian": {
11
11
  "team": "Editor: Lego",
12
- "singleton": true,
13
- "runReact18": true
12
+ "singleton": true
14
13
  },
15
14
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
16
15
  "main": "dist/cjs/index.js",
@@ -33,14 +32,14 @@
33
32
  "dependencies": {
34
33
  "@atlaskit/adf-schema": "^47.6.0",
35
34
  "@atlaskit/analytics-listeners": "^9.0.0",
36
- "@atlaskit/analytics-next": "^11.0.0",
37
- "@atlaskit/editor-common": "^106.0.0",
38
- "@atlaskit/editor-plugin-feature-flags": "^1.4.0",
35
+ "@atlaskit/analytics-next": "^11.1.0",
36
+ "@atlaskit/editor-plugin-feature-flags": "^2.0.0",
39
37
  "@atlaskit/editor-prosemirror": "7.0.0",
40
38
  "@atlaskit/editor-tables": "^2.9.0",
41
39
  "@babel/runtime": "^7.0.0"
42
40
  },
43
41
  "peerDependencies": {
42
+ "@atlaskit/editor-common": "^107.6.0",
44
43
  "react": "^18.2.0"
45
44
  },
46
45
  "techstack": {