@w5s/mrm-preset 3.2.5 → 3.3.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.
@@ -1,6 +1,9 @@
1
1
 
2
2
  
3
- > @w5s/mrm-preset@3.2.4 build:tsc
3
+ > @w5s/mrm-preset@3.3.1 build /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset
4
+ > pnpm run "/^build:.*/"
5
+
6
+
7
+ > @w5s/mrm-preset@3.3.1 build:tsc /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset
4
8
  > tsc
5
9
 
6
- ⠙⠙
@@ -1,12 +1,119 @@
1
1
 
2
2
  
3
- > @w5s/mrm-preset@3.2.3 format:src
3
+ > @w5s/mrm-preset@3.2.6 format /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset
4
+ > pnpm run "/^format:.*/"
5
+
6
+
7
+ > @w5s/mrm-preset@3.2.6 format:src /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset
4
8
  > eslint . --fix
5
9
 
10
+ 
11
+ /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset/CHANGELOG.md
12
+  34:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
13
+  36:1 error Heading level skipped from 1 to 3 markdown/heading-increment
14
+  42:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
15
+  44:1 error Heading level skipped from 1 to 3 markdown/heading-increment
16
+  50:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
17
+  52:1 error Heading level skipped from 1 to 3 markdown/heading-increment
18
+  147:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
19
+  149:1 error Heading level skipped from 1 to 3 markdown/heading-increment
20
+  163:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
21
+  165:1 error Heading level skipped from 1 to 3 markdown/heading-increment
22
+  171:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
23
+  173:1 error Heading level skipped from 1 to 3 markdown/heading-increment
24
+  211:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
25
+  213:1 error Heading level skipped from 1 to 3 markdown/heading-increment
26
+  298:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
27
+  300:1 error Heading level skipped from 1 to 3 markdown/heading-increment
28
+  335:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
29
+  337:1 error Heading level skipped from 1 to 3 markdown/heading-increment
30
+  347:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
31
+  349:1 error Heading level skipped from 1 to 3 markdown/heading-increment
32
+  387:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
33
+  389:1 error Heading level skipped from 1 to 3 markdown/heading-increment
34
+  427:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
35
+  429:1 error Heading level skipped from 1 to 3 markdown/heading-increment
36
+  443:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
37
+  445:1 error Heading level skipped from 1 to 3 markdown/heading-increment
38
+  462:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
39
+  464:1 error Heading level skipped from 1 to 3 markdown/heading-increment
40
+  471:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
41
+  473:1 error Heading level skipped from 1 to 3 markdown/heading-increment
42
+  481:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
43
+  483:1 error Heading level skipped from 1 to 3 markdown/heading-increment
44
+  489:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
45
+  491:1 error Heading level skipped from 1 to 3 markdown/heading-increment
46
+  505:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
47
+  507:1 error Heading level skipped from 1 to 3 markdown/heading-increment
48
+  517:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
49
+  519:1 error Heading level skipped from 1 to 3 markdown/heading-increment
50
+  579:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
51
+  583:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
52
+  587:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
53
+  589:1 error Heading level skipped from 1 to 3 markdown/heading-increment
54
+  593:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
55
+  597:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
56
+  601:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
57
+  605:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
58
+  609:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
59
+  613:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
60
+  617:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
61
+  621:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
62
+  625:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
63
+  629:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
64
+  633:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
65
+  637:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
66
+  641:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
67
+  645:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
68
+  649:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
69
+  653:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
70
+  657:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
71
+  661:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
72
+  665:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
73
+  669:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
74
+  673:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
75
+  677:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
76
+  679:1 error Heading level skipped from 1 to 3 markdown/heading-increment
77
+  683:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
78
+  685:1 error Heading level skipped from 1 to 3 markdown/heading-increment
79
+  689:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
80
+  691:1 error Heading level skipped from 1 to 3 markdown/heading-increment
81
+  696:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
82
+  698:1 error Heading level skipped from 1 to 3 markdown/heading-increment
83
+  702:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
84
+  704:1 error Heading level skipped from 1 to 3 markdown/heading-increment
85
+  718:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
86
+  720:1 error Heading level skipped from 1 to 3 markdown/heading-increment
87
+  728:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
88
+  730:1 error Heading level skipped from 1 to 3 markdown/heading-increment
89
+  734:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
90
+  736:1 error Heading level skipped from 1 to 3 markdown/heading-increment
91
+  740:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
92
+  742:1 error Heading level skipped from 1 to 3 markdown/heading-increment
93
+  747:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
94
+  749:1 error Heading level skipped from 1 to 3 markdown/heading-increment
95
+  755:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
96
+  757:1 error Heading level skipped from 1 to 3 markdown/heading-increment
97
+  767:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
98
+  769:1 error Heading level skipped from 1 to 3 markdown/heading-increment
99
+  780:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
100
+  782:1 error Heading level skipped from 1 to 3 markdown/heading-increment
101
+  793:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
102
+  795:1 error Heading level skipped from 1 to 3 markdown/heading-increment
103
+  799:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
104
+  801:1 error Heading level skipped from 1 to 3 markdown/heading-increment
105
+  806:1 error Unexpected additional H1 heading found markdown/no-multiple-h1
106
+  808:1 error Heading level skipped from 1 to 3 markdown/heading-increment
107
+ 
108
+ /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset/_tester/CODE_OF_CONDUCT.md
109
+  69:2 error Label reference 'INSERT CONTACT METHOD' not found markdown/no-missing-label-refs
6
110
  
