Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

chore(package): update uglify-es v3.2.0...v3.2.1 #190

Merged
merged 2 commits into from
Dec 14, 2017
Merged

chore(package): update uglify-es v3.2.0...v3.2.1 #190

merged 2 commits into from
Dec 14, 2017

Conversation

SuperManEver
Copy link
Contributor

@SuperManEver SuperManEver commented Dec 6, 2017

related to this issue: #187

uglify-es version 3.2.0 doesn't support const and arrow-function. In my case, this causes build failure when I try to make a production bundle for deployment

@jsf-clabot
Copy link

jsf-clabot commented Dec 6, 2017

CLA assistant check
All committers have signed the CLA.

@alexander-akait
Copy link
Member

@SuperManEver Why? Seems you have outdated npm cache. Just run npm cache clean --force and try again npm i

@SuperManEver
Copy link
Contributor Author

SuperManEver commented Dec 6, 2017

@evilebottnawi tried this several times. Locally it works perfect, no errors appear, but when I try to upload my code to heroku error arises. I tried with version 3.2.0 and I get exactly the same error I get when heroku tries to build my bundle. If I use uglify-es version 3.2.1, everything works fine

@alexander-akait
Copy link
Member

@SuperManEver what is error you get? This #187 (comment)?

@SuperManEver
Copy link
Contributor Author

@evilebottnawi this one
image

@SuperManEver
Copy link
Contributor Author

@evilebottnawi the fastest way how you can convince yourself that problem in 'uglify-es' version is by taking this file https://github.com/izolate/millify/blob/master/index.js and try to minify it withuglify-es version 3.2.0 and version 3.2.1 and you will see the difference

@alexander-akait
Copy link
Member

@SuperManEver confirm, please update snapshots npm run test -- -u

@kzc
Copy link

kzc commented Dec 6, 2017

uglify-es version 3.2.0 doesn't support const and arrow-function.

That's not the case.

Updating the uglify-es version is fine, but the issue was unrelated to this.

$ bin/uglifyjs -V
uglify-es 3.2.0

$ curl -s https://raw.githubusercontent.com/izolate/millify/master/index.js | bin/uglifyjs -bmc
const suffixes = new Map();

suffixes.set(3, "K"), suffixes.set(6, "M"), suffixes.set(9, "B"), suffixes.set(12, "T"), 
module.exports = ((e, s) => {
    e = (e => {
        if ("number" != typeof e) throw new Error("Input value is not a number");
        return parseFloat(e);
    })(e);
    const t = ((e, s) => {
        for (let t of suffixes.keys()) e > t && (s = t);
        return {
            suffix: suffixes.get(s),
            zeroes: s
        };
    })(Math.floor(Math.log10(Math.abs(e))) + 1, null), f = e / Math.pow(10, t.zeroes);
    return s = f % 1 == 0 ? 2 : Math.max(1, s + 1) || 3, -1e3 < e && e < 1e3 ? e : `${parseFloat(f.toPrecision(s))}${t.suffix}`;
});
$ bin/uglifyjs -V
uglify-es 3.2.1

$ curl -s https://raw.githubusercontent.com/izolate/millify/master/index.js | bin/uglifyjs -bmc
const suffixes = new Map();

suffixes.set(3, "K"), suffixes.set(6, "M"), suffixes.set(9, "B"), suffixes.set(12, "T"), 
module.exports = ((e, s) => {
    e = (e => {
        if ("number" != typeof e) throw new Error("Input value is not a number");
        return parseFloat(e);
    })(e);
    const t = ((e, s) => {
        for (let t of suffixes.keys()) e > t && (s = t);
        return {
            suffix: suffixes.get(s),
            zeroes: s
        };
    })(Math.floor(Math.log10(Math.abs(e))) + 1, null), f = e / Math.pow(10, t.zeroes);
    return s = f % 1 == 0 ? 2 : Math.max(1, s + 1) || 3, -1e3 < e && e < 1e3 ? e : `${parseFloat(f.toPrecision(s))}${t.suffix}`;
});

@michael-ciniawsky michael-ciniawsky changed the title updated 'uglify-es' version chore(package): update uglify-es v3.2.0...v3.2.1 Dec 7, 2017
@SuperManEver
Copy link
Contributor Author

@evilebottnawi not exactly understand what should I do about this "please update snapshots npm run test -- -u". Can you explain it a little bit more, please?

@michael-ciniawsky
Copy link
Member

I wonder where this change to the test snapshot is coming from tbh

@alexander-akait
Copy link
Member

@SuperManEver run npm run test -- -u inside project to update snapshot and we can merge this in master

@SuperManEver
Copy link
Contributor Author

@evilebottnawi updated snapshot by running npm run test -- -u

@joshwiens joshwiens merged commit b356f74 into webpack-contrib:master Dec 14, 2017
joshwiens added a commit that referenced this pull request Dec 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants