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

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 (54) hide show
  1. package/.turbo/turbo-build.log +6 -0
  2. package/.turbo/turbo-docs.log +63 -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-spellcheck.log +1 -0
  7. package/.turbo/turbo-test.log +27 -0
  8. package/CHANGELOG.md +203 -16
  9. package/README.md +7 -7
  10. package/bootstrap/index.js +30 -51
  11. package/ci/_gitlab/AutoDevops.gitlab-ci.yml +1 -2
  12. package/ci/_gitlab/AutoDevopsInclude.gitlab-ci.yml +19 -19
  13. package/ci/_gitlab/Renovate.gitlab-ci.yml +6 -6
  14. package/ci/github.js +53 -0
  15. package/ci/gitlab.js +1 -2
  16. package/ci/index.js +7 -2
  17. package/commitlint/index.js +8 -2
  18. package/config.json +1 -0
  19. package/contributing/index.js +1 -1
  20. package/core/block.js +1 -1
  21. package/core/commitlint.js +3 -3
  22. package/core/cspell.js +2 -11
  23. package/core/eslint.js +25 -6
  24. package/{gitignore/template.js → core/git.ignore.js} +32 -6
  25. package/core/git.js +19 -19
  26. package/core/githooks.js +7 -7
  27. package/core/githubCI.js +56 -0
  28. package/core/jest.js +55 -74
  29. package/core/jsonFile.js +8 -7
  30. package/core/lintStaged.js +3 -3
  31. package/core/npm.js +51 -16
  32. package/core/pkg.js +74 -21
  33. package/core/project.js +6 -0
  34. package/core/semanticRelease.js +3 -3
  35. package/core/turbo.js +52 -0
  36. package/core/typedoc.js +6 -19
  37. package/core/vscode.js +16 -6
  38. package/cspell/index.js +33 -23
  39. package/editorconfig/index.js +20 -8
  40. package/eslint/index.js +91 -48
  41. package/githooks/index.js +48 -57
  42. package/gitignore/index.js +5 -22
  43. package/jest/index.js +13 -17
  44. package/lang/.eslintrc.json +2 -1
  45. package/lang/index.js +40 -39
  46. package/lang/templates/index.spec.ts +3 -2
  47. package/lang/templates/index.ts +1 -2
  48. package/licenses/index.js +26 -0
  49. package/package.json +21 -15
  50. package/postconfigure/index.js +3 -3
  51. package/project/index.js +262 -155
  52. package/release/index.js +5 -6
  53. package/renovate/index.js +5 -3
  54. 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.40 build:tsc
