@w5s/mrm-preset 3.5.6 → 3.5.8

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.
Files changed (46) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-lint.log +11 -11
  3. package/.turbo/turbo-test.log +23 -258
  4. package/CHANGELOG.md +8 -0
  5. package/asdf/{index.js → index.cjs} +1 -1
  6. package/bootstrap/{index.js → index.cjs} +11 -10
  7. package/ci/_gitlab/Renovate.gitlab-ci.yml +1 -1
  8. package/ci/{github.js → github.cjs} +10 -10
  9. package/ci/{gitlab.js → gitlab.cjs} +1 -2
  10. package/ci/{index.js → index.cjs} +4 -4
  11. package/commitlint/{index.js → index.cjs} +3 -3
  12. package/core/{asdf.js → asdf.cjs} +2 -2
  13. package/core/{commitlint.js → commitlint.cjs} +5 -5
  14. package/core/{cspell.js → cspell.cjs} +5 -4
  15. package/core/{eslint.js → eslint.cjs} +5 -4
  16. package/core/{git.js → git.cjs} +4 -3
  17. package/core/{githooks.js → githooks.cjs} +3 -3
  18. package/core/{jest.js → jest.cjs} +11 -10
  19. package/core/{jsonFile.js → jsonFile.cjs} +1 -1
  20. package/core/{lintStaged.js → lintStaged.cjs} +4 -4
  21. package/core/{npm.js → npm.cjs} +204 -205
  22. package/core/{pkg.js → pkg.cjs} +71 -69
  23. package/core/{semanticRelease.js → semanticRelease.cjs} +7 -7
  24. package/core/{turbo.js → turbo.cjs} +5 -4
  25. package/core/{typedoc.js → typedoc.cjs} +9 -8
  26. package/core/{vitest.js → vitest.cjs} +8 -7
  27. package/core/{vscode.js → vscode.cjs} +1 -1
  28. package/cspell/{index.js → index.cjs} +8 -8
  29. package/editorconfig/{index.js → index.cjs} +4 -3
  30. package/eslint/{index.js → index.cjs} +10 -9
  31. package/githooks/{index.js → index.cjs} +12 -11
  32. package/gitignore/{index.js → index.cjs} +1 -1
  33. package/lang/{index.js → index.cjs} +4 -4
  34. package/licenses/{index.js → index.cjs} +5 -4
  35. package/package.json +4 -4
  36. package/package.json.backup +9 -9
  37. package/post-configure/{index.js → index.cjs} +5 -4
  38. package/project/{index.js → index.cjs} +65 -64
  39. package/release/{index.js → index.cjs} +6 -5
  40. package/renovate/{index.js → index.cjs} +3 -2
  41. package/vitest/{index.js → index.cjs} +1 -1
  42. package/contributing/{index.js → index.cjs} +1 -1
  43. package/core/{git.ignore.js → git.ignore.cjs} +27 -27
  44. package/core/{githubCI.js → githubCI.cjs} +2 -2
  45. package/core/{gitlabCI.js → gitlabCI.cjs} +0 -0
  46. package/core/{project.js → project.cjs} +8 -8
@@ -1,2 +1,2 @@
1
1
  $ pnpm run "/^build:.*/"
2
- $ tsc
2
+ $ pnpm exec tsc
@@ -1,24 +1,24 @@
1
1
  $ pnpm run "/^lint:.*/"
2
- $ eslint .
2
+ $ pnpm exec eslint .
3
3
  Pages directory cannot be found at /home/runner/work/project-config/project-config/packages/mrm-preset/pages or /home/runner/work/project-config/project-config/packages/mrm-preset/src/pages. If using a custom path, please configure with the `no-html-link-for-pages` rule in your eslint config file.
4
4
 
5
- /home/runner/work/project-config/project-config/packages/mrm-preset/ci/gitlab.js
6
- 5:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
5
+ /home/runner/work/project-config/project-config/packages/mrm-preset/ci/gitlab.cjs
6
+ 4:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
7
7
 
8
- /home/runner/work/project-config/project-config/packages/mrm-preset/core/githubCI.js
8
+ /home/runner/work/project-config/project-config/packages/mrm-preset/core/githubCI.cjs
9
9
  21:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
