cli: bump to jest 29

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-09-05 21:47:03 +02:00
parent 25b94e6345
commit ffa2d1f414
5 changed files with 914 additions and 473 deletions
+5 -3
View File
@@ -21,7 +21,8 @@ module.exports = {
const assetFilename = JSON.stringify(path.basename(filename));
if (filename.match(/\.icon\.svg$/)) {
return `const React = require('react');
return {
code: `const React = require('react');
const SvgIcon = require('@material-ui/core/SvgIcon').default;
module.exports = {
__esModule: true,
@@ -34,9 +35,10 @@ module.exports = {
children: ${assetFilename}
})
})
};`;
};`,
};
}
return `module.exports = ${assetFilename};`;
return { code: `module.exports = ${assetFilename};` };
},
};
+2 -2
View File
@@ -64,10 +64,10 @@ function createTransformer(config) {
}
// We only return the `map` result if source maps are enabled, as they
// have a negative impact on the coverage accuracy.
return code;
return { code };
}
return source;
return { code: source };
};
// TODO: contribute something like this to @sucrase/jest-plugin
+1 -1
View File
@@ -21,7 +21,7 @@ function createTransformer(config) {
const swcTransformer = createSwcTransformer(config);
const process = (source, filePath, jestOptions) => {
if (filePath.endsWith('.js') && !ESM_REGEX.test(source)) {
return source;
return { code: source };
}
return swcTransformer.process(source, filePath, jestOptions);
+4 -3
View File
@@ -55,7 +55,7 @@
"@swc/core": "^1.2.239",
"@swc/helpers": "^0.4.7",
"@swc/jest": "^0.2.22",
"@types/jest": "^27",
"@types/jest": "^29.0.0",
"@types/webpack-env": "^1.15.2",
"@typescript-eslint/eslint-plugin": "^5.9.0",
"@typescript-eslint/parser": "^5.9.0",
@@ -89,9 +89,10 @@
"handlebars": "^4.7.3",
"html-webpack-plugin": "^5.3.1",
"inquirer": "^8.2.0",
"jest": "^27.5.1",
"jest": "^29.0.2",
"jest-css-modules": "^2.1.0",
"jest-runtime": "^27.5.1",
"jest-environment-jsdom": "^29.0.2",
"jest-runtime": "^29.0.2",
"jest-transform-yaml": "^1.0.0",
"json-schema": "^0.4.0",
"lodash": "^4.17.21",
+902 -464
View File
File diff suppressed because it is too large Load Diff