@picgo/bump-version 1.1.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,37 @@
1
+ name: publish
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ publish:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout
14
+ uses: actions/checkout@v4
15
+
16
+ - name: Setup pnpm
17
+ uses: pnpm/action-setup@v4
18
+ with:
19
+ version: 10
20
+
21
+ - name: Setup Node.js
22
+ uses: actions/setup-node@v4
23
+ with:
24
+ node-version: 20
25
+ registry-url: https://registry.npmjs.org
26
+ cache: pnpm
27
+
28
+ - name: Install dependencies
29
+ run: pnpm install --frozen-lockfile
30
+
31
+ - name: Lint
32
+ run: pnpm run lint
33
+
34
+ - name: Publish
35
+ run: pnpm publish --access public --no-git-checks
36
+ env:
37
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/.node-version ADDED
@@ -0,0 +1 @@
1
+ 22
package/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ # :tada: 2.0.0 (2025-12-10)
2
+
3
+
4
+ ### :bug: Bug Fixes
5
+
6
+ * some deps not installed ([f2a4f74](https://github.com/PicGo/bump-version/commit/f2a4f74))
7
+
8
+
9
+ ### :package: Chore
10
+
11
+ * add pnpm-lock to npmignore ([6de1b65](https://github.com/PicGo/bump-version/commit/6de1b65))
12
+ * update deps \&\& add node 20 limit ([d2d96e9](https://github.com/PicGo/bump-version/commit/d2d96e9))
13
+
14
+
15
+
1
16
  ## :tada: 1.1.2 (2021-09-16)
2
17
 
3
18
 
package/README.md CHANGED
@@ -4,6 +4,8 @@ A full `git commit` -> `changelog` -> `release` workflow & convention.
4
4
 
5
5
  It's now only available for Node.js projects. Thanks [standard-version](https://github.com/conventional-changelog/standard-version) for the inspiration.
6
6
 
7
+ > Starting from v1.2.0, bump-version requires Node.js 20 or higher.
8
+
7
9
  <p align="center">
8
10
  <img src="https://raw.githubusercontent.com/Molunerfinn/test/master/picgo/New%20LOGO-150.png" alt="">
9
11
  </p>
@@ -22,11 +24,15 @@ It's now only available for Node.js projects. Thanks [standard-version](https://
22
24
  ## Installation
23
25
 
24
26
  ```bash
25
- npm install -D @picgo/bump-version
27
+ npm install -D @picgo/bump-version commitizen
28
+
29
+ #or
30
+
31
+ yarn add -D @picgo/bump-version commitizen
26
32
 
27
33
  #or
28
34
 
29
- yarn add -D @picgo/bump-version
35
+ pnpm add -D @picgo/bump-version commitizen
30
36
  ```
31
37
 
32
38
  Also, add the following data at the top level in your `package.json` to properly config `bump-version` (replace old `config` if you have already configured `commitizen` or `cz-customizable` before):
package/bin/bump-version CHANGED
@@ -2,8 +2,7 @@
2
2
  const minimist = require('minimist')
3
3
  const semver = require('semver')
4
4
  const path = require('path')
5
- const inquirer = require('inquirer')
6
- const _ = require('lodash')
5
+ const inquirer = require('inquirer').default
7
6
  const logger = require('../src/logger')
8
7
  const mainLifeCycle = require('../src/mainLifeCycle')
9
8
  const utils = require('../src/utils')
@@ -57,7 +56,7 @@ let defaultObj = {
57
56
  file: 'CHANGELOG.md'
58
57
  }
59
58
 
60
- argv = _.assign({}, defaultObj, argv)
59
+ argv = Object.assign({}, defaultObj, argv)
61
60
 
62
61
  let promptList = [
63
62
  {
@@ -78,7 +77,7 @@ BumpVersion -- By PicGo Group
78
77
  } else {
79
78
  promptList = [
80
79
  {
81
- type: 'list',
80
+ type: 'select',
82
81
  name: 'version',
83
82
  message: `The current version is ${currentVersion}\n Which version would you like to bump it?`,
84
83
  choices: [
@@ -0,0 +1,32 @@
1
+ const { FlatCompat } = require('@eslint/eslintrc')
2
+ const js = require('@eslint/js')
3
+
4
+ const compat = new FlatCompat({
5
+ baseDirectory: __dirname,
6
+ recommendedConfig: js.configs.recommended,
7
+ allConfig: js.configs.all
8
+ })
9
+
10
+ module.exports = [
11
+ {
12
+ ignores: ['node_modules', 'dist']
13
+ },
14
+ ...compat.extends(
15
+ 'eslint:recommended',
16
+ 'plugin:import/recommended',
17
+ 'plugin:n/recommended',
18
+ 'plugin:promise/recommended'
19
+ ),
20
+ {
21
+ languageOptions: {
22
+ ecmaVersion: 2022,
23
+ sourceType: 'script'
24
+ }
25
+ },
26
+ {
27
+ files: ['eslint.config.js'],
28
+ rules: {
29
+ 'n/no-unpublished-require': 'off'
30
+ }
31
+ }
32
+ ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picgo/bump-version",
3
- "version": "1.1.2",
3
+ "version": "2.0.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -9,13 +9,6 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "scripts": {
13
- "test": "echo \"Error: no test specified\"",
14
- "cz": "git-cz",
15
- "release": "node ./bin/bump-version",
16
- "lint": "eslint --ext .js -f ./node_modules/eslint-friendly-formatter .",
17
- "lint:fix": "eslint --ext .js -f ./node_modules/eslint-friendly-formatter --fix ."
18
- },
19
12
  "husky": {
20
13
  "hooks": {
21
14
  "pre-commit": "npm run lint",
@@ -33,13 +26,12 @@
33
26
  },
34
27
  "homepage": "https://github.com/PicGo/bump-version#readme",
35
28
  "devDependencies": {
36
- "eslint": "^5.16.0",
37
- "eslint-config-standard": "^12.0.0",
38
- "eslint-friendly-formatter": "^4.0.1",
39
- "eslint-plugin-import": "^2.16.0",
40
- "eslint-plugin-node": "^8.0.1",
41
- "eslint-plugin-promise": "^4.1.1",
42
- "eslint-plugin-standard": "^4.0.0"
29
+ "@eslint/eslintrc": "^3.3.3",
30
+ "@eslint/js": "^9.39.1",
31
+ "eslint": "^9.39.1",
32
+ "eslint-plugin-import": "^2.32.0",
33
+ "eslint-plugin-n": "^17.23.1",
34
+ "eslint-plugin-promise": "^7.2.1"
43
35
  },
44
36
  "config": {
45
37
  "commitizen": {
@@ -56,10 +48,26 @@
56
48
  },
57
49
  "dependencies": {
58
50
  "@commitlint/cli": "^7.5.2",
51
+ "chalk": "^4.1.2",
59
52
  "commitizen": "^4.2.3",
53
+ "compare-func": "^2.0.0",
60
54
  "conventional-changelog": "^3.0.6",
61
- "cz-customizable": "^5.8.0",
55
+ "cz-customizable": "^7.5.1",
56
+ "husky": "^1.3.1",
57
+ "inquirer": "^13.0.2",
58
+ "minimist": "^1.2.8",
62
59
  "ora": "^3.4.0",
63
- "husky": "^1.3.1"
60
+ "q": "^1.5.1",
61
+ "semver": "^7.7.3"
62
+ },
63
+ "engines": {
64
+ "node": ">=20.0.0"
65
+ },
66
+ "scripts": {
67
+ "test": "echo \"Error: no test specified\"",
68
+ "cz": "git-cz",
69
+ "release": "node ./bin/bump-version",
70
+ "lint": "eslint --ext .js .",
71
+ "lint:fix": "eslint --ext .js --fix ."
64
72
  }
65
- }
73
+ }
package/src/changelog.js CHANGED
@@ -11,7 +11,7 @@ module.exports = (argv, newVersion) => {
11
11
  let oldContent = ''
12
12
  try {
13
13
  oldContent = fs.readFileSync(argv.file, 'utf8')
14
- } catch (e) {
14
+ } catch {
15
15
  oldContent = ''
16
16
  }
17
17
  let context = ''
@@ -5,21 +5,28 @@ const tag = require('./tag')
5
5
  const spinner = require('./ora')
6
6
  module.exports = (argv, currentVersion, newVersion) => {
7
7
  spinner.start()
8
- return new Promise((resolve, reject) => {
9
- spinner.text = 'Bumping version...'
10
- return resolve(bumpVersion(argv, newVersion))
11
- }).then(() => {
12
- spinner.text = 'Generating changelog...'
13
- return changeLog(argv, newVersion)
14
- }).then(() => {
15
- spinner.text = 'Commiting changes...'
16
- return commit(argv, newVersion)
17
- }).then(() => {
18
- spinner.text = 'Creating tag...'
19
- return tag(argv, newVersion)
20
- }).then(() => {
21
- spinner.succeed('Done!')
22
- }).catch(e => {
23
- spinner.fail('Failed!')
24
- })
8
+ return Promise.resolve()
9
+ .then(() => {
10
+ spinner.text = 'Bumping version...'
11
+ return bumpVersion(argv, newVersion)
12
+ })
13
+ .then(() => {
14
+ spinner.text = 'Generating changelog...'
15
+ return changeLog(argv, newVersion)
16
+ })
17
+ .then(() => {
18
+ spinner.text = 'Commiting changes...'
19
+ return commit(argv, newVersion)
20
+ })
21
+ .then(() => {
22
+ spinner.text = 'Creating tag...'
23
+ return tag(argv, newVersion)
24
+ })
25
+ .then(() => {
26
+ return spinner.succeed('Done!')
27
+ })
28
+ .catch(err => {
29
+ spinner.fail('Failed!')
30
+ throw err
31
+ })
25
32
  }
package/src/tag.js CHANGED
@@ -9,11 +9,10 @@ module.exports = (argv, newVersion) => {
9
9
  } else {
10
10
  flow = exec(argv, `git tag -a v${newVersion} -m v${newVersion}`)
11
11
  }
12
- return flow
13
- .then(async () => {
14
- if (argv.push) {
15
- await exec(`git push --follow-tags origin master`)
16
- }
17
- return Promise.resolve()
18
- })
12
+ return flow.then(async () => {
13
+ if (argv.push) {
14
+ await exec(`git push --follow-tags origin master`)
15
+ }
16
+ return null
17
+ })
19
18
  }
package/.eslintrc DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "env": {
3
- "node": true
4
- },
5
- "extends": "standard"
6
- }
@@ -1,21 +0,0 @@
1
- name: publish
2
- on:
3
- push:
4
- branches:
5
- - master
6
- jobs:
7
- build:
8
- runs-on: ubuntu-latest
9
- steps:
10
- - name: Clone repo
11
- uses: actions/checkout@v1
12
- - name: Setup node
13
- uses: actions/setup-node@v1
14
- with:
15
- node-version: '12.x'
16
- registry-url: 'https://registry.npmjs.org'
17
- - name: Install modules
18
- run: yarn
19
- - run: npm publish --access public
20
- env:
21
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,18 +0,0 @@
1
- name: manually-trigger
2
- on: workflow_dispatch
3
- jobs:
4
- build:
5
- runs-on: ubuntu-latest
6
- steps:
7
- - name: Clone repo
8
- uses: actions/checkout@v1
9
- - name: Setup node
10
- uses: actions/setup-node@v1
11
- with:
12
- node-version: '12.x'
13
- registry-url: 'https://registry.npmjs.org'
14
- - name: Install modules
15
- run: yarn
16
- - run: npm publish --access public
17
- env:
18
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,24 +0,0 @@
1
- language: node_js
2
- node_js: stable
3
-
4
- # Travis-CI Caching
5
- cache:
6
- directories:
7
- - node_modules
8
-
9
- stages:
10
- - name: deploy
11
-
12
- jobs:
13
- include:
14
- - stage: deploy
15
- deploy:
16
- provider: npm
17
- email: "marksz@teamsz.xyz"
18
- api_key: "${NPM_TOKEN}"
19
- skip_cleanup: true
20
- on:
21
- branch: master
22
- branches:
23
- only:
24
- - master