@atlaskit/media-test-helpers 40.0.7 → 41.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,30 @@
1
1
  # @atlaskit/media-test-helpers
2
2
 
3
+ ## 41.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`770f036c93884`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/770f036c93884) -
8
+ Removed `react-intl-next` alias and replaced all usages with `react-intl` directly.
9
+
10
+ What changed: The `react-intl-next` npm alias (which resolved to `react-intl@^5`) has been
11
+ removed. All imports now reference `react-intl` directly, and `peerDependencies` have been updated
12
+ to `"^5.25.1 || ^6.0.0 || ^7.0.0"`.
13
+
14
+ How consumer should update their code: Ensure `react-intl` is installed at a version satisfying
15
+ `^5.25.1 || ^6.0.0 || ^7.0.0`. If your application was using `react-intl-next` as an npm alias, it
16
+ can be safely removed. Replace any remaining `react-intl-next` imports with `react-intl`.
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
22
+ ## 40.0.8
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies
27
+
3
28
  ## 40.0.7
4
29
 
5
30
  ### Patch Changes
@@ -8,8 +8,9 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.I18NWrapper = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
- var _reactIntlNext = require("react-intl-next");
12
- var _LocaleSelect = _interopRequireWildcard(require("@atlaskit/locale/LocaleSelect"));
11
+ var _reactIntl = require("react-intl");
12
+ var _LocaleSelect = _interopRequireDefault(require("@atlaskit/locale/LocaleSelect"));
13
+ var _defaultLocales = _interopRequireDefault(require("@atlaskit/locale/default-locales"));
13
14
  var _locales = require("@atlaskit/media-ui/locales");
14
15
  var _primitives = require("@atlaskit/primitives");
15
16
  var _form = require("@atlaskit/form");
@@ -22,13 +23,13 @@ function getMessages(localeValue) {
22
23
  return _locales.locales[langWithRegion] || _locales.locales[lang];
23
24
  }