7
111
  /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset/ci/gitlab.js
8
112
   5:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
9
113
  
114
+ /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset/contributing/templates/CODE_OF_CONDUCT.md
115
+  64:2 error Label reference 'INSERT CONTACT METHOD' not found markdown/no-missing-label-refs
116
+ 
10
117
  /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset/core/githubCI.js
11
118
   21:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
12
119
   21:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
@@ -14,16 +121,21 @@
14
121
   21:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
15
122
  
16
123
  /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset/core/npm.js
17
-  50:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
18
-  90:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
19
-  116:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
20
-  132:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
124
+  51:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
125
+  92:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
126
+  119:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
127
+  135:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
128
+  154:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
21
129
  
22
130
  /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset/core/vscode.js
23
131
   41:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
24
132
   82:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
25
133
   82:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
26
134
  
27
- ✖ 12 problems (0 errors, 12 warnings)
28
- 
29
- ⠙⠙
135
+ /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset/eslint/index.js
136
+  50:11 error 'extsMap' is assigned a value but never used no-unused-vars
137
+ 
138
+ ✖ 111 problems (98 errors, 13 warnings)
139
+ 
140
+  ELIFECYCLE  Command failed with exit code 1.
141
+  ELIFECYCLE  Command failed with exit code 1.
@@ -1,29 +1,32 @@
1
-
2
- ⠙⠹
3
- > @w5s/mrm-preset@3.2.4 lint:src
4
- > eslint .
5
-
6
- 
7
- /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset/ci/gitlab.js
8
-  5:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
9
- 
10
- /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset/core/githubCI.js
11
-  21:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
12
-  21:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
13
-  21:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
14
-  21:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
15
- 
16
- /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset/core/npm.js
17
-  50:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
18
-  90:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
19
-  116:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
20
-  132:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
21
- 
22
- /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset/core/vscode.js
23
-  41:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
24
-  82:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
25
-  82:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
26
- 
27
- ✖ 12 problems (0 errors, 12 warnings)
28
- 
29
- ⠙⠙
1
+
2
+ > @w5s/mrm-preset@3.3.0 lint /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset
3
+ > pnpm run "/^lint:.*/"
4
+
5
+
6
+ > @w5s/mrm-preset@3.3.0 lint:src /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset
7
+ > eslint .
8
+
9
+
10
+ /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset/ci/gitlab.js
11
+ 5:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
12
+
13
+ /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset/core/githubCI.js
14
+ 21:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
15
+ 21:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
16
+ 21:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
17
+ 21:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
18
+
19
+ /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset/core/npm.js
20
+ 51:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
21
+ 92:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
22
+ 119:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
23
+ 135:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
24
+ 154:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
25
+
26
+ /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset/core/vscode.js
27
+ 41:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
28
+ 82:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
29
+ 82:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
30
+
31
+ ✖ 13 problems (0 errors, 13 warnings)
32
+
@@ -1,4 +1,8 @@
1
1
 
