@w5s/mrm-preset 3.11.0 β†’ 3.12.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.
@@ -45,5 +45,5 @@ If you think this is incorrect, verify your comment blocks in your src and the s
45
45
  πŸ’« Results:
46
46
 
47
47
  ──────────────────────────────────────────────────────────
48
-  βœ” Markdown Magic Done. 0.05 seconds
48
+  βœ” Markdown Magic Done. 0.08 seconds
49
49
  ──────────────────────────────────────────────────────────
@@ -27,7 +27,7 @@ $ pnpm exec eslint .
27
27
  20:1 warning Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free jsdoc/ts-ban-ts-comment
28
28
  22:1 warning Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free jsdoc/ts-ban-ts-comment
29
29
  24:1 warning Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free jsdoc/ts-ban-ts-comment
30
- 339:3 warning Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free jsdoc/ts-ban-ts-comment
30
+ 327:3 warning Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free jsdoc/ts-ban-ts-comment
31
31
 
32
32
  /home/runner/work/project-config/project-config/packages/mrm-preset/core/pkg.cjs
33
33
  11:1 warning Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free jsdoc/ts-ban-ts-comment
@@ -1,7 +1,6 @@
1
1
  $ pnpm run "/^test:.*/"
2
2
  $ mkdir -p .temp; cd .temp; mrm bootstrap --dir ..; mrm configure --dir ..
3
3
 
4
-
5
4
  Task β€œbootstrap” not found.
6
5
 
7
6
  We’ve tried these locations:
@@ -14,10 +13,10 @@ We’ve tried these locations:
14
13
  - bootstrap package in local node_modules
15
14
  - mrm-task-bootstrap package on the npm registry
16
15
  - bootstrap package on the npm registry
16
+
17
17
  Running alias configure...
18
18
  Running gitignore...
19
19
  Create .gitignore
20
-
21
20
  Task β€œproject” not found.
22
21
 
23
22
  We’ve tried these locations:
@@ -31,3 +30,4 @@ We’ve tried these locations:
31
30
  - mrm-task-project package on the npm registry
32
31
  - project package on the npm registry
33
32
 
