indutny / asn1.js

ASN.1 Decoder/Encoder/DSL
MIT License
181 stars 64 forks source link

Let/Const bricked our build #99

Closed gdborton closed 6 years ago

gdborton commented 6 years ago

Hi!

Version 4.10 broke our build because it's being used in a browserify/webpack shim for node's crypto library. Uglify caught this for us as it started choking on const.

cc: @ljharb @goatslacker

Here is the dep tree:

~/airlab/repos/thinger master*
 └─┬ webpack@3.10.0
   └─┬ node-libs-browser@2.1.0
     └─┬ crypto-browserify@3.12.0
       └─┬ browserify-sign@4.0.4
         └─┬ parse-asn1@5.1.0
           └── asn1.js@4.10.0
ljharb commented 6 years ago

Adding const (and any ES6) is a breaking change; v4.10 should have been a v5. Reverting this in v4 and publishing a patch would be greatly appreciated!

gdborton commented 6 years ago

It seems this was likely caused by a cached version in our internal npm registry. Doesn't appear to be an issue any more.

ljharb commented 6 years ago

Aha, indeed 4.10 was unpublished. Sorry for the noise!

ljharb commented 6 years ago

(Duplicate of #91)

cr0cK commented 6 years ago

A 4.11 version with the reverted modifications would have been better, you should never unpublished a tag.

My build was broken too, because it was trying to download the 4.10 version referenced in my npm-shrinkwrap file. And I'm certainly not the only one in that case !

hikirsch commented 6 years ago

this bricked our build too b/c we also upgraded webpack to 3.10.0. for the time being, we've pinned on version 4.9.2 since this was the last version on 4 that was published properly.

as of now, i do not know how we can clean our npm cache from our repo, i do not think our product supports this (visual studio team services).

i agree with @cr0cK that this shouldn't have been unpublished either and that 4.11 should have been published. can we please do that? the resolution of this package from parse-asn1@5.1.0 will still resolve properly for us and i will no longer have to pin 4.9.2

indutny commented 6 years ago

Sorry, everyone! Just published 4.10.1, please let me know if it fixes your issues!

gdborton commented 6 years ago

Thanks @indutny!