pob 26.7.0 → 26.9.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 +26 -0
- package/lib/generators/common/release/templates/workflow-release.yml.ejs +1 -0
- package/lib/generators/common/transpiler/CommonTranspilerGenerator.js +2 -2
- package/lib/generators/core/ci/templates/github-action-documentation-workflow.yml.ejs +1 -0
- package/lib/generators/core/ci/templates/github-action-push-workflow-split.yml.ejs +6 -0
- package/lib/generators/core/ci/templates/github-action-push-workflow.yml.ejs +1 -0
- package/package.json +11 -12
- package/lib/generators/common/format-lint/updateEslintConfig.js +0 -155
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,32 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [26.9.0](https://github.com/christophehurpeau/pob/compare/pob@26.8.0...pob@26.9.0) (2025-02-22)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* use option check-latest: true in setup-node ci action ([63bdec9](https://github.com/christophehurpeau/pob/commit/63bdec956723a872f0bde486a9212c4cf60d2de0))
|
|
11
|
+
|
|
12
|
+
### Reverts
|
|
13
|
+
|
|
14
|
+
* Revert "feat: update node ci usage to 22.14" ([dab8648](https://github.com/christophehurpeau/pob/commit/dab86485e6eb0d833521660943b0db37aaa3d9f8))
|
|
15
|
+
|
|
16
|
+
Version bump for dependency: @pob/sort-pkg
|
|
17
|
+
Version bump for dependency: @pob/root
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## [26.8.0](https://github.com/christophehurpeau/pob/compare/pob@26.7.0...pob@26.8.0) (2025-02-17)
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **deps:** update @pob/eslint-config to v59.7.0 ([#2468](https://github.com/christophehurpeau/pob/issues/2468)) ([dbb4715](https://github.com/christophehurpeau/pob/commit/dbb47156a20d69047fe56f1476bd734849dd1891))
|
|
25
|
+
* update node ci usage to 22.14 ([fc4186e](https://github.com/christophehurpeau/pob/commit/fc4186ecabbba5fb162be99ece77e0389d66380b))
|
|
26
|
+
* update to node 22.14 ([9f5e485](https://github.com/christophehurpeau/pob/commit/9f5e485f5044fd402de2c6b178990a6ba49e935c))
|
|
27
|
+
|
|
28
|
+
Version bump for dependency: yarn-workspace-utils
|
|
29
|
+
Version bump for dependency: @pob/root
|
|
30
|
+
|
|
31
|
+
|
|
6
32
|
## [26.7.0](https://github.com/christophehurpeau/pob/compare/pob@26.6.0...pob@26.7.0) (2025-02-17)
|
|
7
33
|
|
|
8
34
|
### Bug Fixes
|
|
@@ -643,7 +643,7 @@ export default class CommonTranspilerGenerator extends Generator {
|
|
|
643
643
|
}
|
|
644
644
|
break;
|
|
645
645
|
case "22":
|
|
646
|
-
pkg.engines.node = ">=22.
|
|
646
|
+
pkg.engines.node = ">=22.14.0";
|
|
647
647
|
break;
|
|
648
648
|
default:
|
|
649
649
|
throw new Error(`Invalid min node version: ${minNodeVersion}`);
|
|
@@ -667,7 +667,7 @@ export default class CommonTranspilerGenerator extends Generator {
|
|
|
667
667
|
packageUtils.removeDevDependencies(pkg, ["@types/node"]);
|
|
668
668
|
|
|
669
669
|
// Supports oldest current or active LTS version of node
|
|
670
|
-
const minVersion = this.options.onlyLatestLTS ? "22.
|
|
670
|
+
const minVersion = this.options.onlyLatestLTS ? "22.14.0" : "20.9.0";
|
|
671
671
|
|
|
672
672
|
if (
|
|
673
673
|
!pkg.engines.node ||
|
|
@@ -13,6 +13,7 @@ jobs:
|
|
|
13
13
|
- uses: actions/setup-node@v4
|
|
14
14
|
with:
|
|
15
15
|
node-version: 22
|
|
16
|
+
check-latest: true
|
|
16
17
|
|
|
17
18
|
- name: Enable Corepack
|
|
18
19
|
run: corepack enable
|
|
@@ -42,6 +43,7 @@ jobs:
|
|
|
42
43
|
- uses: actions/setup-node@v4
|
|
43
44
|
with:
|
|
44
45
|
node-version: 22
|
|
46
|
+
check-latest: true
|
|
45
47
|
|
|
46
48
|
- name: Enable Corepack
|
|
47
49
|
run: corepack enable
|
|
@@ -73,6 +75,7 @@ jobs:
|
|
|
73
75
|
- uses: actions/setup-node@v4
|
|
74
76
|
with:
|
|
75
77
|
node-version: 22
|
|
78
|
+
check-latest: true
|
|
76
79
|
|
|
77
80
|
- name: Enable Corepack
|
|
78
81
|
run: corepack enable
|
|
@@ -109,6 +112,7 @@ jobs:
|
|
|
109
112
|
- uses: actions/setup-node@v4
|
|
110
113
|
with:
|
|
111
114
|
node-version: ${{ matrix.node-version }}
|
|
115
|
+
check-latest: true
|
|
112
116
|
|
|
113
117
|
<% if (packageManager === 'yarn') { -%>
|
|
114
118
|
- name: Enable Corepack
|
|
@@ -166,6 +170,7 @@ jobs:
|
|
|
166
170
|
- uses: actions/setup-node@v4
|
|
167
171
|
with:
|
|
168
172
|
node-version: ${{ matrix.node-version }}
|
|
173
|
+
check-latest: true
|
|
169
174
|
|
|
170
175
|
- name: Enable Corepack
|
|
171
176
|
run: corepack enable
|
|
@@ -192,6 +197,7 @@ jobs:
|
|
|
192
197
|
- uses: actions/setup-node@v4
|
|
193
198
|
with:
|
|
194
199
|
node-version: 22
|
|
200
|
+
check-latest: true
|
|
195
201
|
|
|
196
202
|
- uses: GoogleCloudPlatform/release-please-action@v3
|
|
197
203
|
if: ${{ github.ref == 'refs/heads/main' }}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pob",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.9.0",
|
|
4
4
|
"description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skeleton"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"type": "module",
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": ">=22.
|
|
21
|
+
"node": ">=22.14.0"
|
|
22
22
|
},
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"bin": "./lib/pob.js",
|
|
@@ -41,12 +41,11 @@
|
|
|
41
41
|
},
|
|
42
42
|
"prettier": "@pob/root/prettier-config",
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@pob/eslint-config": "59.
|
|
45
|
-
"@pob/eslint-config-typescript": "59.
|
|
46
|
-
"@pob/eslint-config-typescript-react": "59.
|
|
47
|
-
"@pob/sort-eslint-config": "8.0.0",
|
|
44
|
+
"@pob/eslint-config": "59.7.0",
|
|
45
|
+
"@pob/eslint-config-typescript": "59.7.0",
|
|
46
|
+
"@pob/eslint-config-typescript-react": "59.7.0",
|
|
48
47
|
"@pob/sort-object": "9.0.0",
|
|
49
|
-
"@pob/sort-pkg": "11.0.
|
|
48
|
+
"@pob/sort-pkg": "11.0.1",
|
|
50
49
|
"@prettier/sync": "0.5.2",
|
|
51
50
|
"@types/inquirer": "9.0.7",
|
|
52
51
|
"@yarnpkg/cli": "4.6.0",
|
|
@@ -65,17 +64,17 @@
|
|
|
65
64
|
"mem-fs-editor": "11.1.4",
|
|
66
65
|
"minimist": "1.2.8",
|
|
67
66
|
"parse-author": "2.0.0",
|
|
68
|
-
"pob-dependencies": "17.
|
|
69
|
-
"prettier": "3.5.
|
|
67
|
+
"pob-dependencies": "17.7.0",
|
|
68
|
+
"prettier": "3.5.2",
|
|
70
69
|
"semver": "7.7.1",
|
|
71
70
|
"typescript": "5.7.3",
|
|
72
71
|
"validate-npm-package-name": "^6.0.0",
|
|
73
|
-
"yarn-workspace-utils": "8.
|
|
72
|
+
"yarn-workspace-utils": "8.3.0",
|
|
74
73
|
"yeoman-environment": "4.4.3",
|
|
75
74
|
"yeoman-generator": "7.4.0"
|
|
76
75
|
},
|
|
77
76
|
"devDependencies": {
|
|
78
|
-
"@pob/root": "16.
|
|
79
|
-
"@types/node": "22.13.
|
|
77
|
+
"@pob/root": "16.7.0",
|
|
78
|
+
"@types/node": "22.13.5"
|
|
80
79
|
}
|
|
81
80
|
}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import sortConfig from "@pob/sort-eslint-config";
|
|
2
|
-
|
|
3
|
-
function updateOverrides(config, testsOverride) {
|
|
4
|
-
const existingTestsOverrideIndex = !config.overrides
|
|
5
|
-
? -1
|
|
6
|
-
: config.overrides.findIndex(
|
|
7
|
-
testsOverride.env?.jest
|
|
8
|
-
? (override) => override.env && override.env.jest
|
|
9
|
-
: (override) =>
|
|
10
|
-
override?.env?.jest ||
|
|
11
|
-
override.extends?.includes(testsOverride.extends[0]),
|
|
12
|
-
);
|
|
13
|
-
if (!testsOverride) {
|
|
14
|
-
if (existingTestsOverrideIndex !== -1) {
|
|
15
|
-
config.overrides.splice(existingTestsOverrideIndex, 1);
|
|
16
|
-
if (config.overrides.length === 0) {
|
|
17
|
-
delete config.overrides;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
} else {
|
|
21
|
-
if (testsOverride.rules && Object.keys(testsOverride.rules).length === 0) {
|
|
22
|
-
delete testsOverride.rules;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (existingTestsOverrideIndex !== -1) {
|
|
26
|
-
const existingTestsOverride =
|
|
27
|
-
config.overrides[existingTestsOverrideIndex];
|
|
28
|
-
Object.assign(existingTestsOverride, testsOverride);
|
|
29
|
-
|
|
30
|
-
if (
|
|
31
|
-
existingTestsOverride.rules &&
|
|
32
|
-
Object.keys(existingTestsOverride.rules).length === 0
|
|
33
|
-
) {
|
|
34
|
-
delete existingTestsOverride.rules;
|
|
35
|
-
}
|
|
36
|
-
} else {
|
|
37
|
-
if (!config.overrides) config.overrides = [];
|
|
38
|
-
config.overrides.push(testsOverride);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return config;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function updateParserAndPlugins(
|
|
45
|
-
config,
|
|
46
|
-
useTypescript,
|
|
47
|
-
globalEslint,
|
|
48
|
-
relativePath,
|
|
49
|
-
) {
|
|
50
|
-
if (useTypescript) {
|
|
51
|
-
// webstorm uses this to detect eslint .ts compat
|
|
52
|
-
config.parser = "@typescript-eslint/parser";
|
|
53
|
-
config.plugins = ["@typescript-eslint"];
|
|
54
|
-
|
|
55
|
-
if (!globalEslint) {
|
|
56
|
-
config.parserOptions = {
|
|
57
|
-
project: "./tsconfig.json",
|
|
58
|
-
createDefaultProgram: true, // fix for lint-staged
|
|
59
|
-
};
|
|
60
|
-
} else {
|
|
61
|
-
config.parserOptions = {
|
|
62
|
-
// EXPERIMENTAL_useProjectService: true,
|
|
63
|
-
project: `${relativePath}/tsconfig.json`,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
} else {
|
|
67
|
-
if (
|
|
68
|
-
config.parser === "typescript-eslint-parser" ||
|
|
69
|
-
config.parser === "@typescript-eslint/parser"
|
|
70
|
-
) {
|
|
71
|
-
delete config.parser;
|
|
72
|
-
}
|
|
73
|
-
if (config.parserOptions && config.parserOptions.project) {
|
|
74
|
-
delete config.parserOptions;
|
|
75
|
-
}
|
|
76
|
-
if (
|
|
77
|
-
config.plugins &&
|
|
78
|
-
(config.plugins[0] === "typescript" ||
|
|
79
|
-
config.plugins[0] === "@typescript-eslint")
|
|
80
|
-
) {
|
|
81
|
-
config.plugins.splice(0, 1);
|
|
82
|
-
}
|
|
83
|
-
if (config.plugins && config.plugins.length === 0) {
|
|
84
|
-
delete config.plugins;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return config;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function updateSettings(config, settings) {
|
|
92
|
-
Object.entries(settings).forEach(([key, value]) => {
|
|
93
|
-
if (value === false) {
|
|
94
|
-
if (config.settings) {
|
|
95
|
-
delete config.settings[key];
|
|
96
|
-
}
|
|
97
|
-
} else {
|
|
98
|
-
if (!config.settings) config.settings = {};
|
|
99
|
-
config.settings[key] = value;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
if (config.settings && Object.keys(config.settings) === 0) {
|
|
104
|
-
delete config.settings;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return config;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function updateIgnorePatterns(config, ignorePatterns) {
|
|
111
|
-
if (!ignorePatterns) {
|
|
112
|
-
delete config.ignorePatterns;
|
|
113
|
-
} else {
|
|
114
|
-
config.ignorePatterns = ignorePatterns;
|
|
115
|
-
}
|
|
116
|
-
return config;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export default function updateEslintConfig(
|
|
120
|
-
config,
|
|
121
|
-
{
|
|
122
|
-
extendsConfig,
|
|
123
|
-
testsOverride,
|
|
124
|
-
useTypescript,
|
|
125
|
-
globalEslint,
|
|
126
|
-
settings,
|
|
127
|
-
ignorePatterns,
|
|
128
|
-
relativePath,
|
|
129
|
-
},
|
|
130
|
-
) {
|
|
131
|
-
config.root = true;
|
|
132
|
-
config.extends = [
|
|
133
|
-
...extendsConfig,
|
|
134
|
-
...(config?.extends && Array.isArray(config.extends)
|
|
135
|
-
? config.extends.filter(
|
|
136
|
-
(extendsValue) =>
|
|
137
|
-
extendsValue === "@pob/eslint-config-typescript/allow-unsafe",
|
|
138
|
-
)
|
|
139
|
-
: []),
|
|
140
|
-
];
|
|
141
|
-
|
|
142
|
-
config = updateParserAndPlugins(
|
|
143
|
-
config,
|
|
144
|
-
useTypescript,
|
|
145
|
-
globalEslint,
|
|
146
|
-
relativePath,
|
|
147
|
-
);
|
|
148
|
-
config = updateOverrides(config, testsOverride);
|
|
149
|
-
if (settings) {
|
|
150
|
-
config = updateSettings(config, settings);
|
|
151
|
-
}
|
|
152
|
-
config = updateIgnorePatterns(config, ignorePatterns);
|
|
153
|
-
|
|
154
|
-
return sortConfig(config);
|
|
155
|
-
}
|