diff --git a/.changeset/lemon-feet-fail.md b/.changeset/lemon-feet-fail.md new file mode 100644 index 000000000..de0749610 --- /dev/null +++ b/.changeset/lemon-feet-fail.md @@ -0,0 +1,5 @@ +--- +"@asyncapi/generator": patch +--- + +Removed the source-map-support package from the AsyncAPI Generator, as it is no longer required for version 2, which now supports Node.js version 18.12.0 and above. diff --git a/apps/generator/lib/generator.js b/apps/generator/lib/generator.js index cca957eb4..8a07a5670 100644 --- a/apps/generator/lib/generator.js +++ b/apps/generator/lib/generator.js @@ -27,7 +27,6 @@ const { fetchSpec, isReactTemplate, isJsFile, - registerSourceMap, getTemplateDetails, convertCollectionToObject, } = require('./utils'); @@ -57,8 +56,6 @@ const shouldIgnoreDir = dirPath => dirPath === '.git' || dirPath.startsWith(`.git${path.sep}`); -registerSourceMap(); - class Generator { /** * Instantiates a new Generator object. diff --git a/apps/generator/lib/utils.js b/apps/generator/lib/utils.js index 27e26de0f..6403eb2fd 100644 --- a/apps/generator/lib/utils.js +++ b/apps/generator/lib/utils.js @@ -134,16 +134,6 @@ utils.isAsyncFunction = (fn) => { return fn && fn.constructor && fn.constructor.name === 'AsyncFunction'; }; -/** - * Register `source-map-support` package. - * This package provides source map support for stack traces in Node - also for transpiled code from TS. - * - * @private - */ -utils.registerSourceMap = () => { - require('source-map-support').install(); -}; - /** * Register TypeScript transpiler. It enables transpilation of TS filters and hooks on the fly. * diff --git a/apps/generator/package.json b/apps/generator/package.json index 93d2e9e03..3c473907c 100644 --- a/apps/generator/package.json +++ b/apps/generator/package.json @@ -73,7 +73,6 @@ "resolve-pkg": "^2.0.0", "semver": "^7.3.2", "simple-git": "^3.3.0", - "source-map-support": "^0.5.19", "ts-node": "^10.9.1", "typescript": "^4.9.3" }, diff --git a/package-lock.json b/package-lock.json index 21056a9ba..45663cb5b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,6 @@ "resolve-pkg": "^2.0.0", "semver": "^7.3.2", "simple-git": "^3.3.0", - "source-map-support": "^0.5.19", "ts-node": "^10.9.1", "typescript": "^4.9.3" },