Giter Site home page Giter Site logo

antfu / bumpp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from js-devtools/version-bump-prompt

510.0 510.0 35.0 1.25 MB

Interactive CLI that bumps your version numbers and more

Home Page: https://jstools.dev/version-bump-prompt/

License: MIT License

JavaScript 0.51% TypeScript 99.49%

bumpp's Introduction

bumpp's People

Contributors

aleclarson avatar antfu avatar auvred avatar bernankez avatar danielroe avatar dockfries avatar greenkeeperio-bot avatar jamesmessinger avatar jannchie avatar kejunmao avatar murongg avatar sec-ant avatar sidtagirisa avatar sqrtofsaturn avatar sxzz avatar vision010 avatar wsypower avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

bumpp's Issues

Look in parent directories for config file

Clear and concise description of the problem

It seems only the working directory is checked

Suggested solution

Check each parent directory for bump.config.ts until a config file is found

Alternative

No response

Additional context

No response

Validations

After upgrade to v9.2.0 bump.config.ts not work

Describe the bug

After upgrade to v9.2.0 bump.config.ts not work, but with v9.1.0 it works.

Reproduction

https://github.com/yunsii/unplugin-polish-tagged-templates

System Info

System:
    OS: Linux 5.15 Ubuntu 18.04.6 LTS (Bionic Beaver)
    CPU: (12) x64 Intel(R) Core(TM) i7-10710U CPU @ 1.10GHz
    Memory: 11.55 GB / 15.52 GB
    Container: Yes
    Shell: 5.4.2 - /usr/bin/zsh
  Binaries:
    Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node
    Yarn: 1.22.5 - /usr/bin/yarn
    npm: 8.3.1 - ~/.nvm/versions/node/v16.14.0/bin/npm
    pnpm: 8.6.9 - ~/.local/share/pnpm/pnpm

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

run versionBumpp function in a mjs file

Describe the bug

Here are the steps to reproduce the error:

  1. create a mjs file
  2. import versionBumpp from 'bumpp';
  3. run versionBumpp function

import { ReleaseType } from "semver";
^^^^^^^^^^^
SyntaxError: Named export 'ReleaseType' not found. The requested module 'semver' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'semver';
const { ReleaseType } = pkg;