2
- > @w5s/mrm-preset@3.2.5 prepare:empty
2
+ > @w5s/mrm-preset@3.2.5 prepare /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset
3
+ > pnpm run "/prepare:.*/"
4
+
5
+
6
+ > @w5s/mrm-preset@3.2.5 prepare:empty /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset
3
7
  > :
4
8
 
@@ -1 +1,5 @@
1
+
2
+ > @w5s/mrm-preset@3.3.0 spellcheck /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset
3
+ > cspell --no-progress '**'
4
+
1
5
  CSpell: Files checked: 53, Issues found: 0 in 0 files.
@@ -1,25 +1,30 @@
1
-
2
- â ™
3
- > @w5s/mrm-preset@3.2.4 test:script
4
- > mkdir _tester; cd _tester; mrm bootstrap --dir ..; mrm configure --dir ..
5
-
6
- mkdir: _tester: File exists
7
- Running bootstrap...
8
- Running alias configure...
9
- Running gitignore...
10
- Running project...
11
- Running contributing...
12
- Running licenses...
13
- Running asdf...
14
- Running release...
15
- Running ci...
16
- Running lang...
17
- Running commitlint...
18
- Running editorconfig...
19
- Running eslint...
20
- Running cspell...
21
- Running vitest...
22
- Running renovate...
23
- Running githooks...
24
- Running post-configure...
25
- ⠙⠙
1
+
2
+ > @w5s/mrm-preset@3.3.0 test /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset
3
+ > pnpm run "/^test:.*/"
4
+
5
+
6
+ > @w5s/mrm-preset@3.3.0 test:script /Users/julienpolo/Code/w5s/project-config/packages/mrm-preset
7
+ > mkdir _tester; cd _tester; mrm bootstrap --dir ..; mrm configure --dir ..
8
+
9
+ mkdir: _tester: File exists
10
+ Running bootstrap...
11
+ Running alias configure...
12
+ Running gitignore...
13
+ Running project...
14
+ Running contributing...
15
+ Running licenses...
16
+ Running asdf...
17
+ Running release...
18
+ Running ci...
19
+ Running lang...
20
+ Running commitlint...
21
+ Running editorconfig...
22
+ Running eslint...
23
+ Running cspell...
24
+ Running vitest...
25
+ Running renovate...
26
+ Running githooks...
27
+ Running post-configure...
28
+ Error: to format code
29
+ Invalid package manager specification in package.json (pnpm@latest); expected a semver version
30
+
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
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.3.1](github.com/w5s/project-config/compare/@w5s/mrm-preset@3.3.0...@w5s/mrm-preset@3.3.1) (2026-03-07)
7
+
8
+ **Note:** Version bump only for package @w5s/mrm-preset
9
+
10
+ # [3.3.0](github.com/w5s/project-config/compare/@w5s/mrm-preset@3.2.6...@w5s/mrm-preset@3.3.0) (2026-03-07)
11
+
12
+ ### ✨ Features
13
+
14
+ - Improve support for eslint latest versions ([dea0bff](github.com/w5s/project-config/commits/dea0bff))
15
+
16
+ **Note:** Version bump only for package @w5s/mrm-preset
17
+
18
+ ## [3.2.6](github.com/w5s/project-config/compare/@w5s/mrm-preset@3.2.5...@w5s/mrm-preset@3.2.6) (2026-03-02)
19
+
20
+ **Note:** Version bump only for package @w5s/mrm-preset
21
+
6
22
  ## [3.2.5](github.com/w5s/project-config/compare/@w5s/mrm-preset@3.2.4...@w5s/mrm-preset@3.2.5) (2026-02-19)
