@w5s/mrm-preset 1.0.0-alpha.4 → 1.0.0-alpha.40

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.
Files changed (53) hide show
  1. package/.turbo/turbo-build.log +6 -0
  2. package/.turbo/turbo-docs.log +64 -0
  3. package/.turbo/turbo-format.log +6 -0
  4. package/.turbo/turbo-lint.log +6 -0
  5. package/.turbo/turbo-prepare.log +1 -0
  6. package/.turbo/turbo-test.log +27 -0
  7. package/CHANGELOG.md +199 -16
  8. package/README.md +7 -7
  9. package/bootstrap/index.js +30 -51
  10. package/ci/_gitlab/AutoDevops.gitlab-ci.yml +1 -2
  11. package/ci/_gitlab/AutoDevopsInclude.gitlab-ci.yml +19 -19
  12. package/ci/_gitlab/Renovate.gitlab-ci.yml +6 -6
  13. package/ci/github.js +53 -0
  14. package/ci/gitlab.js +1 -2
  15. package/ci/index.js +7 -2
  16. package/commitlint/index.js +8 -2
  17. package/config.json +1 -0
  18. package/contributing/index.js +1 -1
  19. package/core/block.js +1 -1
  20. package/core/commitlint.js +3 -3
  21. package/core/cspell.js +2 -11
  22. package/core/eslint.js +25 -6
  23. package/{gitignore/template.js → core/git.ignore.js} +32 -6
  24. package/core/git.js +19 -19
  25. package/core/githooks.js +7 -7
  26. package/core/githubCI.js +56 -0
  27. package/core/jest.js +55 -74
  28. package/core/jsonFile.js +8 -7
  29. package/core/lintStaged.js +3 -3
  30. package/core/npm.js +51 -16
  31. package/core/pkg.js +74 -21
  32. package/core/project.js +6 -0
  33. package/core/semanticRelease.js +3 -3
  34. package/core/turbo.js +52 -0
  35. package/core/typedoc.js +6 -19
  36. package/core/vscode.js +16 -6
  37. package/cspell/index.js +33 -23
  38. package/editorconfig/index.js +20 -8
  39. package/eslint/index.js +91 -48
  40. package/githooks/index.js +48 -57
  41. package/gitignore/index.js +5 -22
  42. package/jest/index.js +13 -17
  43. package/lang/.eslintrc.json +2 -1
  44. package/lang/index.js +40 -39
  45. package/lang/templates/index.spec.ts +3 -2
  46. package/lang/templates/index.ts +1 -2
  47. package/licenses/index.js +26 -0
  48. package/package.json +20 -14
  49. package/postconfigure/index.js +3 -3
  50. package/project/index.js +262 -155
  51. package/release/index.js +5 -6
  52. package/renovate/index.js +5 -3
  53. package/tsconfig.json +3 -5
@@ -0,0 +1,6 @@
1
+ [1] : exited with code 0
2
+ [tsc]
3
+ [tsc] > @w5s/mrm-preset@1.0.0-alpha.39 build:tsc
4
+ [tsc] > tsc --noEmit --skipLibCheck
5
+ [tsc]
6
+ [tsc] npm run build:tsc exited with code 0
@@ -0,0 +1,64 @@
1
+ Starting markdown-magic [ '**/*.md', '!node_modules/**' ]
2
+ ✔ README.md Updated
3
+ Transforms run
4
+ ⁕ PKG_JSON:template=# W5s Mrm Preset _(${name})_
5
+ ⁕ PKG_JSON:template=> ${description}&unknownTxt=
6
+ ⁕ PKG_JSON:template=[${license}][license-url] © ${author}
7
+ ⁕ PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
8
+ ⁕ PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}
9
+ ⁕ PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
10
+
11
+ ✔ _tester/node_modules/@w5s/mrm-preset/README.md Updated
12
+ Transforms run
13
+ ⁕ PKG_JSON:template=# W5s Mrm Preset _(${name})_
14
+ ⁕ PKG_JSON:template=> ${description}&unknownTxt=
15
+ ⁕ PKG_JSON:template=[${license}][license-url] © ${author}
16
+ ⁕ PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
17
+ ⁕ PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}
18
+ ⁕ PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
19
+
20
+ ✔ _tester/node_modules/@w5s/eslint-config/README.md Updated
21
+ Transforms run
22
+ ⁕ PKG_JSON:template=# W5s ESLint configuration _(${name})_
23
+ ⁕ PKG_JSON:template=> ${description}&unknownTxt=
24
+ ⁕ PKG_JSON:template=```console\nnpm install --save-dev ${name}\n```
25
+ ⁕ PKG_JSON:template=[${license}][license-url] © ${author}
26
+ ⁕ PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
27
+ ⁕ PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}
28
+ ⁕ PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
29
+
30
+ ✔ _tester/node_modules/@w5s/cspell-config/README.md Updated
31
+ Transforms run
32
+ ⁕ PKG_JSON:template=# W5s CSpell configuration _(${name})_
33
+ ⁕ PKG_JSON:template=> ${description}&unknownTxt=
34
+ ⁕ PKG_JSON:template=```console\nnpm install --save-dev ${name} cspell\n```
35
+ ⁕ PKG_JSON:template=```json\n{\n "import": ["${name}"]\n}\n```
36
+ ⁕ PKG_JSON:template=[${license}][license-url] © ${author}
37
+ ⁕ PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
38
+ ⁕ PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}
39
+ ⁕ PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
40
+
41
+ ✔ _tester/node_modules/@w5s/ts-config/README.md Updated
42
+ Transforms run
43
+ ⁕ PKG_JSON:template=# W5s Typescript configuration _(${name})_
44
+ ⁕ PKG_JSON:template=> ${description}&unknownTxt=
45
+ ⁕ PKG_JSON:template=```console\nnpm install --save-dev ${name}\n```
46
+ ⁕ PKG_JSON:template=Typescript: ${peerDependencies.typescript}&unknownTxt=
47
+ ⁕ PKG_JSON:template=[${license}][license-url] © ${author}
48
+ ⁕ PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
49
+ ⁕ PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}
50
+ ⁕ PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
51
+
52
+ ✔ _tester/node_modules/@w5s/prettier-config/README.md Updated
53
+ Transforms run
54
+ ⁕ PKG_JSON:template=# W5s Prettier configuration _(${name})_
55
+ ⁕ PKG_JSON:template=> ${description}&unknownTxt=
56
+ ⁕ PKG_JSON:template=```console\nnpm install --save-dev ${name}\n```
57
+ ⁕ PKG_JSON:template=```json\n"${name}"\n```
58
+ ⁕ PKG_JSON:template=```js\nmodule.exports = {\n ...require('${name}'),\n // Override rules\n};\n```
59
+ ⁕ PKG_JSON:template=Prettier: ${peerDependencies.prettier}&unknownTxt=
60
+ ⁕ PKG_JSON:template=[${license}][license-url] © ${author}
61
+ ⁕ PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
62
+ ⁕ PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}
63
+ ⁕ PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
64
+
@@ -0,0 +1,6 @@
1
+ [1] : exited with code 0
2
+ [src]
3
+ [src] > @w5s/mrm-preset@1.0.0-alpha.38 format:src
4
+ [src] > eslint . --fix --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml
5
+ [src]
6
+ [src] npm run format:src exited with code 0
@@ -0,0 +1,6 @@
1
+ [1] : exited with code 0
2
+ [src]
3
+ [src] > @w5s/mrm-preset@1.0.0-alpha.39 lint:src
4
+ [src] > eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml
5
+ [src]
6
+ [src] npm run lint:src exited with code 0
@@ -0,0 +1 @@
1
+ [0] : exited with code 0
@@ -0,0 +1,27 @@
1
+ [src]
2
+ [src] > @w5s/mrm-preset@1.0.0-alpha.39 test:src
3
+ [src] > mkdir _tester; cd _tester; mrm bootstrap --dir ..; mrm configure --dir ..
4
+ [src]
5
+ [src] mkdir: _tester: File exists
6
+ [src] Running bootstrap...
7
+ [src] Running alias configure...
8
+ [src] Running gitignore...
9
+ [src] Running project...
10
+ [src] Update turbo.json
11
+ [src] Running contributing...
12
+ [src] Running licenses...
13
+ [src] Running release...
14
+ [src] Running ci...
15
+ [src] Running lang...
16
+ [src] Update tsconfig.json
17
+ [src] Running commitlint...
18
+ [src] Update .vscode/extensions.json
19
+ [src] Running editorconfig...
20
+ [src] Running eslint...
21
+ [src] Running cspell...
22
+ [src] Update .cspell.json
23
+ [src] Running jest...
24
+ [src] Running renovate...
25
+ [src] Running githooks...
26
+ [src] Running postconfigure...
27
+ [src] npm run test:src exited with code 0
package/CHANGELOG.md CHANGED
@@ -3,57 +3,240 @@
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.4](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.3...@w5s/mrm-preset@1.0.0-alpha.4) (2022-02-16)
6
+ # [1.0.0-alpha.40](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.39...@w5s/mrm-preset@1.0.0-alpha.40) (2023-01-22)
7
+
8
+ **Note:** Version bump only for package @w5s/mrm-preset
9
+
10
+ # [1.0.0-alpha.39](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.38...@w5s/mrm-preset@1.0.0-alpha.39) (2023-01-22)
11
+
12
+ **Note:** Version bump only for package @w5s/mrm-preset
13
+
14
+ # [1.0.0-alpha.38](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.37...@w5s/mrm-preset@1.0.0-alpha.38) (2023-01-11)
15
+
16
+ ### Reverts
17
+
18
+ - Revert "💚 Correct clean build script" ([cc3c1e3](https://github.com/w5s/project-config/commit/cc3c1e3f20b3fd7c4412a3ac3ea199e005537468))
19
+
20
+ # [1.0.0-alpha.37](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.36...@w5s/mrm-preset@1.0.0-alpha.37) (2023-01-09)
21
+
22
+ **Note:** Version bump only for package @w5s/mrm-preset
23
+
24
+ # [1.0.0-alpha.36](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.35...@w5s/mrm-preset@1.0.0-alpha.36) (2022-12-22)
25
+
26
+ **Note:** Version bump only for package @w5s/mrm-preset
27
+
28
+ # [1.0.0-alpha.35](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.34...@w5s/mrm-preset@1.0.0-alpha.35) (2022-12-22)
29
+
30
+ **Note:** Version bump only for package @w5s/mrm-preset
31
+
32
+ # [1.0.0-alpha.34](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.33...@w5s/mrm-preset@1.0.0-alpha.34) (2022-12-14)
33
+
34
+ **Note:** Version bump only for package @w5s/mrm-preset
35
+
36
+ # [1.0.0-alpha.33](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.32...@w5s/mrm-preset@1.0.0-alpha.33) (2022-12-12)
37
+
38
+ **Note:** Version bump only for package @w5s/mrm-preset
39
+
40
+ # [1.0.0-alpha.32](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.31...@w5s/mrm-preset@1.0.0-alpha.32) (2022-12-05)
41
+
42
+ **Note:** Version bump only for package @w5s/mrm-preset
43
+
44
+ # [1.0.0-alpha.31](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.30...@w5s/mrm-preset@1.0.0-alpha.31) (2022-11-24)
45
+
46
+ **Note:** Version bump only for package @w5s/mrm-preset
47
+
48
+ # [1.0.0-alpha.30](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.29...@w5s/mrm-preset@1.0.0-alpha.30) (2022-11-15)
49
+
50
+ **Note:** Version bump only for package @w5s/mrm-preset
51
+
52
+ # [1.0.0-alpha.29](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.28...@w5s/mrm-preset@1.0.0-alpha.29) (2022-11-06)
53
+
54
+ **Note:** Version bump only for package @w5s/mrm-preset
55
+
56
+ # [1.0.0-alpha.28](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.27...@w5s/mrm-preset@1.0.0-alpha.28) (2022-11-04)
7
57
 
58
+ **Note:** Version bump only for package @w5s/mrm-preset
59
+
60
+ # [1.0.0-alpha.27](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.26...@w5s/mrm-preset@1.0.0-alpha.27) (2022-09-23)
61
+
62
+ **Note:** Version bump only for package @w5s/mrm-preset
63
+
64
+ # [1.0.0-alpha.26](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.25...@w5s/mrm-preset@1.0.0-alpha.26) (2022-09-19)
65
+
66
+ **Note:** Version bump only for package @w5s/mrm-preset
67
+
68
+ # [1.0.0-alpha.25](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.24...@w5s/mrm-preset@1.0.0-alpha.25) (2022-09-05)
69
+
70
+ **Note:** Version bump only for package @w5s/mrm-preset
71
+
72
+ # [1.0.0-alpha.24](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.23...@w5s/mrm-preset@1.0.0-alpha.24) (2022-08-30)
73
+
74
+ **Note:** Version bump only for package @w5s/mrm-preset
75
+
76
+ # [1.0.0-alpha.23](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.22...@w5s/mrm-preset@1.0.0-alpha.23) (2022-08-29)
77
+
78
+ **Note:** Version bump only for package @w5s/mrm-preset
79
+
80
+ # [1.0.0-alpha.22](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.21...@w5s/mrm-preset@1.0.0-alpha.22) (2022-08-29)
81
+
82
+ **Note:** Version bump only for package @w5s/mrm-preset
83
+
84
+ # [1.0.0-alpha.21](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.20...@w5s/mrm-preset@1.0.0-alpha.21) (2022-08-09)
85
+
86
+ **Note:** Version bump only for package @w5s/mrm-preset
87
+
88
+ # [1.0.0-alpha.20](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.19...@w5s/mrm-preset@1.0.0-alpha.20) (2022-08-09)
89
+
90
+ **Note:** Version bump only for package @w5s/mrm-preset
91
+
92
+ # [1.0.0-alpha.19](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.18...@w5s/mrm-preset@1.0.0-alpha.19) (2022-06-28)
93
+
94
+ **Note:** Version bump only for package @w5s/mrm-preset
95
+
96
+ # [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)
97
+
98
+ **Note:** Version bump only for package @w5s/mrm-preset
99
+
100
+ # [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)
101
+
102
+ **Note:** Version bump only for package @w5s/mrm-preset
103
+
104
+ # [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)
8
105
 
9
106
  ### Bug Fixes
10
107
 
11
- * correct eslint vscode settings ([a32e0fb](https://github.com/w5s/project-config/commit/a32e0fb739cbe349565b26ea412cdf37e3d56bdb))
12
- * correct mrm preset url ([ad6f030](https://github.com/w5s/project-config/commit/ad6f03091e0a294c043974b564e24c79023e659b))
13
- * correct typo ([2218859](https://github.com/w5s/project-config/commit/221885997fec37149f7e349b00a58fbcb3bfb8db))
14
- * rollback to eslint.validate vscode setting ([769a2e1](https://github.com/w5s/project-config/commit/769a2e100083aca4f5e9037fa539fcf1f6002d65))
108
+ - correct require extension eslint rule ([94798d6](https://github.com/w5s/project-config/commit/94798d6579b93d92f44021f9f77971994ca5ce5e))
15
109
 
110
+ # [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)
16
111
 
17
- ### Features
112
+ ### Bug Fixes
18
113
 
19
- * improve typescript eslint configuration ([efc6f1c](https://github.com/w5s/project-config/commit/efc6f1cef876e8fc5d4d1d1b94ca90a6805fbbbf))
114
+ - remove test from build ([506f19d](https://github.com/w5s/project-config/commit/506f19d71b3fc16613d37d10c022a08dbcf70376))
20
115
 
116
+ # [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)
21
117
 
118
+ ### Bug Fixes
22
119
 
120
+ - add prepare task to turbo configuration ([717d59a](https://github.com/w5s/project-config/commit/717d59a724c1de8cb37f37c23aae8f4cc57fc231))
121
+ - remove --quiet option on format ([268b0a7](https://github.com/w5s/project-config/commit/268b0a76dbd03cfa6729988472948a66e2b749c9))
23
122
 
123
+ # [1.0.0-alpha.13](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.12...@w5s/mrm-preset@1.0.0-alpha.13) (2022-06-07)
24
124
 
25
- # [1.0.0-alpha.3](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.2...@w5s/mrm-preset@1.0.0-alpha.3) (2022-02-15)
125
+ ### Bug Fixes
126
+
127
+ - improve cspell output ([a5721b5](https://github.com/w5s/project-config/commit/a5721b5c8e97817dc68e9444f4443d3cb7893a27))
128
+
129
+ # [1.0.0-alpha.12](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.11...@w5s/mrm-preset@1.0.0-alpha.12) (2022-06-07)
130
+
131
+ ### Bug Fixes
26
132
 
133
+ - add spellcheck task to turbo config ([1029c2b](https://github.com/w5s/project-config/commit/1029c2b97b12b44618ce741d045b02712f0ebf18))
134
+ - clean non useful empty script when possible ([2e7e60a](https://github.com/w5s/project-config/commit/2e7e60a400506bbca00db653813668fa47f8f065))
135
+ - correct docs task in turbo ([0fca8c9](https://github.com/w5s/project-config/commit/0fca8c9ca0389b090e6aa2a66d47ab63b1cb138e))
136
+ - remove uneeded @types/jest typing ([475f6bb](https://github.com/w5s/project-config/commit/475f6bbdc101d31460cd8ffb7f5deb3b97176d5c))
137
+ - remove uneeded cspell script ([ba8d38b](https://github.com/w5s/project-config/commit/ba8d38b8053a24a7937c24c270f5d61d3dad71c7))
27
138
 
28
139
  ### Features
29
140
 
30
- * use airbnb-base as default presets ([e499fc1](https://github.com/w5s/project-config/commit/e499fc115023571e749072db33d774b443b68bb7))
141
+ - configure spellcheck ([4be6a96](https://github.com/w5s/project-config/commit/4be6a96d6d30e1085b73c0befcab1d3fa30475ab))
142
+ - improve eslint mrm support for workspaces ([2dacc2e](https://github.com/w5s/project-config/commit/2dacc2e867ebb74c8de777af2ce9f173426ebc33))
143
+ - improve turbo support for lint and format ([76e19e0](https://github.com/w5s/project-config/commit/76e19e02918aba66a2e6e9c06a7d0bed99500ecc))
31
144
 
145
+ # [1.0.0-alpha.11](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.10...@w5s/mrm-preset@1.0.0-alpha.11) (2022-05-20)
32
146
 
147
+ ### Bug Fixes
33
148
 
149
+ - correct prepare package script ([f2d5fbf](https://github.com/w5s/project-config/commit/f2d5fbfc4e7b66dece1d1139e2ba3835bcf524a1))
34
150
 
151
+ ### Features
35
152
 
36
- # [1.0.0-alpha.2](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.1...@w5s/mrm-preset@1.0.0-alpha.2) (2022-02-15)
153
+ - add minimal support for yarn + github ci ([b9ae537](https://github.com/w5s/project-config/commit/b9ae53746fa9a3f92a1ca0e3600e20cdda583a45))
154
+
155
+ # [1.0.0-alpha.10](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.9...@w5s/mrm-preset@1.0.0-alpha.10) (2022-05-13)
156
+
157
+ ### Bug Fixes
158
+
159
+ - remove tsc on lint-staged because buggy ([6b0f4f2](https://github.com/w5s/project-config/commit/6b0f4f2c6d5d06f959ee1edc5cc6266464747d7e))
160
+
161
+ # [1.0.0-alpha.9](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.8...@w5s/mrm-preset@1.0.0-alpha.9) (2022-04-12)
162
+
163
+ ### Bug Fixes
164
+
165
+ - correct default mrm task ([1a59cb1](https://github.com/w5s/project-config/commit/1a59cb1a114c2cba091c4729b5e66e5a5354004e))
166
+
167
+ # [1.0.0-alpha.8](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.7...@w5s/mrm-preset@1.0.0-alpha.8) (2022-03-08)
168
+
169
+ ### Bug Fixes
170
+
171
+ - add missing $schema for tsconfig ([c33c7ae](https://github.com/w5s/project-config/commit/c33c7aeba405d651eba19187436724780dd90aff))
172
+ - remove unused typedoc script ([51238f0](https://github.com/w5s/project-config/commit/51238f04b8f3d95baac7f0a367ba1c07061d2ce4))
173
+
174
+ # [1.0.0-alpha.7](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.6...@w5s/mrm-preset@1.0.0-alpha.7) (2022-03-01)
175
+
176
+ ### Bug Fixes
37
177
 
178
+ - correct bootstrap step ([da7f539](https://github.com/w5s/project-config/commit/da7f539560ba143f830c9ea824b0d79c6a50522c))
179
+ - correct is-ci script that fails in some yarn berry ([4e4707d](https://github.com/w5s/project-config/commit/4e4707d7e8c0cd2c88e1dc6bc94705317dcf9e98))
180
+ - improve yarn check ([3af241a](https://github.com/w5s/project-config/commit/3af241af004d747518733983260eb295aa75e5cb))
181
+
182
+ # [1.0.0-alpha.6](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.5...@w5s/mrm-preset@1.0.0-alpha.6) (2022-02-23)
183
+
184
+ ### Bug Fixes
185
+
186
+ - correct gitignore task ([b4f0903](https://github.com/w5s/project-config/commit/b4f0903561c97500aef65488ef06ccd7eae0db80))
187
+ - remove jest on lint-staged ([2fbc851](https://github.com/w5s/project-config/commit/2fbc85132ab380429d6966bff47b176bcfb51f6d))
188
+ - shorten eslint extensions ([aecc870](https://github.com/w5s/project-config/commit/aecc870ce0b288436208757376bc05504bff3331))
38
189
 
39
190
  ### Features
40
191
 
41
- * enable source.fixAll for vscode ([d484156](https://github.com/w5s/project-config/commit/d484156c063f2bf9f5cb3212878aa07bb4f8fd6f))
42
- * improve arrow-body-style configuration ([a4ee8a9](https://github.com/w5s/project-config/commit/a4ee8a9f3912285b45287afc4ccae2fa57431c6a))
192
+ - use es-jest as default jest preset ([61535d9](https://github.com/w5s/project-config/commit/61535d9c47c25150becc564a5dd273d7cc14b579))
43
193
 
194
+ # [1.0.0-alpha.5](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.4...@w5s/mrm-preset@1.0.0-alpha.5) (2022-02-18)
44
195
 
196
+ ### Bug Fixes
45
197
 
198
+ - change bootstrap behavior ([497c83a](https://github.com/w5s/project-config/commit/497c83a4082f7fd4e3b8b6913802ebcb21caa65a))
199
+ - remove lint-staged + cspell integration ([6747c83](https://github.com/w5s/project-config/commit/6747c83ec997034d25d136bc5aa008ed108ceb96))
200
+ - use UNLICENSED for default license ([608ee8f](https://github.com/w5s/project-config/commit/608ee8f0bf57fec94636587b116d5bda0fb4ee3f))
46
201
 
202
+ ### Features
47
203
 
48
- # 1.0.0-alpha.1 (2022-02-12)
204
+ - add gitignore for yarn v2 ([06c547a](https://github.com/w5s/project-config/commit/06c547a6b7813f935678c29b410aee62da5b3866))
205
+ - add support for yarn berry ([2b77669](https://github.com/w5s/project-config/commit/2b77669a29316825a38470c80a48aff8ab068f7f))
49
206
 
207
+ # [1.0.0-alpha.4](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.3...@w5s/mrm-preset@1.0.0-alpha.4) (2022-02-16)
50
208
 
51
209
  ### Bug Fixes
52
210
 
53
- * correct generate cspell.json ([e638b75](https://github.com/w5s/project-config/commit/e638b75ead5d3ffd34b0c74b95b237d29b542406))
211
+ - correct eslint vscode settings ([a32e0fb](https://github.com/w5s/project-config/commit/a32e0fb739cbe349565b26ea412cdf37e3d56bdb))
212
+ - correct mrm preset url ([ad6f030](https://github.com/w5s/project-config/commit/ad6f03091e0a294c043974b564e24c79023e659b))
213
+ - correct typo ([2218859](https://github.com/w5s/project-config/commit/221885997fec37149f7e349b00a58fbcb3bfb8db))
214
+ - rollback to eslint.validate vscode setting ([769a2e1](https://github.com/w5s/project-config/commit/769a2e100083aca4f5e9037fa539fcf1f6002d65))
215
+
216
+ ### Features
217
+
218
+ - improve typescript eslint configuration ([efc6f1c](https://github.com/w5s/project-config/commit/efc6f1cef876e8fc5d4d1d1b94ca90a6805fbbbf))
219
+
220
+ # [1.0.0-alpha.3](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.2...@w5s/mrm-preset@1.0.0-alpha.3) (2022-02-15)
221
+
222
+ ### Features
223
+
224
+ - use airbnb-base as default presets ([e499fc1](https://github.com/w5s/project-config/commit/e499fc115023571e749072db33d774b443b68bb7))
225
+
226
+ # [1.0.0-alpha.2](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.1...@w5s/mrm-preset@1.0.0-alpha.2) (2022-02-15)
227
+
228
+ ### Features
229
+
230
+ - enable source.fixAll for vscode ([d484156](https://github.com/w5s/project-config/commit/d484156c063f2bf9f5cb3212878aa07bb4f8fd6f))
231
+ - improve arrow-body-style configuration ([a4ee8a9](https://github.com/w5s/project-config/commit/a4ee8a9f3912285b45287afc4ccae2fa57431c6a))
232
+
233
+ # 1.0.0-alpha.1 (2022-02-12)
234
+
235
+ ### Bug Fixes
54
236
 
237
+ - correct generate cspell.json ([e638b75](https://github.com/w5s/project-config/commit/e638b75ead5d3ffd34b0c74b95b237d29b542406))
55
238
 
56
239
  ### Features
57
240
 
58
- * add cspell check on lint-staged in mrm ([d8a744f](https://github.com/w5s/project-config/commit/d8a744f1f297c2308cd15ce1f19958f9302eee5d))
59
- * add mrm-preset package ([1409046](https://github.com/w5s/project-config/commit/1409046e772755148f9885ce39c8f86afef4e50d))
241
+ - add cspell check on lint-staged in mrm ([d8a744f](https://github.com/w5s/project-config/commit/d8a744f1f297c2308cd15ce1f19958f9302eee5d))
242
+ - add mrm-preset package ([1409046](https://github.com/w5s/project-config/commit/1409046e772755148f9885ce39c8f86afef4e50d))
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
- <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=# W5s Mrm Preset _(${name})_) -->
1
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=# W5s Mrm Preset _(${name})_) -->
2
2
  # W5s Mrm Preset _(@w5s/mrm-preset)_
3
3
  <!-- AUTO-GENERATED-CONTENT:END -->
4
4
 
5
5
  [![NPM Version][package-version-svg]][package-url]
6
6
  [![License][license-image]][license-url]
7
7
 
8
- <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=> ${description}&unknownTxt= ) -->
8
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=> ${description}&unknownTxt= ) -->
9
9
  > Mrm configuration presets
10
10
  <!-- AUTO-GENERATED-CONTENT:END -->
11
11
 
@@ -19,7 +19,7 @@ Initialize your project using this command :
19
19
 
20
20
  ```bash
21
21
  # from the root of your project
22
- npm exec -p mrm -p @w5s/mrm-preset -- mrm bootstrap --preset @w5s/mrm-preset
22
+ npm exec --package=@w5s/mrm-preset --package=mrm -- mrm bootstrap --preset @w5s/mrm-preset
23
23
  ```
24
24
 
25
25
  This will install in `package.json` the npm scripts
@@ -38,19 +38,19 @@ npm run configure
38
38
  ```
39
39
 
40
40
  ## License
41
- <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=[${license}][license-url] © ${author}) -->
41
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[${license}][license-url] © ${author}) -->
42
42
  [MIT][license-url] © Julien Polo <julien.polo@gmail.com>
43
43
  <!-- AUTO-GENERATED-CONTENT:END -->
44
44
 
45
45
  <!-- VARIABLES -->
46
46
 
47
- <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square) -->
47
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square) -->
48
48
  [package-version-svg]: https://img.shields.io/npm/v/@w5s/mrm-preset.svg?style=flat-square
49
49
  <!-- AUTO-GENERATED-CONTENT:END -->
50
- <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}) -->
50
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}) -->
51
51
  [package-url]: https://www.npmjs.com/package/@w5s/mrm-preset
52
52
  <!-- AUTO-GENERATED-CONTENT:END -->
53
- <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square) -->
53
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square) -->
54
54
  [license-image]: https://img.shields.io/badge/license-MIT-green.svg?style=flat-square
55
55
  <!-- AUTO-GENERATED-CONTENT:END -->
56
56
  [license-url]: ../../LICENSE
@@ -1,70 +1,55 @@
1
- /* eslint-disable sort-keys-fix/sort-keys-fix */
2
- const path = require('path');
3
- const { packageJson, file } = require('mrm-core');
4
- const npm = require('../core/npm');
5
- const pkg = require('../core/pkg');
1
+ const path = require('node:path');
2
+ const { packageJson } = require('mrm-core');
3
+ const npm = require('../core/npm.js');
4
+ const pkg = require('../core/pkg.js');
5
+ const { gitIgnoreTemplate } = require('../core/git.js');
6
6
 
7
7
  /**
8
8
  * @param {{
9
9
  * mrmPreset: string,
10
10
  * mrmTask: string,
11
11
  * packageArchetype: 'application'|'library'|'workspace',
12
- * packageManager: 'npm'|'yarn'
12
+ * packageManager: 'npm'|'yarn@classic'|'yarn@berry'
13
13
  * }} config
14
14
  * @returns {void}
15
15
  */
16
- function task({ mrmPreset, mrmTask, packageArchetype, packageManager }) {
16
+ function task({ mrmPreset, mrmTask, packageManager }) {
17
17
  /**
18
18
  * setup package.json from following object
19
19
  */
20
20
 
21
- const packageFile = packageJson({
21
+ packageJson({
22
22
  name: path.basename(process.cwd()),
23
23
  version: '1.0.0-alpha.0',
24
24
  private: true,
25
- license: 'PRIVATE',
25
+ license: 'UNLICENSED',
26
26
  description: '',
27
- });
27
+ }).save();
28
+ gitIgnoreTemplate(['macOS', 'NodeJS', 'VisualStudioCode']);
28
29
 
29
- packageFile.merge({
30
- scripts: {
31
- configure: `npm run mrm -- ${mrmTask}`,
32
- mrm: `mrm --preset ${mrmPreset}`,
33
- },
34
- });
35
- pkg.value(packageFile, {
36
- path: 'packageManager',
37
- state: 'present',
38
- update: packageManager,
39
- default: () => {
40
- if (file('yarn.lock').exists()) {
41
- return 'yarn';
42
- }
43
-
44
- // return 'npm';
45
- return undefined;
46
- },
47
- });
48
- pkg.value(packageFile, {
49
- path: 'mrmConfig.packageArchetype',
50
- state: 'present',
51
- update: packageArchetype,
52
- default: () => {
53
- if (file('lerna.json').exists() || Boolean(packageFile.get('workspaces'))) {
54
- return 'workspace';
55
- }
56
-
57
- return 'library';
58
- },
59
- });
60
- packageFile.save();
30
+ npm.bootstrap(packageManager);
61
31
 
62
32
  npm.dependency({
63
33
  dev: true,
64
34
  name: ['mrm', mrmPreset],
65
- yarn: packageManager === 'yarn',
66
35
  state: 'present',
67
36
  });
37
+
38
+ pkg.withPackageJson((packageFile) => {
39
+ const currentPackageManager = pkg.manager(packageFile);
40
+
41
+ // Add MRM default scripts
42
+ pkg.script(packageFile, {
43
+ name: 'configure',
44
+ state: 'present',
45
+ default: currentPackageManager === 'npm' ? `npm run mrm -- ${mrmTask}` : `yarn mrm ${mrmTask}`,
46
+ });
47
+ pkg.script(packageFile, {
48
+ name: 'mrm',
49
+ state: 'present',
50
+ default: `mrm --preset ${mrmPreset}`,
51
+ });
52
+ });
68
53
  }
69
54
 
70
55
  task.description = 'Bootstrap a new project.';
@@ -80,15 +65,9 @@ task.parameters = {
80
65
  message: 'Default MRM task name ?',
81
66
  type: 'input',
82
67
  },
83
- packageArchetype: {
84
- choices: ['library', 'application', 'workspace'],
85
- message: 'What Archetype of package ?',
86
- name: 'packageArchetype',
87
- type: 'input',
88
- },
89
68
  packageManager: {
90
- default: 'yarn',
91
- choices: ['yarn', 'npm'],
69
+ default: 'yarn@berry',
70
+ choices: ['yarn@berry', 'yarn@classic', 'npm'],
92
71
  message: 'Which default package manager ?',
93
72
  name: 'packageManager',
94
73
  type: 'input',
@@ -1,4 +1,4 @@
1
- ##
1
+ #
2
2
  # Follow the following standards
3
3
  #
4
4
  # @ref https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
@@ -69,7 +69,6 @@ code_analysis:
69
69
  variables:
70
70
  CODE_ANALYSIS_HOUR: 7 # 7h UTC => 9h Paris
71
71
  # CODE_ANALYSIS_DISABLED: "🛑"
72
-
73
72
  # deploy_production:
74
73
  # extends:
75
74
  # - .autodevops_trigger_deploy
@@ -4,21 +4,19 @@ include:
4
4
 
5
5
  # Default variables
6
6
  variables:
7
-
8
-
9
7
  # To activate the auto release
10
- AUTO_DEVOPS_QUALITY_WHEN: 'always' # 'always'|'never'
11
- AUTO_DEVOPS_TEST_WHEN: 'always' # 'always'|'never'
12
- AUTO_DEVOPS_RELEASE_WHEN: 'manual' # 'on_success'|'manual'|'never'
13
- AUTO_DEVOPS_DEPLOY_ALLOW: 'tag' # 'tag'|'any'
14
- AUTO_DEVOPS_DEPLOY_WHEN: 'manual' # 'on_success'|'manual'|'never'
8
+ AUTO_DEVOPS_QUALITY_WHEN: always # 'always'|'never'
9
+ AUTO_DEVOPS_TEST_WHEN: always # 'always'|'never'
10
+ AUTO_DEVOPS_RELEASE_WHEN: manual # 'on_success'|'manual'|'never'
11
+ AUTO_DEVOPS_DEPLOY_ALLOW: tag # 'tag'|'any'
12
+ AUTO_DEVOPS_DEPLOY_WHEN: manual # 'on_success'|'manual'|'never'
15
13
 
16
14
  # Renovate variable
17
15
  # RENOVATE_DISABLED: "🛑"
18
16
 
19
- ##
17
+ # #
20
18
  # Contextual variables
21
- ##
19
+ # #
22
20
  # DEPLOY_ENVIRONMENT: production,staging,...
23
21
  # RENOVATE: true|false
24
22
 
@@ -33,14 +31,14 @@ variables:
33
31
  if: '$CI_PIPELINE_SOURCE == "schedule"'
34
32
  when: never
35
33
  - &autodevops_renovate_skip_rule
36
- if: "$RENOVATE"
34
+ if: $RENOVATE
37
35
  when: never
38
36
  - &autodevops_default_branch_only_rule
39
- if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH'
37
+ if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
40
38
  when: never
41
39
  - when: on_success
42
40
 
43
- ##
41
+ # #
44
42
  # Generic trait for a trigger button for release stage
45
43
  #
46
44
  .autodevops_trigger_release:
@@ -53,7 +51,9 @@ variables:
53
51
  - <<: *autodevops_default_branch_only_rule
54
52
  - if: "$AUTO_DEVOPS_RELEASE_WHEN == 'never'"
55
53
  when: never
56
- - if: "$CI_COMMIT_TAG"
54
+ - if: $CI_COMMIT_TAG
55
+ when: never
56
+ - if: $CI_COMMIT_MESSAGE =~ /🔖 /
57
57
  when: never
58
58
  - if: $CI_COMMIT_MESSAGE =~ /chore\(release\):/
59
59
  when: never
@@ -75,7 +75,7 @@ variables:
75
75
  - npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
76
76
  - npm run release
77
77
 
78
- ##
78
+ # #
79
79
  # Generic trait for a trigger button for deploy stage.
80
80
  # Use DEPLOY_ENVIRONMENT variable to choose environment
81
81
  #
@@ -176,7 +176,7 @@ variables:
176
176
  CODE_ANALYSIS_HOUR: 7 # 7h UTC => 9h Paris
177
177
  # CODE_ANALYSIS_DISABLED: "🛑"
178
178
  rules:
179
- - if: "$CODE_ANALYSIS_DISABLED"
179
+ - if: $CODE_ANALYSIS_DISABLED
180
180
  when: never
181
181
  - if: '$CI_PIPELINE_SOURCE == "schedule"'
182
182
  when: always
@@ -226,9 +226,9 @@ variables:
226
226
  expire_in: 1 week
227
227
  paths:
228
228
  - dist
229
- - "packages/*/dist"
229
+ - 'packages/*/dist'
230
230
  - lib
231
- - "packages/*/lib"
231
+ - 'packages/*/lib'
232
232
  - node_modules
233
233
 
234
234
  .autodevops_node_docs:
@@ -242,9 +242,9 @@ variables:
242
242
  .autodevops_renovate:
243
243
  stage: prepare
244
244
  rules:
245
- - if: "$RENOVATE_DISABLED"
245
+ - if: $RENOVATE_DISABLED
246
246
  when: never
247
- - if: "$RENOVATE"
247
+ - if: $RENOVATE
248
248
  when: always
249
249
  - when: never
250
250
  extends: