jscrambler 8.8.0 → 8.8.1

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # jscrambler
2
2
 
3
+ ## 8.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [a5f9ae7]: Document globalNamesPrefix parameter
8
+
3
9
  ## 8.8.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -25,6 +25,7 @@ If you're looking to gain control over third-party tags and achieve PCI DSS comp
25
25
  - [Profiling Data Mode (default: **automatic**)](#profiling-data-mode-default-automatic)
26
26
  - [Instrument (`--instrument`)](#instrument---instrument)
27
27
  - [Symbol Table](#symbol-table)
28
+ - [Global Names Prefix](#global-names-prefix)
28
29
  - [API](#api)
29
30
  - [Quick example](#quick-example)
30
31
  - [Jscrambler Parameters](#jscrambler-parameters)
@@ -392,6 +393,28 @@ Similarly, the resulting symbol table can be obtained using the `--output-symbol
392
393
 
393
394
  **NOTE**: It only makes sense to use symbol tables on protections that use the identifiers renaming parameter.
394
395
 
396
+ ## Global Names Prefix
397
+
398
+ If you need to make **separate obfuscation requests** for source code that belong to the same application instance, there is a small chance that you will encounter a **naming collision** on the generate global names.
399
+
400
+ To prevent **global naming collisions**, you can set the `globalNamesPrefix` parameter on each protection request:
401
+
402
+ ```json
403
+ // jscrambler.json to protect micro-frontend 1
404
+ {
405
+ "globalNamesPrefix": "p1"
406
+ }
407
+
408
+ // jscrambler.json to protect micro-frontend 2
409
+ {
410
+ "globalNamesPrefix": "p2"
411
+ }
412
+ ```
413
+
414
+ If apply the previous configuration, all generated global variable names will start with the letters *p1* for *micro-frontend 1* and *p2* for *micro-frontend 2*.
415
+
416
+ ***Note***: The `globalNamesPrefix` parameter must be **short** and **unintelligible** to avoid code size increase and automated attacks
417
+
395
418
  ## API
396
419
  ```bash
397
420
  npm install jscrambler
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jscrambler",
3
3
  "description": "Jscrambler Code Integrity API client.",
4
- "version": "8.8.0",
4
+ "version": "8.8.1",
5
5
  "homepage": "https://github.com/jscrambler/jscrambler",
6
6
  "author": "Jscrambler <support@jscrambler.com>",
7
7
  "repository": {