Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

Terser

The fast and efficient minifier for modern JavaScript
Collective - Host: opensource - https://opencollective.com/terser - Website: https://terser.org - Code: https://github.com/terser

fix invalid AST produced by dropping unused variable

close #44

github.com/terser/terser - 53355bdb24dc4ba31112239380209fc0caa7c897 authored about 12 years ago by Mihai Bazon <[email protected]>
Merge pull request #41 from Skalman/toString-patch

Convert x.toString() to ""+x instead of x+""

github.com/terser/terser - f05c99d89f0ccd18c757adfd6fa7cc93092823b5 authored about 12 years ago by Mihai Bazon <[email protected]>
convert x.toString() to ""+x instead of x+""

In some places this can save one byte in whitespace, e.g. after return.
Example:

function f(arg...

github.com/terser/terser - b49230ab8d717d91710d8c383c79ded77c78a39e authored about 12 years ago by Dan Wolff <[email protected]>
declare dependency versions

close #40

github.com/terser/terser - 78856a3dabffb5e22431ee5c14656d3a64076540 authored about 12 years ago by Mihai Bazon <[email protected]>
AST_LabelRef no longer inherits from AST_SymbolRef

github.com/terser/terser - 1e5e13ed81fe96d4388ae7d9ff1402a871c436b7 authored about 12 years ago by Mihai Bazon <[email protected]>
v2.1.10

github.com/terser/terser - 64270b97780afa714a5c0f86116f88261c310175 authored about 12 years ago by Mihai Bazon <[email protected]>
fix API breakage

close #36, #38

github.com/terser/terser - e312c5c2a7d68de3da3bb7e8c9044e3183fe49d6 authored about 12 years ago by Mihai Bazon <[email protected]>
optimization for if/break as first statement in a loop body

for(...; x; ...) if (y) break; → for(...; x&&!y; ...);

similarly for `while` and some combi...

github.com/terser/terser - 1a5fd3e05294a74900c6265f364f233e3f05eba0 authored about 12 years ago by Mihai Bazon <[email protected]>
ignore node_modules/

github.com/terser/terser - 5a7e54cf724d28eab424acd92f097207ee69afbd authored about 12 years ago by Mihai Bazon <[email protected]>
v2.1.9

github.com/terser/terser - 39f8a6270384415fb45f1a814b8a3be5117c2345 authored about 12 years ago by Mihai Bazon <[email protected]>
fix another small regression

we do need parens here: `new (foo.bar().baz)`, but not here: `new foo.bar.baz`

github.com/terser/terser - 46be3f2bf19564a838179f523262f69dc1a9b5ac authored about 12 years ago by Mihai Bazon <[email protected]>
v2.1.8

github.com/terser/terser - 258b46f4dc0d3df2cf20c4fbd4f3dd6314977518 authored about 12 years ago by Mihai Bazon <[email protected]>
fix regression from 5346fb94 (shouldn't parenthesize i++ in x[i++])

github.com/terser/terser - 80da21dab467e9214d5908fca0a54d1242b3c443 authored about 12 years ago by Mihai Bazon <[email protected]>
v2.1.7

github.com/terser/terser - bb0e4d7126692b7dfa1d4a71b67f6a87c443d07e authored about 12 years ago by Mihai Bazon <[email protected]>
add AST_Accessor and AST_SymbolAccessor node types

AST_Accessor will represent the function for a setter or getter. Since they
are not mangleable,...

github.com/terser/terser - 5276a4a873d174ae594198045a15cb821cca29e7 authored about 12 years ago by Mihai Bazon <[email protected]>
parenthesize property access when it's the expression in New

refs #35

github.com/terser/terser - a1ae0c8609ad5ab977dae8afcb96b04594a0cc9a authored about 12 years ago by Mihai Bazon <[email protected]>
further fix for parens around New (refs #35)

github.com/terser/terser - a90c1aeafe0ab94cb20e0f0f40fda2b740a3bb15 authored about 12 years ago by Mihai Bazon <[email protected]>
parenthesize a Call expression when its parent is New

fix #35

github.com/terser/terser - ff388a8d2d6f7777690e792e8cb497acb108e3e5 authored about 12 years ago by Mihai Bazon <[email protected]>
add proper parens around unary expressions

fix #34

github.com/terser/terser - 5346fb94bb186e08e21b60fb19ea7ec902c03784 authored about 12 years ago by Mihai Bazon <[email protected]>
add option to mangle names even if eval/with is in use

(for more fair comparison to Closure compiler)

github.com/terser/terser - a4f6d46118c0d9d1d84a9238d8ef4e57279caac3 authored about 12 years ago by Mihai Bazon <[email protected]>
discard the hack that worked around the deprecation warning

(since the source-map module no longer uses require.js)

refs #9

github.com/terser/terser - 7f5f4d60b70909d21e0111d2c900ba0f5993b374 authored about 12 years ago by Mihai Bazon <[email protected]>
convert `while` into `for`

github.com/terser/terser - ffccb233e5338fd99cdcda17058ffb0d3415cfcb authored about 12 years ago by Mihai Bazon <[email protected]>
minor

github.com/terser/terser - fba0c1aafe5e54a982238bd7e54596852617ef6c authored about 12 years ago by Mihai Bazon <[email protected]>
minor optimization

for `==` or `!=` against a constant, prefer to display the constant first.
should help a bit aft...

github.com/terser/terser - 774f2ded9422903f082f0291ec69c7a6e2edfcaf authored about 12 years ago by Mihai Bazon <[email protected]>
print final semicolon

close #28

github.com/terser/terser - 85af942d64e007524d76454baf80011c3ecda2ce authored about 12 years ago by Mihai Bazon <[email protected]>
use a Dictionary object instead of plain object for hashes

to mitigate the `__proto__` issue

related to #30

github.com/terser/terser - 8413787efc6dd570b5cc48dec65e5ffe1a32084a authored about 12 years ago by Mihai Bazon <[email protected]>
v2.1.6

github.com/terser/terser - dde57452aa5c42bddb6865404e75d1b721c26c43 authored about 12 years ago by Mihai Bazon <[email protected]>
it's safe to negate expression in !EXP only in boolean context

#kendo

github.com/terser/terser - cf409800be18c76efc91a65051bea5f4cb9c44e4 authored about 12 years ago by Mihai Bazon <[email protected]>
added unsafe_comps for negating `<=` with `>`

since it has the potential to break code, let's keep it disabled by default

github.com/terser/terser - 18270dd9f371f1b5debad2521c4b9f7fce02051f authored about 12 years ago by Mihai Bazon <[email protected]>
fix compressing UnaryPrefix

only try negating the expression if the operator is `!`

#kendo

github.com/terser/terser - d4c25c571bfac8e9bf91b2b894837d61370b0c35 authored about 12 years ago by Mihai Bazon <[email protected]>
v2.1.5

github.com/terser/terser - 5248b79506d80c7da8b8a50225fe0bb48e607346 authored about 12 years ago by Mihai Bazon <[email protected]>
don't move expressions containing the binary `in` operator into the `for` initializer

(opera can't parse it)

close #25

github.com/terser/terser - abe0ebbf026bcf1ac280f160de8621071681b2b9 authored about 12 years ago by Mihai Bazon <[email protected]>
v2.1.4

github.com/terser/terser - 0852f5595edbceb1b8626c7214fcc6c17bf271e9 authored about 12 years ago by Mihai Bazon <[email protected]>
cripple scope to make IE happy :-(

close #24

github.com/terser/terser - cb3cafa14d2b65e8100b777d47a0cbade08ad7ca authored about 12 years ago by Mihai Bazon <[email protected]>
test for fs.existsSync

github.com/terser/terser - 202fb937995086561421719b2b26449757e80913 authored about 12 years ago by Mihai Bazon <[email protected]>
v2.1.3

github.com/terser/terser - 7b87d2ef837efa6e8b03f7f778e87e5d264589c0 authored about 12 years ago by Mihai Bazon <[email protected]>
fix for `if (...) return; else return ...;`

(it was assumed that the first `return` always contains a value)

close #22

github.com/terser/terser - 70fd2b1f336535188696d9e7b198b8acd31aa558 authored about 12 years ago by Mihai Bazon <[email protected]>
more sequence optimizations (lift some sequences above binary/unary expressions so that we can avoid parens)

github.com/terser/terser - 30faaf13edca3a4db6867e8faf0f0b68c6ac11e0 authored about 12 years ago by Mihai Bazon <[email protected]>
v2.1.2

github.com/terser/terser - 41be8632d3ec2ac0bae566aab97f40d7d7146142 authored about 12 years ago by Mihai Bazon <[email protected]>
Merge branch 'master' of github.com:mishoo/UglifyJS2

github.com/terser/terser - bee01dc1bec7d76a323bc4570cdba869c42ad447 authored about 12 years ago by Mihai Bazon <[email protected]>
alternate hack to disable deprecation warning

ref #9, close #20

github.com/terser/terser - 12f71e01d02a2f4cc76cb8471036992e0cba9cf1 authored about 12 years ago by Mihai Bazon <[email protected]>
Merge pull request #19 from SevInf/master

Allow to specify sourceRoot in minify

github.com/terser/terser - 3a72deacab4d2f5fea3399233565c8a62267c783 authored about 12 years ago by Mihai Bazon <[email protected]>
minor fix for dropping unused definitions.

function f(x, y) {
var g = function() { return h() };
var h = function() { r...

github.com/terser/terser - fc8314e810c91431cd18fa9a784adb7867726013 authored about 12 years ago by Mihai Bazon <[email protected]>
Add sourceRoot option to minify

github.com/terser/terser - 11dffe950ed5beb1bbf224a594cf0fae7dc11f9a authored about 12 years ago by Sergej Tatarincev <[email protected]>
add fromString argument to `UglifyJS.minify` (allows to pass the source

code, instead of file names, as first argument).

close #17

github.com/terser/terser - 6f45928a73009b6b1aee8c1886f08ff5b83e6cb1 authored about 12 years ago by Mihai Bazon <[email protected]>
more optimizations for some break/continue cases

github.com/terser/terser - afb7faa6fadee46a6ab46232eddba2121c77549b authored about 12 years ago by Mihai Bazon <[email protected]>
v2.1.1

github.com/terser/terser - 6aa56f92fe07edfc677d390a2e26b37c98da0968 authored about 12 years ago by Mihai Bazon <[email protected]>
fix `--comments` (close #16)

github.com/terser/terser - 4fe4257c69734448fb242dfaab3804f883165df3 authored about 12 years ago by Mihai Bazon <[email protected]>
v2.1.0

github.com/terser/terser - a5e75c5a2125662b1ed1a93e8b2204bf33bf44f8 authored about 12 years ago by Mihai Bazon <[email protected]>
added note about API docs and online demo

github.com/terser/terser - 4482fdd63f0a9fcd8e6f92f2af8076cdb3240af6 authored about 12 years ago by Mihai Bazon <[email protected]>
more small optimizations

(unlikely to help for hand-written code)

github.com/terser/terser - 253bd8559bdc3b681fb665704718bc024f5d316e authored about 12 years ago by Mihai Bazon <[email protected]>
define aborts on AST_If: true if both branches abort

github.com/terser/terser - 6a099fba66eba896755f5a723a9d08034faee615 authored about 12 years ago by Mihai Bazon <[email protected]>
employ a better parser for command-line arguments

to support passing commas in strings in for example:

uglifyjs2 -cd TEST="'a,b'" <<EOF
c...

github.com/terser/terser - a21f3c6cdd27696770b5cc605b5f02d81f0a32af authored about 12 years ago by Mihai Bazon <[email protected]>
the `sort` option is broken anyway, removed it

we need to mangle names from outermost to innermost scope; mangling names
from inner scopes befo...

github.com/terser/terser - 8f664585983e4174bb850e3975659127eb99df36 authored about 12 years ago by Mihai Bazon <[email protected]>
add `semicolons` option in the code generator (default: `true`)

pass `false` to separate statements with newlines instead of semicolons

github.com/terser/terser - 6472f9410ec93c4f934643d7fd7ff3edeef6b191 authored about 12 years ago by Mihai Bazon <[email protected]>
fix small glitches in source map generation

github.com/terser/terser - 8957b3a694195a6e049472f7ef463b4ae3c0f8b8 authored about 12 years ago by Mihai Bazon <[email protected]>
disable warnings in the test suite

github.com/terser/terser - 1ffd5265545c80babc9e7002ff42a64a0453d589 authored about 12 years ago by Mihai Bazon <[email protected]>
drop unused function arguments

also add test for "drop_unused" (the last one fails for now)

github.com/terser/terser - fcc0229087c4efd212a1050f38d3049d52344b3a authored about 12 years ago by Mihai Bazon <[email protected]>
add parens to AST_Seq whose parent is AST_Unary

github.com/terser/terser - b071c9d079e3acbfb521a6634364c5816d3be280 authored about 12 years ago by Mihai Bazon <[email protected]>
fix compressing benchmark.js (it tried to evaluate a statement)

the following code in benchmark.js triggered the issue:

support.decompilation = Function(
...

github.com/terser/terser - 851b48e4a3ecdbe7d77ec827f94d67092d2890ef authored about 12 years ago by Mihai Bazon <[email protected]>
minor

github.com/terser/terser - 708abb1ab141c737a70fca9e0af839a0b68d9db0 authored about 12 years ago by Mihai Bazon <[email protected]>
fix regression from fb5c01c073d06034815d5f3b782fd11cbdf6d6f5

is_digit takes a char code now, not a string

github.com/terser/terser - 370d3e09172c35e4f0a7c6a47edd53625b6e2012 authored about 12 years ago by Mihai Bazon <[email protected]>
fix end tokens in spidermonkey ast import

github.com/terser/terser - b51fe0dcc348fe2c3942b04c7c7d88f3fb7eaa49 authored about 12 years ago by Mihai Bazon <[email protected]>
update for acorn

github.com/terser/terser - 70d205c447c05d053c953659d3ddc41759e37579 authored about 12 years ago by Mihai Bazon <[email protected]>
minor

github.com/terser/terser - 8149be551e238442e9378f8ef4e5eaa2554bf9bf authored about 12 years ago by Mihai Bazon <[email protected]>
actually enable the option that drops unused names in the test of issue #12

github.com/terser/terser - ba3df646c0ce2a8997937423c9df9d2da0670ded authored about 12 years ago by Mihai Bazon <[email protected]>
remove the $self hack

operations are destructive anyway, so there's no point to clone the nodes in
the transformer. s...

github.com/terser/terser - 1b6f8d463f15c5a3fa27b55be0a6d2dc74bcc12a authored about 12 years ago by Mihai Bazon <[email protected]>
add test for issue #12

github.com/terser/terser - 731fa9c2360334d374593ea0a79031d24c9c7107 authored about 12 years ago by Mihai Bazon <[email protected]>
fix in_boolean_context() (two tests were broken)

github.com/terser/terser - 72cb5328ee58307ccb9bc91ac5826c3a41aac4d2 authored about 12 years ago by Mihai Bazon <[email protected]>
use AST_Lambda for object setters/getters

so that the optimization that drops the name if unused doesn't apply.
close #12

github.com/terser/terser - fc39553714ab747339c11173e11ca95aaea1ed0c authored about 12 years ago by Mihai Bazon <[email protected]>
fix pos in syntax error exception

github.com/terser/terser - d9d67317b1283886b24fec9a4c6607bf729a5e59 authored about 12 years ago by Mihai Bazon <[email protected]>
stealing more hacks from acorn in the name of speed

github.com/terser/terser - fb5c01c073d06034815d5f3b782fd11cbdf6d6f5 authored about 12 years ago by Mihai Bazon <[email protected]>
using makeComparator from acorn to generate functions that tests whether a

string is keyword, reserved etc.

speeds up the parser a bit, though not spectacular.. still far ...

github.com/terser/terser - f4584af42c8baa0a8f221adf1ff9a85765163e4b authored about 12 years ago by Mihai Bazon <[email protected]>
cleanup

- use prototype-less objects where feasible (minor speed improvement)
- get rid of HOP

github.com/terser/terser - 172aa7a93ccd39feceefa058ad008e19eec0a073 authored about 12 years ago by Mihai Bazon <[email protected]>
fix propagation of symbol references

github.com/terser/terser - 5053a29bc0b723bbf468f50e0434c3eff38600e2 authored about 12 years ago by Mihai Bazon <[email protected]>
disable warnings by default in `minify` (pass warnings: true to enable)

close #11

github.com/terser/terser - f322b32e0e8df5b60f577da401922f11048f2f87 authored about 12 years ago by Mihai Bazon <[email protected]>
fix node name

github.com/terser/terser - 9cdaed9860e22513b76f8fe0ad74c1fa2faaf4d9 authored about 12 years ago by Mihai Bazon <[email protected]>
seems cleaner if AST_Label doesn't inherit from AST_SymbolDeclaration

github.com/terser/terser - dacce1b1fad07f5e62d62c52f05a42aa19c0e434 authored about 12 years ago by Mihai Bazon <[email protected]>
small improvements in wrap_commonjs:

- use MAP.splice instead of a BlockStatement to inject code (avoids some
warnings in the linte...

github.com/terser/terser - f26f3b44bc238c5ea9772ccea5a21c9c928b6fd9 authored about 12 years ago by Mihai Bazon <[email protected]>
drop unused variable

github.com/terser/terser - c5ecbfc756a4ed0aa736a82a062441b97effa7f5 authored about 12 years ago by Mihai Bazon <[email protected]>
add `--lint` and display {file} in scope_warnings

github.com/terser/terser - 3799ac8973bb0bd08efe7a2af27808e5917183cc authored about 12 years ago by Mihai Bazon <[email protected]>
minor

github.com/terser/terser - 86182afa7f3c6d6159e2ade7b88306ab1f62832b authored about 12 years ago by Mihai Bazon <[email protected]>
update on @cc_on

github.com/terser/terser - 4807c6e75686ea722a2424e7a1dd369225c1be3b authored about 12 years ago by Mihai Bazon <[email protected]>
add AST_Infinity node

github.com/terser/terser - a84d07e31298fc1f8825b0047629634920667707 authored about 12 years ago by Mihai Bazon <[email protected]>
make `--comments` keep @cc_on too

github.com/terser/terser - 88beddfa91c8f362cc74538937ce883541e77680 authored about 12 years ago by Mihai Bazon <[email protected]>
added $propdoc to AST nodes and some cleanups

hopefully we can make the AST documentation self-generating

github.com/terser/terser - 1b0aab2ce9e7f429ceeda98ee0cda448085918ec authored about 12 years ago by Mihai Bazon <[email protected]>
minor AST cleanup (AST_BlockStatement may inherit from AST_Block)

github.com/terser/terser - 9ead49641da82de3a27ed813a056628f83da379c authored about 12 years ago by Mihai Bazon <[email protected]>
add `--ast-help`

displays a rather cruel description of the AST classes, derived
directly from the node definitions.

github.com/terser/terser - e1862cd36f147e410c003c9daee5fd2befdf9a42 authored about 12 years ago by Mihai Bazon <[email protected]>
fix detecting symbols in use

github.com/terser/terser - 2c025f23db6efb6d1442208d81c2080d40c44f10 authored about 12 years ago by Mihai Bazon <[email protected]>
Merge pull request #8 from SevInf/master

Fix crash in minify function

github.com/terser/terser - 9dfcd47ec8fef20a7c6f994bb8896a16ffa0eb2b authored about 12 years ago by Mihai Bazon <[email protected]>
Fix nodejs minify without inSourceMap exception

When inSourceMap is omitted fs.readFile throws exception. Fixed version
calls fs.readFile only w...

github.com/terser/terser - 203ecaf85ba7ad714e77c78b2102309d5581948c authored about 12 years ago by Sergej Tatarincev <[email protected]>
fix `inSourceMap` in `minify` (should read the file)

github.com/terser/terser - c967f0b0fefd7db03922769f1d2aaf2ae1394ddc authored about 12 years ago by Mihai Bazon <[email protected]>
add simple API wrapper: UglifyJS.minify

(refs #7)

github.com/terser/terser - dfc04e66770f463e1ae97547950e6b829aaeeeff authored about 12 years ago by Mihai Bazon <[email protected]>
added some basic API doc

github.com/terser/terser - 42ea3c95e0ef4d7831b466c6a42e06705fd31535 authored about 12 years ago by Mihai Bazon <[email protected]>
should not expose base54.sort() in the API docs, I think

github.com/terser/terser - d4970b35acb6142157e3f6dd4505ae0e44a175c6 authored about 12 years ago by Mihai Bazon <[email protected]>
added --self to easily get a browser-runnable version of UglifyJS

github.com/terser/terser - dd8286bce152125d18a0af13a6088049303f2993 authored about 12 years ago by Mihai Bazon <[email protected]>
eliminate redundant directives in the same scope

github.com/terser/terser - 093a9031dc15b2e2bd85850f3f3eb7fe90f01bd7 authored about 12 years ago by Mihai Bazon <[email protected]>
for certain nodes that we invent we might not have a original source file to

map from, so just use "?". and in any case, don't fail hard when addMapping throws.

github.com/terser/terser - 80a18fe2fa60d8a689516b921a386839d30b6abe authored about 12 years ago by Mihai Bazon <[email protected]>
fix typo

github.com/terser/terser - fe1411bba1368c4e3c1fe92459e956ec4a4c5ee6 authored about 12 years ago by Mihai Bazon <[email protected]>
remove unused code

github.com/terser/terser - 455ac5435d2adca919ec6fd4e195af75aa0f09fe authored about 12 years ago by Mihai Bazon <[email protected]>