[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#841196: ITP: node-os-homedir -- Node.js 4 `os.homedir()` ponyfill



On 10/18/2016 06:28 PM, Jakub Wilk wrote:
> * Lars Wirzenius <liw@liw.fi>, 2016-10-18, 19:14:
>>> The WTFness of this code is certainly way above what we're normally
>>> used to, but (AIUI) it's only used as a fallback for nodejs < 4.
>>> Debian currently has 4.6.0.
>> In that case, perhaps this package isn't needed in Debian at all?
> You would have to patch the depending packages to use os.homedir()
> directly rather than through the wrapper this package provides. But that
> might be easier than surviving the debian-devel discussion. :-P

https://www.npmjs.com/package/os-homedir suggests that it is used like this:

  const osHomedir = require('os-homedir');

If we're reaching that point where we are filling in a fallback that is
actually unused because typeof os.homedir === 'function' is true, could
we have a separate package that collects and provides these kind of stubs?

These poly-/ponyfills seem unlikely to ever change their API as well
because they can't, so that should actually be feasible. (I suppose
dependencies are strictly versioned as well and you don't get fixes? Or
packages are renamed anyway when they change API?)

Kind regards
Philipp Kern

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: