@atlaskit/node-data-provider 8.1.0 → 8.3.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,20 @@
1
1
  # @atlaskit/node-data-provider
2
2
 
3
+ ## 8.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`506d872ef2503`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/506d872ef2503) -
8
+ Add smartlink response caching to browser storage to reduce layoutshift on transition and page
9
+ load
10
+
11
+ ## 8.2.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`c9e2a2b390abf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c9e2a2b390abf) -
16
+ Batch retrieve should batch retrieve block calls in renderer
17
+
3
18
  ## 8.1.0
4
19
 
5
20
  ### Minor Changes
@@ -71,7 +71,7 @@ var NodeDataProvider = exports.NodeDataProvider = /*#__PURE__*/function () {
71
71
  key: "setSSRData",
72
72
  value: function setSSRData() {
73
73
  var ssrData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
74
- if ((0, _platformFeatureFlags.fg)('platform_synced_block_patch1')) {
74
+ if ((0, _platformFeatureFlags.fg)('platform_synced_block_patch_1')) {
75
75
  this.updateCache(ssrData, {
76
76
  strategy: 'replace',
77
77
  source: 'ssr'
@@ -227,7 +227,7 @@ var NodeDataProvider = exports.NodeDataProvider = /*#__PURE__*/function () {
227
227
  // because it could be stale data.
228
228
  if (cacheVersionBeforeRequest === this.cacheVersion) {
229
229
  // Replace promise with the resolved data in the cache
230
- if ((0, _platformFeatureFlags.fg)('platform_synced_block_patch1')) {
230
+ if ((0, _platformFeatureFlags.fg)('platform_synced_block_patch_1')) {
231
231
  this.updateCache((0, _defineProperty2.default)({}, dataKey, _data), {
232
232
  strategy: 'merge',
233
233
  source: 'network'
@@ -84,7 +84,7 @@ export class NodeDataProvider {
84
84
  * @param ssrData A map of node data keys to their corresponding data.
85
85
  */
86
86
  setSSRData(ssrData = {}) {
87
- if (fg('platform_synced_block_patch1')) {
87
+ if (fg('platform_synced_block_patch_1')) {
88
88
  this.updateCache(ssrData, {
89
89
  strategy: 'replace',
90
90
  source: 'ssr'
@@ -210,7 +210,7 @@ export class NodeDataProvider {
210
210
  // because it could be stale data.
211
211
  if (cacheVersionBeforeRequest === this.cacheVersion) {
212
212
  // Replace promise with the resolved data in the cache
213
- if (fg('platform_synced_block_patch1')) {
213
+ if (fg('platform_synced_block_patch_1')) {
214
214
  this.updateCache({
215
215
  [dataKey]: data
216
216
  }, {
@@ -68,7 +68,7 @@ export var NodeDataProvider = /*#__PURE__*/function () {
68
68
  key: "setSSRData",
69
69
  value: function setSSRData() {
70
70
  var ssrData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
71
- if (fg('platform_synced_block_patch1')) {
71
+ if (fg('platform_synced_block_patch_1')) {
72
72
  this.updateCache(ssrData, {
73
73
  strategy: 'replace',
74
74
  source: 'ssr'
@@ -224,7 +224,7 @@ export var NodeDataProvider = /*#__PURE__*/function () {
224
224
  // because it could be stale data.
225
225
  if (cacheVersionBeforeRequest === this.cacheVersion) {
226
226
  // Replace promise with the resolved data in the cache
227
- if (fg('platform_synced_block_patch1')) {
227
+ if (fg('platform_synced_block_patch_1')) {
228
228
  this.updateCache(_defineProperty({}, dataKey, _data), {
229
229
  strategy: 'merge',
230
230
  source: 'network'
@@ -1,3 +1,4 @@
1
1
  export { NodeDataProvider } from './node-data-provider';
2
+ export type { CallbackPayload } from './node-data-provider';
2
3
  export { findNodesToPrefetch } from './utils/find-nodes-to-prefetch';
3
4
  export { prefetchNodeDataProvidersData } from './utils/prefetch-node-data-providers-data';
@@ -34,7 +34,7 @@ type CacheData<Data> = Record<string, {
34
34
  * Represents the payload passed to the callback function when data is fetched.
35
35
  * It can either contain an error or the fetched data.
36
36
  */
37
- type CallbackPayload<Data> = {
37
+ export type CallbackPayload<Data> = {
38
38
  data?: undefined;
39
39
  /** An error that occurred while fetching data. */
40
40
  error: Error;
@@ -1,3 +1,4 @@
1
1
  export { NodeDataProvider } from './node-data-provider';
2
+ export type { CallbackPayload } from './node-data-provider';
2
3
  export { findNodesToPrefetch } from './utils/find-nodes-to-prefetch';
3
4
  export { prefetchNodeDataProvidersData } from './utils/prefetch-node-data-providers-data';
@@ -34,7 +34,7 @@ type CacheData<Data> = Record<string, {
34
34
  * Represents the payload passed to the callback function when data is fetched.
35
35
  * It can either contain an error or the fetched data.
36
36
  */
37
- type CallbackPayload<Data> = {
37
+ export type CallbackPayload<Data> = {
38
38
  data?: undefined;
39
39
  /** An error that occurred while fetching data. */
40
40
  error: Error;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/node-data-provider",
3
- "version": "8.1.0",
3
+ "version": "8.3.0",
4
4
  "description": "Node data provider for @atlaskit/editor-core plugins and @atlaskit/renderer",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -20,7 +20,7 @@
20
20
  "atlaskit:src": "src/index.ts",
21
21
  "dependencies": {
22
22
  "@atlaskit/editor-json-transformer": "^8.31.0",
23
- "@atlaskit/editor-prosemirror": "^7.2.0",
23
+ "@atlaskit/editor-prosemirror": "^7.3.0",
24
24
  "@atlaskit/platform-feature-flags": "^1.1.0",
25
25
  "@babel/runtime": "^7.0.0"
26
26
  },
@@ -51,7 +51,7 @@
51
51
  }
52
52
  },
53
53
  "platform-feature-flags": {
54
- "platform_synced_block_patch1": {
54
+ "platform_synced_block_patch_1": {
55
55
  "type": "boolean"
56
56
  }
57
57
  },