33
+
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
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
+ # [3.12.0](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@3.5.1...@w5s/mrm-preset@3.12.0) (2026-10-01)
7
+
8
+ ### ✨ Features
9
+
10
+ - Add lefthook-config ([d8b837c](https://github.com/w5s/project-config/commit/d8b837c))
11
+
12
+ ### πŸ› Bug Fixes
13
+
14
+ - Fix ignored changelog files ([104fada](https://github.com/w5s/project-config/commit/104fada))
15
+
16
+ **Note:** Version bump only for package @w5s/mrm-preset
17
+
6
18
  # [3.11.0](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@3.5.1...@w5s/mrm-preset@3.11.0) (2026-09-22)
7
19
 
8
20
  ### ✨ Features
@@ -3,22 +3,24 @@ const path = require('node:path');
3
3
 
4
4
  function task() {
5
5
  // code of conduct
6
- const EOL = '\n';
7
6
  const codeOfConduct = 'CODE_OF_CONDUCT.md';
8
7
  const codeOfConductFile = file(codeOfConduct);
9
- if (!codeOfConductFile.exists() || !codeOfConductFile.get().includes(`<!-- EditMode: MANUAL -->`)) {
10
- const codeOfConductTemplate = file(path.join(__dirname, 'templates', codeOfConduct)).get();
11
- codeOfConductFile.save(
12
- [
13
- `<!--
8
+ if (codeOfConductFile.exists() && codeOfConductFile.get().includes(`<!-- EditMode: MANUAL -->`)) {
9
+ return;
10
+ }
11
+ const EOL = '\n';
12
+
13
+ const codeOfConductTemplate = file(path.join(__dirname, 'templates', codeOfConduct)).get();
14
+ codeOfConductFile.save(
15
+ [
16
+ `<!--
14
17
  Generated by mrm
15
18
  * change EditMode: MANUAL to avoid overwriting by mrm
16
19
  -->`,
17
- `<!-- EditMode: AUTO -->`,
18
- codeOfConductTemplate,
19
- ].join(EOL),
20
- );
21
- }
20
+ `<!-- EditMode: AUTO -->`,
21
+ codeOfConductTemplate,
22
+ ].join(EOL),
23
+ );
22
24
  }
23
25
 
24
26
  task.description = 'Setup Contributing';
package/core/jsonFile.cjs CHANGED
@@ -7,11 +7,7 @@
7
7
  * @param {undefined | string | string[]} path
8
8
  */
9
9
  function getValue(jsonFile, path) {
10
- if (path == null) {
11
- return jsonFile.get();
12
- }
13
-
14
- return jsonFile.get(path);
10
+ return path == null ? jsonFile.get() : jsonFile.get(path);
15
11
  }
16
12
 
17
13
  /**
package/core/npm.cjs CHANGED
@@ -106,10 +106,7 @@ function detectPackageManager() {
106
106
  if (isUsingYarn()) {
107
107
  return 'yarn';
108
108
  }
109
- if (isUsingPnpm()) {
110
- return 'pnpm';
111
- }
112
- return 'npm';
109
+ return isUsingPnpm() ? 'pnpm' : 'npm';
113
110
  }
114
111
 
115
112
  /**
@@ -174,14 +171,9 @@ function getUnsatisfiedDeps(deps, versions, options) {
174
171
  return true;
175
172
  }
176
173
 
177
- // No required version specified
178
- if (!required) {
179
- // Install if the pacakge isn’t installed
180
- return !installed;
181
- }
182
-
183
- // Install if installed version doesn't satisfy range
184
- return !semver.satisfies(installed, required);
174
+ // Keep the installed package when no version is required.
175
+ // Otherwise reinstall when the installed version does not satisfy the range.
176
+ return required ? !semver.satisfies(installed, required) : !installed;
185
177
  });
186
178
  }
187
179
 
@@ -196,11 +188,7 @@ function getVersionedDep(dep, versions) {
196
188
  if (!validateNpmPackageName(dep).validForNewPackages) {
197
189
  // If we were explicitly passed a version, attempt to
198
190
  // load it via the `#semver:<semver>` syntax.
199
- if (versions[dep]) {
200
- return `${dep}#semver:${versions[dep]}`;
201
- }
202
-
203
- return dep;
191
+ return versions[dep] ? `${dep}#semver:${versions[dep]}` : dep;
204
192
  }
205
193
  const version = versions[dep] || 'latest';
206
194
 
package/core/pkg.cjs CHANGED
@@ -26,11 +26,7 @@ function archetype(packageFile) {
26
26
  if (hasWorkspaces(packageFile)) {
27
27
  return 'workspace';
28
28
  }
29
- if (packageFile.get('private') === true || (packageFile.get('main') == null && packageFile.get('exports'))) {
30
- return 'application';
31
- }
32
-
33
- return 'library';
29
+ return packageFile.get('private') === true || (packageFile.get('main') == null && packageFile.get('exports')) ? 'application' : 'library';
34
30
  }
35
31
 
36
32
  /**
@@ -164,11 +160,7 @@ function manager(packageFile) {
164
160
  if (file('package-lock.json').exists()) {
165
161
  return 'npm';
166
162
  }
167
- if (file('pnpm-lock.yaml').exists()) {
168
- return 'pnpm';
169
- }
170
-
171
- return defaultManager;
163
+ return file('pnpm-lock.yaml').exists() ? 'pnpm' : defaultManager;
172
164
  }
173
165
 
174
166
  module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/mrm-preset",
3
- "version": "3.11.0",
3
+ "version": "3.12.0",
4
4
  "description": "Mrm configuration presets",
5
5
  "keywords": [
6
6
  "mrm",
@@ -25,8 +25,8 @@
25
25
  "postpack": "clean-package restore"
26
26
  },
27
27
  "dependencies": {
28
- "@w5s/configurator-core": "^1.19.0",
29
- "@w5s/dev": "^5.0.0",
28
+ "@w5s/configurator-core": "^1.20.0",
29
+ "@w5s/dev": "^6.0.0",
30
30
  "debug": "^4.3.3",
31
31
  "glob": "^13.0.0",
32
32
  "mrm-core": "^7.0.0",
@@ -39,5 +39,5 @@
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  },
42
- "gitHead": "13458dbf2ac200ee3013fb7be9ff1ca6122ff4f4"
42
+ "gitHead": "22c5f0c577887c9855d4a6fa3c139e0e36a1bc6a"
43
43
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/mrm-preset",
3
- "version": "3.11.0",
3
+ "version": "3.12.0",
4
4
  "description": "Mrm configuration presets",
5
5
  "keywords": [
6
6
  "mrm",
@@ -40,8 +40,8 @@
40
40
  "typecheck:src": "pnpm exec tsc --noEmit"
41
41
  },
42
42
  "dependencies": {
43
- "@w5s/configurator-core": "^1.19.0",
44
- "@w5s/dev": "^5.0.0",
43
+ "@w5s/configurator-core": "^1.20.0",
44
+ "@w5s/dev": "^6.0.0",
45
45
  "debug": "^4.3.3",
46
46
  "glob": "^13.0.0",
47
47
  "mrm-core": "^7.0.0",
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "13458dbf2ac200ee3013fb7be9ff1ca6122ff4f4"
63
+ "gitHead": "22c5f0c577887c9855d4a6fa3c139e0e36a1bc6a"
64
64
  }
@@ -19,27 +19,26 @@ function createRenovate({ renovatePresetApplication, renovatePresetLibrary }) {
19
19
  */
20
20
  function task({ renovatePreset }) {
21
21
  const gitSupported = hasGit();
22
+ if (!gitSupported) return;
22
23
 
23
- if (gitSupported) {
24
- const packageFile = packageJson();
25
- const packageArchetype = pkg.archetype(packageFile);
26
- const renovatePresetResolved =
27
- renovatePreset || (packageArchetype === 'application' ? renovatePresetApplication : renovatePresetLibrary);
28
- const renovateFile = json('renovate.json');
29
- renovateFile.merge({
30
- $schema: 'https://docs.renovatebot.com/renovate-schema.json',
31
- });
32
- renovateFile.set(
33
- 'extends',
34
- [renovatePresetResolved, ...renovateFile.get('extends', []).filter(
35
- /**
36
- * @param {string} extension
37
- */
38
- (extension) => extension !== renovatePresetApplication && extension !== renovatePresetLibrary,
39
- )],
40
- );
41
- renovateFile.save();
42
- }
24
+ const packageFile = packageJson();
25
+ const packageArchetype = pkg.archetype(packageFile);
26
+ const renovatePresetResolved =
27
+ renovatePreset || (packageArchetype === 'application' ? renovatePresetApplication : renovatePresetLibrary);
28
+ const renovateFile = json('renovate.json');
29
+ renovateFile.merge({
30
+ $schema: 'https://docs.renovatebot.com/renovate-schema.json',
31
+ });
32
+ renovateFile.set(
33
+ 'extends',
34
+ [renovatePresetResolved, ...renovateFile.get('extends', []).filter(
35
+ /**
36
+ * @param {string} extension
37
+ */
38
+ (extension) => extension !== renovatePresetApplication && extension !== renovatePresetLibrary,
39
+ )],
40
+ );
41
+ renovateFile.save();
43
42
  }
44
43
 
45
44
  task.description = 'Setup Renovate';