News for hackers. Stuff that matters.
Re:Major bank accidentally published a private package to th... by adrianhel on Tuesday March 12, 2019 @04:24AM (#19366278)
They could just change it to `npm publish npm|url name` with some useful warnings. The name should be checked against package.name.

Then libraries could simply add an npm script for publishing.

    npm publish

    To publish a package to
    npm, you must enter:

      npm publish npm <package-name>

    To publish a package to
    another registry, you
    must enter:

      npm publish <url> <package-name>
Just as easy, just clearer.
Re:Major bank accidentally published a private package to th... by madeofpalk on Tuesday March 12, 2019 @07:50PM (#19374256)
cool, so now the developer that did this will just thoughtlessly type npm publish npm instead.

At the end of the day, there's only so much you can do. Really, a hammer shouldn't have a prompt on it confirming each hit. If it does, users will just instinctively press it and then a few months down the road they'll hit their thumb.