@w5s/mrm-preset 3.5.32 → 3.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/.turbo/turbo-docs.log +1 -1
- package/CHANGELOG.md +48 -0
- package/config.json +1 -1
- package/lefthook/index.cjs +32 -0
- package/package.json +4 -4
- package/package.json.backup +4 -4
- package/post-configure/index.cjs +1 -1
- package/core/lintStaged.cjs +0 -35
- package/githooks/index.cjs +0 -66
- package/githooks/templates/CODEOWNERS +0 -4
package/.turbo/turbo-docs.log
CHANGED
|
@@ -45,5 +45,5 @@ If you think this is incorrect, verify your comment blocks in your src and the s
|
|
|
45
45
|
[96m💫 Results:[39m
|
|
46
46
|
|
|
47
47
|
──────────────────────────────────────────────────────────
|
|
48
|
-
[92m ✔ Markdown Magic Done. 0.
|
|
48
|
+
[92m ✔ Markdown Magic Done. 0.12 seconds[39m
|
|
49
49
|
──────────────────────────────────────────────────────────
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,54 @@
|
|
|
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.9.0](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@3.5.1...@w5s/mrm-preset@3.9.0) (2026-09-17)
|
|
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
|
+
|
|
18
|
+
# [3.8.0](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@3.5.1...@w5s/mrm-preset@3.8.0) (2026-09-17)
|
|
19
|
+
|
|
20
|
+
### ✨ Features
|
|
21
|
+
|
|
22
|
+
- Add lefthook-config ([d8b837c](https://github.com/w5s/project-config/commit/d8b837c))
|
|
23
|
+
|
|
24
|
+
### 🐛 Bug Fixes
|
|
25
|
+
|
|
26
|
+
- Fix ignored changelog files ([104fada](https://github.com/w5s/project-config/commit/104fada))
|
|
27
|
+
|
|
28
|
+
**Note:** Version bump only for package @w5s/mrm-preset
|
|
29
|
+
|
|
30
|
+
# [3.7.0](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@3.5.1...@w5s/mrm-preset@3.7.0) (2026-09-16)
|
|
31
|
+
|
|
32
|
+
### ✨ Features
|
|
33
|
+
|
|
34
|
+
- Add lefthook-config ([d8b837c](https://github.com/w5s/project-config/commit/d8b837c))
|
|
35
|
+
|
|
36
|
+
### 🐛 Bug Fixes
|
|
37
|
+
|
|
38
|
+
- Fix ignored changelog files ([104fada](https://github.com/w5s/project-config/commit/104fada))
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @w5s/mrm-preset
|
|
41
|
+
|
|
42
|
+
# [3.6.0](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@3.5.1...@w5s/mrm-preset@3.6.0) (2026-09-16)
|
|
43
|
+
|
|
44
|
+
### ✨ Features
|
|
45
|
+
|
|
46
|
+
- Add lefthook-config ([d8b837c](https://github.com/w5s/project-config/commit/d8b837c))
|
|
47
|
+
|
|
48
|
+
### 🐛 Bug Fixes
|
|
49
|
+
|
|
50
|
+
- Fix ignored changelog files ([104fada](https://github.com/w5s/project-config/commit/104fada))
|
|
51
|
+
|
|
52
|
+
**Note:** Version bump only for package @w5s/mrm-preset
|
|
53
|
+
|
|
6
54
|
## [3.5.32](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@3.5.1...@w5s/mrm-preset@3.5.32) (2026-09-07)
|
|
7
55
|
|
|
8
56
|
### 🐛 Bug Fixes
|
package/config.json
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const { fileSync } = require('@w5s/configurator-core');
|
|
2
|
+
|
|
3
|
+
const { hasGit } = require('../core/git.cjs');
|
|
4
|
+
const npm = require('../core/npm.cjs');
|
|
5
|
+
|
|
6
|
+
const config = `extends:
|
|
7
|
+
- node_modules/@w5s/lefthook-config/default.yml
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
function task() {
|
|
11
|
+
const state = hasGit() ? 'present' : 'absent';
|
|
12
|
+
|
|
13
|
+
npm.dependency({
|
|
14
|
+
dev: true,
|
|
15
|
+
name: {
|
|
16
|
+
'@w5s/lefthook-config': '^0.1.0',
|
|
17
|
+
'lefthook': '^2.0.0',
|
|
18
|
+
},
|
|
19
|
+
state,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
fileSync({
|
|
23
|
+
path: 'lefthook.yml',
|
|
24
|
+
state,
|
|
25
|
+
update: () => config,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
task.description = 'Setup Lefthook';
|
|
30
|
+
task.parameters = {};
|
|
31
|
+
|
|
32
|
+
module.exports = task;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@w5s/mrm-preset",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.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.
|
|
29
|
-
"@w5s/dev": "^3.
|
|
28
|
+
"@w5s/configurator-core": "^1.17.0",
|
|
29
|
+
"@w5s/dev": "^3.31.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": "
|
|
42
|
+
"gitHead": "c775b53274c35cb97edaa9ffa5cd5ffd47f9a4f0"
|
|
43
43
|
}
|
package/package.json.backup
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@w5s/mrm-preset",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.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.
|
|
44
|
-
"@w5s/dev": "^3.
|
|
43
|
+
"@w5s/configurator-core": "^1.17.0",
|
|
44
|
+
"@w5s/dev": "^3.31.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": "
|
|
63
|
+
"gitHead": "c775b53274c35cb97edaa9ffa5cd5ffd47f9a4f0"
|
|
64
64
|
}
|
package/post-configure/index.cjs
CHANGED
package/core/lintStaged.cjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
const jsonFile = require('./jsonFile.cjs');
|
|
2
|
-
const pkg = require('./pkg.cjs');
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @typedef {Record<string, string|string[]>} LintStagedConfig
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @param {{
|
|
10
|
-
* state: 'present'|'absent',
|
|
11
|
-
* update?: ((config: LintStagedConfig) => LintStagedConfig) | undefined
|
|
12
|
-
* }} options
|
|
13
|
-
*/
|
|
14
|
-
function lintStaged({ state, update }) {
|
|
15
|
-
pkg.withPackageJson((packageFile) => {
|
|
16
|
-
jsonFile.value(packageFile, {
|
|
17
|
-
/** @type {LintStagedConfig} */
|
|
18
|
-
default: {},
|
|
19
|
-
path: 'lint-staged',
|
|
20
|
-
state,
|
|
21
|
-
update,
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// Dependencies
|
|
26
|
-
// npm.dependency({
|
|
27
|
-
// dev: true,
|
|
28
|
-
// name: ['lint-staged'],
|
|
29
|
-
// state,
|
|
30
|
-
// });
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
module.exports = {
|
|
34
|
-
lintStaged,
|
|
35
|
-
};
|
package/githooks/index.cjs
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
const { fileSync } = require('@w5s/configurator-core');
|
|
2
|
-
const { packageJson, template } = require('mrm-core');
|
|
3
|
-
const path = require('node:path');
|
|
4
|
-
|
|
5
|
-
const { hasGit } = require('../core/git.cjs');
|
|
6
|
-
const { gitHook } = require('../core/githooks.cjs');
|
|
7
|
-
const { lintStaged } = require('../core/lintStaged.cjs');
|
|
8
|
-
const pkg = require('../core/pkg.cjs');
|
|
9
|
-
const project = require('../core/project.cjs');
|
|
10
|
-
|
|
11
|
-
function task() {
|
|
12
|
-
const gitSupported = hasGit();
|
|
13
|
-
const packageFile = packageJson();
|
|
14
|
-
const hasESLint = pkg.hasDependency(packageFile, 'eslint', 'dev');
|
|
15
|
-
|
|
16
|
-
lintStaged({
|
|
17
|
-
state: gitSupported ? 'present' : 'absent',
|
|
18
|
-
update: (config) => ({
|
|
19
|
-
...config,
|
|
20
|
-
'*.js?(x)': [...(hasESLint ? ['eslint'] : [])],
|
|
21
|
-
'*.ts?(x)': [
|
|
22
|
-
// TODO: https://github.com/okonet/lint-staged/issues/825
|
|
23
|
-
// ...(hasTsc ? ["tsc --noEmit --skipLibCheck"] : []),
|
|
24
|
-
...(hasESLint ? ['eslint'] : []),
|
|
25
|
-
],
|
|
26
|
-
'*.{json,jsonc,json5}': [...(hasESLint ? ['eslint'] : [])],
|
|
27
|
-
'*.{yml,yaml}': [...(hasESLint ? ['eslint'] : [])],
|
|
28
|
-
}),
|
|
29
|
-
});
|
|
30
|
-
pkg.withPackageJson((_packageFile) => {
|
|
31
|
-
pkg.script(_packageFile, {
|
|
32
|
-
name: `${project.prepare}:githooks`,
|
|
33
|
-
state: gitSupported ? 'present' : 'absent',
|
|
34
|
-
|
|
35
|
-
// eslint-disable-next-line no-template-curly-in-string
|
|
36
|
-
update: (_) => 'if [ -z "${CI:-}" ]; then git config core.hooksPath .githooks; fi',
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
gitHook({
|
|
41
|
-
content: `npm exec -- lint-staged`,
|
|
42
|
-
name: 'pre-commit',
|
|
43
|
-
state: gitSupported ? 'present' : 'absent',
|
|
44
|
-
});
|
|
45
|
-
gitHook({
|
|
46
|
-
content: `npm run ${project.validate}`,
|
|
47
|
-
name: 'pre-push',
|
|
48
|
-
state: gitSupported ? 'present' : 'absent',
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
fileSync({
|
|
52
|
-
path: 'CODEOWNERS',
|
|
53
|
-
state: gitSupported ? 'present' : 'absent',
|
|
54
|
-
update: (content) =>
|
|
55
|
-
(content.length === 0
|
|
56
|
-
? template('', path.join(__dirname, 'templates', 'CODEOWNERS'))
|
|
57
|
-
.apply()
|
|
58
|
-
.get()
|
|
59
|
-
: undefined),
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
task.description = 'Setup Git hooks';
|
|
64
|
-
task.parameters = {};
|
|
65
|
-
|
|
66
|
-
module.exports = task;
|