terser 5.3.7 → 5.5.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,25 @@
1
1
  # Changelog
2
2
 
3
+ ## v5.5.1
4
+
5
+ - Fixed object properties with unicode surrogates on safari.
6
+
7
+ ## v5.5.0
8
+
9
+ - Fixed crash when inlining uninitialized variable into template string.
10
+ - The sourcemap for dist was removed for being too large.
11
+
12
+ ## v5.4.0
13
+
14
+ - Logical assignment
15
+ - Change `let x = undefined` to just `let x`
16
+ - Removed some optimizations for template strings, placing them behind `unsafe` options. Reason: adding strings is not equivalent to template strings, due to valueOf differences.
17
+ - The AST_Token class was slimmed down in order to use less memory.
18
+
19
+ ## v5.3.8
20
+
21
+ - Restore node 13 support
22
+
3
23
  ## v5.3.7
4
24
 
5
25
  Hotfix release, fixes package.json "engines" syntax
package/README.md CHANGED
@@ -50,6 +50,8 @@ From NPM for programmatic use:
50
50
 
51
51
  # Command line usage
52
52
 
53
+ <!-- CLI_USAGE:START -->
54
+
53
55
  terser [input files] [options]
54
56
 
55
57
  Terser can take multiple input files. It's recommended that you pass the
@@ -387,9 +389,12 @@ random number on every compile to simulate mangling changing with different
387
389
  inputs (e.g. as you update the input script with new properties), and to help
388
390
  identify mistakes like writing mangled keys to storage.
389
391
 
392
+ <!-- CLI_USAGE:END -->
390
393
 
391
394
  # API Reference
392
395
 
396
+ <!-- API_REFERENCE:START -->
397
+
393
398
  Assuming installation via NPM, you can load Terser in your application
394
399
  like this:
395
400
 
@@ -405,8 +410,8 @@ import { minify } from "terser";
405
410
 
406
411
  Browser loading is also supported:
407
412
  ```html
408
- <script src="node_modules/source-map/dist/source-map.min.js"></script>
409
- <script src="dist/bundle.min.js"></script>
413
+ <script src="https://cdn.jsdelivr.net/npm/source-map@0.7.3/dist/source-map.js"></script>
414
+ <script src="https://cdn.jsdelivr.net/npm/terser/dist/bundle.min.js"></script>
410
415
  ```
411
416
 
412
417
  There is a single async high level function, **`async minify(code, options)`**,
@@ -1276,6 +1281,8 @@ $ rm -rf node_modules yarn.lock
1276
1281
  $ yarn
1277
1282
  ```
1278
1283
 
1284
+ <!-- API_REFERENCE:END -->
1285
+
1279
1286
  # Reporting issues
1280
1287
 
1281
1288
  In the terser CLI we use [source-map-support](https://npmjs.com/source-map-support) to produce good error stacks. In your own app, you're expected to enable source-map-support (read their docs) to have nice stack traces that will help you write good issues.