A little compatibility issue


So I’ve been making pure node apps until now and haven’t had to deal with babel, transpiling and such. Today I decided to make an atom package and am having an issue. One of my dependencies uses the padStart method: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart

Atom doesn’t seem to know what this function is, which I’m assuming is caused by an older version of node.
I’ve tried rewriting this in the source code of my dependency and everything works fine, but I can’t go doing this every time the dependency gets an update.

I’m really new to this so some guidance on how could I handle this would be appreciated :frowning:


Close, but not quite. If you pop open a command line and type atom -v, you can see the versions of Electron/Chrome/Node included in Atom.

> atom -v

Atom    : 1.22.1
Electron: 1.6.15
Chrome  : 56.0.2924.87
Node    : 7.4.0

The page you linked identifies the feature as having been implemented in Chrome 57. I don’t know what the dependency is, but I don’t think it would be too onerous to keep applying patch for a simple function like this. I also don’t know how to figure out when Atom will update to a particular version of Electron, but I can find out that the latest version of Electron is built on Chrome 58. So it’s only a matter of time until Atom is migrated past 56.


Oh, you’re right.

Guess I’ll just patch the dependency for now and patiently wait for Atom to get on chrome 57.

Thank you for your answer.