10
10
  21:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
11
11
  21:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
12
12
  21:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
13
13
 
14
- /home/runner/work/project-config/project-config/packages/mrm-preset/core/npm.js
15
- 51:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
16
- 92:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
17
- 119:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
18
- 135:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
19
- 154:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
14
+ /home/runner/work/project-config/project-config/packages/mrm-preset/core/npm.cjs
15
+ 215:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
16
+ 276:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
17
+ 292:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
18
+ 310:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
19
+ 329:1 warning Prefer a more specific type to `Function` jsdoc/reject-function-type
20
20
 
21
- /home/runner/work/project-config/project-config/packages/mrm-preset/core/vscode.js
21
+ /home/runner/work/project-config/project-config/packages/mrm-preset/core/vscode.cjs
22
22
  41:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
23
23
  82:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
24
24
  82:1 warning Prefer a more specific type to `any` jsdoc/reject-any-type
@@ -1,268 +1,33 @@
1
1
  $ pnpm run "/^test:.*/"
2
2
  $ mkdir -p .temp; cd .temp; mrm bootstrap --dir ..; mrm configure --dir ..
3
- Running bootstrap...
4
- Create package.json
5
- Update ./package.json
6
- Update package.json
7
- Running alias configure...
8
- Running gitignore...
9
- Running project...
10
- Update package.json
11
- Create turbo.json
12
- Installing turbo...
13
-
14
- added 2 packages, and audited 3 packages in 2s
15
-
16
- found 0 vulnerabilities
17
- Installing npm-run-all2...
18
-
19
- added 17 packages, and audited 20 packages in 811ms
20
-
21
- 3 packages are looking for funding
22
- run `npm fund` for details
23
-
24
- found 0 vulnerabilities
25
- Installing @w5s/conventional-changelog...
26
-
27
- added 8 packages, and audited 28 packages in 2s
28
-
29
- 5 packages are looking for funding
30
- run `npm fund` for details
31
-
32
- found 0 vulnerabilities
33
- Create .vscode/tasks.json
34
- Update .vscode/tasks.json
35
- Running contributing...
36
- Create CODE_OF_CONDUCT.md
37
- Running licenses...
38
- Running asdf...
39
- Create .tool-versions
40
- Running release...
41
- Update package.json
42
- Installing semantic-release and @semantic-release/gitlab-config...
43
- npm warn deprecated read-pkg-up@11.0.0: Renamed to read-package-up
44
-
45
- added 359 packages, and audited 725 packages in 12s
46
-
47
- 130 packages are looking for funding
48
- run `npm fund` for details
49
-
50
- 20 vulnerabilities (18 moderate, 2 high)
51
-
52
- To address issues that do not require attention, run:
53
- npm audit fix
54
-
55
- To address all issues (including breaking changes), run:
56
- npm audit fix --force
57
-
58
- Run `npm audit` for details.
59
- Update package.json
60
- Running ci...
61
- Running lang...
62
- Create tsconfig.settings.json
63
- Create tsconfig.json
64
- Create src/index.ts
65
- Create src/index.spec.ts
66
- Update package.json
67
- Installing ts-node-dev and tsconfig-paths...
68
- npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
69
- npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
70
- npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
71
-
72
- added 57 packages, and audited 782 packages in 3s
73
-
74
- 136 packages are looking for funding
75
- run `npm fund` for details
76
-
77
- 20 vulnerabilities (18 moderate, 2 high)
78
-
79
- To address issues that do not require attention, run:
80
- npm audit fix
81
-
82
- To address all issues (including breaking changes), run:
83
- npm audit fix --force
84
-
85
- Run `npm audit` for details.
86
- Installing typescript, @types/node, and @w5s/tsconfig...
87
-
88
- added 1 package, and audited 783 packages in 2s
89
-
90
- 136 packages are looking for funding
91
- run `npm fund` for details
92
-
93
- 20 vulnerabilities (18 moderate, 2 high)
94
-
95
- To address issues that do not require attention, run:
96
- npm audit fix
97
-
98
- To address all issues (including breaking changes), run:
99
- npm audit fix --force
100
3
 
