@plaudit/pnpm-plugin-plaudit-config 1.0.3 → 1.1.0
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 +12 -0
- package/package.json +4 -3
- package/pnpmfile.cjs +24 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ 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.0] - 2026-04-17
|
|
9
|
+
### Added
|
|
10
|
+
- Support for declaring patches
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- The mergeable config stuff not working properly
|
|
14
|
+
- Another pair of packages that an idiot with admin privileges at WordPress bricked even after I warned them about it
|
|
15
|
+
|
|
16
|
+
## [1.0.4] - 2026-04-16
|
|
17
|
+
### Fixed
|
|
18
|
+
- My code assuming that pnpm wouldn't idiotically clobber the output of config functions
|
|
19
|
+
|
|
8
20
|
## [1.0.3] - 2026-04-16
|
|
9
21
|
### Fixed
|
|
10
22
|
- The allowBuilds property being inconsistent at best (I hope)
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plaudit/pnpm-plugin-plaudit-config",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
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.
|
|
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
|
|
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,22 +31,25 @@ 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((
|
|
34
|
-
...Object.fromEntries((
|
|
41
|
+
...Object.fromEntries((mergeableConfig.onlyBuiltDependencies ?? []).map(dep => [dep, true])),
|
|
42
|
+
...Object.fromEntries((mergeableConfig.ignoredBuiltDependencies ?? []).map(dep => [dep, false])),
|
|
35
43
|
...config.allowBuilds,
|
|
44
|
+
...mergeableConfig.projectAllowBuilds,
|
|
36
45
|
},
|
|
37
46
|
overrides: {
|
|
38
|
-
...(config.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
55
|
"@wordpress/components": "30.9.0",
|
|
@@ -51,8 +61,16 @@ module.exports = {
|
|
|
51
61
|
"@wordpress/hooks": "4.43.0",
|
|
52
62
|
"@wordpress/i18n": "6.16.0",
|
|
53
63
|
"@wordpress/icons": "12.1.0",
|
|
54
|
-
"date-fns": "^4.0.0"
|
|
55
|
-
|
|
64
|
+
"date-fns": "^4.0.0",
|
|
65
|
+
...config.overrides,
|
|
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
|
|
56
74
|
});
|
|
57
75
|
}
|
|
58
76
|
},
|