@varlet/release 0.1.0 → 0.1.1-alpha.1702447412579

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.
Files changed (2) hide show
  1. package/bin/index.js +29 -29
  2. package/package.json +2 -2
package/bin/index.js CHANGED
@@ -1,29 +1,29 @@
1
- #!/usr/bin/env node
2
- import { release, changelog, commitLint } from '../dist/index.js'
3
- import { Command } from 'commander'
4
-
5
- const program = new Command()
6
-
7
- program
8
- .command('release')
9
- .option('-r --remote <remote>', 'Remote name')
10
- .description('Release all packages and generate changelogs')
11
- .action(async (options) => release(options))
12
-
13
- program
14
- .command('changelog')
15
- .option('-rc --releaseCount <releaseCount>', 'Release count')
16
- .option('-f --file <file>', 'Changelog filename')
17
- .description('Generate changelog')
18
- .action(async (options) => changelog(options))
19
-
20
- program
21
- .command('commit-lint')
22
- .option('-p --commitMessagePath <commitMessagePath>', 'Git commit message path')
23
- .option('-r --commitMessageRe <reg>', 'Validate the regular of whether the commit message passes')
24
- .option('-e --errorMessage <message>', 'Validation failed to display error messages')
25
- .option('-w --warningMessage <message>', 'Validation failed to display warning messages')
26
- .description('Lint commit message')
27
- .action(async (option) => commitLint(option))
28
-
29
- program.parse()
1
+ #!/usr/bin/env node
2
+ import { release, changelog, commitLint } from '../dist/index.js'
3
+ import { Command } from 'commander'
4
+
5
+ const program = new Command()
6
+
7
+ program
8
+ .command('release')
9
+ .option('-r --remote <remote>', 'Remote name')
10
+ .description('Release all packages and generate changelogs')
11
+ .action(async (options) => release(options))
12
+
13
+ program
14
+ .command('changelog')
15
+ .option('-rc --releaseCount <releaseCount>', 'Release count')
16
+ .option('-f --file <file>', 'Changelog filename')
17
+ .description('Generate changelog')
18
+ .action(async (options) => changelog(options))
19
+
20
+ program
21
+ .command('commit-lint')
22
+ .option('-p --commitMessagePath <path>', 'Git commit message path')
23
+ .option('-r --commitMessageRe <reg>', 'Validate the regular of whether the commit message passes')
24
+ .option('-e --errorMessage <message>', 'Validation failed to display error messages')
25
+ .option('-w --warningMessage <message>', 'Validation failed to display warning messages')
26
+ .description('Lint commit message')
27
+ .action(async (option) => commitLint(option))
28
+
29
+ program.parse()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@varlet/release",
3
3
  "type": "module",
4
- "version": "0.1.0",
4
+ "version": "0.1.1-alpha.1702447412579",
5
5
  "description": "release all packages and generate changelogs",
6
6
  "keywords": [
7
7
  "varlet",
@@ -72,7 +72,7 @@
72
72
  },
73
73
  "scripts": {
74
74
  "preinstall": "npx only-allow pnpm",
75
- "postinstall": "simple-git-hooks",
75
+ "postinstall": "node -e \"if (process.env.INIT_CWD === process.cwd()) { process.exit(1) }\" || simple-git-hooks",
76
76
  "dev": "tsup --watch",
77
77
  "build": "tsup",
78
78
  "release": "pnpm build && node bin/index.js release",