npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rn-update-build-version

v2.0.0

Published

Aumente a versão e o número de compilação em seu aplicativo nativo de reação para package.json e ambas as plataformas (ios && android) com um comando

Downloads

37

Readme

Por favor, crie um pull request para o projeto se você melhorar alguma coisa! Isso nos ajudará a criar juntos um pacote de alta qualidade.

Esse projeto foi modificado por Cleverson Fernandes, porem créditos de desenvolvimento para: gustarus

React native version upper

Aumentemajor, minor ou patch da versão e do número da compilação em seu aplicativo em package.json e em projetos ios e android com um comando.

node ./node_modules/rn-update-build-version/index.js --patch -m 'commit message'

Com este script você pode:

  • Increase major, minor or patch part in the version.
  • Make a git commit with version changes.
  • Make a git tag with new version.

Exemplo

> yarn run version:up -- --patch
$ rn-update-build-version "--patch"

I'm going to increase the version in:
  - package.json (./package.json);
  - ios project (./ios/happinesstracker/Info.plist);
  - android project (./android/app/build.gradle).

The version will be changed:
  - from: 0.2.2 (9);
  - to:   0.2.3 (10).

Use "0.2.3" as the next version? [y/n] y

Atualizando versões
    Atualizando versão em package.json...
  Versão no package.json alterada.
    Atualizando versão no projeto xcode...
  Versão e número de compilação no projeto ios (arquivo plist) alterados.
    Atualizando versão no projeto android...
  Versão e número de compilação no projeto android (arquivo gradle) alterados.

Feito!

Instalação

yarn add rn-update-build-version

Or via npm:

npm install rn-update-build-version --save

Uso

1. Adicione o comando na seção scripts em package.json

{
  "name": "your-project-name",
  "scripts": {
    "version:patch": "node ./node_modules/rn-update-build-version/index.js --patch",
    "version:major": "node ./node_modules/rn-update-build-version/index.js --major",
    "version:minor": "node ./node_modules/rn-update-build-version/index.js --minor"
  }
}

2. Certifique-se de ter definido a versão

{
  "name": "your-project-name",
  "version": "1.0.0",
  "scripts": {
    "version:patch": "node ./node_modules/rn-update-build-version/index.js --patch",
    "version:major": "node ./node_modules/rn-update-build-version/index.js --major",
    "version:minor": "node ./node_modules/rn-update-build-version/index.js --minor"
  }
}

3. Confirme o package.json (opcional)

git add package.json
git commit -m 'version:up command added'

4. Aumente a versão quando necessário

yarn version:up --major

Or via npm:

npm run version:up -- --major

Options

Você pode passar o nome e o valor da opção com a seguinte sintaxe (lembre-se de colocar -- antes das opções se estiver usando npm, com yarn isso não é necessário):

yarn version:up --flag value

| Option | Type | Default value | Description | | ------------------------------ | -------- | ----------------------------------------------------------- | ---------------------------------------------------- | | --major | flag | | Increase major version:0.0.0 -> 1.0.0 | | --minor | flag | | Increase minor version:0.0.0 -> 0.1.0 | | --patch | flag | | Increase patch version:0.0.0 -> 0.0.1 | | --message or -m | string | "release ${version}: increase versions and build numbers" | Custom commit message. | | --pathToPackage './path' | string | ./package.json | Path to package.json file in your project. | | --pathToPlist './path' | string | ./ios/${package.name}/Info.plist | Path to Info.plist file (ios project). | | --pathToGradle './path' | string | ./android/app/build.gradle | Path to build.gradle file (android project). |