Removed source-map-support runtime dependency (#1399)

This commit is contained in:
Timofey Kachalov
2026-03-22 16:18:03 +04:00
committed by GitHub
parent 8a67a82914
commit fb74744555
5 changed files with 20 additions and 8 deletions
+1
View File
@@ -3,6 +3,7 @@ Change Log
v5.4.1
---
* Fixed missing space between keywords (`return`, `throw`, `typeof`) and Unicode surrogate pair identifiers in compact mode. Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1112
* Removed `source-map-support` runtime dependency. Use `node --enable-source-maps` instead. Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1149
v5.4.0
---
+6 -2
View File
@@ -41,7 +41,6 @@
"multimatch": "5.0.0",
"process": "0.11.10",
"reflect-metadata": "0.2.2",
"source-map-support": "0.5.21",
"string-template": "1.0.0",
"stringz": "2.1.0",
"tslib": "2.8.1"
@@ -85,11 +84,13 @@
"js-beautify": "1.15.4",
"mocha": "11.7.4",
"nyc": "17.1.0",
"parse5": "^8.0.0",
"pjson": "1.0.9",
"prettier": "3.6.2",
"rimraf": "6.0.1",
"sinon": "19.0.2",
"source-map-resolve": "0.6.0",
"source-map-support": "0.5.21",
"terser": "5.44.0",
"threads": "1.7.0",
"ts-loader": "9.5.4",
@@ -131,7 +132,10 @@
"author": {
"name": "Timofei Kachalov"
},
"contributors": ["Timofei Kachalov (https://github.com/sanex3339)", "Dmitry Zamotkin (https://github.com/zamotkin)"],
"contributors": [
"Timofei Kachalov (https://github.com/sanex3339)",
"Dmitry Zamotkin (https://github.com/zamotkin)"
],
"license": "BSD-2-Clause",
"packageManager": "yarn@1.22.21+sha512.ca75da26c00327d26267ce33536e5790f18ebd53266796fbb664d2a4a5116308042dd8ee7003b276a20eace7d3c5561c3577bdd71bcb67071187af124779620a"
}
-4
View File
@@ -1,7 +1,6 @@
const fs = require('fs');
const copyright = 'Copyright (C) 2016-2026 Timofei Kachalov <support@obfuscator.io>';
const sourceMapSupportRequire = 'require("source-map-support").install();';
class WebpackUtils {
/**
@@ -21,9 +20,6 @@ class WebpackUtils {
fs.readFileSync('./LICENSE.BSD', 'utf8') + "\n*/";
}
static getSourceMapSupportImport () {
return sourceMapSupportRequire;
}
}
module.exports.WebpackUtils = WebpackUtils;
+1 -2
View File
@@ -48,8 +48,7 @@ module.exports = {
new webpack.BannerPlugin(
{
banner: WebpackUtils.getBannerText(
WebpackUtils.getLicenseText(),
WebpackUtils.getSourceMapSupportImport()
WebpackUtils.getLicenseText()
),
raw: true,
entryOnly: false
+12
View File
@@ -1956,6 +1956,11 @@ enhanced-resolve@^5.17.3:
graceful-fs "^4.2.4"
tapable "^2.2.0"
entities@^6.0.0:
version "6.0.1"
resolved "https://registry.yarnpkg.com/entities/-/entities-6.0.1.tgz#c28c34a43379ca7f61d074130b2f5f7020a30694"
integrity sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==
env-paths@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-4.0.0.tgz#d0bb1f84a81d2542581bf7b7e8085d0683b39097"
@@ -4268,6 +4273,13 @@ parse-json@^5.2.0:
json-parse-even-better-errors "^2.3.0"
lines-and-columns "^1.1.6"
parse5@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/parse5/-/parse5-8.0.0.tgz#aceb267f6b15f9b6e6ba9e35bfdd481fc2167b12"
integrity sha512-9m4m5GSgXjL4AjumKzq1Fgfp3Z8rsvjRNbnkVwfu2ImRqE5D0LnY2QfDen18FSY9C573YU5XxSapdHZTZ2WolA==
dependencies:
entities "^6.0.0"
path-exists@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz"