diff --git a/src/context/directory/index.ts b/src/context/directory/index.ts index 3411c7f8f..4ca7e6e31 100644 --- a/src/context/directory/index.ts +++ b/src/context/directory/index.ts @@ -152,7 +152,7 @@ export default class DirectoryContext { await handler.dump(this); } catch (err) { log.debug(err.stack); - throw new Error(`Problem exporting ${name}`); + throw new Error(`Problem exporting ${name}`, { cause: err }); } }) ); diff --git a/src/context/yaml/index.ts b/src/context/yaml/index.ts index 7b25a8f71..0a9ec24f1 100644 --- a/src/context/yaml/index.ts +++ b/src/context/yaml/index.ts @@ -201,7 +201,7 @@ export default class YAMLContext { } } catch (err) { log.debug(err.stack); - throw new Error(`Problem exporting ${name}`); + throw new Error(`Problem exporting ${name}`, { cause: err }); } }) ); diff --git a/tsconfig.json b/tsconfig.json index 3ebe7ac57..d8e35f7fc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es2020", + "target": "es2022", "experimentalDecorators": true, "module": "nodenext", "moduleResolution": "nodenext",