GithubHelp home page GithubHelp logo

Comments (9)

tdewolff avatar tdewolff commented on August 31, 2024

Thanks a lot Julian for putting together a test case. I'm terribly swamped in work right now but will try to do my best to find out the culprit soon!

from minify.

tdewolff avatar tdewolff commented on August 31, 2024

git bisect shows ff4ee8b as the problem (28 May 2022), usage of template literals

from minify.

perrin4869 avatar perrin4869 commented on August 31, 2024

interesting, I wasn't aware this was a regression! Thank you so much for looking into it as always 😁

from minify.

tdewolff avatar tdewolff commented on August 31, 2024

Specifically, it's not the fact that strings are converted to template literals, but that \n and \r are being converted to literal characters within template literals (eg. 0x5C6E => 0x0A). This ought to be fine, not sure how undici can tell the difference.

from minify.

tdewolff avatar tdewolff commented on August 31, 2024

I've found it. See the end of https://tc39.es/ecma262/#sec-static-semantics-trv, it says that a a sequence of literal <CR><LF> becomes a 0x0A in the string, not 0x0D0A as I expected.

from minify.

perrin4869 avatar perrin4869 commented on August 31, 2024

that's interesting! this means we get to shave off a few more bytes off our scripts 😆
that's really impressive how you tracked this down!

from minify.

tdewolff avatar tdewolff commented on August 31, 2024

Unfortunately, it's the reverse hehe. Now must keep the sequence \r as two characters :-( I've pushed out a fix and will be releasing a new version now.

from minify.

perrin4869 avatar perrin4869 commented on August 31, 2024

Thanks! I'll run this on Monday!

from minify.

perrin4869 avatar perrin4869 commented on August 31, 2024

everything is fixed! thanks again!!!!

from minify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.