Giter Club home page Giter Club logo

pkg-rename's Introduction

@tiaanduplessis/pkg-rename

package version package downloads standard-readme compliant package license make a pull request Greenkeeper badge

CLI to rename a npm package

Table of Contents

Install

$ npm -g install @tiaanduplessis/pkg-rename
# OR
$ yarn global add @tiaanduplessis/pkg-rename

Usage

cd into your package's directory after renaming it. You can then run:

$ pkg-rename old-package-name
# or 
$ pkg-rename --old=old-package-name

This will get the latest version of the old package from npm and deprecate this and all previous published versions with a message:

WARNING: This project has been renamed to new-package-name. Install using new-package-name instead.

new-package-name is retrieved from the closest package.json

You can also publish directly after:

$ pkg-rename old-package-name --publish

Contribute

  1. Fork it and create your feature branch: git checkout -b my-new-feature
  2. Commit your changes: git commit -am 'Add some feature'
  3. Push to the branch: git push origin my-new-feature
  4. Submit a pull request

License

MIT

pkg-rename's People

Contributors

greenkeeper[bot] avatar tiaanduplessis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pkg-rename's Issues

No error is shown when publish fails

Hi, first of all, thanks for this useful package!

I've noticed an issue with it. I tried to rename a package (react-navigation-sharedelement -> react-navigation-shared-element), but this didn't complete succesfully.
I used this command after renaming the name in package.json:

$ pkg-rename react-navigation-sharedelement --publish

And this was the output:

Successfully deprecated <=0.4.5 versions of react-navigation-sharedelement.

Unfortunately the publish did not happen or complete succesfully. When publishing manually I get the following NPM error 403 Forbidden - PUT https://registry.npmjs.org/react-navigation-shared-element - Package name too similar to existing packages; try renaming your package to '@ijzerenhein/react-navigation-shared-element' and publishing with 'npm publish --access=public' instead, which explains the problem.

So in short, when publish fails it should report the error, otherwise it gives you the impression that all went well.

cheers!

does not work with 2FA

I tried using this when my account had 2FA turned on. No error was shown and it immediately returned

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.