jso-protector 0.4.14 → 0.4.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +2 -1
- package/bin/jso-protector.js +18 -9
- package/examples/README.md +1 -1
- package/index.js +2 -2
- package/package.json +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.15 - 2026-09-24
|
|
4
|
+
|
|
5
|
+
**`--preset standard` works on the Basic and Corporate plans.** It was refused
|
|
6
|
+
for everyone below Enterprise.
|
|
7
|
+
|
|
8
|
+
- `standard`, `balanced` and `maximum` asked for compression ratio `Best`,
|
|
9
|
+
which is an Enterprise feature, so any compressing preset was refused on
|
|
10
|
+
Basic and Corporate with "'compression ratio best' requires Enterprise
|
|
11
|
+
membership" -- before a single file was protected. The presets now ask for
|
|
12
|
+
`Auto`, which gives each plan its own strongest ratio: Basic Medium,
|
|
13
|
+
Corporate High, Enterprise Best. Enterprise output is unchanged.
|
|
14
|
+
- The same fix applies to the defaults this package picks when it translates
|
|
15
|
+
another tool's `compact`, `minify` or `stringCompression` settings.
|
|
16
|
+
- An explicit `--option CompressionRatio=Best` is still sent exactly as written.
|
|
17
|
+
- `balanced` and `maximum` include Enterprise-only transforms (string
|
|
18
|
+
encryption, control-flow flattening), so they still need Enterprise; the
|
|
19
|
+
README and docs now say so instead of "a paid plan".
|
|
20
|
+
|
|
3
21
|
## 0.4.14 - 2026-09-23
|
|
4
22
|
|
|
5
23
|
**`--preset maximum` works.** Every run of it was refused before a single file
|
package/README.md
CHANGED
|
@@ -67,7 +67,8 @@ and missing parity against common JavaScript obfuscators.
|
|
|
67
67
|
`--source-map-evidence`, `--vm-proof-pack`, `--deployment-hygiene-evidence`,
|
|
68
68
|
and `--runtime-incident-evidence` turn a build into a written report.
|
|
69
69
|
- **Presets instead of forty switches.** `--preset free` runs with no account;
|
|
70
|
-
`standard
|
|
70
|
+
`standard` needs Basic or higher; `balanced|maximum` include Enterprise-only
|
|
71
|
+
transforms (EncryptStrings, FlatTransform) and need Enterprise,
|
|
71
72
|
or import a preset exported from the online tool with `--web-preset`.
|
|
72
73
|
- **Different profiles in one build.** `namedSets` maps file globs to their own
|
|
73
74
|
preset and options, so a checkout flow can ship maximum protection while
|
package/bin/jso-protector.js
CHANGED
|
@@ -28,6 +28,15 @@ const HTML_SCRIPT_PATTERN = /<script\b([^>]*)>([\s\S]*?)<\/script>/gi;
|
|
|
28
28
|
const SOURCE_MAP_COMMENT_LINE_PATTERN = /^[ \t]*\/\/[#@]\s*sourceMappingURL=.*(?:\r?\n)?/gm;
|
|
29
29
|
const SOURCE_MAP_COMMENT_BLOCK_PATTERN = /[ \t]*\/\*[#@]\s*sourceMappingURL=[\s\S]*?\*\/[ \t]*(?:\r?\n)?/g;
|
|
30
30
|
|
|
31
|
+
// CompressionRatio "Auto", NOT "Best", in every preset and translated default.
|
|
32
|
+
// Plans.cs gates each explicit ratio by plan (Medium = Basic, High = Corporate,
|
|
33
|
+
// Best = Enterprise), and "Best" was hardcoded here -- so standard, balanced and
|
|
34
|
+
// maximum were refused for every Basic and Corporate customer ("'compression
|
|
35
|
+
// ratio best' requires Enterprise membership"), while the docs said these
|
|
36
|
+
// presets "need a paid plan". "Auto" makes the engine pick the plan's own best
|
|
37
|
+
// ratio (ProtectorV2.CalcCompressorRatio): Enterprise still gets Best, and
|
|
38
|
+
// nothing a customer paid for is lost. Found 2026-09-24. An explicit
|
|
39
|
+
// --option CompressionRatio=Best is still sent as written.
|
|
31
40
|
const PRESET_OPTIONS = {
|
|
32
41
|
// Free tier. Exactly the transforms that are ungated server-side - anything
|
|
33
42
|
// else (compression, MoveStrings, DeepObfuscate, renaming, VM ...) requires a
|
|
@@ -43,7 +52,7 @@ const PRESET_OPTIONS = {
|
|
|
43
52
|
MoveStrings: true,
|
|
44
53
|
ReplaceNames: true,
|
|
45
54
|
SelfCompression: true,
|
|
46
|
-
CompressionRatio: "
|
|
55
|
+
CompressionRatio: "Auto"
|
|
47
56
|
},
|
|
48
57
|
balanced: {
|
|
49
58
|
IdentityStyle: "v2abcd",
|
|
@@ -52,7 +61,7 @@ const PRESET_OPTIONS = {
|
|
|
52
61
|
ReplaceNames: true,
|
|
53
62
|
SelfCompression: true,
|
|
54
63
|
SelfCompressionMinSize: 0,
|
|
55
|
-
CompressionRatio: "
|
|
64
|
+
CompressionRatio: "Auto",
|
|
56
65
|
DeepObfuscate: true,
|
|
57
66
|
ReorderCode: true,
|
|
58
67
|
EncryptStrings: true,
|
|
@@ -71,7 +80,7 @@ const PRESET_OPTIONS = {
|
|
|
71
80
|
MoveMembers: true,
|
|
72
81
|
SelfCompression: true,
|
|
73
82
|
SelfCompressionMinSize: 0,
|
|
74
|
-
CompressionRatio: "
|
|
83
|
+
CompressionRatio: "Auto",
|
|
75
84
|
DeepObfuscate: true,
|
|
76
85
|
ReorderCode: true,
|
|
77
86
|
AddDeadCode: true,
|
|
@@ -83,7 +92,7 @@ const PRESET_OPTIONS = {
|
|
|
83
92
|
|
|
84
93
|
const WEB_FEATURE_OPTIONS = {
|
|
85
94
|
"Short Local Name": { IdentityStyle: "v2abcd" },
|
|
86
|
-
"Compressor": { SelfCompression: true, SelfCompressionMinSize: 0, CompressionRatio: "
|
|
95
|
+
"Compressor": { SelfCompression: true, SelfCompressionMinSize: 0, CompressionRatio: "Auto" },
|
|
87
96
|
"Deep Obfuscation": { DeepObfuscate: true },
|
|
88
97
|
"Code Transposition": { ReorderCode: true },
|
|
89
98
|
"Dead Code Insertion": { AddDeadCode: true, DeadcodeLevel: "Low" },
|
|
@@ -1632,7 +1641,7 @@ function parseArgs(argv) {
|
|
|
1632
1641
|
const value = readOptionalBoolean(argv, i + 1);
|
|
1633
1642
|
if (value) {
|
|
1634
1643
|
args.options.push("SelfCompression=true");
|
|
1635
|
-
args.options.push("CompressionRatio=
|
|
1644
|
+
args.options.push("CompressionRatio=Auto");
|
|
1636
1645
|
} else {
|
|
1637
1646
|
args.options.push("SelfCompression=false");
|
|
1638
1647
|
args.options.push("WriteFormats=true");
|
|
@@ -2021,7 +2030,7 @@ function translateJavascriptObfuscatorConfigOptions(source = {}) {
|
|
|
2021
2030
|
|
|
2022
2031
|
if (source.compact === true) {
|
|
2023
2032
|
translated.options.SelfCompression = true;
|
|
2024
|
-
translated.options.CompressionRatio = "
|
|
2033
|
+
translated.options.CompressionRatio = "Auto";
|
|
2025
2034
|
} else if (source.compact === false) {
|
|
2026
2035
|
translated.options.SelfCompression = false;
|
|
2027
2036
|
translated.options.WriteFormats = true;
|
|
@@ -2086,7 +2095,7 @@ function translateJsConfuserConfigOptions(source = {}) {
|
|
|
2086
2095
|
|
|
2087
2096
|
if (source.stringCompression === true || source.minify === true || source.compact === true) {
|
|
2088
2097
|
translated.options.SelfCompression = true;
|
|
2089
|
-
translated.options.CompressionRatio = "
|
|
2098
|
+
translated.options.CompressionRatio = "Auto";
|
|
2090
2099
|
} else if (source.minify === false || source.compact === false) {
|
|
2091
2100
|
translated.options.WriteFormats = true;
|
|
2092
2101
|
}
|
|
@@ -2845,7 +2854,7 @@ function migrateJavascriptObfuscatorConfig(sourcePath, args = {}) {
|
|
|
2845
2854
|
|
|
2846
2855
|
if (sourceConfig.compact === true) {
|
|
2847
2856
|
config.options.SelfCompression = true;
|
|
2848
|
-
config.options.CompressionRatio = "
|
|
2857
|
+
config.options.CompressionRatio = "Auto";
|
|
2849
2858
|
mapped.push({ from: "compact", to: "SelfCompression", note: "Compact output maps to self-compression." });
|
|
2850
2859
|
} else if (sourceConfig.compact === false) {
|
|
2851
2860
|
config.options.WriteFormats = true;
|
|
@@ -3022,7 +3031,7 @@ function migrateJsConfuserConfig(sourcePath, args = {}) {
|
|
|
3022
3031
|
|
|
3023
3032
|
if (sourceConfig.stringCompression === true || sourceConfig.minify === true || sourceConfig.compact === true) {
|
|
3024
3033
|
config.options.SelfCompression = true;
|
|
3025
|
-
config.options.CompressionRatio = "
|
|
3034
|
+
config.options.CompressionRatio = "Auto";
|
|
3026
3035
|
mapped.push({ from: sourceConfig.stringCompression === true ? "stringCompression" : sourceConfig.minify === true ? "minify" : "compact", to: "SelfCompression", note: "Compression/minify maps to self-compression." });
|
|
3027
3036
|
} else if (sourceConfig.minify === false || sourceConfig.compact === false) {
|
|
3028
3037
|
config.options.WriteFormats = true;
|
package/examples/README.md
CHANGED
|
@@ -39,7 +39,7 @@ published as `javascriptobfuscator-com`; `jso-protector` is the former name and
|
|
|
39
39
|
is deprecated but still updated:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
npm install --save-dev javascriptobfuscator-com@0.4.
|
|
42
|
+
npm install --save-dev javascriptobfuscator-com@0.4.15
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
Repository contributors can instead use the existing `file:../..` development
|
package/index.js
CHANGED
|
@@ -231,7 +231,7 @@ function translateJavascriptObfuscatorOptions(sourceOptions = {}, overrides = {}
|
|
|
231
231
|
|
|
232
232
|
if (source.compact === true) {
|
|
233
233
|
translated.options.SelfCompression = true;
|
|
234
|
-
translated.options.CompressionRatio = "Best"
|
|
234
|
+
translated.options.CompressionRatio = "Auto"; // not "Best": Best is Enterprise-only (see bin/jso-protector.js PRESET_OPTIONS note)
|
|
235
235
|
} else if (source.compact === false) {
|
|
236
236
|
translated.options.WriteFormats = true;
|
|
237
237
|
}
|
|
@@ -315,7 +315,7 @@ function translateJsConfuserOptions(sourceOptions = {}, overrides = {}) {
|
|
|
315
315
|
|
|
316
316
|
if (source.stringCompression === true || source.minify === true || source.compact === true) {
|
|
317
317
|
translated.options.SelfCompression = true;
|
|
318
|
-
translated.options.CompressionRatio = "Best"
|
|
318
|
+
translated.options.CompressionRatio = "Auto"; // not "Best": Best is Enterprise-only (see bin/jso-protector.js PRESET_OPTIONS note)
|
|
319
319
|
} else if (source.minify === false || source.compact === false) {
|
|
320
320
|
translated.options.WriteFormats = true;
|
|
321
321
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jso-protector",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.15",
|
|
4
4
|
"description": "Obfuscate and protect JavaScript in your build or CI: dependency-free CLI, Node API, and webpack/Vite/Rollup/esbuild/Next.js/Metro plugins, with one-command migration from javascript-obfuscator and JS-Confuser configs.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "JavaScript Obfuscator",
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
"smoke": "node ./bin/jso-protector.js --help && node ./bin/jso-protector.js --config ./jso.config.example.json --dry-run --json",
|
|
226
226
|
"smoke:api": "node ./bin/jso-protector.js --config ./jso.config.example.json --json",
|
|
227
227
|
"test": "node ./test/cli.test.js && node ./test/ai.test.js && node ./test/ai-precheck.test.js && node ./test/ai-script-governance.test.js && node ./test/data-exfiltration-guard.test.js && node ./test/compat-scan.test.js && node ./test/compliance.test.js && node ./test/evidence-forwarder.test.js && node ./test/config-schema.test.js && node ./test/countermeasures.test.js && node ./test/environment-integrity.test.js && node ./test/estimate.test.js && node ./test/github-action.test.js && node ./test/governance.test.js && node ./test/local-bridge.test.js && node ./test/managed-integrity.test.js && node ./test/named-sets.test.js && node ./test/release-signer.test.js && node ./test/scan-watermarks.test.js && node ./test/third-party-inventory.test.js && node ./test/watermark.test.js && node ./test/wire-format-vectors.test.js",
|
|
228
|
-
"verify": "npm test && npm run verify:package && npm run verify:examples && npm run verify:publish-metadata && npm run verify:ci && npm run verify:polyglot && npm run verify:ai && npm run verify:verify-scripts-tracked && npm run verify:aspnet-bom && npm run verify:aspnet-compile && npm run verify:endrequest-guard && npm run verify:analysis-pattern-bounds && npm run verify:health-readiness && npm run verify:legacy-soap-security && npm run verify:online-demo-security && npm run verify:parser-engine && npm run verify:emit-validation && npm run verify:es5-syntax && npm run verify:emit-validation-modern && npm run verify:runtime-defense-libraries && npm run verify:internal-links && npm run verify:seo && npm run verify:sitemap-freshness && npm run verify:changelog-freshness && npm run verify:faq-visibility && npm run verify:artifact-claims && npm run verify:runtime-dashboard && npm run verify:plan-numbers && npm run verify:payment-page && npm run verify:payment-activation && npm run verify:payment-row-completeness && npm run verify:account-recovery && npm run verify:registration && npm run verify:admin-auth && npm run verify:http-api-auth && npm run verify:request-body-limits && npm run verify:public-form-security && npm run verify:operational-logs && npm run verify:richtexteditor-surface && npm run verify:dashboard-resource-governance && npm run verify:dashboard-diagnostic-surface && npm run verify:web-integrity-policy && npm run verify:entitlements && npm run verify:enterprise-governance && npm run verify:database-migrations && npm run verify:source-secrets && npm run verify:published-artifact-secrets && npm run verify:ignored-shipping-secrets && npm run verify:winforms-runtime-floor && npm run verify:ai-billing && npm run verify:ai-key-security && npm run verify:ajax-transport && npm run verify:competitor-gap && npm run verify:parity-defect-sync && npm run verify:source-map-evidence && npm run verify:migration-review && npm run verify:identifier-cache-review && npm run verify:runtime-defense-review && npm run verify:vm-proof && npm run verify:deployment-hygiene && npm run verify:download-artifacts && npm run verify:download-examples && npm run verify:copy-discipline && npm run verify:github-action && npm run verify:outbound-nofollow",
|
|
228
|
+
"verify": "npm test && npm run verify:package && npm run verify:examples && npm run verify:publish-metadata && npm run verify:ci && npm run verify:polyglot && npm run verify:ai && npm run verify:verify-scripts-tracked && npm run verify:aspnet-bom && npm run verify:aspnet-compile && npm run verify:endrequest-guard && npm run verify:analysis-pattern-bounds && npm run verify:wire-name-coverage && npm run verify:desktop-option-names && npm run verify:symbolicate-api-shape && npm run verify:advice-option-names && npm run verify:preset-plan-levels && npm run verify:health-readiness && npm run verify:legacy-soap-security && npm run verify:online-demo-security && npm run verify:parser-engine && npm run verify:emit-validation && npm run verify:es5-syntax && npm run verify:emit-validation-modern && npm run verify:runtime-defense-libraries && npm run verify:internal-links && npm run verify:seo && npm run verify:sitemap-freshness && npm run verify:changelog-freshness && npm run verify:faq-visibility && npm run verify:artifact-claims && npm run verify:runtime-dashboard && npm run verify:plan-numbers && npm run verify:payment-page && npm run verify:payment-activation && npm run verify:payment-row-completeness && npm run verify:account-recovery && npm run verify:registration && npm run verify:admin-auth && npm run verify:http-api-auth && npm run verify:request-body-limits && npm run verify:public-form-security && npm run verify:operational-logs && npm run verify:richtexteditor-surface && npm run verify:dashboard-resource-governance && npm run verify:dashboard-diagnostic-surface && npm run verify:web-integrity-policy && npm run verify:entitlements && npm run verify:enterprise-governance && npm run verify:database-migrations && npm run verify:source-secrets && npm run verify:published-artifact-secrets && npm run verify:ignored-shipping-secrets && npm run verify:winforms-runtime-floor && npm run verify:ai-billing && npm run verify:ai-key-security && npm run verify:ajax-transport && npm run verify:competitor-gap && npm run verify:parity-defect-sync && npm run verify:source-map-evidence && npm run verify:migration-review && npm run verify:identifier-cache-review && npm run verify:runtime-defense-review && npm run verify:vm-proof && npm run verify:deployment-hygiene && npm run verify:download-artifacts && npm run verify:download-examples && npm run verify:copy-discipline && npm run verify:github-action && npm run verify:outbound-nofollow",
|
|
229
229
|
"verify:release": "npm run verify && npm run verify:corpus-protect && npm run verify:corpus-runtime",
|
|
230
230
|
"verify:verify-scripts-tracked": "node ../polyglot-smoke/check-verify-scripts-tracked.js",
|
|
231
231
|
"verify:parity-defect-sync": "node ../polyglot-smoke/check-parity-defect-sync.js",
|
|
@@ -234,6 +234,11 @@
|
|
|
234
234
|
"verify:endrequest-guard": "node ../polyglot-smoke/check-endrequest-guard.js",
|
|
235
235
|
"verify:payment-row-completeness": "node ../polyglot-smoke/check-payment-row-completeness.js",
|
|
236
236
|
"verify:analysis-pattern-bounds": "node ../polyglot-smoke/check-analysis-pattern-bounds.js",
|
|
237
|
+
"verify:wire-name-coverage": "node ../polyglot-smoke/check-wire-name-coverage.js",
|
|
238
|
+
"verify:desktop-option-names": "node ../polyglot-smoke/check-desktop-option-names.js",
|
|
239
|
+
"verify:symbolicate-api-shape": "node ../polyglot-smoke/check-symbolicate-api-shape.js",
|
|
240
|
+
"verify:advice-option-names": "node ../polyglot-smoke/check-advice-option-names.js",
|
|
241
|
+
"verify:preset-plan-levels": "node ../polyglot-smoke/check-preset-plan-levels.js",
|
|
237
242
|
"verify:health-readiness": "node ../polyglot-smoke/check-health-readiness.js",
|
|
238
243
|
"verify:live-health": "node ../polyglot-smoke/check-production-health.js",
|
|
239
244
|
"verify:live-seo": "node ../polyglot-smoke/check-live-seo.js",
|