@atlaskit/editor-synced-block-provider 6.6.7 → 6.6.8

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,11 @@
1
1
  # @atlaskit/editor-synced-block-provider
2
2
 
3
+ ## 6.6.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 6.6.7
4
10
 
5
11
  ### Patch Changes
@@ -211,6 +211,8 @@ var ReferenceSyncBlockStoreManager = exports.ReferenceSyncBlockStoreManager = /*
211
211
  var syncBlockNode = (0, _utils.createSyncBlockNode)('', resourceId);
212
212
  var providerData = (_this$dataProvider2 = this.dataProvider) === null || _this$dataProvider2 === void 0 || (_this$dataProvider2 = _this$dataProvider2.getNodeDataFromCache(syncBlockNode)) === null || _this$dataProvider2 === void 0 ? void 0 : _this$dataProvider2.data;
213
213
  if (providerData) {
214
+ // Initial provider cache data can come from SSR/prefetch and bypass updateCache(),
215
+ // so strip annotations here before references render existing synced block payloads.
214
216
  return this.stripAnnotationMarksFromReferenceData(providerData);
215
217
  }
216
218
  return this.getFromSessionCache(resourceId);
@@ -248,6 +250,8 @@ var ReferenceSyncBlockStoreManager = exports.ReferenceSyncBlockStoreManager = /*
248
250
  if (!raw) {
249
251
  return undefined;
250
252
  }
253
+ // Session cache entries written before this sanitizer existed may still include
254
+ // source annotation marks, so keep this read-time safety net for legacy data.
251
255
  return this.stripAnnotationMarksFromReferenceData(JSON.parse(raw));
252
256
  } catch (error) {
253
257
  (0, _monitoring.logException)(error, {
@@ -142,6 +142,8 @@ export class ReferenceSyncBlockStoreManager {
142
142
  const syncBlockNode = createSyncBlockNode('', resourceId);
143
143
  const providerData = (_this$dataProvider2 = this.dataProvider) === null || _this$dataProvider2 === void 0 ? void 0 : (_this$dataProvider2$g = _this$dataProvider2.getNodeDataFromCache(syncBlockNode)) === null || _this$dataProvider2$g === void 0 ? void 0 : _this$dataProvider2$g.data;
144
144
  if (providerData) {
145
+ // Initial provider cache data can come from SSR/prefetch and bypass updateCache(),
146
+ // so strip annotations here before references render existing synced block payloads.
145
147
  return this.stripAnnotationMarksFromReferenceData(providerData);
146
148
  }
147
149
  return this.getFromSessionCache(resourceId);
@@ -175,6 +177,8 @@ export class ReferenceSyncBlockStoreManager {
175
177
  if (!raw) {
176
178
  return undefined;
177
179
  }
180
+ // Session cache entries written before this sanitizer existed may still include
181
+ // source annotation marks, so keep this read-time safety net for legacy data.
178
182
  return this.stripAnnotationMarksFromReferenceData(JSON.parse(raw));
179
183
  } catch (error) {
180
184
  logException(error, {
@@ -204,6 +204,8 @@ export var ReferenceSyncBlockStoreManager = /*#__PURE__*/function () {
204
204
  var syncBlockNode = createSyncBlockNode('', resourceId);
205
205
  var providerData = (_this$dataProvider2 = this.dataProvider) === null || _this$dataProvider2 === void 0 || (_this$dataProvider2 = _this$dataProvider2.getNodeDataFromCache(syncBlockNode)) === null || _this$dataProvider2 === void 0 ? void 0 : _this$dataProvider2.data;
206
206
  if (providerData) {
207
+ // Initial provider cache data can come from SSR/prefetch and bypass updateCache(),
208
+ // so strip annotations here before references render existing synced block payloads.
207
209
  return this.stripAnnotationMarksFromReferenceData(providerData);
208
210
  }
209
211
  return this.getFromSessionCache(resourceId);
@@ -241,6 +243,8 @@ export var ReferenceSyncBlockStoreManager = /*#__PURE__*/function () {
241
243
  if (!raw) {
242
244
  return undefined;
243
245
  }
246
+ // Session cache entries written before this sanitizer existed may still include
247
+ // source annotation marks, so keep this read-time safety net for legacy data.
244
248
  return this.stripAnnotationMarksFromReferenceData(JSON.parse(raw));
245
249
  } catch (error) {
246
250
  logException(error, {
package/package.json CHANGED
@@ -24,12 +24,12 @@
24
24
  ],
25
25
  "atlaskit:src": "src/index.ts",
26
26
  "dependencies": {
27
- "@atlaskit/adf-utils": "^19.30.0",
27
+ "@atlaskit/adf-utils": "^19.31.0",
28
28
  "@atlaskit/editor-json-transformer": "^8.32.0",
29
29
  "@atlaskit/editor-prosemirror": "^7.3.0",
30
30
  "@atlaskit/node-data-provider": "^11.1.0",
31
31
  "@atlaskit/platform-feature-flags": "^1.1.0",
32
- "@atlaskit/tmp-editor-statsig": "^82.1.0",
32
+ "@atlaskit/tmp-editor-statsig": "^83.0.0",
33
33
  "@babel/runtime": "^7.0.0",
34
34
  "@compiled/react": "^0.20.0",
35
35
  "graphql-ws": "^5.14.2",
@@ -38,11 +38,12 @@
38
38
  "uuid": "^3.1.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "@atlaskit/editor-common": "^114.39.0",
41
+ "@atlaskit/editor-common": "^114.46.0",
42
42
  "react": "^18.2.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@testing-library/react": "^16.3.0",
46
+ "react": "^18.2.0",
46
47
  "react-dom": "^18.2.0"
47
48
  },
48
49
  "techstack": {
@@ -81,7 +82,7 @@
81
82
  }
82
83
  },
83
84
  "name": "@atlaskit/editor-synced-block-provider",
84
- "version": "6.6.7",
85
+ "version": "6.6.8",
85
86
  "description": "Synced Block Provider for @atlaskit/editor-plugin-synced-block",
86
87
  "author": "Atlassian Pty Ltd",
87
88
  "license": "Apache-2.0",