@w5s/mrm-preset 1.0.0-alpha.14 → 1.0.0-alpha.17
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 +43 -43
- package/.turbo/turbo-format.log +1 -1
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +20 -21
- package/CHANGELOG.md +30 -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 +16 -21
- 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 +16 -11
- package/githooks/index.js +6 -6
- package/gitignore/index.js +1 -1
- package/jest/index.js +1 -1
- package/lang/index.js +9 -8
- package/package.json +2 -2
- package/postconfigure/index.js +2 -2
- package/project/index.js +13 -8
- package/release/index.js +3 -3
- package/renovate/index.js +1 -1
- package/tsconfig.json +2 -2
- package/.turbo/turbo-spellcheck.log +0 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@w5s/mrm-preset:build: cache hit, replaying output
|
|
1
|
+
@w5s/mrm-preset:build: cache hit, replaying output [2ma8c8bdf6d4c74157[0m
|
package/.turbo/turbo-docs.log
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
@w5s/mrm-preset:docs: cache hit, replaying output
|
|
2
|
-
@w5s/mrm-preset:docs:
|
|
3
|
-
@w5s/mrm-preset:docs: ℹ Notice:
|
|
4
|
-
@w5s/mrm-preset:docs:
|
|
5
|
-
@w5s/mrm-preset:docs:
|
|
6
|
-
@w5s/mrm-preset:docs: ✔ README.md Updated
|
|
7
|
-
@w5s/mrm-preset:docs:
|
|
8
|
-
@w5s/mrm-preset:docs:
|
|
9
|
-
@w5s/mrm-preset:docs:
|
|
10
|
-
@w5s/mrm-preset:docs:
|
|
11
|
-
@w5s/mrm-preset:docs:
|
|
12
|
-
@w5s/mrm-preset:docs:
|
|
13
|
-
@w5s/mrm-preset:docs:
|
|
14
|
-
@w5s/mrm-preset:docs:
|
|
15
|
-
@w5s/mrm-preset:docs: ✔ _tester/node_modules/@w5s/mrm-preset/README.md Updated
|
|
16
|
-
@w5s/mrm-preset:docs:
|
|
17
|
-
@w5s/mrm-preset:docs:
|
|
18
|
-
@w5s/mrm-preset:docs:
|
|
19
|
-
@w5s/mrm-preset:docs:
|
|
20
|
-
@w5s/mrm-preset:docs:
|
|
21
|
-
@w5s/mrm-preset:docs:
|
|
22
|
-
@w5s/mrm-preset:docs:
|
|
23
|
-
@w5s/mrm-preset:docs:
|
|
24
|
-
@w5s/mrm-preset:docs: ✔ _tester/node_modules/@w5s/eslint-config/README.md Updated
|
|
25
|
-
@w5s/mrm-preset:docs:
|
|
26
|
-
@w5s/mrm-preset:docs:
|
|
27
|
-
@w5s/mrm-preset:docs:
|
|
28
|
-
@w5s/mrm-preset:docs:
|
|
29
|
-
@w5s/mrm-preset:docs:
|
|
30
|
-
@w5s/mrm-preset:docs:
|
|
31
|
-
@w5s/mrm-preset:docs:
|
|
32
|
-
@w5s/mrm-preset:docs:
|
|
33
|
-
@w5s/mrm-preset:docs:
|
|
34
|
-
@w5s/mrm-preset:docs: ✔ _tester/node_modules/@w5s/ts-config/README.md Updated
|
|
35
|
-
@w5s/mrm-preset:docs:
|
|
36
|
-
@w5s/mrm-preset:docs:
|
|
37
|
-
@w5s/mrm-preset:docs:
|
|
38
|
-
@w5s/mrm-preset:docs:
|
|
39
|
-
@w5s/mrm-preset:docs:
|
|
40
|
-
@w5s/mrm-preset:docs:
|
|
41
|
-
@w5s/mrm-preset:docs:
|
|
42
|
-
@w5s/mrm-preset:docs:
|
|
43
|
-
@w5s/mrm-preset:docs:
|
|
1
|
+
@w5s/mrm-preset:docs: cache hit, replaying output [2m4126cb459ae19810[0m
|
|
2
|
+
[32m@w5s/mrm-preset:docs: [0mStarting markdown-magic [ '**/*.md', '!node_modules/**' ]
|
|
3
|
+
[32m@w5s/mrm-preset:docs: [0mℹ Notice:
|
|
4
|
+
[32m@w5s/mrm-preset:docs: [0m Missing transforms "BASIC_RULES","JSX_RULES" in _tester/node_modules/eslint-plugin-react/README.md
|
|
5
|
+
[32m@w5s/mrm-preset:docs: [0m
|
|
6
|
+
[32m@w5s/mrm-preset:docs: [0m✔ README.md Updated
|
|
7
|
+
[32m@w5s/mrm-preset:docs: [0m Transforms run
|
|
8
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=# W5s Mrm Preset _(${name})_
|
|
9
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=> ${description}&unknownTxt=
|
|
10
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[${license}][license-url] © ${author}
|
|
11
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
|
|
12
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
|
|
13
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
|
|
14
|
+
[32m@w5s/mrm-preset:docs: [0m
|
|
15
|
+
[32m@w5s/mrm-preset:docs: [0m✔ _tester/node_modules/@w5s/mrm-preset/README.md Updated
|
|
16
|
+
[32m@w5s/mrm-preset:docs: [0m Transforms run
|
|
17
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=# W5s Mrm Preset _(${name})_
|
|
18
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=> ${description}&unknownTxt=
|
|
19
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[${license}][license-url] © ${author}
|
|
20
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
|
|
21
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
|
|
22
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
|
|
23
|
+
[32m@w5s/mrm-preset:docs: [0m
|
|
24
|
+
[32m@w5s/mrm-preset:docs: [0m✔ _tester/node_modules/@w5s/eslint-config/README.md Updated
|
|
25
|
+
[32m@w5s/mrm-preset:docs: [0m Transforms run
|
|
26
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=# W5s ESLint configuration _(${name})_
|
|
27
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=> ${description}&unknownTxt=
|
|
28
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=```console\nnpm install --save-dev ${name}\n```
|
|
29
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[${license}][license-url] © ${author}
|
|
30
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
|
|
31
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
|
|
32
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
|
|
33
|
+
[32m@w5s/mrm-preset:docs: [0m
|
|
34
|
+
[32m@w5s/mrm-preset:docs: [0m✔ _tester/node_modules/@w5s/ts-config/README.md Updated
|
|
35
|
+
[32m@w5s/mrm-preset:docs: [0m Transforms run
|
|
36
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=# W5s Typescript configuration _(${name})_
|
|
37
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=> ${description}&unknownTxt=
|
|
38
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=```console\nnpm install --save-dev ${name}\n```
|
|
39
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[${license}][license-url] © ${author}
|
|
40
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
|
|
41
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
|
|
42
|
+
[32m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
|
|
43
|
+
[32m@w5s/mrm-preset:docs: [0m
|
package/.turbo/turbo-format.log
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@w5s/mrm-preset:format: cache hit, replaying output [
|
|
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 [2m97545b1f29f3da72[0m
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
@w5s/mrm-preset:test: cache hit, replaying output
|
|
2
|
-
@w5s/mrm-preset:test:
|
|
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: [
|
|
16
|
-
@w5s/mrm-preset:test: [36mRunning
|
|
17
|
-
@w5s/mrm-preset:test: [
|
|
18
|
-
@w5s/mrm-preset:test: [
|
|
19
|
-
@w5s/mrm-preset:test: [36mRunning
|
|
20
|
-
@w5s/mrm-preset:test: [36mRunning
|
|
21
|
-
@w5s/mrm-preset:test: [36mRunning postconfigure...[39m
|
|
1
|
+
@w5s/mrm-preset:test: cache hit, replaying output [2m2b1723ac76b528db[0m
|
|
2
|
+
[34m@w5s/mrm-preset:test: [0mmkdir: _tester: File exists
|
|
3
|
+
[34m@w5s/mrm-preset:test: [0m[36mRunning bootstrap...[39m
|
|
4
|
+
[34m@w5s/mrm-preset:test: [0m[33mRunning alias configure...[39m
|
|
5
|
+
[34m@w5s/mrm-preset:test: [0m[36mRunning gitignore...[39m
|
|
6
|
+
[34m@w5s/mrm-preset:test: [0m[36mRunning project...[39m
|
|
7
|
+
[34m@w5s/mrm-preset:test: [0m[32mUpdate package.json[39m
|
|
8
|
+
[34m@w5s/mrm-preset:test: [0m[36mRunning contributing...[39m
|
|
9
|
+
[34m@w5s/mrm-preset:test: [0m[36mRunning release...[39m
|
|
10
|
+
[34m@w5s/mrm-preset:test: [0m[36mRunning ci...[39m
|
|
11
|
+
[34m@w5s/mrm-preset:test: [0m[36mRunning lang...[39m
|
|
12
|
+
[34m@w5s/mrm-preset:test: [0m[36mRunning commitlint...[39m
|
|
13
|
+
[34m@w5s/mrm-preset:test: [0m[36mRunning editorconfig...[39m
|
|
14
|
+
[34m@w5s/mrm-preset:test: [0m[36mRunning eslint...[39m
|
|
15
|
+
[34m@w5s/mrm-preset:test: [0m[36mRunning cspell...[39m
|
|
16
|
+
[34m@w5s/mrm-preset:test: [0m[36mRunning jest...[39m
|
|
17
|
+
[34m@w5s/mrm-preset:test: [0m[32mUpdate package.json[39m
|
|
18
|
+
[34m@w5s/mrm-preset:test: [0m[36mRunning renovate...[39m
|
|
19
|
+
[34m@w5s/mrm-preset:test: [0m[36mRunning githooks...[39m
|
|
20
|
+
[34m@w5s/mrm-preset:test: [0m[36mRunning postconfigure...[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,36 @@
|
|
|
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.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)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @w5s/mrm-preset
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [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)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* correct require extension eslint rule ([94798d6](https://github.com/w5s/project-config/commit/94798d6579b93d92f44021f9f77971994ca5ce5e))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [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)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* remove test from build ([506f19d](https://github.com/w5s/project-config/commit/506f19d71b3fc16613d37d10c022a08dbcf70376))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
6
36
|
# [1.0.0-alpha.14](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.13...@w5s/mrm-preset@1.0.0-alpha.14) (2022-06-10)
|
|
7
37
|
|
|
8
38
|
|
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: undefined,
|
|
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 {{
|
|
@@ -15,31 +15,26 @@ function jest({ state }) {
|
|
|
15
15
|
const hasWorkspaces = pkg.hasWorkspaces(packageFileDefault);
|
|
16
16
|
|
|
17
17
|
pkg.withPackageJson((packageFile) => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
const ignorePatterns = ['/node_modules/', '/docs/', '/lib/', '/build/', '/.cache/', '/public/'];
|
|
19
|
+
|
|
20
|
+
pkg.value(packageFile, {
|
|
21
|
+
path: 'jest',
|
|
22
|
+
state: hasJest ? 'present' : 'absent',
|
|
23
|
+
update: hasWorkspaces
|
|
24
|
+
? () => ({
|
|
24
25
|
preset: 'es-jest',
|
|
25
26
|
projects: packageFile
|
|
26
27
|
.get('workspaces.packages', packageFile.get('workspaces', []))
|
|
27
28
|
.map((/** @type {string} */ workspace) => `<rootDir>/${workspace}`),
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const ignorePatterns = ['/node_modules/', '/docs/', '/lib/', '/build/', '/.cache/', '/public/'];
|
|
32
|
-
packageFile.merge({
|
|
33
|
-
jest: {
|
|
29
|
+
})
|
|
30
|
+
: (config) => ({
|
|
31
|
+
...config,
|
|
34
32
|
preset: 'es-jest',
|
|
35
33
|
coveragePathIgnorePatterns: ignorePatterns,
|
|
36
34
|
testPathIgnorePatterns: ignorePatterns,
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} else {
|
|
41
|
-
packageFile.unset('jest');
|
|
42
|
-
}
|
|
35
|
+
}),
|
|
36
|
+
default: {},
|
|
37
|
+
});
|
|
43
38
|
|
|
44
39
|
pkg.script(packageFile, {
|
|
45
40
|
name: project.coverage,
|
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>} */
|
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,13 +37,14 @@ 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
41
|
if (hasWorkspaces) {
|
|
41
42
|
tsConfig
|
|
42
43
|
.unset('compilerOptions.rootDir')
|
|
43
44
|
.unset('compilerOptions.outDir')
|
|
44
45
|
.unset('include')
|
|
45
46
|
.merge({
|
|
46
|
-
$schema: 'https://json.schemastore.org/tsconfig',
|
|
47
|
+
$schema: 'https://json.schemastore.org/tsconfig.json',
|
|
47
48
|
extends: `./${tsConfigSettingsName}`,
|
|
48
49
|
})
|
|
49
50
|
.save();
|
|
@@ -53,7 +54,7 @@ function createLang({ language: languageDefault = 'typescript', tsConfig: tsConf
|
|
|
53
54
|
} else {
|
|
54
55
|
tsConfigSettings
|
|
55
56
|
.merge({
|
|
56
|
-
$schema: 'https://json.schemastore.org/tsconfig',
|
|
57
|
+
$schema: 'https://json.schemastore.org/tsconfig.json',
|
|
57
58
|
compilerOptions: {},
|
|
58
59
|
extends: tsConfigPreset,
|
|
59
60
|
})
|
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.17",
|
|
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": "b24d9aa790950ac545776a79d9a58a637e8f4903"
|
|
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
|
*
|
|
@@ -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