@w5s/mrm-preset 1.0.0-alpha.42 → 1.0.0-alpha.43
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/CHANGELOG.md +8 -0
- package/bootstrap/index.js +6 -6
- package/core/commitlint.js +2 -2
- package/core/githooks.js +7 -15
- package/githooks/index.js +1 -1
- package/package.json +4 -3
- package/postconfigure/index.js +8 -0
- package/release/index.js +2 -1
- package/.turbo/turbo-build.log +0 -6
- package/.turbo/turbo-format.log +0 -6
- package/.turbo/turbo-lint.log +0 -6
- package/.turbo/turbo-test.log +0 -27
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
|
+
## 1.0.0-alpha.43 (2023-02-23)
|
|
7
|
+
|
|
8
|
+
- ✨ Improve mrm bootstrap script ([0445277](https://github.com/w5s/project-config/commit/0445277))
|
|
9
|
+
- ➖ Remove is-ci, lint-staged, commitlint dependency (used through npx) ([ae39f34](https://github.com/w5s/project-config/commit/ae39f34))
|
|
10
|
+
- ➖ Remove mrm dependency ([7ee3d94](https://github.com/w5s/project-config/commit/7ee3d94))
|
|
11
|
+
- 🐛 Fix unbound variable error ([d2aa040](https://github.com/w5s/project-config/commit/d2aa040))
|
|
12
|
+
- 💚 Fix ci ([cded057](https://github.com/w5s/project-config/commit/cded057))
|
|
13
|
+
|
|
6
14
|
## 1.0.0-alpha.42 (2023-02-10)
|
|
7
15
|
|
|
8
16
|
- ✨ Configure @w5s/conventional-changelog ([b19e437](https://github.com/w5s/project-config/commit/b19e437))
|
package/bootstrap/index.js
CHANGED
|
@@ -29,11 +29,11 @@ function task({ mrmPreset, mrmTask, packageManager }) {
|
|
|
29
29
|
|
|
30
30
|
npm.bootstrap(packageManager);
|
|
31
31
|
|
|
32
|
-
npm.dependency({
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
});
|
|
32
|
+
// npm.dependency({
|
|
33
|
+
// dev: true,
|
|
34
|
+
// name: ['mrm', mrmPreset],
|
|
35
|
+
// state: 'present',
|
|
36
|
+
// });
|
|
37
37
|
|
|
38
38
|
pkg.withPackageJson((packageFile) => {
|
|
39
39
|
const currentPackageManager = pkg.manager(packageFile);
|
|
@@ -47,7 +47,7 @@ function task({ mrmPreset, mrmTask, packageManager }) {
|
|
|
47
47
|
pkg.script(packageFile, {
|
|
48
48
|
name: 'mrm',
|
|
49
49
|
state: 'present',
|
|
50
|
-
default: `mrm --preset ${mrmPreset}`,
|
|
50
|
+
default: `npm exec --package=mrm --package=${mrmPreset} -- mrm --preset ${mrmPreset}`,
|
|
51
51
|
});
|
|
52
52
|
});
|
|
53
53
|
}
|
package/core/commitlint.js
CHANGED
|
@@ -23,13 +23,13 @@ function commitlint({ state, preset }) {
|
|
|
23
23
|
|
|
24
24
|
gitHook({
|
|
25
25
|
name: 'commit-msg',
|
|
26
|
-
content: 'npm exec --
|
|
26
|
+
content: 'npm exec -- commitlint --edit $1',
|
|
27
27
|
state,
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
npm.dependency({
|
|
31
31
|
dev: true,
|
|
32
|
-
name: [
|
|
32
|
+
name: [preset],
|
|
33
33
|
state,
|
|
34
34
|
});
|
|
35
35
|
}
|
package/core/githooks.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
const { execSync } = require('node:child_process');
|
|
2
2
|
const path = require('node:path');
|
|
3
|
-
const { file,
|
|
3
|
+
const { file, makeDirs } = require('mrm-core');
|
|
4
4
|
const project = require('./project.js');
|
|
5
5
|
const npm = require('./npm.js');
|
|
6
6
|
const pkg = require('./pkg.js');
|
|
7
7
|
const block = require('./block.js');
|
|
8
8
|
|
|
9
|
+
const hookDirectory = '.githooks';
|
|
10
|
+
|
|
9
11
|
/**
|
|
10
12
|
* @param {{
|
|
11
13
|
* state: 'present'|'absent',
|
|
@@ -17,21 +19,14 @@ function husky({ state }) {
|
|
|
17
19
|
npm.dependency({
|
|
18
20
|
dev: true,
|
|
19
21
|
name: ['husky'],
|
|
20
|
-
state:
|
|
22
|
+
state: 'absent',
|
|
21
23
|
});
|
|
22
|
-
if (hasHusky) {
|
|
23
|
-
npm.dependency({
|
|
24
|
-
dev: true,
|
|
25
|
-
name: ['is-ci'],
|
|
26
|
-
state: 'present',
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
24
|
|
|
30
25
|
pkg.withPackageJson((packageFile) => {
|
|
31
26
|
pkg.script(packageFile, {
|
|
32
|
-
name: `${project.prepare}:
|
|
27
|
+
name: `${project.prepare}:githooks`,
|
|
33
28
|
state: hasHusky ? 'present' : 'absent',
|
|
34
|
-
update:
|
|
29
|
+
update: `[ -n "\${CI:-}" ] || npx husky install ${hookDirectory}`,
|
|
35
30
|
});
|
|
36
31
|
});
|
|
37
32
|
}
|
|
@@ -44,10 +39,7 @@ function husky({ state }) {
|
|
|
44
39
|
* }} options
|
|
45
40
|
*/
|
|
46
41
|
function gitHook({ name, state, content }) {
|
|
47
|
-
const
|
|
48
|
-
const hasHusky = pkg.hasDependency(packageFileDefault, 'husky', 'dev');
|
|
49
|
-
const hasGitHook = hasHusky && state === 'present';
|
|
50
|
-
const hookDirectory = '.husky';
|
|
42
|
+
const hasGitHook = state === 'present';
|
|
51
43
|
const hookFileName = path.join(hookDirectory, name);
|
|
52
44
|
if (hasGitHook) {
|
|
53
45
|
makeDirs(hookDirectory);
|
package/githooks/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@w5s/mrm-preset",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.43",
|
|
4
4
|
"description": "Mrm configuration presets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mrm",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/debug": "4.1.7",
|
|
46
|
-
"mrm": "4.1.13"
|
|
46
|
+
"mrm": "4.1.13",
|
|
47
|
+
"mrm-preset-default": "4.1.11"
|
|
47
48
|
},
|
|
48
49
|
"engines": {
|
|
49
50
|
"node": ">=16.0.0"
|
|
@@ -51,5 +52,5 @@
|
|
|
51
52
|
"publishConfig": {
|
|
52
53
|
"access": "public"
|
|
53
54
|
},
|
|
54
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "ace7dcdd3244c34b38de66da80347ca16e59838d"
|
|
55
56
|
}
|
package/postconfigure/index.js
CHANGED
|
@@ -2,8 +2,16 @@ const { spawnSync } = require('node:child_process');
|
|
|
2
2
|
const { packageJson } = require('mrm-core');
|
|
3
3
|
const project = require('../core/project.js');
|
|
4
4
|
const pkg = require('../core/pkg.js');
|
|
5
|
+
const npm = require('../core/npm.js');
|
|
5
6
|
|
|
6
7
|
function task() {
|
|
8
|
+
// Remove old deps
|
|
9
|
+
npm.dependency({
|
|
10
|
+
dev: true,
|
|
11
|
+
name: ['is-ci', '@commitlint/cli', 'lint-staged', 'mrm'],
|
|
12
|
+
state: 'absent',
|
|
13
|
+
});
|
|
14
|
+
|
|
7
15
|
const packageFile = packageJson();
|
|
8
16
|
const packageManager = pkg.manager(packageFile);
|
|
9
17
|
const formatResult = spawnSync(packageManager, ['run', project.format]);
|
package/release/index.js
CHANGED
|
@@ -10,7 +10,8 @@ function task() {
|
|
|
10
10
|
pkg.withPackageJson((packageFile) => {
|
|
11
11
|
pkg.script(packageFile, {
|
|
12
12
|
name: project.release,
|
|
13
|
-
|
|
13
|
+
// eslint-disable-next-line no-template-curly-in-string
|
|
14
|
+
update: useWorkspace ? '[ -n "${CI:-}" ] && lerna publish --yes || lerna publish' : semanticRelease.command(),
|
|
14
15
|
state: 'present',
|
|
15
16
|
});
|
|
16
17
|
});
|
package/.turbo/turbo-build.log
DELETED
package/.turbo/turbo-format.log
DELETED
package/.turbo/turbo-lint.log
DELETED
package/.turbo/turbo-test.log
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
[src]
|
|
2
|
-
[src] > @w5s/mrm-preset@1.0.0-alpha.41 test:src
|
|
3
|
-
[src] > mkdir _tester; cd _tester; mrm bootstrap --dir ..; mrm configure --dir ..
|
|
4
|
-
[src]
|
|
5
|
-
[src] mkdir: _tester: File exists
|
|
6
|
-
[src] [36mRunning bootstrap...[39m
|
|
7
|
-
[src] [33mRunning alias configure...[39m
|
|
8
|
-
[src] [36mRunning gitignore...[39m
|
|
9
|
-
[src] [36mRunning project...[39m
|
|
10
|
-
[src] [32mUpdate turbo.json[39m
|
|
11
|
-
[src] [36mRunning contributing...[39m
|
|
12
|
-
[src] [36mRunning licenses...[39m
|
|
13
|
-
[src] [36mRunning release...[39m
|
|
14
|
-
[src] [36mRunning ci...[39m
|
|
15
|
-
[src] [36mRunning lang...[39m
|
|
16
|
-
[src] [32mUpdate tsconfig.json[39m
|
|
17
|
-
[src] [36mRunning commitlint...[39m
|
|
18
|
-
[src] [32mUpdate .vscode/extensions.json[39m
|
|
19
|
-
[src] [36mRunning editorconfig...[39m
|
|
20
|
-
[src] [36mRunning eslint...[39m
|
|
21
|
-
[src] [36mRunning cspell...[39m
|
|
22
|
-
[src] [32mUpdate .cspell.json[39m
|
|
23
|
-
[src] [36mRunning jest...[39m
|
|
24
|
-
[src] [36mRunning renovate...[39m
|
|
25
|
-
[src] [36mRunning githooks...[39m
|
|
26
|
-
[src] [36mRunning postconfigure...[39m
|
|
27
|
-
[src] npm run test:src exited with code 0
|