bbump 1.0.0 → 1.0.2

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,27 @@
1
+ name: Publish Package
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ permissions:
9
+ id-token: write # Required for OIDC
10
+ contents: read
11
+
12
+ jobs:
13
+ publish:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - uses: actions/setup-node@v4
19
+ with:
20
+ node-version: '20'
21
+ registry-url: 'https://registry.npmjs.org'
22
+
23
+ # Ensure npm 11.5.1 or later is installed
24
+ - name: Update npm
25
+ run: npm install -g npm@latest
26
+ - run: npm ci
27
+ - run: npm publish
@@ -36,10 +36,15 @@ try {
36
36
 
37
37
  // Add only package.json and lockfile to Git
38
38
  const lockfile = isYarn ? 'yarn.lock' : 'package-lock.json';
39
- execSync(`git add package.json ${lockfile}`, { stdio: 'inherit' });
39
+ const filesToAdd = ['package.json'];
40
+ if (existsSync(lockfile)) {
41
+ filesToAdd.push(lockfile);
42
+ }
43
+
44
+ execSync(`git add ${filesToAdd.join(' ')}`, { stdio: 'inherit' });
40
45
 
41
46
  // Commit only the specified files with a fixed commit message
42
- execSync(`git commit -m "chore: bump version" package.json ${lockfile}`, { stdio: 'inherit' });
47
+ execSync(`git commit -m "chore: bump version" ${filesToAdd.join(' ')}`, { stdio: 'inherit' });
43
48
 
44
49
  console.log(`Version bumped to ${versionType} and changes committed with message: 'chore: bump version'.`);
45
50
  } catch (error) {
package/package.json CHANGED
@@ -1,15 +1,21 @@
1
1
  {
2
2
  "name": "bbump",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Bump version based on branch prefix",
5
- "main": "src/index.mjs",
5
+ "main": "index.js",
6
+ "type": "module",
6
7
  "bin": {
7
- "bbump": "src/index.mjs"
8
+ "bbump": "index.js"
8
9
  },
9
10
  "scripts": {
10
- "test": "echo \"Error: no test specified\" && exit 1"
11
+ "test": "echo \"Error: no test specified\" && exit 1",
12
+ "bumpVersion": "node index.js"
11
13
  },
12
14
  "author": "helloint",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/helloint/bbump.git"
18
+ },
13
19
  "license": "MIT",
14
20
  "dependencies": {
15
21
  "inquirer": "^9.0.0"
package/.idea/bumpb.iml DELETED
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" inherit-compiler-output="true">
4
- <exclude-output />
5
- <content url="file://$MODULE_DIR$" />
6
- <orderEntry type="inheritedJdk" />
7
- <orderEntry type="sourceFolder" forTests="false" />
8
- </component>
9
- </module>
package/.idea/misc.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="corretto-21" project-jdk-type="JavaSDK">
4
- <output url="file://$PROJECT_DIR$/out" />
5
- </component>
6
- </project>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/bumpb.iml" filepath="$PROJECT_DIR$/.idea/bumpb.iml" />
6
- </modules>
7
- </component>
8
- </project>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
6
- </project>