Giter Club home page Giter Club logo

packr's Issues

In Chrome 46.0.2490.86 / Firefox 42, the minimized code with base62 encode does not work.

In Chrome 46.0.2490.86 / Firefox 42, the minimized code with base62 encode does not work.

when executing the generated source, it shows "Uncaught TypeError: Cannot set property length of # which has only a getter"

document.getElementsByTagName('script') returns Array Like object depending on the kinds of browser. Then I suppose to replace from

document.getElementsByTagName('script')

to

Array.apply(null,document.getElementsByTagName('script'))

Packr 1.0.2 intermittently strips spaces with ruby 1.8.7 patch > p352

I just thought I'd document this issue here, but I recently upgraded to ruby 1.8.7 (2012-02-08 MBARI 8/0x6770 on patchlevel 358) [i686-darwin12.2.1], MBARI 0x6770, Ruby Enterprise Edition 2012.02

With the new version packr intermittently strips all spaces from javascript code (but not in strings). For example expected compressed output:

if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}} ...

actual output:

if(typeofYAHOO=="undefined"||!YAHOO){varYAHOO={}} ...

This behaviour only occurs intermittently for certain runs of the ruby runtime. If the bug is happening, then all usages of Packr.pack will exhibit the behaviour while ruby is running. For another run of ruby, the bug doesn't happen at all.

I believe the problem lies with packr being dependant on hash ordering somewhere. Versions of ruby > 1.8.7 p352 return random hash orderings as per this security fix.

Unfortunately this bug took me a long time to track down because I didn't initially realise it was related to a ruby upgrade which had happened a long time previously.

Anyway, I suggest this at least be documented somewhere and preferably fixed, though I realise 1.0.2 is very old now. Not sure if the problem manifests in newer versions.

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.