mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix error with jose package upgrade
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
8ba7d8427a
commit
c843d1b7bd
@ -21,9 +21,12 @@ module.exports = (path, options) => {
|
||||
// Once we're able to migrate our Jest config to ESM and a browser crypto
|
||||
// implementation is available for the browser+ESM version of uuid to use (eg, via
|
||||
// https://github.com/jsdom/jsdom/pull/3352 or a similar polyfill), this can go away.
|
||||
if (pkg.name === "uuid") {
|
||||
delete pkg["exports"];
|
||||
delete pkg["module"];
|
||||
switch (pkg.name) {
|
||||
case "uuid":
|
||||
case "jose":
|
||||
delete pkg["exports"];
|
||||
delete pkg["module"];
|
||||
break;
|
||||
}
|
||||
|
||||
return pkg;
|
||||
|
||||
@ -7,6 +7,7 @@ import fetchMock from "jest-fetch-mock";
|
||||
import configurePackages from "./common/configure-packages";
|
||||
import { configure } from "mobx";
|
||||
import { setImmediate } from "timers";
|
||||
import { TextEncoder, TextDecoder as TextDecoderNode } from "util";
|
||||
|
||||
// setup default configuration for external npm-packages
|
||||
configurePackages();
|
||||
@ -32,3 +33,6 @@ global.fail = ((error = "Test failed without explicit error") => {
|
||||
process.on("unhandledRejection", (err: any) => {
|
||||
global.fail(err);
|
||||
});
|
||||
|
||||
global.TextEncoder = TextEncoder;
|
||||
global.TextDecoder = TextDecoderNode as unknown as typeof TextDecoder;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user