cli-changescribe 0.1.2 → 0.1.3

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 (3) hide show
  1. package/README.md +23 -0
  2. package/package.json +1 -1
  3. package/src/init.js +12 -0
package/README.md CHANGED
@@ -4,8 +4,27 @@ CLI to generate Conventional Commit messages and PR summaries using Groq.
4
4
 
5
5
  ## Install
6
6
 
7
+ Pick the install command that matches your repo's package manager:
8
+
7
9
  ```bash
10
+ # npm
8
11
  npm install -g cli-changescribe
12
+ # or in a repo
13
+ npm install cli-changescribe
14
+ ```
15
+
16
+ ```bash
17
+ # pnpm
18
+ pnpm add -g cli-changescribe
19
+ # or in a repo
20
+ pnpm add cli-changescribe
21
+ ```
22
+
23
+ ```bash
24
+ # yarn
25
+ yarn global add cli-changescribe
26
+ # or in a repo
27
+ yarn add cli-changescribe
9
28
  ```
10
29
 
11
30
  ## Setup
@@ -16,6 +35,10 @@ Create a `.env.local` file in the repo where you run the CLI:
16
35
  GROQ_API_KEY="your-key-here"
17
36
  ```
18
37
 
38
+ If your repo uses `pnpm` or `yarn`, make sure you install `cli-changescribe`
39
+ with the same package manager so the correct lockfile is updated (Vercel uses
40
+ `frozen-lockfile` by default).
41
+
19
42
  ### Setup process (recommended)
20
43
 
21
44
  1. Install `cli-changescribe` (global or per repo).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cli-changescribe",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "CLI for generating commit messages and PR summaries",
5
5
  "bin": {
6
6
  "changescribe": "bin/changescribe.js"
package/src/init.js CHANGED
@@ -42,6 +42,18 @@ function runInit(cwd = process.cwd()) {
42
42
  process.exit(1);
43
43
  }
44
44
 
45
+ const pnpmLock = path.join(cwd, 'pnpm-lock.yaml');
46
+ const yarnLock = path.join(cwd, 'yarn.lock');
47
+ if (fs.existsSync(pnpmLock)) {
48
+ console.warn(
49
+ '⚠️ pnpm-lock.yaml detected. Use pnpm to install/update dependencies so the lockfile stays in sync.'
50
+ );
51
+ } else if (fs.existsSync(yarnLock)) {
52
+ console.warn(
53
+ '⚠️ yarn.lock detected. Use yarn to install/update dependencies so the lockfile stays in sync.'
54
+ );
55
+ }
56
+
45
57
  const pkg = readPackageJson(packagePath);
46
58
  const added = ensureScripts(pkg);
47
59
  writePackageJson(packagePath, pkg);