cli: removed unused @sucrase/jest-plugin dependency

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-12-01 17:53:47 +01:00
parent f382f2d324
commit 43b2b9c791
4 changed files with 6 additions and 16 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Removed the unused dependency on `@sucrase/jest-plugin`.
@@ -17,7 +17,6 @@
const { createHash } = require('crypto');
const { transform } = require('sucrase');
const sucrasePkg = require('sucrase/package.json');
const sucrasePluginPkg = require('@sucrase/jest-plugin/package.json');
const ESM_REGEX = /\b(?:import|export)\b/;
@@ -70,15 +69,12 @@ function createTransformer(config) {
return { code: source };
};
// TODO: contribute something like this to @sucrase/jest-plugin
const getCacheKey = sourceText => {
return createHash('md5')
.update(sourceText)
.update(Buffer.alloc(1))
.update(sucrasePkg.version)
.update(Buffer.alloc(1))
.update(sucrasePluginPkg.version)
.update(Buffer.alloc(1))
.update(JSON.stringify(config))
.update(Buffer.alloc(1))
.update('1') // increment whenever the transform logic in this file changes
-1
View File
@@ -46,7 +46,6 @@
"@spotify/eslint-config-base": "^14.0.0",
"@spotify/eslint-config-react": "^14.0.0",
"@spotify/eslint-config-typescript": "^14.0.0",
"@sucrase/jest-plugin": "^2.1.1",
"@sucrase/webpack-loader": "^2.0.0",
"@svgr/plugin-jsx": "6.5.x",
"@svgr/plugin-svgo": "6.5.x",
+1 -11
View File
@@ -3617,7 +3617,6 @@ __metadata:
"@spotify/eslint-config-base": ^14.0.0
"@spotify/eslint-config-react": ^14.0.0
"@spotify/eslint-config-typescript": ^14.0.0
"@sucrase/jest-plugin": ^2.1.1
"@sucrase/webpack-loader": ^2.0.0
"@svgr/plugin-jsx": 6.5.x
"@svgr/plugin-svgo": 6.5.x
@@ -12928,15 +12927,6 @@ __metadata:
languageName: node
linkType: hard
"@sucrase/jest-plugin@npm:^2.1.1":
version: 2.2.1
resolution: "@sucrase/jest-plugin@npm:2.2.1"
dependencies:
sucrase: ^3.18.0
checksum: 818627b40392875107722530af1a58f195d7166a5c5149db425db8ac3ff741b39d1c722a09dfbe7b686c87002616da7ef3c861dbe6f6f5390f3ca8f08c2a975a
languageName: node
linkType: hard
"@sucrase/webpack-loader@npm:^2.0.0":
version: 2.0.0
resolution: "@sucrase/webpack-loader@npm:2.0.0"
@@ -35766,7 +35756,7 @@ __metadata:
languageName: node
linkType: hard
"sucrase@npm:^3.18.0, sucrase@npm:^3.20.2":
"sucrase@npm:^3.20.2":
version: 3.29.0
resolution: "sucrase@npm:3.29.0"
dependencies: