@commercetools-frontend/jest-preset-mc-app 27.6.0 → 27.6.2
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 +18 -0
- package/jest-preset.js +2 -1
- package/package.json +2 -2
- package/typescript/jest-preset.js +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @commercetools-frontend/jest-preset-mc-app
|
|
2
2
|
|
|
3
|
+
## 27.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#4015](https://github.com/commercetools/merchant-center-application-kit/pull/4015) [`bdfc13d`](https://github.com/commercetools/merchant-center-application-kit/commit/bdfc13d6cd0bbd53b72f07e29509bed803e08934) Thanks [@ByronDWall](https://github.com/ByronDWall)! - fix: handle ESM-only dependencies (uuid v14) in jest preset
|
|
8
|
+
|
|
9
|
+
Add `transformIgnorePatterns` to the shared jest preset so that ESM-only packages like `uuid` v14 are transpiled by babel-jest. Also add `ts` and `tsx` to the base preset's `moduleFileExtensions` so JavaScript starter templates can resolve TypeScript dependencies.
|
|
10
|
+
|
|
11
|
+
- Updated dependencies []:
|
|
12
|
+
- @commercetools-frontend/babel-preset-mc-app@27.6.2
|
|
13
|
+
|
|
14
|
+
## 27.6.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies []:
|
|
19
|
+
- @commercetools-frontend/babel-preset-mc-app@27.6.1
|
|
20
|
+
|
|
3
21
|
## 27.6.0
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/jest-preset.js
CHANGED
|
@@ -20,7 +20,7 @@ const defaultModuleExportsResolver = resolveRelativePath(
|
|
|
20
20
|
|
|
21
21
|
module.exports = {
|
|
22
22
|
displayName: 'test',
|
|
23
|
-
moduleFileExtensions: ['js', 'mjs', 'cjs', 'jsx', 'json'],
|
|
23
|
+
moduleFileExtensions: ['js', 'mjs', 'cjs', 'jsx', 'ts', 'tsx', 'json'],
|
|
24
24
|
moduleDirectories: ['src', 'node_modules'],
|
|
25
25
|
moduleNameMapper: {
|
|
26
26
|
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
|
|
@@ -42,6 +42,7 @@ module.exports = {
|
|
|
42
42
|
url: 'https://mc.europe-west1.gcp.commercetools.com/',
|
|
43
43
|
},
|
|
44
44
|
testPathIgnorePatterns: ['node_modules', 'cypress'],
|
|
45
|
+
transformIgnorePatterns: ['node_modules/(?!(uuid|\\.pnpm))'],
|
|
45
46
|
testRegex: '\\.spec\\.jsx?$',
|
|
46
47
|
transform: {
|
|
47
48
|
'^.+\\.(js|jsx|mjs|ts|tsx)$': defaultTransformBabelJest,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/jest-preset-mc-app",
|
|
3
|
-
"version": "27.6.
|
|
3
|
+
"version": "27.6.2",
|
|
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": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"module": "./jest-preset.js",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@babel/core": "^7.22.17",
|
|
26
|
-
"@commercetools-frontend/babel-preset-mc-app": "27.6.
|
|
26
|
+
"@commercetools-frontend/babel-preset-mc-app": "27.6.2",
|
|
27
27
|
"@formatjs/intl-getcanonicallocales": "^2.2.1",
|
|
28
28
|
"@formatjs/intl-listformat": "^7.4.1",
|
|
29
29
|
"@formatjs/intl-locale": "^3.3.3",
|
|
@@ -2,6 +2,12 @@ const defaultPreset = require('../jest-preset');
|
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
...defaultPreset,
|
|
5
|
-
moduleFileExtensions: [
|
|
5
|
+
moduleFileExtensions: [
|
|
6
|
+
'ts',
|
|
7
|
+
'tsx',
|
|
8
|
+
...defaultPreset.moduleFileExtensions.filter(
|
|
9
|
+
(ext) => ext !== 'ts' && ext !== 'tsx'
|
|
10
|
+
),
|
|
11
|
+
],
|
|
6
12
|
testRegex: '\\.spec\\.[j|t]sx?$',
|
|
7
13
|
};
|