JS-Interpreter icon indicating copy to clipboard operation
JS-Interpreter copied to clipboard

support npm with github

Open tjenkinson opened this issue 6 years ago • 7 comments

so that users can

npm install --save github:NeilFraser/JS-Interpreter

closes #156

See https://docs.npmjs.com/cli/install

I wondered if it would work without name but it's required. It's a bit misleading if someone else owns js-interpreter on npm. Ideally you would register a new name and use that to prevent any confusion.

tjenkinson avatar Aug 31 '19 13:08 tjenkinson

I'm not clear on how to contact the person who currently owns the js-interpreter npm package, nor whether they would be willing and able to transfer it, but I would say it would be preferable for that npm to be owned by @NeilFraser, and for this PR to be accepted in support of having an official version whether under that name or another.

cpcallen avatar Sep 01 '19 18:09 cpcallen

Any update?

hsluoyz avatar Dec 22 '19 11:12 hsluoyz

I'm not clear on how to contact the person who currently owns the js-interpreter npm package, nor whether they would be willing and able to transfer it, but I would say it would be preferable for that npm to be owned by @NeilFraser, and for this PR to be accepted in support of having an official version whether under that name or another.

Please see my other ticket. #216 I will be totally happy to transfer ownership of it to you guys. But, I think we should spare a thought for those people who are currently using npm's js-interpreter so that we don't break things for them.

mercmobily avatar Aug 16 '21 13:08 mercmobily

I had a look at this PR, and I wanted to add that doing this might not be enough:

if (typeof exports === 'object' && typeof module === 'object') {
  module.exports = Interpreter;
}

Mainly because of this line in js-interpreter:

Interpreter.nativeGlobal = this;

Sandwiching it might be a better option, since this will change its meaning depending on where it's being used. However, I am not the strongest JS person in my team. Raphael (in my team) will do a much better job than me at checking these sort of issues.

mercmobily avatar Aug 16 '21 13:08 mercmobily

I'm on annual leave at the moment but will look at this when I get back to the office. Thanks @tjenkinson for the PR and @mercmobily for offering the use of the existing name. I'm not sure that @NeilFraser will be that keen to take on maintenance of the npm but we can probably work something out, especially if there are folks like you guys with the relevant experience who are willing to help out.

I agree that it would be best not to break things for users of the existing package.

cpcallen avatar Aug 16 '21 22:08 cpcallen

No worries, let me know once you get back. In the meantime, I will leave the current js-interpreter npm package as is, waiting for your decision! Thanks for taking the time to answer during your annual leave.

mercmobily avatar Aug 16 '21 23:08 mercmobily

Any chance this PR gets merged? And is there currently another solution to install js-interpreter as a npm dependency?

derwehr avatar Mar 14 '22 09:03 derwehr