@plaudit/pnpm-plugin-plaudit-config 1.0.4 → 1.1.1

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/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.1.1] - 2026-04-17
9
+ ### Added
10
+ - Installation instructions to the readme
11
+
12
+ ### Changed
13
+ - Bumped the pinned version of `@wordpress/components` to `32.6.0`
14
+
15
+ ## [1.1.0] - 2026-04-17
16
+ ### Added
17
+ - Support for declaring patches
18
+
19
+ ### Fixed
20
+ - The mergeable config stuff not working properly
21
+ - Another pair of packages that an idiot with admin privileges at WordPress bricked even after I warned them about it
22
+
8
23
  ## [1.0.4] - 2026-04-16
9
24
  ### Fixed
10
25
  - My code assuming that pnpm wouldn't idiotically clobber the output of config functions
package/README.md CHANGED
@@ -1,3 +1,14 @@
1
1
  # Plaudit's PNPM Config
2
2
 
3
3
  The basic config state that all Plaudit-managed PNPM projects should use
4
+
5
+ # Adding this to projects
6
+ ## Plugins and Sites
7
+ 1. Run: `theapp pnpm up`
8
+ 2. All done!
9
+
10
+ ## JS Libraries
11
+ 1. Add the following to the scripts key in the package.json file: `"pnpm:devPreinstall": "pnpm add --config '@plaudit/pnpm-plugin-plaudit-config'"`
12
+ 2. Run: `pnpm update`
13
+ 3. Run: `rm -rf node_modules pnpm-lock.yaml && pnpm up`
14
+ 4. All done!
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@plaudit/pnpm-plugin-plaudit-config",
3
- "version": "1.0.4",
3
+ "version": "1.1.1",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "files": [
6
+ "./patches",
6
7
  "./pnpmfile.cjs",
7
8
  "CHANGELOG.md",
8
9
  "LICENSE.md",
@@ -12,10 +13,10 @@
12
13
  "devDependencies": {
13
14
  "@pnpm/hooks.pnpmfile": "^1100.0.1",
14
15
  "@pnpm/types": "^1100.0.0",
15
- "typescript": "^6.0.2"
16
+ "typescript": "^6.0.3"
16
17
  },
17
18
  "scripts": {
18
- "build": "tsc",
19
+ "build": "tsc && cp -f dist/pnpmfile.cjs .",
19
20
  "clean": "rm -rf dist pnpmfile.cjs"
20
21
  }
21
22
  }
package/pnpmfile.cjs CHANGED
@@ -1,7 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const dependencyKeys = ['dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies'];
3
+ const { join } = require("node:path");
4
+ /**
5
+ * A map of "<package id>[@<version identifier>]" -> "file in the 'patches' folder" pairs
6
+ */
7
+ const activePatches = {
8
+ // "webpack@5.*": "webpack.patch"
9
+ };
4
10
  const globalForcePinDependenciesRegex = false; ///^@wordpress\//;
11
+ const dependencyKeys = ['dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies'];
5
12
  let rootPkg = undefined;
6
13
  module.exports = {
7
14
  hooks: {
@@ -24,25 +31,28 @@ module.exports = {
24
31
  return pkg;
25
32
  },
26
33
  updateConfig(config) {
34
+ const mergeableConfig = config.rootProjectManifest?.pnpm ?? {};
27
35
  return Object.assign(config, {
28
36
  allowBuilds: {
29
37
  "core-js": true,
30
38
  "core-js-pure": true,
31
39
  "@parcel/watcher": false,
32
40
  "unrs-resolver": false,
33
- ...Object.fromEntries((config.onlyBuiltDependencies ?? []).map(dep => [dep, true])),
34
- ...Object.fromEntries((config.ignoredBuiltDependencies ?? []).map(dep => [dep, false])),
41
+ ...Object.fromEntries((mergeableConfig.onlyBuiltDependencies ?? []).map(dep => [dep, true])),
42
+ ...Object.fromEntries((mergeableConfig.ignoredBuiltDependencies ?? []).map(dep => [dep, false])),
35
43
  ...config.allowBuilds,
36
- ...config.projectAllowBuilds,
44
+ ...mergeableConfig.projectAllowBuilds,
37
45
  },
38
46
  overrides: {
39
47
  "micromatch": "^4",
40
48
  "react-autosize-textarea>react": "*",
41
49
  "react-autosize-textarea>react-dom": "*",
42
50
  //Temporary pinnings because WordPress bricked their typedefs
51
+ "@types/wordpress__block-editor": "15.0.5",
52
+ "@types/wordpress__blocks": "15.10.2",
43
53
  "@wordpress/block-editor": "15.16.0",
44
54
  "@wordpress/blocks": "15.16.0",
45
- "@wordpress/components": "30.9.0",
55
+ "@wordpress/components": "32.6.0",
46
56
  "@wordpress/compose": "7.43.0",
47
57
  "@wordpress/core-data": "7.43.0",
48
58
  "@wordpress/data": "10.43.0",
@@ -53,8 +63,14 @@ module.exports = {
53
63
  "@wordpress/icons": "12.1.0",
54
64
  "date-fns": "^4.0.0",
55
65
  ...config.overrides,
56
- ...config.projectOverrides
57
- }
66
+ ...mergeableConfig.projectOverrides
67
+ },
68
+ patchedDependencies: {
69
+ ...Object.fromEntries(Object.entries(activePatches).map(([dependency, patchFilePath]) => [dependency, join(__dirname, 'patches', patchFilePath)])),
70
+ ...config.patchedDependencies,
71
+ ...mergeableConfig.projectPatchedDependencies
72
+ },
73
+ allowUnusedPatches: true
58
74
  });
59
75
  }
60
76
  },