pnpm-plugin-alex-857 1.0.13 → 1.0.17

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 ADDED
@@ -0,0 +1,87 @@
1
+ # pnpm-plugin-alex-857
2
+
3
+ A pnpm config plugin that provides a shared **catalog** of dependency versions and common pnpm settings for monorepos.
4
+
5
+ ## What it does
6
+
7
+ - **Catalog**: Injects a default catalog from `pnpm-catalog.json` so you can use `catalog:` in your dependencies.
8
+ - **Config**: Sets `strictPeerDependencies: true`, `hoist: false`, and `hoistWorkspacePackages: true`.
9
+ - **install-catalog**: A script to add all catalog packages to your project in one go.
10
+
11
+ ## Install
12
+
13
+ Add the plugin as a **config dependency** so pnpm loads its pnpmfile and catalog:
14
+
15
+ ```bash
16
+ pnpm add --config pnpm-plugin-alex-857@latest
17
+ ```
18
+
19
+ This updates your `pnpm-workspace.yaml` with something like:
20
+
21
+ ```yaml
22
+ configDependencies:
23
+ pnpm-plugin-alex-857: 1.0.14+sha512-...
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ ### Using the catalog
29
+
30
+ After adding the plugin, you can reference catalog versions in `package.json`:
31
+
32
+ ```json
33
+ {
34
+ "dependencies": {
35
+ "react": "catalog:",
36
+ "react-dom": "catalog:",
37
+ "react-router-dom": "catalog:"
38
+ }
39
+ }
40
+ ```
41
+
42
+ Or add a single package:
43
+
44
+ ```bash
45
+ pnpm add react@catalog:
46
+ ```
47
+
48
+ ### Installing all catalog packages
49
+
50
+ To add every package in the catalog as a dependency at once, run:
51
+
52
+ ```bash
53
+ pnpm run install:catalog
54
+ ```
55
+
56
+ Add this script to your root `package.json` so the command works (config dependencies don’t expose bins by default):
57
+
58
+ ```json
59
+ {
60
+ "scripts": {
61
+ "install:catalog": "node node_modules/.pnpm-config/pnpm-plugin-alex-857/install-catalog.js"
62
+ }
63
+ }
64
+ ```
65
+
66
+ ### Config applied by the plugin
67
+
68
+ When the plugin is installed, it sets:
69
+
70
+ | Setting | Value |
71
+ |--------|--------|
72
+ | `strictPeerDependencies` | `true` |
73
+ | `hoist` | `false` |
74
+ | `hoistWorkspacePackages` | `true` |
75
+
76
+ ## Catalog
77
+
78
+ The default catalog is defined in the plugin’s `pnpm-catalog.json`. Published versions include entries such as:
79
+
80
+ - react, react-dom
81
+ - react-router, react-router-dom, react-router-config
82
+
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.
84
+
85
+ ## License
86
+
87
+ ISC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pnpm-plugin-alex-857",
3
- "version": "1.0.13",
3
+ "version": "1.0.17",
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,6 +8,9 @@ module.exports = {
8
8
  for (const [name, version] of Object.entries(catalog)) {
9
9
  config.catalogs.default[name] = version;
10
10
  }
11
+ config.strictPeerDependencies = true;
12
+ config.hoist = false;
13
+ config.hoistWorkspacePackages = true;
11
14
  return config;
12
15
  },
13
16
  },