pnpm-plugin-alex-857 1.0.22 → 1.0.24

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
@@ -8,62 +8,79 @@ A pnpm config plugin that provides a shared **catalog** of dependency versions a
8
8
  - **Config**: Sets `strictPeerDependencies: true`, `hoist: false`, and `hoistWorkspacePackages: true`.
9
9
  - **install-catalog**: A script to add all catalog packages to your project in one go.
10
10
 
11
- ## Install
11
+ ---
12
12
 
13
- Add the plugin as a **config dependency** so pnpm loads its pnpmfile and catalog:
13
+ ## Setup (step by step)
14
+
15
+ ### Step 1: Add the plugin as a config dependency
16
+
17
+ From your monorepo root:
14
18
 
15
19
  ```bash
16
20
  pnpm add --config pnpm-plugin-alex-857@latest
17
21
  ```
18
22
 
19
- This updates your `pnpm-workspace.yaml` with something like:
23
+ This updates your `pnpm-workspace.yaml` with a `configDependencies` entry and installs the plugin so its pnpmfile and catalog are used on every `pnpm install`.
24
+
25
+ ### Step 2: Add scripts to your root `package.json`
20
26
 
21
- ```yaml
22
- configDependencies:
23
- pnpm-plugin-alex-857: 1.0.14+sha512-...
27
+ Add the following scripts so the plugin’s install-catalog script runs correctly (config dependencies don’t expose bins to the workspace):
28
+
29
+ ```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",
36
+ "postinstall": "pnpm run install:catalog",
37
+ "install:catalog": "node node_modules/.pnpm-config/pnpm-plugin-alex-857/install-catalog.js"
38
+ }
39
+ }
24
40
  ```
25
41
 
26
- ## Usage
42
+ - **preinstall**: Ensures the latest plugin version is used before each install.
43
+ - **postinstall**: Runs after `pnpm install` and adds all catalog packages to the root (if not already present).
44
+ - **install:catalog**: Manual script to add all catalog packages at once.
27
45
 
28
- ### Using the catalog
46
+ ### Step 3: Use the catalog in your dependencies
29
47
 
30
- After adding the plugin, you can reference catalog versions in `package.json`:
48
+ In your root or workspace `package.json`, reference catalog versions with `catalog:`:
31
49
 
32
50
  ```json
33
51
  {
34
52
  "dependencies": {
35
53
  "react": "catalog:",
36
54
  "react-dom": "catalog:",
37
- "react-router-dom": "catalog:"
55
+ "react-router": "catalog:",
56
+ "react-router-config": "catalog:",
57
+ "react-router-dom": "catalog:",
58
+ "recharts": "catalog:"
38
59
  }
39
60
  }
40
61
  ```
41
62
 
42
- Or add a single package:
63
+ Or add a single package from the catalog:
43
64
 
44
65
  ```bash
45
66
  pnpm add react@catalog:
46
67
  ```
47
68
 
48
- ### Installing all catalog packages
69
+ ---
49
70
 
50
- To add every package in the catalog as a dependency at once, run:
71
+ ## Updating the plugin
72
+
73
+ **If there is a new update in pnpm-plugin-alex-857, developers only need to run:**
51
74
 
52
75
  ```bash
53
- pnpm run install:catalog
76
+ pnpm install
54
77
  ```
55
78
 
56
- Add this script to your root `package.json` so the command works (config dependencies don’t expose bins by default):
79
+ The **preinstall** script runs `pnpm add --config pnpm-plugin-alex-857@latest`, so the latest plugin version is installed automatically. No extra steps are required.
57
80
 
58
- ```json
59
- {
60
- "scripts": {
61
- "install:catalog": "node node_modules/.pnpm-config/pnpm-plugin-alex-857/install-catalog.js"
62
- }
63
- }
64
- ```
81
+ ---
65
82
 
66
- ### Config applied by the plugin
83
+ ## Config applied by the plugin
67
84
 
68
85
  When the plugin is installed, it sets:
69
86
 
@@ -73,14 +90,15 @@ When the plugin is installed, it sets:
73
90
  | `hoist` | `false` |
74
91
  | `hoistWorkspacePackages` | `true` |
75
92
 
93
+ ---
94
+
76
95
  ## Catalog
77
96
 
78
- The default catalog is defined in the plugin’s `pnpm-catalog.json`. Published versions include entries such as:
97
+ The default catalog is defined in the plugin’s `pnpm-catalog.json` (e.g. react, react-dom, react-router, react-router-dom, react-router-config, recharts).
79
98
 
80
- - react, react-dom
81
- - react-router, react-router-dom, react-router-config
99
+ To use a custom catalog in your repo, place a `pnpm-catalog.json` in the project root; the `install-catalog` script will use it if found there.
82
100
 
83
- To rely on a custom catalog in your repo, place a `pnpm-catalog.json` in the project root; the `install-catalog` script will use it if found there.
101
+ ---
84
102
 
85
103
  ## License
86
104
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pnpm-plugin-alex-857",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "description": "A plugin for pnpm to use alex as a linter",
5
5
  "bin": {
6
6
  "install-catalog": "./install-catalog.js",
package/pnpm-catalog.json CHANGED
@@ -3,5 +3,6 @@
3
3
  "react-dom": "18.3.1",
4
4
  "react-router-dom": "6.22.3",
5
5
  "react-router": "6.22.3",
6
- "react-router-config": "5.1.1"
6
+ "react-router-config": "5.1.1",
7
+ "recharts": "2.15.1"
7
8
  }