at ModuleJob._instantiate (node:internal/modules/esm/module_job:128:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:194:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
at async loadESM (node:internal/process/esm_loader:88:5)
at async handleMainPromise (node:internal/modules/run_main:61:12)

I found a TS type declaration ReleaseType in dist/chunk-L3LY4KGC.mjs.

Reproduction

https://stackblitz.com/edit/stackblitz-starters-7ky89b?file=index.mjs

System Info

System:
    OS: macOS 13.4
    CPU: (10) arm64 Apple M1 Max
    Memory: 1.81 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.16.0 - ~/Library/Caches/fnm_multishells/41379_1685869881245/bin/node
    Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/41379_1685869881245/bin/yarn
    npm: 8.11.0 - ~/Library/Caches/fnm_multishells/41379_1685869881245/bin/npm
  Browsers:
    Chrome: 113.0.5672.126
    Safari: 16.5

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Read monorepo path from `pnpm-workspace.yaml`

Clear and concise description of the problem

I've noticed that currently it automatically recognizes monorepo in packages, but not other paths unless a custom config is provided. However, pnpm fully supports other paths.

Suggested solution

We can actually read pnpm-workspace.yaml to collect all the paths to monorepo.

Alternative

Provide a config.

Additional context

No response

Validations

`bump.config.ts` has no effect on `commit` and `tag`

Describe the bug

The settings for commit and tag appear to be completely ignored when set to false or even when set to a string (e.g. jumpy or ju-%s-py). Docs say that these should be used for naming the version (when string used) or to disable tag and commit respectively.

The only one that appears to be working is push: false which actually prevents the git push.

I did not test the all: false/true or execute parameter.

Test Results:

bumpp-v9.1.0-bump.config.ts

  • finds bump.config.ts
  • does not respect any of the parameters except push: false
  • it also actually tries to commit/tag/etc.

bumpp-v9.2.0-bump.config.ts

  • finds bump.config.ts
  • does not respect any of the parameters except push: false
  • commit and tag are ignored if set to false or if seet to a string e.g. jumpy or ju-%s-py
  • it also actually tries to commit/tag/etc.

Reproduction

https://codesandbox.io/p/sandbox/reproduction-bumpp-config-file-jywcm5

System Info

System:
    OS: macOS 14.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 21.90 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.2 - ~/Library/pnpm/node
    pnpm: 8.9.2 - ~/Library/pnpm/pnpm

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

How to quickly enter the next version

Clear and concise description of the problem

I want to a quickly enter the next version method

Suggested solution

use bumpp next require next version

Alternative

No response

Additional context

I don't like using prompt when up the simple version

Validations

`--recursive` only finds sub packages in `/packages/**`

Describe the bug

The bumpp package in the latest version does not find recursive package.json files if they are anywhere else but the /packages/** folder structure.

This is despite those other folders being present in the pnpm-workspace.yaml file.

In the reproduction:

  • running pnpm install
  • and then running pnpm release in the root directory
  • result: the upgrade shows that the versions in package.json, package/app/package.json will be updated
  • however, it does not update the version in the app/package.json
  • the pnpm-workspace.yaml does have the app directory listed as a workspace directory but not the packages folder!
Folder Structure Xnapper-2023-10-18-23 05 01
Output of `pnpm release` => `pnpm bumpp -r` Xnapper-2023-10-18-23 04 43

Reproduction

https://codesandbox.io/p/sandbox/reproduction-bumpp-no-recursive-grl7gm

System Info

System:
    OS: macOS 14.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 21.90 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.2 - ~/Library/pnpm/node
    npm: 10.2.0 - ~/Library/pnpm/npm
    pnpm: 8.9.2 - ~/Library/pnpm/pnpm
  Browsers:
    Brave Browser: 118.1.59.117
    Chrome: 118.0.5993.70
    Edge: 118.0.2088.46
    Safari: 17.1

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

bumpp.config.ts

Describe the bug

你好,我现在正在研究这个包的用法,但是我发现配置了bumpp.config.ts配置并不生效,然后我看了下源代码
image
是不是name参数配置有误

Reproduction

const { config } = await loadConfig({ name: 'bump', defaults: bumpConfigDefaults, overrides: { ...(overrides as VersionBumpOptions), }, cwd, })

System Info

System:
    OS: macOS 13.3.1
    CPU: (12) arm64 Apple M2 Max
    Memory: 481.25 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.18.1 - ~/.nvm/versions/node/v16.18.1/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.18.1/bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v16.18.1/bin/npm
  Browsers:
    Safari: 16.4

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

`--execute` argument not works with `%s` placeholder

Describe the bug

Hi!

Looks like --execute argument not works %s placeholder (like --commit or --tag argument).
I want to use bumpp with changelogen.

Like this:

{
  "scripts": {
    "release":  "bumpp package.json --execute=\"pnpm exec changelogen --output changelog.md -r %s && git add changelog.md\" --commit \"build: publish v%s\" --tag --all"
  }
}

But I get the following error:

ERROR  ENOENT: no such file or directory, chdir '/Users/azat/Developer/eslint-plugin-perfectionist' -> '/Users/azat/Developer/eslint-plugin-perfectionist/&&'                                                                                     6:48:17 PM

  at wrappedChdir (node:internal/bootstrap/switches/does_own_process_state:112:14)
  at process.chdir (node:internal/worker:108:5)
  at Module.defaultMain (node_modules/.pnpm/[email protected]/node_modules/changelogen/dist/chunks/default.mjs:21:11)
  at node_modules/.pnpm/[email protected]/node_modules/changelogen/dist/cli.mjs:22:56
  at async main (node_modules/.pnpm/[email protected]/node_modules/changelogen/dist/cli.mjs:22:3)

Reproduction

https://github.com/azat-io/eslint-plugin-perfectionist

System Info

System:
    OS: macOS 13.4
    CPU: (10) arm64 Apple M1 Pro
    Memory: 2.68 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.2.0 - ~/.asdf/installs/nodejs/20.2.0/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.6.6 - ~/.asdf/plugins/nodejs/shims/npm
  Browsers:
    Chrome: 114.0.5735.106
    Firefox: 111.0.1
    Safari: 16.5

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

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.