7
23
 
8
24
  **Note:** Version bump only for package @w5s/mrm-preset
@@ -10,7 +10,7 @@ const { gitIgnore } = require('../core/git.js');
10
10
  * mrmPreset: string,
11
11
  * mrmTask: string,
12
12
  * packageArchetype: 'application'|'library'|'workspace',
13
- * packageManager: 'npm'|'yarn@classic'|'yarn@berry'
13
+ * packageManager: 'npm'|'pnpm'|'yarn@classic'|'yarn@berry'
14
14
  * }} config
15
15
  * @returns {Promise<void>}
16
16
  */
@@ -65,8 +65,8 @@ task.parameters = {
65
65
  type: 'input',
66
66
  },
67
67
  packageManager: {
68
- default: 'yarn@berry',
69
- choices: ['yarn@berry', 'yarn@classic', 'npm'],
68
+ default: 'pnpm',
69
+ choices: ['pnpm', 'yarn@berry', 'yarn@classic', 'npm'],
70
70
  message: 'Which default package manager ?',
71
71
  name: 'packageManager',
72
72
  type: 'input',
@@ -201,7 +201,7 @@ variables:
201
201
  # IMAGE_NAME: $CI_REGISTRY_IMAGE
202
202
 
203
203
  .autodevops_node_image:
204
- image: node:lts-alpine@sha256:4f696fbf39f383c1e486030ba6b289a5d9af541642fc78ab197e584a113b9c03
204
+ image: node:lts-alpine@sha256:7fddd9ddeae8196abf4a3ef2de34e11f7b1a722119f91f28ddf1e99dcafdf114
205
205
 
206
206
  .autodevops_node_install:
207
207
  extends:
@@ -4,7 +4,7 @@
4
4
  RENOVATE_GIT_AUTHOR: '${GITLAB_USER_NAME} <${GITLAB_USER_EMAIL}>'
5
5
  RENOVATE_DRY_RUN: 'false'
6
6
  RENOVATE_LOG_LEVEL: debug
7
- RENOVATE_ALLOWED_POST_UPGRADE: '^pod ,^yarn '
7
+ RENOVATE_ALLOWED_POST_UPGRADE: '^pod ,^pnpm,^npm ,^yarn '
8
8
  # RENOVATE_DISABLED: "🛑"
9
9
  rules:
10
10
  - if: $RENOVATE_DISABLED
@@ -13,7 +13,7 @@
13
13
  when: always
14
14
  - when: never
15
15
  image:
16
- name: renovate/renovate@sha256:d74a16d0b021014173dfac4b0c2e440bd882f65072272ba98dd80a551c28a42c
16
+ name: renovate/renovate@sha256:38d2e54e1dafc61c58cb231bca4cb4b0bea7bbc7236589abd56be55eeaee62aa
17
17
  entrypoint: ['']
18
18
  script:
19
19
  - >
package/ci/github.js CHANGED
@@ -11,7 +11,9 @@ function task() {
11
11
  ? `${packageManager} ci`
12
12
  : packageManager === 'yarn'
13
13
  ? `${packageManager} install --immutable`
14
- : `${packageManager} install`;
14
+ : packageManager === 'pnpm'
15
+ ? `${packageManager} install --frozen-lockfile`
16
+ : `${packageManager} install`;
15
17
  githubCI.workflow({
16
18
  name: 'ci.yml',
17
19
  state,
package/core/npm.js CHANGED
@@ -29,6 +29,7 @@ const { yaml, json } = require('mrm-core');
29
29
  * @typedef {{
30
30
  * dev?: boolean,
31
31
  * yarn?: boolean,
32
+ * pnpm?: boolean,
32
33
  * versions?: Record<string, string>,
33
34
  * }} Options
34
35
  */
@@ -51,7 +52,8 @@ const { yaml, json } = require('mrm-core');
51
52
  */
52
53
  function install(deps, options = {}, exec) {
53
54
  const dev = options.dev !== false;
54
- const run = options.yarn || isUsingYarn() ? runYarn : runNpm;
55
+ const manager = options.yarn ? 'yarn' : options.pnpm ? 'pnpm' : detectPackageManager();
56
+ const run = manager === 'yarn' ? runYarn : manager === 'pnpm' ? runPnpm : runNpm;
55
57
 
56
58
  // options.versions is a min versions mapping,
57
59
  // the list of packages to install will be taken from deps
@@ -92,7 +94,8 @@ function install(deps, options = {}, exec) {
92
94
  function uninstall(deps, options = {}, exec) {
93
95
  deps = _.castArray(deps);
94
96
  const dev = options.dev !== false;
95
- const run = options.yarn || isUsingYarn() ? runYarn : runNpm;
97
+ const manager = options.yarn ? 'yarn' : options.pnpm ? 'pnpm' : detectPackageManager();
98
+ const run = manager === 'yarn' ? runYarn : manager === 'pnpm' ? runPnpm : runNpm;
96
99
 
97
100
  const installed = getOwnDependencies({ dev });
98
101
 
@@ -143,6 +146,24 @@ function runYarn(deps, options = {}, exec) {
143
146
  });
144
147
  }
145
148
 
149
+ /**
150
+ * Install given PNPM packages
151
+ *
152
+ * @param {string[]} deps
153
+ * @param {RunOptions} [options]
154
+ * @param {Function} [exec]
155
+ */
156
+ function runPnpm(deps, options = {}, exec) {
157
+ const add = options.dev ? ['add', '--save-dev'] : ['add'];
158
+ const remove = ['remove'];
159
+ const args = [...(options.remove ? remove : add), ...(isUsingWorkspaces() ? ['--workspace-root'] : []), ...deps];
160
+
161
+ return execCommand(exec, 'pnpm', args, {
162
+ cwd: options.cwd,
163
+ stdio: options.stdio === undefined ? 'inherit' : options.stdio,
164
+ });
165
+ }
166
+
146
167
  /**
147
168
  * Add version or latest to package name
148
169
  *
@@ -245,6 +266,20 @@ function isUsingYarn() {
245
266
  return fs.existsSync('yarn.lock');
246
267
  }
247
268
 
269
+ function isUsingPnpm() {
270
+ return fs.existsSync('pnpm-lock.yaml');
271
+ }
272
+
273
+ function detectPackageManager() {
274
+ if (isUsingYarn()) {
275
+ return 'yarn';
276
+ }
277
+ if (isUsingPnpm()) {
278
+ return 'pnpm';
279
+ }
280
+ return 'npm';
281
+ }
282
+
248
283
  function isUsingWorkspaces() {
249
284
  return Boolean(packageJson().get('workspaces'));
250
285
  }
@@ -255,11 +290,12 @@ function isYarnBerry() {
255
290
  }
256
291
 
257
292
  /**
258
- * @param {'npm'|`yarn@${'classic'|'berry'}`} defaultPackageManager
293
+ * @param {'npm'|'pnpm'|`yarn@${'classic'|'berry'}`} defaultPackageManager
259
294
  */
260
295
  async function bootstrap(defaultPackageManager) {
261
296
  const packageFile = json(`./package.json`);
262
297
  const isYarn = isUsingYarn() || defaultPackageManager.startsWith('yarn@');
298
+ const isPnpm = isUsingPnpm() || defaultPackageManager === 'pnpm';
263
299
 
264
300
  if (!packageFile.get('packageManager') && isYarn) {
265
301
  // Downgrade
@@ -279,13 +315,19 @@ async function bootstrap(defaultPackageManager) {
279
315
  update: () => 'node-modules',
280
316
  });
281
317
  }
318
+ } else if (!packageFile.get('packageManager') && isPnpm) {
319
+ packageFile.set('packageManager', 'pnpm@latest');
320
+ packageFile.save();
282
321
  }
283
322
 
284
323
  // lock files
285
324
  if (isYarn && !fs.existsSync('yarn.lock')) {
286
325
  execCommand(undefined, 'yarn', ['install']);
287
326
  }
288
- if (!isYarn && !fs.existsSync('package-lock.json')) {
327
+ if (isPnpm && !fs.existsSync('pnpm-lock.yaml')) {
328
+ execCommand(undefined, 'pnpm', ['install']);
329
+ }
330
+ if (!isYarn && !isPnpm && !fs.existsSync('package-lock.json')) {
289
331
  execCommand(undefined, 'npm', ['install']);
290
332
  }
291
333
  }
@@ -296,6 +338,7 @@ async function bootstrap(defaultPackageManager) {
296
338
  * state: 'present'|'absent',
297
339
  * dev?: boolean,
298
340
  * yarn?: boolean,
341
+ * pnpm?: boolean,
299
342
  * }} options
300
343
  */
301
344
  function dependency({ name, state, ...options }) {
package/core/pkg.js CHANGED
@@ -93,20 +93,23 @@ const defaultManager = 'npm';
93
93
 
94
94
  /**
95
95
  * @param {import('mrm-core').PackageJson} packageFile
96
- * @returns {'yarn'|'npm'} - The manager used by the package
96
+ * @returns {'yarn'|'npm'|'pnpm'} - The manager used by the package
97
97
  */
98
98
  function manager(packageFile) {
99
- if (packageFile.get('packagerManager')) {
100
- const [head, tail] = packageFile.get('packagerManager').split('@', 2);
99
+ if (packageFile.get('packageManager')) {
100
+ const [head, tail] = packageFile.get('packageManager').split('@', 2);
101
101
 
102
102
  return head ?? tail;
103
103
  }
104
104
  if (file('yarn.lock').exists()) {
105
105
  return 'yarn';
106
106
  }
107
- if (file('package-json.lock').exists()) {
107
+ if (file('package-lock.json').exists()) {
108
108
  return 'npm';
109
109
  }
110
+ if (file('pnpm-lock.yaml').exists()) {
111
+ return 'pnpm';
112
+ }
110
113
 
111
114
  return defaultManager;
112
115
  }
package/eslint/index.js CHANGED
@@ -16,9 +16,6 @@ function createESLint({ eslintPreset: eslintPresetDefault = 'eslint:recommended'
16
16
  const packageFileDefault = packageJson();
17
17
  const hasWorkspaces = pkg.hasWorkspaces(packageFileDefault);
18
18
  const hasTypescript = pkg.hasDependency(packageFileDefault, 'typescript', 'dev');
19
- const hasJSX = true;
20
- const hasJSON = true;
21
- const hasYAML = true;
22
19
 
23
20
  // Dependencies
24
21
  npm.dependency({
@@ -46,22 +43,7 @@ function createESLint({ eslintPreset: eslintPresetDefault = 'eslint:recommended'
46
43
  }),
47
44
  });
48
45
 
49
- /** @type {Record<string, boolean>} */
50
- const extsMap = {
51
- mjs: true,
52
- cjs: true,
53
- js: true,
54
- jsx: hasJSX,
55
- ts: hasTypescript,
56
- tsx: hasTypescript && hasJSX,
57
- json: hasJSON,
58
- jsonc: hasJSON,
59
- json5: hasJSON,
60
- yml: hasYAML,
61
- yaml: hasYAML,
62
- };
63
- const extList = Object.keys(extsMap).filter((ext) => extsMap[ext]);
64
- const extOption = '';// ` --ext=${extList.join(',')}`;
46
+ const extOption = ''; // ` --ext=${extList.join(',')}`;
65
47
 
66
48
  pkg.withPackageJson((packageFile) => {
67
49
  const ignorePatterns = pkg
@@ -128,21 +110,7 @@ function createESLint({ eslintPreset: eslintPresetDefault = 'eslint:recommended'
128
110
  'editor.codeActionsOnSave': settings['editor.codeActionsOnSave'] || {
129
111
  'source.fixAll': true,
130
112
  },
131
- 'eslint.validate': [...new Set(
132
- extList.map(
133
- (ext) =>
134
- ({
135
- cjs: 'javascript',
136
- mjs: 'javascript',
137
- jsx: 'javascriptreact',
138
- js: 'javascript',
139
- tsx: 'typescriptreact',
140
- ts: 'typescript',
141
- yaml: 'yaml',
142
- yml: 'yaml',
143
- })[ext] || ext,
144
- ),
145
- )],
113
+ 'eslint.validate': undefined, // remove
146
114
  }),
147
115
  });
148
116
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/mrm-preset",
3
- "version": "3.2.5",
3
+ "version": "3.3.1",
4
4
  "description": "Mrm configuration presets",
5
5
  "keywords": [
6
6
  "mrm",
@@ -21,37 +21,16 @@
21
21
  "type": "commonjs",
22
22
  "main": "config.json",
23
23
  "scripts": {
24
- "build": "npx run-p \"build:*\"",
25
- "build:tsc": "tsc",
26
- "clean": "npx run-p \"clean:*\"",
27
- "clean:tsc": "rm -rf dist",
28
- "docs": "node ../../markdown.mjs",
29
- "format": "npx run-p \"format:*\"",
30
- "format:src": "eslint . --fix",
31
- "lint": "npx run-p \"lint:*\"",
32
- "lint:src": "eslint .",
33
- "postpack": "npx clean-package restore",
34
- "prepack": "npx clean-package",
35
- "prepare": "npx run-p \"prepare:*\"",
36
- "prepare:empty": ":",
37
- "spellcheck": "cspell --no-progress '**'",
38
- "test": "npx run-p \"test:*\"",
39
- "test:script": "mkdir _tester; cd _tester; mrm bootstrap --dir ..; mrm configure --dir .."
24
+ "postpack": "clean-package restore"
40
25
  },
41
26
  "dependencies": {
42
- "@w5s/dev": "^3.1.4",
27
+ "@w5s/dev": "^3.2.1",
43
28
  "debug": "^4.3.3",
44
29
  "glob": "^13.0.0",
45
30
  "mrm-core": "^7.0.0",
46
31
  "semver-intersect": "^1.4.0",
47
32
  "sync-directory": "^6.0.0"
48
33
  },
49
- "devDependencies": {
50
- "@types/debug": "4.1.12",
51
- "mrm": "4.1.22",
52
- "mrm-preset-default": "4.1.11"
53
- },
54
- "clean-package": "../../clean-package.config.mjs",
55
34
  "engines": {
56
35
  "node": ">=20.0.0"
57
36
  },
@@ -59,5 +38,5 @@
59
38
  "access": "public"
60
39
  },
61
40
  "sideEffect": false,
62
- "gitHead": "5ccfbd65c727dda6c5e119e5164d4af6916d83bb"
41
+ "gitHead": "202a665e3ce20aabf1eff51af6b0eb013c179e0a"
63
42
  }
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@w5s/mrm-preset",
3
+ "version": "3.3.1",
4
+ "description": "Mrm configuration presets",
5
+ "keywords": [
6
+ "mrm",
7
+ "config",
8
+ "bootstrap"
9
+ ],
10
+ "homepage": "https://github.com/w5s/project-config/blob/main/packages/mrm-preset#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/w5s/project-config.git/issues"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git@github.com:w5s/project-config.git",
17
+ "directory": "packages/mrm-preset"
18
+ },
19
+ "license": "MIT",
20
+ "author": "Julien Polo <julien.polo@gmail.com>",
21
+ "type": "commonjs",
22
+ "main": "config.json",
23
+ "scripts": {
24
+ "build": "pnpm run \"/^build:.*/\"",
25
+ "build:tsc": "tsc",
26
+ "clean": "pnpm run \"/^clean:.*/\"",
27
+ "clean:tsc": "rm -rf dist",
28
+ "docs": "node ../../markdown.mjs",
29
+ "format": "pnpm run \"/^format:.*/\"",
30
+ "format:src": "eslint . --fix",
31
+ "lint": "pnpm run \"/^lint:.*/\"",
32
+ "lint:src": "eslint .",
33
+ "postpack": "clean-package restore",
34
+ "prepack": "clean-package",
35
+ "spellcheck": "cspell --no-progress '**'",
36
+ "test": "pnpm run \"/^test:.*/\"",
37
+ "test:script": "mkdir _tester; cd _tester; mrm bootstrap --dir ..; mrm configure --dir .."
38
+ },
39
+ "dependencies": {
40
+ "@w5s/dev": "^3.2.1",
41
+ "debug": "^4.3.3",
42
+ "glob": "^13.0.0",
43
+ "mrm-core": "^7.0.0",
44
+ "semver-intersect": "^1.4.0",
45
+ "sync-directory": "^6.0.0"
46
+ },
47
+ "devDependencies": {
48
+ "@types/debug": "4.1.12",
49
+ "mrm": "4.1.22",
50
+ "mrm-preset-default": "4.1.11"
51
+ },
52
+ "clean-package": "../../clean-package.config.cjs",
53
+ "engines": {
54
+ "node": ">=20.0.0"
55
+ },
56
+ "publishConfig": {
57
+ "access": "public"
58
+ },
59
+ "sideEffect": false,
60
+ "gitHead": "202a665e3ce20aabf1eff51af6b0eb013c179e0a"
61
+ }
package/project/index.js CHANGED
@@ -31,12 +31,6 @@ const { turbo } = require('../core/turbo.js');
31
31
  */
32
32
  const turboRun = (script) => `turbo run ${script}`;
33
33
 
34
- /**
35
- *
36
- * @param {string} script
37
- * @param {boolean} allowEmpty
38
- */
39
- const npmRunAll = (script, allowEmpty) => `npx run-p "${script}:*"${allowEmpty ? '' : ''}`;
40
34
  function task() {
41
35
  const rootPackageFile = packageJson();
42
36
  const rootUseWorkspace = pkg.hasWorkspaces(rootPackageFile);
@@ -44,6 +38,7 @@ function task() {
44
38
  // @ts-ignore
45
39
  node: '>=12.x',
46
40
  yarn: '>=1.x',
41
+ pnpm: '>=10.x',
47
42
  npm: '>=6.x',
48
43
  ...mrmPackageJson.engines,
49
44
  };
@@ -51,6 +46,14 @@ function task() {
51
46
  const packageManager = pkg.manager(rootPackageFile);
52
47
  const gitRepository = git.remoteSync();
53
48
 
49
+ /**
50
+ *
51
+ * @param {string} script
52
+ * @param {boolean} allowEmpty
53
+ */
54
+ const npmRunAll = (script, allowEmpty) =>
55
+ (packageManager === 'pnpm' ? `pnpm run "/^${script}:.*/"` : `npx run-p "${script}:*"${allowEmpty ? '' : ''}`);
56
+
54
57
  // Detect git repository
55
58
  if (rootUseWorkspace) {
56
59
  const dirs = pkg.listWorkspaceMatchers(rootPackageFile).map(nodePath.dirname);
package/release/index.js CHANGED
@@ -5,14 +5,14 @@ const { semanticRelease } = require('../core/semanticRelease.js');
5
5
 
6
6
  function task() {
7
7
  const useWorkspace = pkg.hasWorkspaces(packageJson());
8
-
9
8
  // release
10
9
  pkg.withPackageJson((packageFile) => {
10
+ /* eslint-disable no-template-curly-in-string */
11
11
  pkg.script(packageFile, {
12
12
  name: project.release,
13
- update:
14
- // eslint-disable-next-line no-template-curly-in-string
15
- useWorkspace ? '[ -n "${CI:-}" ] && npx lerna publish --yes || npx lerna publish' : semanticRelease.command(),
13
+ update: useWorkspace
14
+ ? '[ -n "${CI:-}" ] && npx lerna publish --yes || npx lerna publish'
15
+ : semanticRelease.command(),
16
16
  state: 'present',
17
17
  });
18
18
  });
package/.eslintrc.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "rules": {
3
- "node/no-sync": "off",
4
- "import/no-unresolved": "off"
5
- }
6
- }