@commercetools-frontend/jest-preset-mc-app 21.6.0 → 21.8.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,38 @@
1
1
  # @commercetools-frontend/jest-preset-mc-app
2
2
 
3
+ ## 21.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @commercetools-frontend/babel-preset-mc-app@21.8.1
9
+
10
+ ## 21.8.0
11
+
12
+ ### Patch Changes
13
+
14
+ - [#2661](https://github.com/commercetools/merchant-center-application-kit/pull/2661) [`43a9df21`](https://github.com/commercetools/merchant-center-application-kit/commit/43a9df2193000b49a0299c02d5218c50d71567ed) Thanks [@emmenko](https://github.com/emmenko)! - Drop the copyright year from the license files
15
+
16
+ - Updated dependencies [[`43a9df21`](https://github.com/commercetools/merchant-center-application-kit/commit/43a9df2193000b49a0299c02d5218c50d71567ed)]:
17
+ - @commercetools-frontend/babel-preset-mc-app@21.8.0
18
+
19
+ ## 21.7.0
20
+
21
+ ### Patch Changes
22
+
23
+ - [#2627](https://github.com/commercetools/merchant-center-application-kit/pull/2627) [`5a8c301d`](https://github.com/commercetools/merchant-center-application-kit/commit/5a8c301d5627df1e8bb6dcf8870575c6ca32c0a7) Thanks [@emmenko](https://github.com/emmenko)! - Add proper entry point for Jest preset for `typescript`.
24
+
25
+ ```diff
26
+ -const jestPresetForTypeScript = require('@commercetools-frontend/jest-preset-mc-app/jest-preset-for-typescript');
27
+
28
+ module.exports = {
29
+ - ...jestPresetForTypeScript,
30
+ + preset: '@commercetools-frontend/jest-preset-mc-app/typescript'
31
+ };
32
+ ```
33
+
34
+ The import `@commercetools-frontend/jest-preset-mc-app/jest-preset-for-typescript` still works for backwards compatibility.
35
+
3
36
  ## 21.6.0
4
37
 
5
38
  ### Patch Changes
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 commercetools GmbH
3
+ Copyright (c) commercetools GmbH
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  <a href="https://www.npmjs.com/package/@commercetools-frontend/jest-preset-mc-app"><img src="https://badgen.net/npm/v/@commercetools-frontend/jest-preset-mc-app" alt="Latest release (latest dist-tag)" /></a> <a href="https://www.npmjs.com/package/@commercetools-frontend/jest-preset-mc-app"><img src="https://badgen.net/npm/v/@commercetools-frontend/jest-preset-mc-app/next" alt="Latest release (next dist-tag)" /></a> <a href="https://bundlephobia.com/result?p=@commercetools-frontend/jest-preset-mc-app"><img src="https://badgen.net/bundlephobia/minzip/@commercetools-frontend/jest-preset-mc-app" alt="Minified + GZipped size" /></a> <a href="https://github.com/commercetools/merchant-center-application-kit/blob/main/LICENSE"><img src="https://badgen.net/github/license/commercetools/merchant-center-application-kit" alt="GitHub license" /></a>
5
5
  </p>
6
6
 
7
- Jest preset used by a MC application.
7
+ Jest preset used by a Custom Application.
8
8
 
9
9
  ## Install
10
10
 
@@ -12,6 +12,14 @@ Jest preset used by a MC application.
12
12
  $ npm install --save @commercetools-frontend/jest-preset-mc-app
13
13
  ```
14
14
 
15
+ ## Usage
16
+
17
+ ```js
18
+ module.exports = {
19
+ preset: '@commercetools-frontend/jest-preset-mc-app',
20
+ };
21
+ ```
22
+
15
23
  ## Custom config
16
24
 
17
25
  You can pass a custom config using one of the [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) format options. The config module name to use is `jest-preset-mc-app`.
@@ -33,15 +41,13 @@ Supported options are:
33
41
 
34
42
  ## TypeScript support
35
43
 
36
- If you need to use the Jest preset with additional TypeScript support, you need to import `@commercetools-frontend/jest-preset-mc-app/jest-preset-for-typescript.js` in your Jest config.
44
+ If you need to use the Jest preset with additional TypeScript support, you need to point to the `@commercetools-frontend/jest-preset-mc-app/typescript` preset in your Jest config.
37
45
 
38
46
  For example:
39
47
 
40
48
  ```js
41
- const jestPresetForTypeScript = require('@commercetools-frontend/jest-preset-mc-app/jest-preset-for-typescript');
42
-
43
49
  module.exports = {
44
- ...jestPresetForTypeScript,
50
+ preset: '@commercetools-frontend/jest-preset-mc-app/typescript',
45
51
  };
46
52
  ```
47
53
 
@@ -82,7 +88,7 @@ module.exports = {
82
88
  };
83
89
  ```
84
90
 
85
- Similarly, you can use the `@commercetools-frontend/jest-preset-mc-app/jest-preset-for-typescript` instead of the `@commercetools-frontend/jest-preset-mc-app`.
91
+ Similarly, you can use the `@commercetools-frontend/jest-preset-mc-app/typescript` instead of the `@commercetools-frontend/jest-preset-mc-app`.
86
92
 
87
93
  ### Enzyme 17
88
94
 
@@ -117,4 +123,4 @@ module.exports = {
117
123
  };
118
124
  ```
119
125
 
120
- Similarly, you can use the `@commercetools-frontend/jest-preset-mc-app/jest-preset-for-typescript` instead of the `@commercetools-frontend/jest-preset-mc-app`.
126
+ Similarly, you can use the `@commercetools-frontend/jest-preset-mc-app/typescript` instead of the `@commercetools-frontend/jest-preset-mc-app`.
@@ -1,7 +1,2 @@
1
- const defaultPreset = require('./jest-preset');
2
-
3
- module.exports = {
4
- ...defaultPreset,
5
- moduleFileExtensions: ['ts', 'tsx', ...defaultPreset.moduleFileExtensions],
6
- testRegex: '\\.spec\\.[j|t]sx?$',
7
- };
1
+ // Alias entry point, for backwards compatibility.
2
+ module.exports = require('./typescript');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/jest-preset-mc-app",
3
- "version": "21.6.0",
3
+ "version": "21.8.1",
4
4
  "description": "Jest preset used by a MC application",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -17,7 +17,7 @@
17
17
  "main": "./jest-preset.js",
18
18
  "module": "./jest-preset.js",
19
19
  "dependencies": {
20
- "@commercetools-frontend/babel-preset-mc-app": "21.3.4",
20
+ "@commercetools-frontend/babel-preset-mc-app": "21.8.1",
21
21
  "@formatjs/intl-getcanonicallocales": "^1.9.2",
22
22
  "@formatjs/intl-listformat": "^6.5.3",
23
23
  "@formatjs/intl-locale": "^2.4.47",
@@ -0,0 +1 @@
1
+ module.exports = require('./jest-preset');
@@ -0,0 +1,7 @@
1
+ const defaultPreset = require('../jest-preset');
2
+
3
+ module.exports = {
4
+ ...defaultPreset,
5
+ moduleFileExtensions: ['ts', 'tsx', ...defaultPreset.moduleFileExtensions],
6
+ testRegex: '\\.spec\\.[j|t]sx?$',
7
+ };