@w5s/mrm-preset 1.0.0-alpha.42 → 1.0.0-alpha.44
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 +1 -1
- package/.turbo/turbo-docs.log +9 -0
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +1 -1
- package/CHANGELOG.md +13 -0
- package/bootstrap/README.md +1 -1
- package/bootstrap/index.js +7 -9
- 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-format.log +0 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
✔ README.md Updated
|
|
2
|
+
Transforms run
|
|
3
|
+
⁕ PKG_JSON:template=# W5s Mrm Preset _(${name})_
|
|
4
|
+
⁕ PKG_JSON:template=> ${description}&unknownTxt=
|
|
5
|
+
⁕ PKG_JSON:template=[${license}][license-url] © ${author}
|
|
6
|
+
⁕ PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
|
|
7
|
+
⁕ PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}
|
|
8
|
+
⁕ PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
|
|
9
|
+
|
package/.turbo/turbo-lint.log
CHANGED
package/.turbo/turbo-test.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
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.44 (2023-02-28)
|
|
7
|
+
|
|
8
|
+
- ✨ Use always latest mrm preset ([abf6c51](https://github.com/w5s/project-config/commit/abf6c51))
|
|
9
|
+
- 👷 Update mrm presets ([4a56dbc](https://github.com/w5s/project-config/commit/4a56dbc))
|
|
10
|
+
|
|
11
|
+
## 1.0.0-alpha.43 (2023-02-23)
|
|
12
|
+
|
|
13
|
+
- ✨ Improve mrm bootstrap script ([0445277](https://github.com/w5s/project-config/commit/0445277))
|
|
14
|
+
- ➖ Remove is-ci, lint-staged, commitlint dependency (used through npx) ([ae39f34](https://github.com/w5s/project-config/commit/ae39f34))
|
|
15
|
+
- ➖ Remove mrm dependency ([7ee3d94](https://github.com/w5s/project-config/commit/7ee3d94))
|
|
16
|
+
- 🐛 Fix unbound variable error ([d2aa040](https://github.com/w5s/project-config/commit/d2aa040))
|
|
17
|
+
- 💚 Fix ci ([cded057](https://github.com/w5s/project-config/commit/cded057))
|
|
18
|
+
|
|
6
19
|
## 1.0.0-alpha.42 (2023-02-10)
|
|
7
20
|
|
|
8
21
|
- ✨ Configure @w5s/conventional-changelog ([b19e437](https://github.com/w5s/project-config/commit/b19e437))
|
package/bootstrap/README.md
CHANGED
package/bootstrap/index.js
CHANGED
|
@@ -29,25 +29,23 @@ 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
|
-
const currentPackageManager = pkg.manager(packageFile);
|
|
40
|
-
|
|
41
39
|
// Add MRM default scripts
|
|
42
40
|
pkg.script(packageFile, {
|
|
43
41
|
name: 'configure',
|
|
44
42
|
state: 'present',
|
|
45
|
-
default:
|
|
43
|
+
default: `npm run mrm -- ${mrmTask}`,
|
|
46
44
|
});
|
|
47
45
|
pkg.script(packageFile, {
|
|
48
46
|
name: 'mrm',
|
|
49
47
|
state: 'present',
|
|
50
|
-
default: `mrm --preset ${mrmPreset}`,
|
|
48
|
+
default: `npm exec --package=mrm --package=${mrmPreset}@latest -- mrm --preset ${mrmPreset}`,
|
|
51
49
|
});
|
|
52
50
|
});
|
|
53
51
|
}
|
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.44",
|
|
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": "5796f2161110005d806c8991c8497f6f0dab74c1"
|
|
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
|
});
|