@w5s/mrm-preset 1.0.0-alpha.15 → 1.0.0-alpha.18
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 -0
- package/.turbo/turbo-docs.log +43 -0
- package/.turbo/turbo-format.log +1 -0
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +20 -0
- package/CHANGELOG.md +27 -0
- package/bootstrap/index.js +3 -3
- package/ci/_gitlab/AutoDevopsInclude.gitlab-ci.yml +2 -0
- package/ci/github.js +2 -2
- package/ci/index.js +4 -4
- package/commitlint/index.js +5 -2
- package/core/commitlint.js +3 -3
- package/core/cspell.js +1 -1
- package/core/eslint.js +25 -6
- package/core/git.js +2 -2
- package/core/githooks.js +4 -4
- package/core/jest.js +3 -3
- package/core/jsonFile.js +8 -7
- package/core/lintStaged.js +3 -3
- package/core/pkg.js +1 -1
- package/core/semanticRelease.js +3 -3
- package/core/turbo.js +3 -3
- package/core/typedoc.js +3 -3
- package/cspell/index.js +3 -3
- package/editorconfig/index.js +1 -1
- package/eslint/index.js +17 -12
- package/githooks/index.js +6 -6
- package/gitignore/index.js +1 -1
- package/jest/index.js +1 -1
- package/lang/index.js +9 -11
- package/package.json +2 -2
- package/postconfigure/index.js +2 -2
- package/project/index.js +15 -10
- package/release/index.js +3 -3
- package/renovate/index.js +1 -1
- package/tsconfig.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@w5s/mrm-preset:build: cache hit, replaying output faa3bdd70e66c4d8
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@w5s/mrm-preset:docs: cache hit, replaying output 28c9b96eaccdecc6
|
|
2
|
+
@w5s/mrm-preset:docs: Starting markdown-magic [ '**/*.md', '!node_modules/**' ]
|
|
3
|
+
@w5s/mrm-preset:docs: ℹ Notice:
|
|
4
|
+
@w5s/mrm-preset:docs: Missing transforms "BASIC_RULES","JSX_RULES" in _tester/node_modules/eslint-plugin-react/README.md
|
|
5
|
+
@w5s/mrm-preset:docs:
|
|
6
|
+
@w5s/mrm-preset:docs: ✔ README.md Updated
|
|
7
|
+
@w5s/mrm-preset:docs: Transforms run
|
|
8
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=# W5s Mrm Preset _(${name})_
|
|
9
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=> ${description}&unknownTxt=
|
|
10
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=[${license}][license-url] © ${author}
|
|
11
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
|
|
12
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
|
|
13
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
|
|
14
|
+
@w5s/mrm-preset:docs:
|
|
15
|
+
@w5s/mrm-preset:docs: ✔ _tester/node_modules/@w5s/mrm-preset/README.md Updated
|
|
16
|
+
@w5s/mrm-preset:docs: Transforms run
|
|
17
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=# W5s Mrm Preset _(${name})_
|
|
18
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=> ${description}&unknownTxt=
|
|
19
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=[${license}][license-url] © ${author}
|
|
20
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
|
|
21
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
|
|
22
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
|
|
23
|
+
@w5s/mrm-preset:docs:
|
|
24
|
+
@w5s/mrm-preset:docs: ✔ _tester/node_modules/@w5s/eslint-config/README.md Updated
|
|
25
|
+
@w5s/mrm-preset:docs: Transforms run
|
|
26
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=# W5s ESLint configuration _(${name})_
|
|
27
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=> ${description}&unknownTxt=
|
|
28
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=```console\nnpm install --save-dev ${name}\n```
|
|
29
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=[${license}][license-url] © ${author}
|
|
30
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
|
|
31
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
|
|
32
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
|
|
33
|
+
@w5s/mrm-preset:docs:
|
|
34
|
+
@w5s/mrm-preset:docs: ✔ _tester/node_modules/@w5s/ts-config/README.md Updated
|
|
35
|
+
@w5s/mrm-preset:docs: Transforms run
|
|
36
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=# W5s Typescript configuration _(${name})_
|
|
37
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=> ${description}&unknownTxt=
|
|
38
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=```console\nnpm install --save-dev ${name}\n```
|
|
39
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=[${license}][license-url] © ${author}
|
|
40
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
|
|
41
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
|
|
42
|
+
@w5s/mrm-preset:docs: ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
|
|
43
|
+
@w5s/mrm-preset:docs:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@w5s/mrm-preset:format: cache hit, replaying output [2m1d31136f1b35d64c[0m
|
package/.turbo/turbo-lint.log
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@w5s/mrm-preset:lint: cache hit, replaying output
|
|
1
|
+
@w5s/mrm-preset:lint: cache hit, replaying output 687f5b7a70c1d1ce
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@w5s/mrm-preset:test: cache hit, replaying output 78432cf2c01c55eb
|
|
2
|
+
@w5s/mrm-preset:test: mkdir: _tester: File exists
|
|
3
|
+
@w5s/mrm-preset:test: [36mRunning bootstrap...[39m
|
|
4
|
+
@w5s/mrm-preset:test: [33mRunning alias configure...[39m
|
|
5
|
+
@w5s/mrm-preset:test: [36mRunning gitignore...[39m
|
|
6
|
+
@w5s/mrm-preset:test: [36mRunning project...[39m
|
|
7
|
+
@w5s/mrm-preset:test: [32mUpdate package.json[39m
|
|
8
|
+
@w5s/mrm-preset:test: [36mRunning contributing...[39m
|
|
9
|
+
@w5s/mrm-preset:test: [36mRunning release...[39m
|
|
10
|
+
@w5s/mrm-preset:test: [36mRunning ci...[39m
|
|
11
|
+
@w5s/mrm-preset:test: [36mRunning lang...[39m
|
|
12
|
+
@w5s/mrm-preset:test: [36mRunning commitlint...[39m
|
|
13
|
+
@w5s/mrm-preset:test: [36mRunning editorconfig...[39m
|
|
14
|
+
@w5s/mrm-preset:test: [36mRunning eslint...[39m
|
|
15
|
+
@w5s/mrm-preset:test: [36mRunning cspell...[39m
|
|
16
|
+
@w5s/mrm-preset:test: [36mRunning jest...[39m
|
|
17
|
+
@w5s/mrm-preset:test: [32mUpdate package.json[39m
|
|
18
|
+
@w5s/mrm-preset:test: [36mRunning renovate...[39m
|
|
19
|
+
@w5s/mrm-preset:test: [36mRunning githooks...[39m
|
|
20
|
+
@w5s/mrm-preset:test: [36mRunning postconfigure...[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
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.18](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.17...@w5s/mrm-preset@1.0.0-alpha.18) (2022-06-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @w5s/mrm-preset
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.0.0-alpha.17](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.16...@w5s/mrm-preset@1.0.0-alpha.17) (2022-06-23)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @w5s/mrm-preset
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [1.0.0-alpha.16](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.15...@w5s/mrm-preset@1.0.0-alpha.16) (2022-06-16)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* correct require extension eslint rule ([94798d6](https://github.com/w5s/project-config/commit/94798d6579b93d92f44021f9f77971994ca5ce5e))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
# [1.0.0-alpha.15](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.14...@w5s/mrm-preset@1.0.0-alpha.15) (2022-06-15)
|
|
7
34
|
|
|
8
35
|
|
package/bootstrap/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const { packageJson, file } = require('mrm-core');
|
|
4
|
-
const npm = require('../core/npm');
|
|
5
|
-
const pkg = require('../core/pkg');
|
|
6
|
-
const { gitIgnoreTemplate } = require('../core/git');
|
|
4
|
+
const npm = require('../core/npm.js');
|
|
5
|
+
const pkg = require('../core/pkg.js');
|
|
6
|
+
const { gitIgnoreTemplate } = require('../core/git.js');
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @param {{
|
package/ci/github.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable global-require, sort-keys-fix/sort-keys-fix */
|
|
2
2
|
const { packageJson } = require('mrm-core');
|
|
3
|
-
const githubCI = require('../core/githubCI');
|
|
4
|
-
const pkg = require('../core/pkg');
|
|
3
|
+
const githubCI = require('../core/githubCI.js');
|
|
4
|
+
const pkg = require('../core/pkg.js');
|
|
5
5
|
|
|
6
6
|
function task() {
|
|
7
7
|
const state = 'present';
|
package/ci/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const gitlabCI = require('../core/gitlabCI');
|
|
2
|
-
const githubCI = require('../core/githubCI');
|
|
3
|
-
const gitlab = require('./gitlab');
|
|
4
|
-
const github = require('./github');
|
|
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');
|
|
5
5
|
|
|
6
6
|
function task() {
|
|
7
7
|
// check gitlab support
|
package/commitlint/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
const {
|
|
2
|
-
const {
|
|
1
|
+
const { vscodeRecommendedExtension } = require('../core/vscode.js');
|
|
2
|
+
const { commitlint } = require('../core/commitlint.js');
|
|
3
|
+
const { hasGit } = require('../core/git.js');
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
*
|
|
@@ -21,6 +22,8 @@ function createCommitLint({ commitLintPreset: commitLintPresetDefault }) {
|
|
|
21
22
|
preset: commitLintPreset,
|
|
22
23
|
state: gitPresent ? 'present' : 'absent',
|
|
23
24
|
});
|
|
25
|
+
|
|
26
|
+
vscodeRecommendedExtension(['seatonjiang.gitmoji-vscode']);
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
task.description = 'Setup CommitLint';
|
package/core/commitlint.js
CHANGED
package/core/cspell.js
CHANGED
package/core/eslint.js
CHANGED
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
const { packageJson } = require('mrm-core');
|
|
2
|
-
|
|
2
|
+
const jsonFile = require('./jsonFile.js');
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {import('eslint').Linter.Config} ESLintConfig
|
|
5
|
+
*/
|
|
3
6
|
/**
|
|
4
|
-
* @param {
|
|
7
|
+
* @param {{
|
|
8
|
+
* state: 'present'|'absent',
|
|
9
|
+
* update: (config: ESLintConfig) => ESLintConfig
|
|
10
|
+
* }} config
|
|
5
11
|
*/
|
|
6
|
-
function eslintConfig(
|
|
12
|
+
function eslintConfig({ state, update }) {
|
|
7
13
|
const packageFile = packageJson();
|
|
8
|
-
|
|
14
|
+
|
|
15
|
+
jsonFile.value(packageFile, {
|
|
16
|
+
path: 'eslintConfig',
|
|
17
|
+
state,
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
update,
|
|
20
|
+
/** @type {ESLintConfig} */
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
default: {},
|
|
23
|
+
});
|
|
24
|
+
|
|
9
25
|
packageFile.save();
|
|
10
26
|
}
|
|
11
|
-
exports.eslintConfig = eslintConfig;
|
|
12
27
|
|
|
13
28
|
/**
|
|
14
29
|
*
|
|
@@ -19,4 +34,8 @@ function eslintIgnore(ignorePatterns) {
|
|
|
19
34
|
packageFile.merge({ eslintIgnore: ignorePatterns });
|
|
20
35
|
packageFile.save();
|
|
21
36
|
}
|
|
22
|
-
|
|
37
|
+
|
|
38
|
+
module.exports = {
|
|
39
|
+
eslintConfig,
|
|
40
|
+
eslintIgnore,
|
|
41
|
+
};
|
package/core/git.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { file, ini } = require('mrm-core');
|
|
2
|
-
const block = require('./block');
|
|
2
|
+
const block = require('./block.js');
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
@@ -69,7 +69,7 @@ exports.gitIgnore = gitIgnore;
|
|
|
69
69
|
*/
|
|
70
70
|
function gitIgnoreTemplate(flags) {
|
|
71
71
|
// eslint-disable-next-line global-require, import/no-dynamic-require
|
|
72
|
-
const templateMap = require('./git.ignore');
|
|
72
|
+
const templateMap = require('./git.ignore.js');
|
|
73
73
|
|
|
74
74
|
flags.forEach((flag) => {
|
|
75
75
|
// @ts-ignore
|
package/core/githooks.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const { execSync } = require('child_process');
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const { file, packageJson, makeDirs } = require('mrm-core');
|
|
4
|
-
const project = require('./project');
|
|
5
|
-
const npm = require('./npm');
|
|
6
|
-
const pkg = require('./pkg');
|
|
7
|
-
const block = require('./block');
|
|
4
|
+
const project = require('./project.js');
|
|
5
|
+
const npm = require('./npm.js');
|
|
6
|
+
const pkg = require('./pkg.js');
|
|
7
|
+
const block = require('./block.js');
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @param {{
|
package/core/jest.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable no-template-curly-in-string */
|
|
2
2
|
const { packageJson } = require('mrm-core');
|
|
3
|
-
const pkg = require('./pkg');
|
|
4
|
-
const npm = require('./npm');
|
|
5
|
-
const project = require('./project');
|
|
3
|
+
const pkg = require('./pkg.js');
|
|
4
|
+
const npm = require('./npm.js');
|
|
5
|
+
const project = require('./project.js');
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @param {{
|
package/core/jsonFile.js
CHANGED
|
@@ -41,16 +41,17 @@ function setValue(jsonFile, path, pathValue) {
|
|
|
41
41
|
*/
|
|
42
42
|
function value(jsonFile, { state, path, default: defaultValue, update: nextValue }) {
|
|
43
43
|
if (state === 'present') {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
let currentValue = getValue(jsonFile, path);
|
|
45
|
+
|
|
46
|
+
if (currentValue == null) {
|
|
47
|
+
currentValue = typeof defaultValue === 'function' ? defaultValue() : defaultValue;
|
|
48
|
+
if (currentValue != null) {
|
|
49
|
+
setValue(jsonFile, path, currentValue);
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
52
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const resolvedValue = typeof defaultValue === 'function' ? defaultValue() : defaultValue;
|
|
53
|
+
if (nextValue != null) {
|
|
54
|
+
const resolvedValue = typeof nextValue === 'function' ? nextValue(getValue(jsonFile, path)) : nextValue;
|
|
54
55
|
if (resolvedValue != null) {
|
|
55
56
|
setValue(jsonFile, path, resolvedValue);
|
|
56
57
|
}
|
package/core/lintStaged.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const pkg = require('./pkg');
|
|
2
|
-
const npm = require('./npm');
|
|
3
|
-
const jsonFile = require('./jsonFile');
|
|
1
|
+
const pkg = require('./pkg.js');
|
|
2
|
+
const npm = require('./npm.js');
|
|
3
|
+
const jsonFile = require('./jsonFile.js');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @typedef {Record<string, string|string[]>} LintStagedConfig
|
package/core/pkg.js
CHANGED
|
@@ -6,7 +6,7 @@ const { intersect } = require('semver-intersect');
|
|
|
6
6
|
const { packageJson, file, json } = require('mrm-core');
|
|
7
7
|
const glob = require('glob');
|
|
8
8
|
const path = require('path');
|
|
9
|
-
const jsonFile = require('./jsonFile');
|
|
9
|
+
const jsonFile = require('./jsonFile.js');
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* An empty placeholder for npm script
|
package/core/semanticRelease.js
CHANGED
package/core/turbo.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { packageJson, json } = require('mrm-core');
|
|
2
|
-
const pkg = require('./pkg');
|
|
3
|
-
const npm = require('./npm');
|
|
4
|
-
const jsonFile = require('./jsonFile');
|
|
2
|
+
const pkg = require('./pkg.js');
|
|
3
|
+
const npm = require('./npm.js');
|
|
4
|
+
const jsonFile = require('./jsonFile.js');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @typedef {{
|
package/core/typedoc.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { packageJson, json } = require('mrm-core');
|
|
2
|
-
const pkg = require('./pkg');
|
|
3
|
-
const npm = require('./npm');
|
|
4
|
-
const jsonFile = require('./jsonFile');
|
|
2
|
+
const pkg = require('./pkg.js');
|
|
3
|
+
const npm = require('./npm.js');
|
|
4
|
+
const jsonFile = require('./jsonFile.js');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @typedef {{
|
package/cspell/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const { cspell } = require('../core/cspell');
|
|
2
|
-
const project = require('../core/project');
|
|
3
|
-
const pkg = require('../core/pkg');
|
|
1
|
+
const { cspell } = require('../core/cspell.js');
|
|
2
|
+
const project = require('../core/project.js');
|
|
3
|
+
const pkg = require('../core/pkg.js');
|
|
4
4
|
|
|
5
5
|
function task() {
|
|
6
6
|
cspell({
|
package/editorconfig/index.js
CHANGED
package/eslint/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const { packageJson } = require('mrm-core');
|
|
2
|
-
const pkg = require('../core/pkg');
|
|
3
|
-
const npm = require('../core/npm');
|
|
4
|
-
const { gitIgnore } = require('../core/git');
|
|
5
|
-
const { eslintIgnore, eslintConfig } = require('../core/eslint');
|
|
6
|
-
const project = require('../core/project');
|
|
7
|
-
const { vscodeSettings } = require('../core/vscode');
|
|
2
|
+
const pkg = require('../core/pkg.js');
|
|
3
|
+
const npm = require('../core/npm.js');
|
|
4
|
+
const { gitIgnore } = require('../core/git.js');
|
|
5
|
+
const { eslintIgnore, eslintConfig } = require('../core/eslint.js');
|
|
6
|
+
const project = require('../core/project.js');
|
|
7
|
+
const { vscodeSettings } = require('../core/vscode.js');
|
|
8
8
|
|
|
9
9
|
function createESLint({ eslintPreset: eslintPresetDefault = 'eslint:recommended' }) {
|
|
10
10
|
/**
|
|
@@ -55,11 +55,16 @@ function createESLint({ eslintPreset: eslintPresetDefault = 'eslint:recommended'
|
|
|
55
55
|
state: !eslintPreset.startsWith('eslint:') ? 'present' : 'absent',
|
|
56
56
|
});
|
|
57
57
|
eslintConfig({
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
state: 'present',
|
|
59
|
+
update: (config) => ({
|
|
60
|
+
...config,
|
|
61
|
+
extends: [eslintPreset],
|
|
62
|
+
rules: eslintRules,
|
|
63
|
+
parserOptions: {
|
|
64
|
+
project: hasTypescript ? './tsconfig.json' : undefined,
|
|
65
|
+
...config.parserOptions,
|
|
66
|
+
},
|
|
67
|
+
}),
|
|
63
68
|
});
|
|
64
69
|
|
|
65
70
|
/** @type {Record<string, boolean>} */
|
|
@@ -122,7 +127,7 @@ function createESLint({ eslintPreset: eslintPresetDefault = 'eslint:recommended'
|
|
|
122
127
|
});
|
|
123
128
|
pkg.script(packageFile, {
|
|
124
129
|
name: project.format,
|
|
125
|
-
script: `eslint .
|
|
130
|
+
script: `eslint . --fix${extOption}`,
|
|
126
131
|
state: 'default',
|
|
127
132
|
});
|
|
128
133
|
});
|
package/githooks/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { packageJson, template } = require('mrm-core');
|
|
3
|
-
const project = require('../core/project');
|
|
4
|
-
const pkg = require('../core/pkg');
|
|
5
|
-
const { hasGit } = require('../core/git');
|
|
6
|
-
const { gitHook, husky } = require('../core/githooks');
|
|
7
|
-
const { lintStaged } = require('../core/lintStaged');
|
|
8
|
-
const { file } = require('../core/file');
|
|
3
|
+
const project = require('../core/project.js');
|
|
4
|
+
const pkg = require('../core/pkg.js');
|
|
5
|
+
const { hasGit } = require('../core/git.js');
|
|
6
|
+
const { gitHook, husky } = require('../core/githooks.js');
|
|
7
|
+
const { lintStaged } = require('../core/lintStaged.js');
|
|
8
|
+
const { file } = require('../core/file.js');
|
|
9
9
|
|
|
10
10
|
function task() {
|
|
11
11
|
const gitSupported = hasGit();
|
package/gitignore/index.js
CHANGED
package/jest/index.js
CHANGED
package/lang/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { json, file, template, packageJson } = require('mrm-core');
|
|
3
|
-
const npm = require('../core/npm');
|
|
4
|
-
const { gitIgnore } = require('../core/git');
|
|
5
|
-
const project = require('../core/project');
|
|
6
|
-
const { eslintIgnore } = require('../core/eslint');
|
|
7
|
-
const { typedoc } = require('../core/typedoc');
|
|
8
|
-
const pkg = require('../core/pkg');
|
|
3
|
+
const npm = require('../core/npm.js');
|
|
4
|
+
const { gitIgnore } = require('../core/git.js');
|
|
5
|
+
const project = require('../core/project.js');
|
|
6
|
+
const { eslintIgnore } = require('../core/eslint.js');
|
|
7
|
+
const { typedoc } = require('../core/typedoc.js');
|
|
8
|
+
const pkg = require('../core/pkg.js');
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
*
|
|
@@ -37,16 +37,15 @@ function createLang({ language: languageDefault = 'typescript', tsConfig: tsConf
|
|
|
37
37
|
gitIgnore('Typescript', ['lib/', '*.tsbuildinfo', 'typings/']);
|
|
38
38
|
eslintIgnore(['lib/']);
|
|
39
39
|
|
|
40
|
-
const excludeList = ['**/*.test.*', '**/*.spec.*', '**/__tests__/**'];
|
|
40
|
+
// const excludeList = ['**/*.test.*', '**/*.spec.*', '**/__tests__/**'];
|
|
41
41
|
if (hasWorkspaces) {
|
|
42
42
|
tsConfig
|
|
43
43
|
.unset('compilerOptions.rootDir')
|
|
44
44
|
.unset('compilerOptions.outDir')
|
|
45
45
|
.unset('include')
|
|
46
46
|
.merge({
|
|
47
|
-
$schema: 'https://json.schemastore.org/tsconfig',
|
|
47
|
+
$schema: 'https://json.schemastore.org/tsconfig.json',
|
|
48
48
|
extends: `./${tsConfigSettingsName}`,
|
|
49
|
-
exclude: excludeList,
|
|
50
49
|
})
|
|
51
50
|
.save();
|
|
52
51
|
|
|
@@ -55,7 +54,7 @@ function createLang({ language: languageDefault = 'typescript', tsConfig: tsConf
|
|
|
55
54
|
} else {
|
|
56
55
|
tsConfigSettings
|
|
57
56
|
.merge({
|
|
58
|
-
$schema: 'https://json.schemastore.org/tsconfig',
|
|
57
|
+
$schema: 'https://json.schemastore.org/tsconfig.json',
|
|
59
58
|
compilerOptions: {},
|
|
60
59
|
extends: tsConfigPreset,
|
|
61
60
|
})
|
|
@@ -68,7 +67,6 @@ function createLang({ language: languageDefault = 'typescript', tsConfig: tsConf
|
|
|
68
67
|
},
|
|
69
68
|
extends: `./${tsConfigSettingsName}`,
|
|
70
69
|
include: ['./src'],
|
|
71
|
-
exclude: excludeList,
|
|
72
70
|
})
|
|
73
71
|
.save();
|
|
74
72
|
|
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.18",
|
|
4
4
|
"description": "Mrm configuration presets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mrm",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "d6e3c3ee14c3ead509432ae962708c90342edd25"
|
|
51
51
|
}
|
package/postconfigure/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { spawnSync } = require('child_process');
|
|
2
2
|
const { packageJson } = require('mrm-core');
|
|
3
|
-
const project = require('../core/project');
|
|
4
|
-
const pkg = require('../core/pkg');
|
|
3
|
+
const project = require('../core/project.js');
|
|
4
|
+
const pkg = require('../core/pkg.js');
|
|
5
5
|
|
|
6
6
|
function task() {
|
|
7
7
|
const packageFile = packageJson();
|
package/project/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const { packageJson, json, makeDirs } = require('mrm-core');
|
|
2
|
-
const git = require('../core/git');
|
|
3
|
-
const pkg = require('../core/pkg');
|
|
4
|
-
const npm = require('../core/npm');
|
|
5
|
-
const { vscodeTask } = require('../core/vscode');
|
|
6
|
-
const project = require('../core/project');
|
|
2
|
+
const git = require('../core/git.js');
|
|
3
|
+
const pkg = require('../core/pkg.js');
|
|
4
|
+
const npm = require('../core/npm.js');
|
|
5
|
+
const { vscodeTask } = require('../core/vscode.js');
|
|
6
|
+
const project = require('../core/project.js');
|
|
7
7
|
const mrmPackageJson = require('../package.json');
|
|
8
|
-
const { turbo } = require('../core/turbo');
|
|
8
|
+
const { turbo } = require('../core/turbo.js');
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
*
|
|
@@ -137,8 +137,8 @@ function task() {
|
|
|
137
137
|
});
|
|
138
138
|
pkg.script(packageFile, {
|
|
139
139
|
name: `${project.prepare}:empty`,
|
|
140
|
-
script:
|
|
141
|
-
state: '
|
|
140
|
+
script: pkg.emptyScript,
|
|
141
|
+
state: !useWorkspace ? 'present' : 'absent',
|
|
142
142
|
});
|
|
143
143
|
pkg.script(packageFile, {
|
|
144
144
|
name: `${project.prepare}:packages`,
|
|
@@ -168,19 +168,24 @@ function task() {
|
|
|
168
168
|
if (useWorkspace) {
|
|
169
169
|
const packages = ['packages/*'];
|
|
170
170
|
const versionIndependent = lernaConfig.get('version') === 'independent';
|
|
171
|
+
const gitmoji = true;
|
|
171
172
|
packageFile.merge({ workspaces: { packages } });
|
|
172
173
|
lernaConfig.merge({
|
|
174
|
+
$schema: 'https://json.schemastore.org/lerna.json',
|
|
173
175
|
command: {
|
|
174
176
|
publish: {
|
|
175
177
|
conventionalCommits: true,
|
|
176
178
|
npmClient: 'npm',
|
|
177
179
|
},
|
|
178
180
|
version: {
|
|
179
|
-
message:
|
|
181
|
+
message: gitmoji
|
|
182
|
+
? `🔖 Publish${versionIndependent ? '' : ' %s'}`
|
|
183
|
+
: `chore(release): publish${versionIndependent ? '' : ' %s'}`,
|
|
180
184
|
},
|
|
181
185
|
},
|
|
182
186
|
npmClient: packageManager,
|
|
183
187
|
useWorkspaces: useWorkspace,
|
|
188
|
+
changelogPreset: 'gitmoji-config',
|
|
184
189
|
});
|
|
185
190
|
lernaConfig.save();
|
|
186
191
|
makeDirs('packages');
|
|
@@ -238,7 +243,7 @@ function task() {
|
|
|
238
243
|
});
|
|
239
244
|
npm.dependency({
|
|
240
245
|
dev: true,
|
|
241
|
-
name: ['lerna'],
|
|
246
|
+
name: ['lerna', 'conventional-changelog-gitmoji-config'],
|
|
242
247
|
state: useWorkspace ? 'present' : 'absent',
|
|
243
248
|
});
|
|
244
249
|
|
package/release/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { packageJson } = require('mrm-core');
|
|
2
|
-
const pkg = require('../core/pkg');
|
|
3
|
-
const project = require('../core/project');
|
|
4
|
-
const { semanticRelease } = require('../core/semanticRelease');
|
|
2
|
+
const pkg = require('../core/pkg.js');
|
|
3
|
+
const project = require('../core/project.js');
|
|
4
|
+
const { semanticRelease } = require('../core/semanticRelease.js');
|
|
5
5
|
|
|
6
6
|
function task() {
|
|
7
7
|
const useWorkspace = packageJson().get('mrmConfig.packageArchetype') === 'workspace';
|
package/renovate/index.js
CHANGED
package/tsconfig.json
CHANGED