24
25
  var findLocale = function findLocale(initialLocale) {
25
- return _LocaleSelect.defaultLocales.find(function (locale) {
26
+ return _defaultLocales.default.find(function (locale) {
26
27
  return locale.value === initialLocale;
27
- }) || initialLocale && _LocaleSelect.defaultLocales.find(function (locale) {
28
+ }) || initialLocale && _defaultLocales.default.find(function (locale) {
28
29
  return locale.value.includes(initialLocale);
29
30
  });
30
31
  };
31
- var defaultLocale = _LocaleSelect.defaultLocales[0];
32
+ var defaultLocale = _defaultLocales.default[0];
32
33
  var I18NWrapper = exports.I18NWrapper = function I18NWrapper(_ref) {
33
34
  var children = _ref.children,
34
35
  initialLocale = _ref.initialLocale;
@@ -46,7 +47,7 @@ var I18NWrapper = exports.I18NWrapper = function I18NWrapper(_ref) {
46
47
  id: "media-locale-select",
47
48
  onLocaleChange: setLocale,
48
49
  defaultLocale: locale
49
- })), /*#__PURE__*/_react.default.createElement(_reactIntlNext.IntlProvider, {
50
+ })), /*#__PURE__*/_react.default.createElement(_reactIntl.IntlProvider, {
50
51
  locale: lang,
51
52
  messages: messages
52
53
  // We need to add this key to force a re-render and refresh translations
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.renderWithIntl = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _reactIntlNext = require("react-intl-next");
9
+ var _reactIntl = require("react-intl");
10
10
  /**
11
11
  * Lazy require to avoid loading @testing-library/react during SSR tests.
12
12
  * jest.resetModules() clears the cache, so RTL would register its hooks inside tests.
@@ -14,7 +14,7 @@ var _reactIntlNext = require("react-intl-next");
14
14
  var renderWithIntl = exports.renderWithIntl = function renderWithIntl(component) {
15
15
  var _require = require('@testing-library/react'),
16
16
  render = _require.render;
17
- return render( /*#__PURE__*/_react.default.createElement(_reactIntlNext.IntlProvider, {
17
+ return render( /*#__PURE__*/_react.default.createElement(_reactIntl.IntlProvider, {
18
18
  locale: "en"
19
19
  }, component));
20
20
  };
@@ -1,6 +1,7 @@
1
1
  import React, { useState } from 'react';
2
- import { IntlProvider } from 'react-intl-next';
3
- import LocaleSelect, { defaultLocales } from '@atlaskit/locale/LocaleSelect';
2
+ import { IntlProvider } from 'react-intl';
3
+ import LocaleSelect from '@atlaskit/locale/LocaleSelect';
4
+ import defaultLocales from '@atlaskit/locale/default-locales';
4
5
  import { locales } from '@atlaskit/media-ui/locales';
5
6
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
6
7
  import { Box, xcss } from '@atlaskit/primitives';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { IntlProvider } from 'react-intl-next';
2
+ import { IntlProvider } from 'react-intl';
3
3
  /**
4
4
  * Lazy require to avoid loading @testing-library/react during SSR tests.
5
5
  * jest.resetModules() clears the cache, so RTL would register its hooks inside tests.
@@ -1,7 +1,8 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React, { useState } from 'react';
3
- import { IntlProvider } from 'react-intl-next';
4
- import LocaleSelect, { defaultLocales } from '@atlaskit/locale/LocaleSelect';
3
+ import { IntlProvider } from 'react-intl';
4
+ import LocaleSelect from '@atlaskit/locale/LocaleSelect';
5
+ import defaultLocales from '@atlaskit/locale/default-locales';
5
6
  import { locales } from '@atlaskit/media-ui/locales';
6
7
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
7
8
  import { Box, xcss } from '@atlaskit/primitives';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { IntlProvider } from 'react-intl-next';
2
+ import { IntlProvider } from 'react-intl';
3
3
  /**
4
4
  * Lazy require to avoid loading @testing-library/react during SSR tests.
5
5
  * jest.resetModules() clears the cache, so RTL would register its hooks inside tests.
@@ -1,5 +1,5 @@
1
1
  export declare const defaultCollectionName = "MediaServicesSample";
2
2
  export declare const onlyAnimatedGifsCollectionName = "only-animated-gifs";
3
- export declare const fileCollectionName: "MediaServicesSampleFiles";
3
+ export declare const fileCollectionName: 'MediaServicesSampleFiles';
4
4
  export declare const defaultMediaPickerCollectionName = "mediapicker-test";
5
5
  export declare const collectionNames: string[];
@@ -1,7 +1,7 @@
1
1
  import { MediaClient } from '@atlaskit/media-client';
2
2
  import { type MediaClientConfig } from '@atlaskit/media-core';
3
3
  import { type MediaEnv } from './mediaPickerAuthProvider';
4
- export declare const defaultBaseUrl: "https://media.staging.atl-paas.net";
4
+ export declare const defaultBaseUrl: 'https://media.staging.atl-paas.net';
5
5
  export declare const defaultParams: {
6
6
  clientId: string;
7
7
  asapIssuer: string;
@@ -1,5 +1,5 @@
1
1
  export declare const defaultCollectionName = "MediaServicesSample";
2
2
  export declare const onlyAnimatedGifsCollectionName = "only-animated-gifs";
3
- export declare const fileCollectionName: "MediaServicesSampleFiles";
3
+ export declare const fileCollectionName: 'MediaServicesSampleFiles';
4
4
  export declare const defaultMediaPickerCollectionName = "mediapicker-test";
5
5
  export declare const collectionNames: string[];
@@ -1,7 +1,7 @@
1
1
  import { MediaClient } from '@atlaskit/media-client';
2
2
  import { type MediaClientConfig } from '@atlaskit/media-core';
3
3
  import { type MediaEnv } from './mediaPickerAuthProvider';
4
- export declare const defaultBaseUrl: "https://media.staging.atl-paas.net";
4
+ export declare const defaultBaseUrl: 'https://media.staging.atl-paas.net';
5
5
  export declare const defaultParams: {
6
6
  clientId: string;
7
7
  asapIssuer: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-test-helpers",
3
- "version": "40.0.7",
3
+ "version": "41.0.0",
4
4
  "description": "Collection of test helpers used in media component stories and specs",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,18 +28,18 @@
28
28
  "@atlaskit/button": "^23.11.0",
29
29
  "@atlaskit/checkbox": "^17.3.0",
30
30
  "@atlaskit/form": "^15.5.0",
31
- "@atlaskit/icon": "^34.0.0",
32
- "@atlaskit/locale": "^3.0.0",
31
+ "@atlaskit/icon": "^34.2.0",
32
+ "@atlaskit/locale": "^4.1.0",
33
33
  "@atlaskit/media-client": "^36.0.0",
34
34
  "@atlaskit/media-common": "^13.0.0",
35
35
  "@atlaskit/media-state": "^2.0.0",
36
- "@atlaskit/media-ui": "^28.7.0",
36
+ "@atlaskit/media-ui": "^29.0.0",
37
37
  "@atlaskit/platform-feature-flags": "^1.1.0",
38
38
  "@atlaskit/popup": "^4.16.0",
39
- "@atlaskit/primitives": "^18.1.0",
40
- "@atlaskit/tabs": "^19.0.0",
39
+ "@atlaskit/primitives": "^19.0.0",
40
+ "@atlaskit/tabs": "^19.1.0",
41
41
  "@atlaskit/textfield": "^8.3.0",
42
- "@atlaskit/tokens": "^12.0.0",
42
+ "@atlaskit/tokens": "^13.0.0",
43
43
  "@atlaskit/tooltip": "^21.1.0",
44
44
  "@atlaskit/ufo": "^0.4.0",
45
45
  "@babel/runtime": "^7.0.0",
@@ -49,19 +49,20 @@
49
49
  "exenv": "^1.2.2",
50
50
  "kakapo": "^4.0.6",
51
51
  "mock-socket": "^9.3.1",
52
- "react-intl-next": "npm:react-intl@^5.18.1",
53
52
  "rxjs": "^5.5.0",
54
53
  "uuid": "^3.1.0",
55
54
  "xhr-mock": "^2.4.0"
56
55
  },
57
56
  "peerDependencies": {
58
57
  "@atlaskit/media-core": "^37.0.0",
59
- "react": "^18.2.0"
58
+ "react": "^18.2.0",
59
+ "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@atlaskit/media-core": "^37.0.0",
63
63
  "@types/exenv": "^1.2.0",
64
- "react-dom": "^18.2.0"
64
+ "react-dom": "^18.2.0",
65
+ "react-intl": "^6.6.2"
65
66
  },
66
67
  "techstack": {
67
68
  "@repo/internal": {
package/report.api.md CHANGED
@@ -46,7 +46,7 @@ import { RequestErrorMetadata } from '@atlaskit/media-client';
46
46
  import { type RenderResult } from '@testing-library/react';
47
47
  import { StyledComponent } from '@emotion/styled-base';
48
48
  import { TableHTMLAttributes } from 'react';
49
- import { WrappedComponentProps } from 'react-intl-next';
49
+ import { WrappedComponentProps } from 'react-intl';
50
50
 
51
51
  // @public (undocumented)
52
52
  export const addGlobalEventEmitterListeners: () => void;