101
- Run `npm audit` for details.
102
- Running commitlint...
103
- Create .vscode/extensions.json
104
- Running editorconfig...
105
- Update .vscode/extensions.json
106
- Running eslint...
107
- Installing eslint and prettier...
4
+ Task “bootstrap” not found.
108
5
 
109
- added 62 packages, and audited 845 packages in 3s
6
+ We’ve tried these locations:
110
7
 
111
- 152 packages are looking for funding
112
- run `npm fund` for details
8
+ - /home/runner/work/project-config/project-config/packages/mrm-preset/bootstrap/index.js
9
+ - /home/runner/dotfiles/mrm/bootstrap/index.js
10
+ - /home/runner/.mrm/bootstrap/index.js
11
+ - “bootstrap” in the default mrm tasks
12
+ - mrm-task-bootstrap package in local node_modules
13
+ - bootstrap package in local node_modules
14
+ - mrm-task-bootstrap package on the npm registry
15
+ - bootstrap package on the npm registry
113
16
 
114
- 20 vulnerabilities (18 moderate, 2 high)
115
-
116
- To address issues that do not require attention, run:
117
- npm audit fix
118
-
119
- To address all issues (including breaking changes), run:
120
- npm audit fix --force
121
-
122
- Run `npm audit` for details.
123
- Installing @w5s/eslint-config...
124
- npm warn ERESOLVE overriding peer dependency
125
-
126
- added 289 packages, and audited 1134 packages in 14s
127
-
128
- 335 packages are looking for funding
129
- run `npm fund` for details
130
-
131
- 20 vulnerabilities (18 moderate, 2 high)
132
-
133
- To address issues that do not require attention, run:
134
- npm audit fix
135
-
136
- To address all issues (including breaking changes), run:
137
- npm audit fix --force
138
-
139
- Run `npm audit` for details.
140
- Update package.json
141
- Update package.json
142
- Update .vscode/extensions.json
143
- Create .vscode/settings.json
144
- Running cspell...
145
- Create .cspell.json
146
- Installing cspell...
147
- npm warn ERESOLVE overriding peer dependency
148
- npm warn While resolving: eslint-plugin-import@2.32.0
149
- npm warn Found: eslint@10.6.0
150
- npm warn node_modules/eslint
151
- npm warn peerOptional eslint@"^9.0.0 || ^10.0.0" from @e18e/eslint-plugin@0.5.1
152
- npm warn node_modules/@e18e/eslint-plugin
153
- npm warn @e18e/eslint-plugin@"^0.5.0" from @w5s/eslint-config@3.8.0
154
- npm warn node_modules/@w5s/eslint-config
155
- npm warn 33 more (@eslint-community/eslint-utils, @eslint-react/ast, ...)
156
- npm warn
157
- npm warn Could not resolve dependency:
158
- npm warn peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" from eslint-plugin-import@2.32.0
159
- npm warn node_modules/@w5s/eslint-config/node_modules/eslint-plugin-import
160
- npm warn eslint-plugin-import@"~2.32.0" from @w5s/eslint-config@3.8.0
161
- npm warn node_modules/@w5s/eslint-config
162
- npm warn
163
- npm warn Conflicting peer dependency: eslint@9.39.4
164
- npm warn node_modules/eslint
165
- npm warn peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" from eslint-plugin-import@2.32.0
166
- npm warn node_modules/@w5s/eslint-config/node_modules/eslint-plugin-import
167
- npm warn eslint-plugin-import@"~2.32.0" from @w5s/eslint-config@3.8.0
168
- npm warn node_modules/@w5s/eslint-config
169
-
170
- added 97 packages, and audited 1231 packages in 5s
171
-
172
- 343 packages are looking for funding
173
- run `npm fund` for details
174
-
175
- 20 vulnerabilities (18 moderate, 2 high)
176
-
177
- To address issues that do not require attention, run:
178
- npm audit fix
179
-
180
- To address all issues (including breaking changes), run:
181
- npm audit fix --force
182
-
183
- Run `npm audit` for details.
184
- Installing @w5s/cspell-config...
185
- npm warn ERESOLVE overriding peer dependency
186
- npm warn While resolving: eslint-plugin-import@2.32.0
187
- npm warn Found: eslint@10.6.0
188
- npm warn node_modules/eslint
189
- npm warn peerOptional eslint@"^9.0.0 || ^10.0.0" from @e18e/eslint-plugin@0.5.1
190
- npm warn node_modules/@e18e/eslint-plugin
191
- npm warn @e18e/eslint-plugin@"^0.5.0" from @w5s/eslint-config@3.8.0
192
- npm warn node_modules/@w5s/eslint-config
193
- npm warn 33 more (@eslint-community/eslint-utils, @eslint-react/ast, ...)
194
- npm warn
195
- npm warn Could not resolve dependency:
196
- npm warn peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" from eslint-plugin-import@2.32.0
197
- npm warn node_modules/@w5s/eslint-config/node_modules/eslint-plugin-import
198
- npm warn eslint-plugin-import@"~2.32.0" from @w5s/eslint-config@3.8.0
199
- npm warn node_modules/@w5s/eslint-config
200
- npm warn
201
- npm warn Conflicting peer dependency: eslint@9.39.4
202
- npm warn node_modules/eslint
203
- npm warn peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" from eslint-plugin-import@2.32.0
204
- npm warn node_modules/@w5s/eslint-config/node_modules/eslint-plugin-import
205
- npm warn eslint-plugin-import@"~2.32.0" from @w5s/eslint-config@3.8.0
206
- npm warn node_modules/@w5s/eslint-config
207
-
208
- added 1 package, and audited 1232 packages in 2s
209
-
210
- 343 packages are looking for funding
211
- run `npm fund` for details
212
-
213
- 20 vulnerabilities (18 moderate, 2 high)
214
-
215
- To address issues that do not require attention, run:
216
- npm audit fix
217
-
218
- To address all issues (including breaking changes), run:
219
- npm audit fix --force
220
-
221
- Run `npm audit` for details.
222
- Update package.json
223
- Running vitest...
224
- Installing vite and vitest...
225
- npm warn ERESOLVE overriding peer dependency
226
- npm warn While resolving: eslint-plugin-import@2.32.0
227
- npm warn Found: eslint@10.6.0
228
- npm warn node_modules/eslint
229
- npm warn peerOptional eslint@"^9.0.0 || ^10.0.0" from @e18e/eslint-plugin@0.5.1
230
- npm warn node_modules/@e18e/eslint-plugin
231
- npm warn @e18e/eslint-plugin@"^0.5.0" from @w5s/eslint-config@3.8.0
232
- npm warn node_modules/@w5s/eslint-config
233
- npm warn 33 more (@eslint-community/eslint-utils, @eslint-react/ast, ...)
234
- npm warn
235
- npm warn Could not resolve dependency:
236
- npm warn peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" from eslint-plugin-import@2.32.0
237
- npm warn node_modules/@w5s/eslint-config/node_modules/eslint-plugin-import
238
- npm warn eslint-plugin-import@"~2.32.0" from @w5s/eslint-config@3.8.0
239
- npm warn node_modules/@w5s/eslint-config
240
- npm warn
241
- npm warn Conflicting peer dependency: eslint@9.39.4
242
- npm warn node_modules/eslint
243
- npm warn peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" from eslint-plugin-import@2.32.0
244
- npm warn node_modules/@w5s/eslint-config/node_modules/eslint-plugin-import
245
- npm warn eslint-plugin-import@"~2.32.0" from @w5s/eslint-config@3.8.0
246
- npm warn node_modules/@w5s/eslint-config
247
-
248
- added 38 packages, and audited 1270 packages in 6s
249
-
250
- 358 packages are looking for funding
251
- run `npm fund` for details
252
-
253
- 20 vulnerabilities (18 moderate, 2 high)
17
+ Running alias configure...
18
+ Running gitignore...
19
+ Create .gitignore
254
20
 
