Uglifyjs: Next release after v2.7.5

Created on 29 Nov 2016  Â·  52Comments  Â·  Source: mishoo/UglifyJS

All 52 comments

PR #1385 - remove npm-shrinkwrap.json to work around [email protected] bug (#1384)

PR #1354 Might still be needed to be merged (it is merged with harmony, but there is no backport on master yet). The change affects carriage return to newline changes in a file that has been modified in both master and harmony though, resolve is both keep as is (so no changes on harmony except the newlines).

Still not merged as of 20/1/2017 despite being closed.

Now send as #1487

PR #1408 - Have minify() and tests use figure_out_scope() as uglifyjs CLI does

Sorry for the huge delay… Moving house and the holidays have taken up way more time than I had anticipated.

We should definitely start thinking about setting up an UglifyJS organization on Github, to make the project more manageable.

@mishoo: thoughts?

PR #1426 - add missing LHS cases which global_defs should avoid

1408 might warrant the next release to be 2.8.0.

PR #1425 - augment evaluate to extract within objects

PR #1427 - optimise binary operands with evaluate()

PR #1431 - fix mangling collision with keep_fnames

1366 - Move minify api to portable api

1437 - Slightly improve a if_return optimization

master build failure can be fixed by #1441

1443 - fix crash in unsafe replacement of undefined

1444 - remove unused AST_Scope.nesting & AST_SymbolRef.frame

1445 - fix corner case in keep_fnames

1446 - enable typeof "undefined" for general use

1448 - Support marking a call as pure (for Typescript and other transpilers)

1449 - fix stray else in compress with conditionals=false

1450 - drop unused: toplevel, assign-only

1453 - fixes and improvements to [].join()

1452 - tweak do-while loops

1457 - fix sequences_limit

1454 - improve string concatenation

1451 - clean up negate_iife

I think there's more than enough in the PR queue for a 2.8.0 release. New patches may start to conflict soon.

~Agreed - I've reached an impasse at this point 😅~

1459 - smarter const replacement taking name length into account

1461 - fix duplicated test names

1476 - improve keep_fargs & keep_fnames

1473 - improve reduce_vars

1477 - evaluate AST_SymbolRef as parameter

Queue is getting large

Maybe I should do a premerge some day

@avdg I can help with any merge conflicts / test failures :sweat_smile:

You already took over the whole project :p Well thanks anyway, as I seem to be specialized in tokenizer only atm... :-)

Actually I'm thinking about this (it's git/github related)

git fetch-pr 123 234 567 (numbers obviously referring to pr id's)

git is just a collection of scripts (well, it's a bit optimized). So this would make life so much easier if a script called fetch-pr was added. Not sure if such a tool exists already.

1469 - enhance global_defs

1479 - add benchmark & JetStream tests

#1484 - add .gitattributes with *.js linefeed rule

1483 - improve --beautify bracketize

Unless I'm mistaken that tool gives you an easy way to set up a local branch for each PR, rather than mixing a select number of PRs together on one branch. I don't think there's a silver bullet for that other than merging all the PRs into a single branch. Normally that branch is called master.

@kzc yes, you'll still have to merge each branch yourself. But from the looks of it you don't have to go into each PR's web page to work out where the repository/branch is, which I thought was what @avdg asked about.

Edit: this one is from GitHub https://help.github.com/articles/checking-out-pull-requests-locally/

If you want to patch a bunch of PRs into your current branch for testing (no commits) you could use this bash script:

$ cat pr-patch.sh

#!/bin/bash
[ "$#" == 0 ] && echo "usage: $0 [PR numbers]" && exit 1
for i in $*
do
    echo $i ...
    curl -L https://github.com/mishoo/UglifyJS2/pull/$i.patch | patch -p1 || exit $_
done

sample usage:

$ bash pr-patch.sh 1483 1479 1477 1476 1475 1473 1471 1461 1459 1457 1454 1452 1449 1448 1446 1445 1444 1443 1437

It assumes you are in the source root.

I changed the PR patch script above to exit upon first patch error.

The PRs in the previous post are compatible with each other and npm test cleanly once combined against master 7f8d72d9d37396f2da05d5d824f74bd414c30119.

PR #1451 conflicts with the others.

@avdg not sure if this is related to what you said in #1383 (comment)

https://gist.github.com/piscisaureus/3342247

I'm aware of that (maybe the access should be shortcutted somehow in documentation)

I'm having some fun with this batch file on Windows:

@echo off
git fetch https://github.com/mishoo/UglifyJS2.git pull/%1/head:pr-%1
for /f %%i in ('git log pr-%1 -1 --pretty^=format:"%%an <%%ae>"') do set author=%%i
git merge --squash pr-%1
git commit --author="%author%"
git branch -D pr-%1

Need to manually edit the commit message, but otherwise seems pretty automatic.

This command will commit a github PR to your local branch with original date, author attribution and comments:

curl -L https://github.com/mishoo/UglifyJS2/pull/1483.patch | git am -3 -b

1488 - remove extraneous spaces between ++/+/--/-

1491 - introduce unsafe_proto

1494 - fix pure_funcs & improve side_effects

1496 - clean up max_line_len

I think this Issue should closed in favor of:

1485 2.8.0 staging

This can be closed.

@kzc thanks for keeping track 😉

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexlamsl picture alexlamsl  Â·  4Comments

alexlamsl picture alexlamsl  Â·  4Comments

alexlamsl picture alexlamsl  Â·  5Comments

gabmontes picture gabmontes  Â·  5Comments

PinkyJie picture PinkyJie  Â·  3Comments