brianloveswords / base64url

For encoding and decoding base64url!
MIT License
225 stars 44 forks source link

Do not publish global typings to npm #20

Closed demurgos closed 6 years ago

demurgos commented 7 years ago

Hi, Your package publishes global typings to npm. This causes conflicts with other (and more recent / acurate) definitions for Node. This module is simply unusable with full TS checks.

Since you use typings, you shouldn't even publish your typings directory but let typings resolve the dependencies with your typings.json file. typings is now deprecated in favor of @types, I'd recommend to switch to @types while fixing this issue.

alexbjorlig commented 7 years ago

Hi @demurgos - how do you solve this in your project? I solved it by adding the following gulp task to my project:

gulp.task('clean-script', function(){
return del([
        'node_modules/base64url/typings',
        'node_modules/base64url/dist/base64url.d.ts',          
    ]);
});
demurgos commented 7 years ago

@dauledk I don't have time to deal with these sorts of issues and even if your solution could work in a postinstall hook, it remains a hack. This issue is so bad that I just switched to another lib: base64-url (with a dash).

@brianloveswords Since I switched to another lib, I did not follow this issue actively, but it seems that multiple other people upvoted this issue. I appreciate that you tried to provide type definitions, but it's been 4 months that your library is unusable with Typescript. Please consider one of the solutions I mentioned in the first post.

MylesBorins commented 6 years ago

We believe that this was fixed in 3.0.0. Please let us know if that is incorrect and we'll re-open the PR