@atlaskit/link-client-extension 2.4.0 → 2.4.1

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,14 @@
1
1
  # @atlaskit/link-client-extension
2
2
 
3
+ ## 2.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#151132](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151132)
8
+ [`3da1333fcf30d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3da1333fcf30d) -
9
+ Adds the 'origin-timezone' header to all cached requests by removing feature flag
10
+ platform.linking-platform.datasource.add-timezone-header
11
+
3
12
  ## 2.4.0
4
13
 
5
14
  ### Minor Changes
@@ -13,7 +13,6 @@ var _react = require("react");
13
13
  var _lru_map = require("lru_map");
14
14
  var _linkProvider = require("@atlaskit/link-provider");
15
15
  var _linkingCommon = require("@atlaskit/linking-common");
16
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
16
  var _useResolverUrl = require("../use-resolver-url");
18
17
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
19
18
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -52,13 +51,13 @@ var useDatasourceClientExtension = exports.useDatasourceClientExtension = functi
52
51
  }
53
52
  return _context.abrupt("return", responsePromise);
54
53
  case 6:
55
- headers = (0, _platformFeatureFlags.fg)('platform.linking-platform.datasource.add-timezone-header') ? {
54
+ headers = {
56
55
  /**
57
- * This header exist to enable the backend to process relative time, eg: "today", with respect to user timezone.
56
+ * This header exists to enable the backend to process relative time, eg: "today", with respect to user timezone.
58
57
  * eg: used in "confluence-object-provider" to process confluence SLLV requests to filter data for relative time.
59
58
  */
60
59
  'origin-timezone': (_Intl = Intl) === null || _Intl === void 0 ? void 0 : _Intl.DateTimeFormat().resolvedOptions().timeZone
61
- } : undefined;
60
+ };
62
61
  _context.prev = 7;
63
62
  responsePromise = (0, _linkingCommon.request)('post', url, data, headers, [200, 201, 202, 203, 204]);
64
63
  lruMap.set(cacheKey, responsePromise);
@@ -330,7 +330,7 @@ var mockDatasourceDataResponseWithSchema = exports.mockDatasourceDataResponseWit
330
330
  });
331
331
  var mockActionsDiscoveryResponse = exports.mockActionsDiscoveryResponse = {
332
332
  actions: [{
333
- actionKey: 'atlassian:issue:update:summary',
333
+ actionKey: 'atlassian:work-item:update:summary',
334
334
  description: 'Updates issue summary',
335
335
  fieldKey: 'summary',
336
336
  integrationKey: 'jira',
@@ -2,7 +2,6 @@ import { useCallback, useMemo } from 'react';
2
2
  import { LRUMap } from 'lru_map';
3
3
  import { useSmartLinkContext } from '@atlaskit/link-provider';
4
4
  import { request } from '@atlaskit/linking-common';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import { useResolverUrl } from '../use-resolver-url';
7
6
  const URL_RESPONSE_CACHE_SIZE = 50;
8
7
  export const datasourceDetailsResponsePromiseCache = new LRUMap(URL_RESPONSE_CACHE_SIZE);
@@ -39,13 +38,13 @@ export const useDatasourceClientExtension = () => {
39
38
  if (responsePromise) {
40
39
  return responsePromise;
41
40
  }
42
- const headers = fg('platform.linking-platform.datasource.add-timezone-header') ? {
41
+ const headers = {
43
42
  /**
44
- * This header exist to enable the backend to process relative time, eg: "today", with respect to user timezone.
43
+ * This header exists to enable the backend to process relative time, eg: "today", with respect to user timezone.
45
44
  * eg: used in "confluence-object-provider" to process confluence SLLV requests to filter data for relative time.
46
45
  */
47
46
  'origin-timezone': (_Intl = Intl) === null || _Intl === void 0 ? void 0 : _Intl.DateTimeFormat().resolvedOptions().timeZone
48
- } : undefined;
47
+ };
49
48
  try {
50
49
  responsePromise = request('post', url, data, headers, [200, 201, 202, 203, 204]);
51
50
  lruMap.set(cacheKey, responsePromise);
@@ -322,7 +322,7 @@ export const mockDatasourceDataResponseWithSchema = {
322
322
  };
323
323
  export const mockActionsDiscoveryResponse = {
324
324
  actions: [{
325
- actionKey: 'atlassian:issue:update:summary',
325
+ actionKey: 'atlassian:work-item:update:summary',
326
326
  description: 'Updates issue summary',
327
327
  fieldKey: 'summary',
328
328
  integrationKey: 'jira',
@@ -8,7 +8,6 @@ import { useCallback, useMemo } from 'react';
8
8
  import { LRUMap } from 'lru_map';
9
9
  import { useSmartLinkContext } from '@atlaskit/link-provider';
10
10
  import { request } from '@atlaskit/linking-common';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
11
  import { useResolverUrl } from '../use-resolver-url';
13
12
  var URL_RESPONSE_CACHE_SIZE = 50;
14
13
  export var datasourceDetailsResponsePromiseCache = new LRUMap(URL_RESPONSE_CACHE_SIZE);
@@ -45,13 +44,13 @@ export var useDatasourceClientExtension = function useDatasourceClientExtension(
45
44
  }
46
45
  return _context.abrupt("return", responsePromise);
47
46
  case 6:
48
- headers = fg('platform.linking-platform.datasource.add-timezone-header') ? {
47
+ headers = {
49
48
  /**
50
- * This header exist to enable the backend to process relative time, eg: "today", with respect to user timezone.
49
+ * This header exists to enable the backend to process relative time, eg: "today", with respect to user timezone.
51
50
  * eg: used in "confluence-object-provider" to process confluence SLLV requests to filter data for relative time.
52
51
  */
53
52
  'origin-timezone': (_Intl = Intl) === null || _Intl === void 0 ? void 0 : _Intl.DateTimeFormat().resolvedOptions().timeZone
54
- } : undefined;
53
+ };
55
54
  _context.prev = 7;
56
55
  responsePromise = request('post', url, data, headers, [200, 201, 202, 203, 204]);
57
56
  lruMap.set(cacheKey, responsePromise);
@@ -323,7 +323,7 @@ export var mockDatasourceDataResponseWithSchema = _objectSpread(_objectSpread({}
323
323
  });
324
324
  export var mockActionsDiscoveryResponse = {
325
325
  actions: [{
326
- actionKey: 'atlassian:issue:update:summary',
326
+ actionKey: 'atlassian:work-item:update:summary',
327
327
  description: 'Updates issue summary',
328
328
  fieldKey: 'summary',
329
329
  integrationKey: 'jira',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-client-extension",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "Extension methods for linking platform client",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,7 +33,7 @@
33
33
  ".": "./src/index.ts"
34
34
  },
35
35
  "dependencies": {
36
- "@atlaskit/linking-common": "^5.11.0",
36
+ "@atlaskit/linking-common": "^5.12.0",
37
37
  "@atlaskit/linking-types": "^9.0.0",
38
38
  "@atlaskit/platform-feature-flags": "0.3.0",
39
39
  "@babel/runtime": "^7.0.0",
@@ -90,10 +90,5 @@
90
90
  "import-no-extraneous-disable-for-examples-and-docs"
91
91
  ]
92
92
  }
93
- },
94
- "platform-feature-flags": {
95
- "platform.linking-platform.datasource.add-timezone-header": {
96
- "type": "boolean"
97
- }
98
93
  }
99
94
  }