DEV: Update terser (#19109)

The `decodedMap` prop comes from https://github.com/terser/terser/pull/1190

> This also exposes a new `decodedMap` property on the result object. Decoded maps are free to create (it's a shallow clone of the `GenMapping` instance), and passing them to `@jridgewell/trace-mapping` is copy-free. With Babel [recently](https://github.com/babel/babel/pull/14497) adding a `decodedMap` field, a dev could pass from the Babel transpilation to Terser without any added memory use for sourcemaps.
This commit is contained in:
Jarek Radosz
2022-11-24 17:15:46 +01:00
committed by GitHub
parent 767e8ec730
commit 57a573eee3
3 changed files with 25 additions and 16 deletions

View File

@ -192,7 +192,7 @@ RSpec.describe DiscourseJsProcessor do
}
result = DiscourseJsProcessor::Transpiler.new.terser(sources, { sourceMap: { includeSources: true } })
expect(result.keys).to contain_exactly("code", "map")
expect(result.keys).to contain_exactly("code", "decoded_map", "map")
begin
# Check the code still works