@w5s/mrm-preset 2.4.5 → 2.5.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.
- package/.turbo/turbo-build.log +3 -2
- package/.turbo/turbo-lint.log +3 -2
- package/.turbo/turbo-spellcheck.log +2 -1
- package/.turbo/turbo-test.log +3 -2
- package/CHANGELOG.md +12 -0
- package/ci/_gitlab/AutoDevopsInclude.gitlab-ci.yml +1 -1
- package/ci/_gitlab/Renovate.gitlab-ci.yml +1 -1
- package/core/githooks.js +14 -37
- package/githooks/index.js +1 -4
- package/package.json +3 -3
- package/package.json.backup +3 -3
- package/.turbo/turbo-format.log +0 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
[0m[1][0m [0m: exited with code 0[0m
|
|
2
3
|
[0m[tsc][0m
|
|
3
|
-
[0m[tsc][0m > @w5s/mrm-preset@2.
|
|
4
|
+
[0m[tsc][0m > @w5s/mrm-preset@2.3.6 build:tsc
|
|
4
5
|
[0m[tsc][0m > tsc --noEmit --skipLibCheck
|
|
5
6
|
[0m[tsc][0m
|
|
6
7
|
[0m[tsc][0m [0mnpm run build:tsc exited with code 0[0m
|
package/.turbo/turbo-lint.log
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
[0m[1][0m [0m: exited with code 0[0m
|
|
2
3
|
[0m[src][0m
|
|
3
|
-
[0m[src][0m > @w5s/mrm-preset@2.
|
|
4
|
+
[0m[src][0m > @w5s/mrm-preset@2.3.6 lint:src
|
|
4
5
|
[0m[src][0m > eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml
|
|
5
6
|
[0m[src][0m
|
|
6
7
|
[0m[src][0m [0mnpm run lint:src exited with code 0[0m
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
CSpell: Files checked: 52, Issues found: 0 in 0 files
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
[0m[1][0m [0m: exited with code 0[0m
|
|
2
3
|
[0m[script][0m
|
|
3
|
-
[0m[script][0m > @w5s/mrm-preset@2.
|
|
4
|
+
[0m[script][0m > @w5s/mrm-preset@2.3.6 test:script
|
|
4
5
|
[0m[script][0m > mkdir _tester; cd _tester; mrm bootstrap --dir ..; mrm configure --dir ..
|
|
5
6
|
[0m[script][0m
|
|
6
7
|
[0m[script][0m mkdir: _tester: File exists
|
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
|
+
## [2.5.1](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@2.5.0...@w5s/mrm-preset@2.5.1) (2024-05-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @w5s/mrm-preset
|
|
9
|
+
|
|
10
|
+
# [2.5.0](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@2.4.5...@w5s/mrm-preset@2.5.0) (2024-05-21)
|
|
11
|
+
|
|
12
|
+
### ✨ Features
|
|
13
|
+
|
|
14
|
+
- Add directory, directorySync ([98e3a28](https://github.com/w5s/project-config/commit/98e3a28))
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @w5s/mrm-preset
|
|
17
|
+
|
|
6
18
|
## [2.4.5](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@2.4.4...@w5s/mrm-preset@2.4.5) (2024-05-12)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @w5s/mrm-preset
|
|
@@ -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:
|
|
204
|
+
image: node:lts-alpine@sha256:a7b980c958bfe4d84ee9263badd95a40c8bb50ad5afdb87902c187fefaef0e24
|
|
205
205
|
|
|
206
206
|
.autodevops_node_install:
|
|
207
207
|
extends:
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
when: always
|
|
14
14
|
- when: never
|
|
15
15
|
image:
|
|
16
|
-
name: renovate/renovate@sha256:
|
|
16
|
+
name: renovate/renovate@sha256:1601c02bbb4d2bc40012cdadd8df42ea186123c4f9574a1d108a849e48cb856b
|
|
17
17
|
entrypoint: ['']
|
|
18
18
|
script:
|
|
19
19
|
- >
|
package/core/githooks.js
CHANGED
|
@@ -1,36 +1,8 @@
|
|
|
1
|
-
const { execSync } = require('node:child_process');
|
|
2
1
|
const path = require('node:path');
|
|
3
|
-
const {
|
|
4
|
-
const { blockSync } = require('@w5s/dev');
|
|
5
|
-
const project = require('./project.js');
|
|
6
|
-
const npm = require('./npm.js');
|
|
7
|
-
const pkg = require('./pkg.js');
|
|
2
|
+
const { blockSync, directorySync, fileSync } = require('@w5s/dev');
|
|
8
3
|
|
|
9
4
|
const hookDirectory = '.githooks';
|
|
10
5
|
|
|
11
|
-
/**
|
|
12
|
-
* @param {{
|
|
13
|
-
* state: 'present'|'absent',
|
|
14
|
-
* }} options
|
|
15
|
-
*/
|
|
16
|
-
function husky({ state }) {
|
|
17
|
-
const hasHusky = state === 'present';
|
|
18
|
-
|
|
19
|
-
npm.dependency({
|
|
20
|
-
dev: true,
|
|
21
|
-
name: ['husky'],
|
|
22
|
-
state: 'absent',
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
pkg.withPackageJson((packageFile) => {
|
|
26
|
-
pkg.script(packageFile, {
|
|
27
|
-
name: `${project.prepare}:githooks`,
|
|
28
|
-
state: hasHusky ? 'present' : 'absent',
|
|
29
|
-
update: `[ -n "\${CI:-}" ] || npx husky ${hookDirectory}`,
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
|
|
34
6
|
/**
|
|
35
7
|
* @param {{
|
|
36
8
|
* name: 'pre-push'|'pre-commit'|'commit-msg',
|
|
@@ -42,23 +14,28 @@ function gitHook({ name, state, content }) {
|
|
|
42
14
|
const hasGitHook = state === 'present';
|
|
43
15
|
const hookFileName = path.join(hookDirectory, name);
|
|
44
16
|
if (hasGitHook) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
17
|
+
directorySync({
|
|
18
|
+
path: hookDirectory,
|
|
19
|
+
state: 'present',
|
|
20
|
+
});
|
|
21
|
+
fileSync({
|
|
22
|
+
path: hookFileName,
|
|
23
|
+
state,
|
|
24
|
+
update: (_) => (_.length === 0 ? '#!/usr/bin/env bash\nset -euo pipefail\n' : _),
|
|
25
|
+
});
|
|
51
26
|
blockSync({
|
|
52
27
|
path: hookFileName,
|
|
53
28
|
block: content,
|
|
54
29
|
insertPosition: ['after', 'EndOfFile'],
|
|
55
30
|
});
|
|
56
31
|
} else {
|
|
57
|
-
|
|
32
|
+
fileSync({
|
|
33
|
+
path: hookFileName,
|
|
34
|
+
state,
|
|
35
|
+
});
|
|
58
36
|
}
|
|
59
37
|
}
|
|
60
38
|
|
|
61
39
|
module.exports = {
|
|
62
|
-
husky,
|
|
63
40
|
gitHook,
|
|
64
41
|
};
|
package/githooks/index.js
CHANGED
|
@@ -4,7 +4,7 @@ const { fileSync } = require('@w5s/dev');
|
|
|
4
4
|
const project = require('../core/project.js');
|
|
5
5
|
const pkg = require('../core/pkg.js');
|
|
6
6
|
const { hasGit } = require('../core/git.js');
|
|
7
|
-
const { gitHook
|
|
7
|
+
const { gitHook } = require('../core/githooks.js');
|
|
8
8
|
const { lintStaged } = require('../core/lintStaged.js');
|
|
9
9
|
|
|
10
10
|
function task() {
|
|
@@ -12,9 +12,6 @@ function task() {
|
|
|
12
12
|
const packageFile = packageJson();
|
|
13
13
|
const hasESLint = pkg.hasDependency(packageFile, 'eslint', 'dev');
|
|
14
14
|
|
|
15
|
-
husky({
|
|
16
|
-
state: gitSupported ? 'present' : 'absent',
|
|
17
|
-
});
|
|
18
15
|
lintStaged({
|
|
19
16
|
state: gitSupported ? 'present' : 'absent',
|
|
20
17
|
update: (config) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@w5s/mrm-preset",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"description": "Mrm configuration presets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mrm",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"postpack": "npx clean-package restore"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@w5s/dev": "^2.
|
|
27
|
+
"@w5s/dev": "^2.2.0",
|
|
28
28
|
"debug": "^4.3.3",
|
|
29
29
|
"glob": "^10.0.0",
|
|
30
30
|
"mrm-core": "^7.0.0",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "82c472e8ba92e7e7b29be093654361b5e075b24f"
|
|
41
41
|
}
|
package/package.json.backup
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@w5s/mrm-preset",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"description": "Mrm configuration presets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mrm",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"test:script": "mkdir _tester; cd _tester; mrm bootstrap --dir ..; mrm configure --dir .."
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@w5s/dev": "^2.
|
|
40
|
+
"@w5s/dev": "^2.2.0",
|
|
41
41
|
"debug": "^4.3.3",
|
|
42
42
|
"glob": "^10.0.0",
|
|
43
43
|
"mrm-core": "^7.0.0",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "82c472e8ba92e7e7b29be093654361b5e075b24f"
|
|
60
60
|
}
|