diff --git a/src/context/directory/index.ts b/src/context/directory/index.ts index bc5d211c7..94b1e5147 100644 --- a/src/context/directory/index.ts +++ b/src/context/directory/index.ts @@ -153,7 +153,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 5a965cd9f..68a9d324a 100644 --- a/src/context/yaml/index.ts +++ b/src/context/yaml/index.ts @@ -202,7 +202,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",