Skip to content

Commit

Permalink
fix: remove source-map-support package (#1258)
Browse files Browse the repository at this point in the history
Co-authored-by: Lukasz Gornicki <[email protected]>%0ACo-authored-by: Marius Bakas <[email protected]>
  • Loading branch information
bakasmarius and Lukasz Gornicki <[email protected]>%0ACo-authored-by: Marius Bakas authored Aug 28, 2024
1 parent 8ade3c1 commit 3a372c4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .changeset/lemon-feet-fail.md
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 0 additions & 3 deletions apps/generator/lib/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const {
fetchSpec,
isReactTemplate,
isJsFile,
registerSourceMap,
getTemplateDetails,
convertCollectionToObject,
} = require('./utils');
Expand Down Expand Up @@ -57,8 +56,6 @@ const shouldIgnoreDir = dirPath =>
dirPath === '.git'
|| dirPath.startsWith(`.git${path.sep}`);

registerSourceMap();

class Generator {
/**
* Instantiates a new Generator object.
Expand Down
10 changes: 0 additions & 10 deletions apps/generator/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
1 change: 0 additions & 1 deletion apps/generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3a372c4

Please sign in to comment.