255
- To address issues that do not require attention, run:
256
- npm audit fix
21
+ Task “project” not found.
257
22
 
258
- To address all issues (including breaking changes), run:
259
- npm audit fix --force
23
+ We’ve tried these locations:
260
24
 
261
- Run `npm audit` for details.
262
- Update package.json
263
- Running renovate...
264
- Running githooks...
265
- Running post-configure...
266
- Error: to format code
267
- Invalid package manager specification in package.json (pnpm@latest); expected a semver version
25
+ - /home/runner/work/project-config/project-config/packages/mrm-preset/project/index.js
26
+ - /home/runner/dotfiles/mrm/project/index.js
27
+ - /home/runner/.mrm/project/index.js
28
+ - “project” in the default mrm tasks
29
+ - mrm-task-project package in local node_modules
30
+ - project package in local node_modules
31
+ - mrm-task-project package on the npm registry
32
+ - project package on the npm registry
268
33
 
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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.5.8](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@3.5.1...@w5s/mrm-preset@3.5.8) (2026-07-06)
7
+
8
+ **Note:** Version bump only for package @w5s/mrm-preset
9
+
10
+ ## [3.5.7](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@3.5.1...@w5s/mrm-preset@3.5.7) (2026-06-26)
11
+
12
+ **Note:** Version bump only for package @w5s/mrm-preset
13
+
6
14
  ## [3.5.6](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@3.5.1...@w5s/mrm-preset@3.5.6) (2026-06-26)
7
15
 
8
16
  **Note:** Version bump only for package @w5s/mrm-preset
@@ -1,4 +1,4 @@
1
- const { asdfConfig } = require('../core/asdf.js');
1
+ const { asdfConfig } = require('../core/asdf.cjs');
2
2
 
3
3
  function task() {
4
4
  asdfConfig({
@@ -1,9 +1,10 @@
1
+ const { packageJson } = require('mrm-core');
1
2
  const path = require('node:path');
2
3
  const process = require('node:process');
3
- const { packageJson } = require('mrm-core');
4
- const npm = require('../core/npm.js');
5
- const pkg = require('../core/pkg.js');
6
- const { gitIgnore } = require('../core/git.js');
4
+
5
+ const { gitIgnore } = require('../core/git.cjs');
6
+ const npm = require('../core/npm.cjs');
7
+ const pkg = require('../core/pkg.cjs');
7
8
 
8
9
  /**
9
10
  * @param {{
@@ -20,11 +21,11 @@ async function task({ mrmPreset, mrmTask, packageManager }) {
20
21
  */
21
22
 
22
23
  packageJson({
24
+ description: '',
25
+ license: 'UNLICENSED',
23
26
  name: path.basename(process.cwd()),
24
- version: '1.0.0-alpha.0',
25
27
  private: true,
26
- license: 'UNLICENSED',
27
- description: '',
28
+ version: '1.0.0-alpha.0',
28
29
  }).save();
29
30
  gitIgnore(['macOS', 'NodeJS', 'VisualStudioCode']);
30
31
 
@@ -39,14 +40,14 @@ async function task({ mrmPreset, mrmTask, packageManager }) {
39
40
  pkg.withPackageJson((packageFile) => {
40
41
  // Add MRM default scripts
41
42
  pkg.script(packageFile, {
43
+ default: `npm run mrm -- ${mrmTask}`,
42
44
  name: 'configure',
43
45
  state: 'present',
44
- default: `npm run mrm -- ${mrmTask}`,
45
46
  });
46
47
  pkg.script(packageFile, {
48
+ default: `npm exec --package=mrm --package=${mrmPreset}@latest -- mrm --preset ${mrmPreset}`,
47
49
  name: 'mrm',
48
50
  state: 'present',
49
- default: `npm exec --package=mrm --package=${mrmPreset}@latest -- mrm --preset ${mrmPreset}`,
50
51
  });
51
52
  });
52
53
  }
@@ -65,8 +66,8 @@ task.parameters = {
65
66
  type: 'input',
66
67
  },
67
68
  packageManager: {
68
- default: 'pnpm',
69
69
  choices: ['pnpm', 'yarn@berry', 'yarn@classic', 'npm'],
70
+ default: 'pnpm',
70
71
  message: 'Which default package manager ?',
71
72
  name: 'packageManager',
72
73
  type: 'input',
@@ -13,7 +13,7 @@
13
13
  when: always
14
14
  - when: never
15
15
  image:
16
- name: renovate/renovate@sha256:6a5475cd62046abc541ebb50b19b2b737ee52cc17153ab5700027afa51186394
16
+ name: renovate/renovate@sha256:e607d6ccf264e1ffda617c98d598d55ed7fa620ecd35656d644ed6835a9374ca
17
17
  entrypoint: ['']
18
18
  script:
19
19
  - >
@@ -1,4 +1,4 @@
1
- const githubCI = require('../core/githubCI.js');
1
+ const githubCI = require('../core/githubCI.cjs');
2
2
 
3
3
  function task() {
4
4
  const state = 'present';
@@ -10,15 +10,6 @@ function task() {
10
10
  update: (config) => ({
11
11
  name: 'CI',
12
12
  ...config,
13
- on: {
14
- merge_group: {},
15
- push: {
16
- branches: [baseBranch],
17
- },
18
- pull_request: {
19
- branches: [baseBranch],
20
- },
21
- },
22
13
  jobs: {
23
14
  ...config.jobs,
24
15
  'code-validate': {
@@ -46,6 +37,15 @@ function task() {
46
37
  ],
47
38
  },
48
39
  },
40
+ on: {
41
+ merge_group: {},
42
+ pull_request: {
43
+ branches: [baseBranch],
44
+ },
45
+ push: {
46
+ branches: [baseBranch],
47
+ },
48
+ },
49
49
  }),
50
50
  });
51
51
  }
@@ -1,6 +1,5 @@
1
- const path = require('node:path');
2
1
  const { yaml } = require('mrm-core');
3
-
2
+ const path = require('node:path');
4
3
  /** @type {typeof import('sync-directory')['default']} */
5
4
  const syncDirectory = /** @type {any} */ (require('sync-directory'));
6
5
 
@@ -1,7 +1,7 @@
1
- const gitlabCI = require('../core/gitlabCI.js');
2
- const githubCI = require('../core/githubCI.js');
3
- const gitlab = require('./gitlab.js');
4
- const github = require('./github.js');
1
+ const githubCI = require('../core/githubCI.cjs');
2
+ const gitlabCI = require('../core/gitlabCI.cjs');
3
+ const github = require('./github.cjs');
4
+ const gitlab = require('./gitlab.cjs');
5
5
 
6
6
  function task() {
7
7
  // check gitlab support
@@ -1,6 +1,6 @@
1
- const { vscodeRecommendedExtension } = require('../core/vscode.js');
2
- const { commitlint } = require('../core/commitlint.js');
3
- const { hasGit } = require('../core/git.js');
1
+ const { commitlint } = require('../core/commitlint.cjs');
2
+ const { hasGit } = require('../core/git.cjs');
3
+ const { vscodeRecommendedExtension } = require('../core/vscode.cjs');
4
4
 
5
5
  /**
6
6
  *
@@ -29,8 +29,8 @@ function asdfConfig({ state, update }) {
29
29
  // @ts-ignore
30
30
  const updated = update ? update(parsed) : parsed;
31
31
 
32
- const formatted = Object.keys(updated)
33
- .map((tool) => `${tool} ${updated[tool]}`)
32
+ const formatted = Object.entries(updated)
33
+ .map(([tool, value]) => `${tool} ${value}`)
34
34
  .join(eol);
35
35
 
36
36
  toolVersionsFile.save(formatted);
@@ -1,6 +1,6 @@
1
- const pkg = require('./pkg.js');
2
- const npm = require('./npm.js');
3
- const { gitHook } = require('./githooks.js');
1
+ const { gitHook } = require('./githooks.cjs');
2
+ const npm = require('./npm.cjs');
3
+ const pkg = require('./pkg.cjs');
4
4
 
5
5
  /**
6
6
  * @param {{
@@ -8,7 +8,7 @@ const { gitHook } = require('./githooks.js');
8
8
  * preset: string,
9
9
  * }} options
10
10
  */
11
- function commitlint({ state, preset }) {
11
+ function commitlint({ preset, state }) {
12
12
  pkg.withPackageJson((packageFile) => {
13
13
  if (state === 'present') {
14
14
  packageFile.merge({
@@ -22,8 +22,8 @@ function commitlint({ state, preset }) {
22
22
  });
23
23
 
24
24
  gitHook({
25
- name: 'commit-msg',
26
25
  content: 'npm exec -- commitlint --edit $1',
26
+ name: 'commit-msg',
27
27
  state,
28
28
  });
29
29
 
@@ -1,5 +1,6 @@
1
1
  const { json } = require('mrm-core');
2
- const npm = require('./npm.js');
2
+
3
+ const npm = require('./npm.cjs');
3
4
 
4
5
  /**
5
6
  * @typedef {{
@@ -24,13 +25,13 @@ function cspell({ state, update }) {
24
25
  const hasCSpell = state === 'present';
25
26
 
26
27
  const cSpellFile = json('.cspell.json', {
27
- version: '0.2',
28
- language: 'en',
29
- words: [],
30
28
  flagWords: [],
31
29
  ignorePaths: [
32
30
  '**/[.]*/**', // ignore hidden directories
33
31
  ],
32
+ language: 'en',
33
+ version: '0.2',
34
+ words: [],
34
35
  });
35
36
 
36
37
  if (hasCSpell) {
@@ -1,5 +1,6 @@
1
1
  const { packageJson } = require('mrm-core');
2
- const jsonFile = require('./jsonFile.js');
2
+
3
+ const jsonFile = require('./jsonFile.cjs');
3
4
 
4
5
  /**
5
6
  * @typedef {import('eslint').Linter.Config} ESLintConfig
@@ -15,13 +16,13 @@ function eslintConfig({ state, update }) {
15
16
  const packageFile = packageJson();
16
17
 
17
18
  jsonFile.value(packageFile, {
19
+ /** @type {ESLintConfig} */
20
+ // @ts-ignore
21
+ default: {},
18
22
  path: 'eslintConfig',
19
23
  state,
20
24
  // @ts-ignore
21
25
  update,
22
- /** @type {ESLintConfig} */
23
- // @ts-ignore
24
- default: {},
25
26
  });
26
27
 
27
28
  packageFile.save();
@@ -1,6 +1,7 @@
1
- const { file, ini } = require('mrm-core');
2
1
  const { blockSync } = require('@w5s/configurator-core');
3
- const templateMap = require('./git.ignore.js');
2
+ const { file, ini } = require('mrm-core');
3
+
4
+ const templateMap = require('./git.ignore.cjs');
4
5
 
5
6
  /**
6
7
  *
@@ -64,8 +65,8 @@ function gitIgnore(flags) {
64
65
 
65
66
  blockSync({
66
67
  block: templateContent,
67
- path: '.gitignore',
68
68
  insertPosition: ['before', 'BeginningOfFile'],
69
+ path: '.gitignore',
69
70
  });
70
71
  }
71
72
  exports.gitIgnore = gitIgnore;
@@ -1,5 +1,5 @@
1
- const path = require('node:path');
2
1
  const { blockSync, directorySync, fileSync } = require('@w5s/configurator-core');
2
+ const path = require('node:path');
3
3
 
4
4
  const hookDirectory = '.githooks';
5
5
 
@@ -10,7 +10,7 @@ const hookDirectory = '.githooks';
10
10
  * content: string
11
11
  * }} options
12
12
  */
13
- function gitHook({ name, state, content }) {
13
+ function gitHook({ content, name, state }) {
14
14
  const hasGitHook = state === 'present';
15
15
  const hookFileName = path.join(hookDirectory, name);
16
16
  if (hasGitHook) {
@@ -24,9 +24,9 @@ function gitHook({ name, state, content }) {
24
24
  update: (_) => (_.length === 0 ? '#!/usr/bin/env bash\nset -euo pipefail\n' : _),
25
25
  });
26
26
  blockSync({
27
- path: hookFileName,
28
27
  block: content,
29
28
  insertPosition: ['after', 'EndOfFile'],
29
+ path: hookFileName,
30
30
  });
31
31
  } else {
32
32
  fileSync({