4
+ [tsc] > tsc --noEmit --skipLibCheck
5
+ [tsc]
6
+ [tsc] npm run build:tsc exited with code 0
@@ -0,0 +1,63 @@
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
+
10
+ ✔ _tester/node_modules/@w5s/mrm-preset/README.md Updated
11
+ Transforms run
12
+ ⁕ PKG_JSON:template=# W5s Mrm Preset _(${name})_
13
+ ⁕ PKG_JSON:template=> ${description}&unknownTxt=
14
+ ⁕ PKG_JSON:template=[${license}][license-url] © ${author}
15
+ ⁕ PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
16
+ ⁕ PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}
17
+ ⁕ PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
18
+
19
+ ✔ _tester/node_modules/@w5s/eslint-config/README.md Updated
20
+ Transforms run
21
+ ⁕ PKG_JSON:template=# W5s ESLint configuration _(${name})_
22
+ ⁕ PKG_JSON:template=> ${description}&unknownTxt=
23
+ ⁕ PKG_JSON:template=```console\nnpm install --save-dev ${name}\n```
24
+ ⁕ PKG_JSON:template=[${license}][license-url] © ${author}
25
+ ⁕ PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
26
+ ⁕ PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}
27
+ ⁕ PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
28
+
29
+ ✔ _tester/node_modules/@w5s/cspell-config/README.md Updated
30
+ Transforms run
31
+ ⁕ PKG_JSON:template=# W5s CSpell configuration _(${name})_
32
+ ⁕ PKG_JSON:template=> ${description}&unknownTxt=
33
+ ⁕ PKG_JSON:template=```console\nnpm install --save-dev ${name} cspell\n```
34
+ ⁕ PKG_JSON:template=```json\n{\n "import": ["${name}"]\n}\n```
35
+ ⁕ PKG_JSON:template=[${license}][license-url] © ${author}
36
+ ⁕ PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
37
+ ⁕ PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}
38
+ ⁕ PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
39
+
40
+ ✔ _tester/node_modules/@w5s/ts-config/README.md Updated
41
+ Transforms run
42
+ ⁕ PKG_JSON:template=# W5s Typescript configuration _(${name})_
43
+ ⁕ PKG_JSON:template=> ${description}&unknownTxt=
44
+ ⁕ PKG_JSON:template=```console\nnpm install --save-dev ${name}\n```
45
+ ⁕ PKG_JSON:template=Typescript: ${peerDependencies.typescript}&unknownTxt=
46
+ ⁕ PKG_JSON:template=[${license}][license-url] © ${author}
47
+ ⁕ PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
48
+ ⁕ PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}
49
+ ⁕ PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
50
+
51
+ ✔ _tester/node_modules/@w5s/prettier-config/README.md Updated
52
+ Transforms run
53
+ ⁕ PKG_JSON:template=# W5s Prettier configuration _(${name})_
54
+ ⁕ PKG_JSON:template=> ${description}&unknownTxt=
55
+ ⁕ PKG_JSON:template=```console\nnpm install --save-dev ${name}\n```
56
+ ⁕ PKG_JSON:template=```json\n"${name}"\n```
57
+ ⁕ PKG_JSON:template=```js\nmodule.exports = {\n ...require('${name}'),\n // Override rules\n};\n```
58
+ ⁕ PKG_JSON:template=Prettier: ${peerDependencies.prettier}&unknownTxt=
59
+ ⁕ PKG_JSON:template=[${license}][license-url] © ${author}
60
+ ⁕ PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
61
+ ⁕ PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}
62
+ ⁕ PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
63
+
@@ -0,0 +1,6 @@
1
+ [1] : exited with code 0
2
+ [src]
3
+ [src] > @w5s/mrm-preset@1.0.0-alpha.40 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.40 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 @@
1
+ CSpell: Files checked: 51, Issues found: 0 in 0 files
@@ -0,0 +1,27 @@
1
+ [src]
2
+ [src] > @w5s/mrm-preset@1.0.0-alpha.40 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,244 @@
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.41 (2023-02-06)
7
+
8
+ - 📝 Update documentation ([8cd1934](https://github.com/w5s/project-config/commit/8cd1934))
9
+
10
+ # [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)
11
+
12
+ **Note:** Version bump only for package @w5s/mrm-preset
13
+
14
+ # [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)
15
+
16
+ **Note:** Version bump only for package @w5s/mrm-preset
17
+
18
+ # [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)
19
+
20
+ ### Reverts
21
+
22
+ - Revert "💚 Correct clean build script" ([cc3c1e3](https://github.com/w5s/project-config/commit/cc3c1e3f20b3fd7c4412a3ac3ea199e005537468))
23
+
24
+ # [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)
25
+
26
+ **Note:** Version bump only for package @w5s/mrm-preset
27
+
28
+ # [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)
29
+
30
+ **Note:** Version bump only for package @w5s/mrm-preset
31
+
32
+ # [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)
33
+
34
+ **Note:** Version bump only for package @w5s/mrm-preset
35
+
36
+ # [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)
37
+
38
+ **Note:** Version bump only for package @w5s/mrm-preset
39
+
40
+ # [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)
41
+
42
+ **Note:** Version bump only for package @w5s/mrm-preset
43
+
44
+ # [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)
45
+
46
+ **Note:** Version bump only for package @w5s/mrm-preset
47
+
48
+ # [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)
49
+
50
+ **Note:** Version bump only for package @w5s/mrm-preset
51
+
52
+ # [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)
53
+
54
+ **Note:** Version bump only for package @w5s/mrm-preset
55
+
56
+ # [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)
7
57
 
58
+ **Note:** Version bump only for package @w5s/mrm-preset
59
+
60
+ # [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)
61
+
62
+ **Note:** Version bump only for package @w5s/mrm-preset
63
+
64
+ # [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)
65
+
66
+ **Note:** Version bump only for package @w5s/mrm-preset
67
+
68
+ # [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)
69
+
70
+ **Note:** Version bump only for package @w5s/mrm-preset
71
+
72
+ # [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)
73
+
74
+ **Note:** Version bump only for package @w5s/mrm-preset
75
+
76
+ # [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)
77
+
78
+ **Note:** Version bump only for package @w5s/mrm-preset
79
+
80
+ # [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)
81
+
82
+ **Note:** Version bump only for package @w5s/mrm-preset
83
+
84
+ # [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)
85
+
86
+ **Note:** Version bump only for package @w5s/mrm-preset
87
+
88
+ # [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)
89
+
90
+ **Note:** Version bump only for package @w5s/mrm-preset
91
+
92
+ # [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)
93
+
94
+ **Note:** Version bump only for package @w5s/mrm-preset
95
+
96
+ # [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)
97
+
98
+ **Note:** Version bump only for package @w5s/mrm-preset
99
+
100
+ # [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)
101
+
102
+ **Note:** Version bump only for package @w5s/mrm-preset
103
+
104
+ # [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)
105
+
106
+ **Note:** Version bump only for package @w5s/mrm-preset
107
+
108
+ # [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
109
 
9
110
  ### Bug Fixes
10
111
 
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))
112
+ - correct require extension eslint rule ([94798d6](https://github.com/w5s/project-config/commit/94798d6579b93d92f44021f9f77971994ca5ce5e))
15
113
 
114
+ # [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
115
 
17
- ### Features
116
+ ### Bug Fixes
18
117
 
19
- * improve typescript eslint configuration ([efc6f1c](https://github.com/w5s/project-config/commit/efc6f1cef876e8fc5d4d1d1b94ca90a6805fbbbf))
118
+ - remove test from build ([506f19d](https://github.com/w5s/project-config/commit/506f19d71b3fc16613d37d10c022a08dbcf70376))
20
119
 
120
+ # [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
121
 
122
+ ### Bug Fixes
22
123
 
124
+ - add prepare task to turbo configuration ([717d59a](https://github.com/w5s/project-config/commit/717d59a724c1de8cb37f37c23aae8f4cc57fc231))
125
+ - remove --quiet option on format ([268b0a7](https://github.com/w5s/project-config/commit/268b0a76dbd03cfa6729988472948a66e2b749c9))
23
126
 
127
+ # [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
128
 
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)
129
+ ### Bug Fixes
26
130
 
131
+ - improve cspell output ([a5721b5](https://github.com/w5s/project-config/commit/a5721b5c8e97817dc68e9444f4443d3cb7893a27))
132
+
133
+ # [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)
134
+
135
+ ### Bug Fixes
136
+
137
+ - add spellcheck task to turbo config ([1029c2b](https://github.com/w5s/project-config/commit/1029c2b97b12b44618ce741d045b02712f0ebf18))
138
+ - clean non useful empty script when possible ([2e7e60a](https://github.com/w5s/project-config/commit/2e7e60a400506bbca00db653813668fa47f8f065))
139
+ - correct docs task in turbo ([0fca8c9](https://github.com/w5s/project-config/commit/0fca8c9ca0389b090e6aa2a66d47ab63b1cb138e))
140
+ - remove uneeded @types/jest typing ([475f6bb](https://github.com/w5s/project-config/commit/475f6bbdc101d31460cd8ffb7f5deb3b97176d5c))
141
+ - remove uneeded cspell script ([ba8d38b](https://github.com/w5s/project-config/commit/ba8d38b8053a24a7937c24c270f5d61d3dad71c7))
27
142
 
28
143
  ### Features
29
144
 
30
- * use airbnb-base as default presets ([e499fc1](https://github.com/w5s/project-config/commit/e499fc115023571e749072db33d774b443b68bb7))
145
+ - configure spellcheck ([4be6a96](https://github.com/w5s/project-config/commit/4be6a96d6d30e1085b73c0befcab1d3fa30475ab))
146
+ - improve eslint mrm support for workspaces ([2dacc2e](https://github.com/w5s/project-config/commit/2dacc2e867ebb74c8de777af2ce9f173426ebc33))
147
+ - improve turbo support for lint and format ([76e19e0](https://github.com/w5s/project-config/commit/76e19e02918aba66a2e6e9c06a7d0bed99500ecc))
148
+
149
+ # [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)
150
+
151
+ ### Bug Fixes
31
152
 
153
+ - correct prepare package script ([f2d5fbf](https://github.com/w5s/project-config/commit/f2d5fbfc4e7b66dece1d1139e2ba3835bcf524a1))
32
154
 
155
+ ### Features
33
156
 
157
+ - add minimal support for yarn + github ci ([b9ae537](https://github.com/w5s/project-config/commit/b9ae53746fa9a3f92a1ca0e3600e20cdda583a45))
34
158
 
159
+ # [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)
35
160
 
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)
161
+ ### Bug Fixes
162
+
163
+ - remove tsc on lint-staged because buggy ([6b0f4f2](https://github.com/w5s/project-config/commit/6b0f4f2c6d5d06f959ee1edc5cc6266464747d7e))
164
+
165
+ # [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)
166
+
167
+ ### Bug Fixes
168
+
169
+ - correct default mrm task ([1a59cb1](https://github.com/w5s/project-config/commit/1a59cb1a114c2cba091c4729b5e66e5a5354004e))
170
+
171
+ # [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)
172
+
173
+ ### Bug Fixes
174
+
175
+ - add missing $schema for tsconfig ([c33c7ae](https://github.com/w5s/project-config/commit/c33c7aeba405d651eba19187436724780dd90aff))
176
+ - remove unused typedoc script ([51238f0](https://github.com/w5s/project-config/commit/51238f04b8f3d95baac7f0a367ba1c07061d2ce4))
177
+
178
+ # [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)
179
+
180
+ ### Bug Fixes
37
181
 
182
+ - correct bootstrap step ([da7f539](https://github.com/w5s/project-config/commit/da7f539560ba143f830c9ea824b0d79c6a50522c))
183
+ - correct is-ci script that fails in some yarn berry ([4e4707d](https://github.com/w5s/project-config/commit/4e4707d7e8c0cd2c88e1dc6bc94705317dcf9e98))
184
+ - improve yarn check ([3af241a](https://github.com/w5s/project-config/commit/3af241af004d747518733983260eb295aa75e5cb))
185
+
186
+ # [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)
187
+
188
+ ### Bug Fixes
189
+
190
+ - correct gitignore task ([b4f0903](https://github.com/w5s/project-config/commit/b4f0903561c97500aef65488ef06ccd7eae0db80))
191
+ - remove jest on lint-staged ([2fbc851](https://github.com/w5s/project-config/commit/2fbc85132ab380429d6966bff47b176bcfb51f6d))
192
+ - shorten eslint extensions ([aecc870](https://github.com/w5s/project-config/commit/aecc870ce0b288436208757376bc05504bff3331))
38
193
 
39
194
  ### Features
40
195
 
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))
196
+ - use es-jest as default jest preset ([61535d9](https://github.com/w5s/project-config/commit/61535d9c47c25150becc564a5dd273d7cc14b579))
43
197
 
198
+ # [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
199
 
200
+ ### Bug Fixes
45
201
 
202
+ - change bootstrap behavior ([497c83a](https://github.com/w5s/project-config/commit/497c83a4082f7fd4e3b8b6913802ebcb21caa65a))
203
+ - remove lint-staged + cspell integration ([6747c83](https://github.com/w5s/project-config/commit/6747c83ec997034d25d136bc5aa008ed108ceb96))
204
+ - use UNLICENSED for default license ([608ee8f](https://github.com/w5s/project-config/commit/608ee8f0bf57fec94636587b116d5bda0fb4ee3f))
46
205
 
206
+ ### Features
47
207
 
48
- # 1.0.0-alpha.1 (2022-02-12)
208
+ - add gitignore for yarn v2 ([06c547a](https://github.com/w5s/project-config/commit/06c547a6b7813f935678c29b410aee62da5b3866))
209
+ - add support for yarn berry ([2b77669](https://github.com/w5s/project-config/commit/2b77669a29316825a38470c80a48aff8ab068f7f))
49
210
 
211
+ # [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
212
 
51
213
  ### Bug Fixes
52
214
 
53
- * correct generate cspell.json ([e638b75](https://github.com/w5s/project-config/commit/e638b75ead5d3ffd34b0c74b95b237d29b542406))
215
+ - correct eslint vscode settings ([a32e0fb](https://github.com/w5s/project-config/commit/a32e0fb739cbe349565b26ea412cdf37e3d56bdb))
216
+ - correct mrm preset url ([ad6f030](https://github.com/w5s/project-config/commit/ad6f03091e0a294c043974b564e24c79023e659b))
217
+ - correct typo ([2218859](https://github.com/w5s/project-config/commit/221885997fec37149f7e349b00a58fbcb3bfb8db))
218
+ - rollback to eslint.validate vscode setting ([769a2e1](https://github.com/w5s/project-config/commit/769a2e100083aca4f5e9037fa539fcf1f6002d65))
219
+
220
+ ### Features
221
+
222
+ - improve typescript eslint configuration ([efc6f1c](https://github.com/w5s/project-config/commit/efc6f1cef876e8fc5d4d1d1b94ca90a6805fbbbf))
223
+
224
+ # [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)
225
+
226
+ ### Features
227
+
228
+ - use airbnb-base as default presets ([e499fc1](https://github.com/w5s/project-config/commit/e499fc115023571e749072db33d774b443b68bb7))
229
+
230
+ # [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)
231
+
232
+ ### Features
233
+
234
+ - enable source.fixAll for vscode ([d484156](https://github.com/w5s/project-config/commit/d484156c063f2bf9f5cb3212878aa07bb4f8fd6f))
235
+ - improve arrow-body-style configuration ([a4ee8a9](https://github.com/w5s/project-config/commit/a4ee8a9f3912285b45287afc4ccae2fa57431c6a))
236
+
237
+ # 1.0.0-alpha.1 (2022-02-12)
238
+
239
+ ### Bug Fixes
54
240
 
241
+ - correct generate cspell.json ([e638b75](https://github.com/w5s/project-config/commit/e638b75ead5d3ffd34b0c74b95b237d29b542406))
55
242
 
56
243
  ### Features
57
244
 
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))
245
+ - add cspell check on lint-staged in mrm ([d8a744f](https://github.com/w5s/project-config/commit/d8a744f1f297c2308cd15ce1f19958f9302eee5d))
246
+ - 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