Giter Club home page Giter Club logo

Comments (3)

andris9 avatar andris9 commented on July 19, 2024

If you want to use iconv you should add it to the dependencies of your own project. If it is available then it used by default. The thing with iconv is that it fails to build on several systems and in case of Nodemailer it made up something like 90% of the size of the installed module while it wasn't even needed. Including iconv made Nodemailer's install time several times longer (because of the compilation time) and the installed module size a lot bigger, so I removed it.

Additionally there's a pending issue for iconv-lite to support iso-2022-jp but I saw that you already found it.

from encoding.

max-mapper avatar max-mapper commented on July 19, 2024

@andris9 I'm interested in hearing why optional dependencies don't work for this use case

from encoding.

andris9 avatar andris9 commented on July 19, 2024

Optional dependencies would work, no question about that – the issue is that in case of Nodemailer having iconv installed even as an optional dep (and optional deps are always installed, at least the installation is tried by npm) was not desirable (the encoding module was once part of Nodemailer, I moved it to a separate module long time after Nodemailer was created).

In Windows (think of Azure) you would get tons of error messages (actually warnings, but scary enough that I got a lot of complaints and "bug" reports). In *nix the installed module size would be 10 times larger than without iconv (with iconv 14 MB, without 1.4 MB) and install time would be several times longer (fresh uncached install without iconv ~5 sec, with iconv ~ 4min) and this for no reason whatsoever – all encoding issues that Nodemailer has can easily be covered by iconv-lite.

Today encoding is not part of Nodemailer anymore, I decided to use iconv-lite directly, so in theory it would be possible to reinclude iconv as a dependency for encoding but I really do not want to touch it, I think it works just fine as it already is.

from encoding.

Related Issues (13)

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.