pnpm-plugin-alex-857 1.0.24 → 1.0.26

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.
package/README.md CHANGED
@@ -10,6 +10,19 @@ A pnpm config plugin that provides a shared **catalog** of dependency versions a
10
10
 
11
11
  ---
12
12
 
13
+ ## Developer checklist
14
+
15
+ Use this checklist when setting up a monorepo with this plugin:
16
+
17
+ - [ ] **Add the plugin** – From the monorepo root, run: `pnpm add --config pnpm-plugin-alex-857@latest`
18
+ - [ ] **Add scripts** – Copy the `scripts` block from Step 2 below into your root `package.json`
19
+ - [ ] **Use the catalog** – Add dependencies with `catalog:` in root or workspace `package.json`, or run `pnpm run install:catalog` to add all catalog packages at once
20
+ - [ ] **Verify** – Run `pnpm install` and confirm install and postinstall complete without errors
21
+
22
+ For updates: when a new version of the plugin is released, running **`pnpm install`** is enough (preinstall will pull the latest).
23
+
24
+ ---
25
+
13
26
  ## Setup (step by step)
14
27
 
15
28
  ### Step 1: Add the plugin as a config dependency
@@ -24,22 +37,17 @@ This updates your `pnpm-workspace.yaml` with a `configDependencies` entry and in
24
37
 
25
38
  ### Step 2: Add scripts to your root `package.json`
26
39
 
27
- Add the following scripts so the plugin’s install-catalog script runs correctly (config dependencies don’t expose bins to the workspace):
40
+ **Copy and paste** this `scripts` block into your root `package.json`:
28
41
 
29
42
  ```json
30
- {
31
- "name": "monorepo-a",
32
- "version": "1.0.0",
33
- "private": true,
34
- "scripts": {
35
- "preinstall": "pnpm add --config pnpm-plugin-alex-857@latest",
43
+ "scripts": {
44
+ "preinstall": "pnpm add --config pnpm-plugin-alex-857@latest && node node_modules/.pnpm-config/pnpm-plugin-alex-857/install-workspace.js",
36
45
  "postinstall": "pnpm run install:catalog",
37
46
  "install:catalog": "node node_modules/.pnpm-config/pnpm-plugin-alex-857/install-catalog.js"
38
- }
39
47
  }
40
48
  ```
41
49
 
42
- - **preinstall**: Ensures the latest plugin version is used before each install.
50
+ - **preinstall**: Ensures the latest plugin version is used and runs the workspace setup script.
43
51
  - **postinstall**: Runs after `pnpm install` and adds all catalog packages to the root (if not already present).
44
52
  - **install:catalog**: Manual script to add all catalog packages at once.
45
53
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pnpm-plugin-alex-857",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "A plugin for pnpm to use alex as a linter",
5
5
  "bin": {
6
6
  "install-catalog": "./install-catalog.js",
package/pnpmfile.cjs CHANGED
@@ -8,12 +8,10 @@ module.exports = {
8
8
  for (const [name, version] of Object.entries(catalog)) {
9
9
  config.catalogs.default[name] = version;
10
10
  }
11
- return {
12
- ...config,
13
- strictPeerDependencies: true,
14
- hoist: false,
15
- hoistWorkspacePackages: true
16
- };
11
+ config.strictPeerDependencies = true;
12
+ config.hoist = false;
13
+ config.hoistWorkspacePackages = true;
14
+ return config;
17
15
  },
18
16
  },
19
17
  };