Microsoft Corp.’s GitHub subsidiary today said that it has agreed to acquire npm Inc., a startup with a central role in the open-source software community and a user base of about 12 million ...