@w5s/mrm-preset 1.0.0-alpha.2 → 1.0.0-alpha.23

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 +11 -0
  2. package/.turbo/turbo-docs.log +44 -0
  3. package/.turbo/turbo-format.log +7 -0
  4. package/.turbo/turbo-lint.log +7 -0
  5. package/.turbo/turbo-prepare.log +2 -0
  6. package/.turbo/turbo-test.log +20 -0
  7. package/CHANGELOG.md +253 -0
  8. package/README.md +1 -1
  9. package/bootstrap/index.js +30 -50
  10. package/ci/_gitlab/AutoDevopsInclude.gitlab-ci.yml +2 -0
  11. package/ci/github.js +54 -0
  12. package/ci/gitlab.js +1 -1
  13. package/ci/index.js +7 -2
  14. package/commitlint/index.js +8 -2
  15. package/config.json +1 -0
  16. package/contributing/index.js +1 -1
  17. package/contributing/templates/CODE_OF_CONDUCT.md +3 -4
  18. package/core/block.js +2 -3
  19. package/core/commitlint.js +3 -3
  20. package/core/cspell.js +1 -10
  21. package/core/eslint.js +25 -6
  22. package/{gitignore/template.js → core/git.ignore.js} +32 -6
  23. package/core/git.js +21 -18
  24. package/core/githooks.js +8 -7
  25. package/core/githubCI.js +56 -0
  26. package/core/jest.js +50 -69
  27. package/core/jsonFile.js +8 -7
  28. package/core/lintStaged.js +3 -3
  29. package/core/npm.js +52 -15
  30. package/core/pkg.js +92 -14
  31. package/core/project.js +6 -0
  32. package/core/semanticRelease.js +4 -4
  33. package/core/turbo.js +57 -0
  34. package/core/typedoc.js +7 -20
  35. package/core/vscode.js +16 -6
  36. package/cspell/index.js +20 -10
  37. package/editorconfig/index.js +7 -2
  38. package/eslint/index.js +85 -33
  39. package/githooks/index.js +47 -56
  40. package/gitignore/index.js +5 -22
  41. package/jest/index.js +13 -17
  42. package/lang/.eslintrc.json +2 -1
  43. package/lang/index.js +44 -41
  44. package/lang/templates/index.spec.ts +1 -0
  45. package/lang/templates/index.ts +1 -2
  46. package/licenses/index.js +26 -0
  47. package/package.json +19 -13
  48. package/postconfigure/index.js +3 -3
  49. package/project/index.js +234 -156
  50. package/release/index.js +5 -5
  51. package/renovate/index.js +7 -5
  52. package/tsconfig.json +3 -5
  53. package/core/workspace.js +0 -6
@@ -0,0 +1,11 @@
1
+ @w5s/mrm-preset:build: cache hit, replaying output e7377db08b06ceeb
2
+ @w5s/mrm-preset:build: [build:*empty]
3
+ @w5s/mrm-preset:build: [build:*empty] > @w5s/mrm-preset@1.0.0-alpha.22 build:empty
4
+ @w5s/mrm-preset:build: [build:*empty] > :
5
+ @w5s/mrm-preset:build: [build:*empty]
6
+ @w5s/mrm-preset:build: [build:*tsc]
7
+ @w5s/mrm-preset:build: [build:*tsc] > @w5s/mrm-preset@1.0.0-alpha.22 build:tsc
8
+ @w5s/mrm-preset:build: [build:*tsc] > tsc --noEmit --skipLibCheck
9
+ @w5s/mrm-preset:build: [build:*tsc]
10
+ @w5s/mrm-preset:build: [build:*empty] npm run build:empty exited with code 0
11
+ @w5s/mrm-preset:build: [build:*tsc] npm run build:tsc exited with code 0
@@ -0,0 +1,44 @@
1
+ @w5s/mrm-preset:docs: cache hit, replaying output d857c46ea61b78a6
2
+ @w5s/mrm-preset:docs: Starting markdown-magic [ '**/*.md', '!node_modules/**' ]
3
+ @w5s/mrm-preset:docs: ℹ Notice:
4
+ @w5s/mrm-preset:docs:  Missing transforms "BASIC_RULES","JSX_RULES" in _tester/node_modules/eslint-plugin-react/README.md
5
+ @w5s/mrm-preset:docs: 
6
+ @w5s/mrm-preset:docs: ✔ README.md Updated
7
+ @w5s/mrm-preset:docs:  Transforms run
8
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=# W5s Mrm Preset _(${name})_
9
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=> ${description}&unknownTxt=
10
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[${license}][license-url] © ${author}
11
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
12
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
13
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
14
+ @w5s/mrm-preset:docs: 
15
+ @w5s/mrm-preset:docs: ✔ _tester/node_modules/@w5s/mrm-preset/README.md Updated
16
+ @w5s/mrm-preset:docs:  Transforms run
17
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=# W5s Mrm Preset _(${name})_
18
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=> ${description}&unknownTxt=
19
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[${license}][license-url] © ${author}
20
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
21
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
22
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
23
+ @w5s/mrm-preset:docs: 
24
+ @w5s/mrm-preset:docs: ✔ _tester/node_modules/@w5s/eslint-config/README.md Updated
25
+ @w5s/mrm-preset:docs:  Transforms run
26
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=# W5s ESLint configuration _(${name})_
27
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=> ${description}&unknownTxt=
28
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=```console\nnpm install --save-dev ${name}\n```
29
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[${license}][license-url] © ${author}
30
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
31
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
32
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
33
+ @w5s/mrm-preset:docs: 
34
+ @w5s/mrm-preset:docs: ✔ _tester/node_modules/@w5s/ts-config/README.md Updated
35
+ @w5s/mrm-preset:docs:  Transforms run
36
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=# W5s Typescript configuration _(${name})_
37
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=> ${description}&unknownTxt=
38
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=```console\nnpm install --save-dev ${name}\n```
39
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=Typescript: ${peerDependencies.typescript}&unknownTxt=
40
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[${license}][license-url] © ${author}
41
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
42
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
43
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
44
+ @w5s/mrm-preset:docs: 
@@ -0,0 +1,7 @@
1
+ @w5s/mrm-preset:format: cache hit, replaying output 0c91c04438167c63
2
+ @w5s/mrm-preset:format: [1] : exited with code 0
3
+ @w5s/mrm-preset:format: [format:*src]
4
+ @w5s/mrm-preset:format: [format:*src] > @w5s/mrm-preset@1.0.0-alpha.22 format:src
5
+ @w5s/mrm-preset:format: [format:*src] > eslint . --fix --ext=mjs,cjs,js,jsx,ts,tsx,json
6
+ @w5s/mrm-preset:format: [format:*src]
7
+ @w5s/mrm-preset:format: [format:*src] npm run format:src exited with code 0
@@ -0,0 +1,7 @@
1
+ @w5s/mrm-preset:lint: cache hit, replaying output d94ca63660f29658
2
+ @w5s/mrm-preset:lint: [1] : exited with code 0
3
+ @w5s/mrm-preset:lint: [lint:*src]
4
+ @w5s/mrm-preset:lint: [lint:*src] > @w5s/mrm-preset@1.0.0-alpha.22 lint:src
5
+ @w5s/mrm-preset:lint: [lint:*src] > eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json
6
+ @w5s/mrm-preset:lint: [lint:*src]
7
+ @w5s/mrm-preset:lint: [lint:*src] npm run lint:src exited with code 0
@@ -0,0 +1,2 @@
1
+ @w5s/mrm-preset:prepare: cache hit, replaying output 88973bec8937c59d
2
+ @w5s/mrm-preset:prepare: [0] : exited with code 0
@@ -0,0 +1,20 @@
1
+ @w5s/mrm-preset:test: cache hit, replaying output 3a07f2220396e619
2
+ @w5s/mrm-preset:test: mkdir: _tester: File exists
3
+ @w5s/mrm-preset:test: Running bootstrap...
4
+ @w5s/mrm-preset:test: Running alias configure...
5
+ @w5s/mrm-preset:test: Running gitignore...
6
+ @w5s/mrm-preset:test: Running project...
7
+ @w5s/mrm-preset:test: Update package.json
8
+ @w5s/mrm-preset:test: Running contributing...
9
+ @w5s/mrm-preset:test: Running licenses...
10
+ @w5s/mrm-preset:test: Running release...
11
+ @w5s/mrm-preset:test: Running ci...
12
+ @w5s/mrm-preset:test: Running lang...
13
+ @w5s/mrm-preset:test: Running commitlint...
14
+ @w5s/mrm-preset:test: Running editorconfig...
15
+ @w5s/mrm-preset:test: Running eslint...
16
+ @w5s/mrm-preset:test: Running cspell...
17
+ @w5s/mrm-preset:test: Running jest...
18
+ @w5s/mrm-preset:test: Running renovate...
19
+ @w5s/mrm-preset:test: Running githooks...
20
+ @w5s/mrm-preset:test: Running postconfigure...
package/CHANGELOG.md CHANGED
@@ -3,6 +3,259 @@
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.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)
7
+
8
+ **Note:** Version bump only for package @w5s/mrm-preset
9
+
10
+
11
+
12
+
13
+
14
+ # [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)
15
+
16
+ **Note:** Version bump only for package @w5s/mrm-preset
17
+
18
+
19
+
20
+
21
+
22
+ # [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)
23
+
24
+ **Note:** Version bump only for package @w5s/mrm-preset
25
+
26
+
27
+
28
+
29
+
30
+ # [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)
31
+
32
+ **Note:** Version bump only for package @w5s/mrm-preset
33
+
34
+
35
+
36
+
37
+
38
+ # [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)
39
+
40
+ **Note:** Version bump only for package @w5s/mrm-preset
41
+
42
+
43
+
44
+
45
+
46
+ # [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)
47
+
48
+ **Note:** Version bump only for package @w5s/mrm-preset
49
+
50
+
51
+
52
+
53
+
54
+ # [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)
55
+
56
+ **Note:** Version bump only for package @w5s/mrm-preset
57
+
58
+
59
+
60
+
61
+
62
+ # [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)
63
+
64
+
65
+ ### Bug Fixes
66
+
67
+ * correct require extension eslint rule ([94798d6](https://github.com/w5s/project-config/commit/94798d6579b93d92f44021f9f77971994ca5ce5e))
68
+
69
+
70
+
71
+
72
+
73
+ # [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)
74
+
75
+
76
+ ### Bug Fixes
77
+
78
+ * remove test from build ([506f19d](https://github.com/w5s/project-config/commit/506f19d71b3fc16613d37d10c022a08dbcf70376))
79
+
80
+
81
+
82
+
83
+
84
+ # [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)
85
+
86
+
87
+ ### Bug Fixes
88
+
89
+ * add prepare task to turbo configuration ([717d59a](https://github.com/w5s/project-config/commit/717d59a724c1de8cb37f37c23aae8f4cc57fc231))
90
+ * remove --quiet option on format ([268b0a7](https://github.com/w5s/project-config/commit/268b0a76dbd03cfa6729988472948a66e2b749c9))
91
+
92
+
93
+
94
+
95
+
96
+ # [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)
97
+
98
+
99
+ ### Bug Fixes
100
+
101
+ * improve cspell output ([a5721b5](https://github.com/w5s/project-config/commit/a5721b5c8e97817dc68e9444f4443d3cb7893a27))
102
+
103
+
104
+
105
+
106
+
107
+ # [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)
108
+
109
+
110
+ ### Bug Fixes
111
+
112
+ * add spellcheck task to turbo config ([1029c2b](https://github.com/w5s/project-config/commit/1029c2b97b12b44618ce741d045b02712f0ebf18))
113
+ * clean non useful empty script when possible ([2e7e60a](https://github.com/w5s/project-config/commit/2e7e60a400506bbca00db653813668fa47f8f065))
114
+ * correct docs task in turbo ([0fca8c9](https://github.com/w5s/project-config/commit/0fca8c9ca0389b090e6aa2a66d47ab63b1cb138e))
115
+ * remove uneeded @types/jest typing ([475f6bb](https://github.com/w5s/project-config/commit/475f6bbdc101d31460cd8ffb7f5deb3b97176d5c))
116
+ * remove uneeded cspell script ([ba8d38b](https://github.com/w5s/project-config/commit/ba8d38b8053a24a7937c24c270f5d61d3dad71c7))
117
+
118
+
119
+ ### Features
120
+
121
+ * configure spellcheck ([4be6a96](https://github.com/w5s/project-config/commit/4be6a96d6d30e1085b73c0befcab1d3fa30475ab))
122
+ * improve eslint mrm support for workspaces ([2dacc2e](https://github.com/w5s/project-config/commit/2dacc2e867ebb74c8de777af2ce9f173426ebc33))
123
+ * improve turbo support for lint and format ([76e19e0](https://github.com/w5s/project-config/commit/76e19e02918aba66a2e6e9c06a7d0bed99500ecc))
124
+
125
+
126
+
127
+
128
+
129
+ # [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)
130
+
131
+
132
+ ### Bug Fixes
133
+
134
+ * correct prepare package script ([f2d5fbf](https://github.com/w5s/project-config/commit/f2d5fbfc4e7b66dece1d1139e2ba3835bcf524a1))
135
+
136
+
137
+ ### Features
138
+
139
+ * add minimal support for yarn + github ci ([b9ae537](https://github.com/w5s/project-config/commit/b9ae53746fa9a3f92a1ca0e3600e20cdda583a45))
140
+
141
+
142
+
143
+
144
+
145
+ # [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)
146
+
147
+
148
+ ### Bug Fixes
149
+
150
+ * remove tsc on lint-staged because buggy ([6b0f4f2](https://github.com/w5s/project-config/commit/6b0f4f2c6d5d06f959ee1edc5cc6266464747d7e))
151
+
152
+
153
+
154
+
155
+
156
+ # [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)
157
+
158
+
159
+ ### Bug Fixes
160
+
161
+ * correct default mrm task ([1a59cb1](https://github.com/w5s/project-config/commit/1a59cb1a114c2cba091c4729b5e66e5a5354004e))
162
+
163
+
164
+
165
+
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
+
170
+ ### Bug Fixes
171
+
172
+ * add missing $schema for tsconfig ([c33c7ae](https://github.com/w5s/project-config/commit/c33c7aeba405d651eba19187436724780dd90aff))
173
+ * remove unused typedoc script ([51238f0](https://github.com/w5s/project-config/commit/51238f04b8f3d95baac7f0a367ba1c07061d2ce4))
174
+
175
+
176
+
177
+
178
+
179
+ # [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)
180
+
181
+
182
+ ### Bug Fixes
183
+
184
+ * correct bootstrap step ([da7f539](https://github.com/w5s/project-config/commit/da7f539560ba143f830c9ea824b0d79c6a50522c))
185
+ * correct is-ci script that fails in some yarn berry ([4e4707d](https://github.com/w5s/project-config/commit/4e4707d7e8c0cd2c88e1dc6bc94705317dcf9e98))
186
+ * improve yarn check ([3af241a](https://github.com/w5s/project-config/commit/3af241af004d747518733983260eb295aa75e5cb))
187
+
188
+
189
+
190
+
191
+
192
+ # [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)
193
+
194
+
195
+ ### Bug Fixes
196
+
197
+ * correct gitignore task ([b4f0903](https://github.com/w5s/project-config/commit/b4f0903561c97500aef65488ef06ccd7eae0db80))
198
+ * remove jest on lint-staged ([2fbc851](https://github.com/w5s/project-config/commit/2fbc85132ab380429d6966bff47b176bcfb51f6d))
199
+ * shorten eslint extensions ([aecc870](https://github.com/w5s/project-config/commit/aecc870ce0b288436208757376bc05504bff3331))
200
+
201
+
202
+ ### Features
203
+
204
+ * use es-jest as default jest preset ([61535d9](https://github.com/w5s/project-config/commit/61535d9c47c25150becc564a5dd273d7cc14b579))
205
+
206
+
207
+
208
+
209
+
210
+ # [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)
211
+
212
+
213
+ ### Bug Fixes
214
+
215
+ * change bootstrap behavior ([497c83a](https://github.com/w5s/project-config/commit/497c83a4082f7fd4e3b8b6913802ebcb21caa65a))
216
+ * remove lint-staged + cspell integration ([6747c83](https://github.com/w5s/project-config/commit/6747c83ec997034d25d136bc5aa008ed108ceb96))
217
+ * use UNLICENSED for default license ([608ee8f](https://github.com/w5s/project-config/commit/608ee8f0bf57fec94636587b116d5bda0fb4ee3f))
218
+
219
+
220
+ ### Features
221
+
222
+ * add gitignore for yarn v2 ([06c547a](https://github.com/w5s/project-config/commit/06c547a6b7813f935678c29b410aee62da5b3866))
223
+ * add support for yarn berry ([2b77669](https://github.com/w5s/project-config/commit/2b77669a29316825a38470c80a48aff8ab068f7f))
224
+
225
+
226
+
227
+
228
+
229
+ # [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)
230
+
231
+
232
+ ### Bug Fixes
233
+
234
+ * correct eslint vscode settings ([a32e0fb](https://github.com/w5s/project-config/commit/a32e0fb739cbe349565b26ea412cdf37e3d56bdb))
235
+ * correct mrm preset url ([ad6f030](https://github.com/w5s/project-config/commit/ad6f03091e0a294c043974b564e24c79023e659b))
236
+ * correct typo ([2218859](https://github.com/w5s/project-config/commit/221885997fec37149f7e349b00a58fbcb3bfb8db))
237
+ * rollback to eslint.validate vscode setting ([769a2e1](https://github.com/w5s/project-config/commit/769a2e100083aca4f5e9037fa539fcf1f6002d65))
238
+
239
+
240
+ ### Features
241
+
242
+ * improve typescript eslint configuration ([efc6f1c](https://github.com/w5s/project-config/commit/efc6f1cef876e8fc5d4d1d1b94ca90a6805fbbbf))
243
+
244
+
245
+
246
+
247
+
248
+ # [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)
249
+
250
+
251
+ ### Features
252
+
253
+ * use airbnb-base as default presets ([e499fc1](https://github.com/w5s/project-config/commit/e499fc115023571e749072db33d774b443b68bb7))
254
+
255
+
256
+
257
+
258
+
6
259
  # [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)
7
260
 
8
261
 
package/README.md CHANGED
@@ -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
@@ -1,70 +1,56 @@
1
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');
2
+ const path = require('node:path');
3
+ const { packageJson } = require('mrm-core');
4
+ const npm = require('../core/npm.js');
5
+ const pkg = require('../core/pkg.js');
6
+ const { gitIgnoreTemplate } = require('../core/git.js');
6
7
 
7
8
  /**
8
9
  * @param {{
9
10
  * mrmPreset: string,
10
11
  * mrmTask: string,
11
12
  * packageArchetype: 'application'|'library'|'workspace',
12
- * packageManager: 'npm'|'yarn'
13
+ * packageManager: 'npm'|'yarn@classic'|'yarn@berry'
13
14
  * }} config
14
15
  * @returns {void}
15
16
  */
16
- function task({ mrmPreset, mrmTask, packageArchetype, packageManager }) {
17
+ function task({ mrmPreset, mrmTask, packageManager }) {
17
18
  /**
18
19
  * setup package.json from following object
19
20
  */
20
21
 
21
- const packageFile = packageJson({
22
+ packageJson({
22
23
  name: path.basename(process.cwd()),
23
24
  version: '1.0.0-alpha.0',
24
25
  private: true,
25
- license: 'PRIVATE',
26
+ license: 'UNLICENSED',
26
27
  description: '',
27
- });
28
+ }).save();
29
+ gitIgnoreTemplate(['macOS', 'NodeJS', 'VisualStudioCode']);
28
30
 
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();
31
+ npm.bootstrap(packageManager);
61
32
 
62
33
  npm.dependency({
63
34
  dev: true,
64
35
  name: ['mrm', mrmPreset],
65
- yarn: packageManager === 'yarn',
66
36
  state: 'present',
67
37
  });
38
+
39
+ pkg.withPackageJson((packageFile) => {
40
+ const currentPackageManager = pkg.manager(packageFile);
41
+
42
+ // Add MRM default scripts
43
+ pkg.script(packageFile, {
44
+ name: 'configure',
45
+ state: 'default',
46
+ script: currentPackageManager === 'npm' ? `npm run mrm -- ${mrmTask}` : `yarn mrm ${mrmTask}`,
47
+ });
48
+ pkg.script(packageFile, {
49
+ name: 'mrm',
50
+ state: 'default',
51
+ script: `mrm --preset ${mrmPreset}`,
52
+ });
53
+ });
68
54
  }
69
55
 
70
56
  task.description = 'Bootstrap a new project.';
@@ -80,15 +66,9 @@ task.parameters = {
80
66
  message: 'Default MRM task name ?',
81
67
  type: 'input',
82
68
  },
83
- packageArchetype: {
84
- choices: ['library', 'application', 'workspace'],
85
- message: 'What Archetype of package ?',
86
- name: 'packageArchetype',
87
- type: 'input',
88
- },
89
69
  packageManager: {
90
- default: 'yarn',
91
- choices: ['yarn', 'npm'],
70
+ default: 'yarn@berry',
71
+ choices: ['yarn@berry', 'yarn@classic', 'npm'],
92
72
  message: 'Which default package manager ?',
93
73
  name: 'packageManager',
94
74
  type: 'input',
@@ -55,6 +55,8 @@ variables:
55
55
  when: never
56
56
  - if: "$CI_COMMIT_TAG"
57
57
  when: never
58
+ - if: $CI_COMMIT_MESSAGE =~ /🔖 /
59
+ when: never
58
60
  - if: $CI_COMMIT_MESSAGE =~ /chore\(release\):/
59
61
  when: never
60
62
  - if: "$AUTO_DEVOPS_RELEASE_WHEN != 'manual'"
package/ci/github.js ADDED
@@ -0,0 +1,54 @@
1
+ /* eslint-disable global-require, sort-keys-fix/sort-keys-fix */
2
+ const { packageJson } = require('mrm-core');
3
+ const githubCI = require('../core/githubCI.js');
4
+ const pkg = require('../core/pkg.js');
5
+
6
+ function task() {
7
+ const state = 'present';
8
+ const packageManager = pkg.manager(packageJson());
9
+ const baseBranch = 'main';
10
+ const packageInstall =
11
+ packageManager === 'npm'
12
+ ? `${packageManager} ci`
13
+ : packageManager === 'yarn'
14
+ ? `${packageManager} install --frozen-lockfile`
15
+ : `${packageManager} install`;
16
+ githubCI.workflow({
17
+ name: 'node.js.yml',
18
+ state,
19
+ update: (config) => ({
20
+ name: 'Node.js CI',
21
+ ...config,
22
+ on: {
23
+ push: {
24
+ branches: [baseBranch],
25
+ },
26
+ pull_request: {
27
+ branches: [baseBranch],
28
+ },
29
+ },
30
+ jobs: {
31
+ ...config.jobs,
32
+ build: {
33
+ 'runs-on': 'ubuntu-latest',
34
+ steps: [
35
+ { uses: 'actions/checkout@v3' },
36
+ {
37
+ name: 'Use Node.js',
38
+ uses: 'actions/setup-node@v3',
39
+ with: {
40
+ 'node-version': 'lts/*',
41
+ cache: packageManager,
42
+ },
43
+ },
44
+ { run: packageInstall },
45
+ { run: `${packageManager} run build` },
46
+ { run: `${packageManager} validate` },
47
+ ],
48
+ },
49
+ },
50
+ }),
51
+ });
52
+ }
53
+
54
+ module.exports = task;
package/ci/gitlab.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable global-require, sort-keys-fix/sort-keys-fix */
2
- const path = require('path');
2
+ const path = require('node:path');
3
3
  const { yaml } = require('mrm-core');
4
4
 
5
5
  /** @type {typeof import('sync-directory')['default']} */
package/ci/index.js CHANGED
@@ -1,11 +1,16 @@
1
- const gitlabCI = require('../core/gitlabCI');
2
- const gitlab = require('./gitlab');
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');
3
5
 
4
6
  function task() {
5
7
  // check gitlab support
6
8
  if (gitlabCI.isSupported()) {
7
9
  gitlab();
8
10
  }
11
+ if (githubCI.isSupported()) {
12
+ github();
13
+ }
9
14
  }
10
15
 
11
16
  task.description = 'Setup Continuous Integration';
@@ -1,5 +1,6 @@
1
- const { commitlint } = require('../core/commitlint');
2
- const { hasGit } = require('../core/git');
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,11 @@ function createCommitLint({ commitLintPreset: commitLintPresetDefault }) {
21
22
  preset: commitLintPreset,
22
23
  state: gitPresent ? 'present' : 'absent',
23
24
  });
25
+
26
+ vscodeRecommendedExtension({
27
+ name: 'seatonjiang.gitmoji-vscode',
28
+ state: gitPresent ? 'present' : 'absent',
29
+ });
24
30
  }
25
31
 
26
32
  task.description = 'Setup CommitLint';
package/config.json CHANGED
@@ -4,6 +4,7 @@
4
4
  "gitignore",
5
5
  "project",
6
6
  "contributing",
7
+ "licenses",
7
8
  "release",
8
9
  "ci",
9
10
  "lang",
@@ -1,4 +1,4 @@
1
- const path = require('path');
1
+ const path = require('node:path');
2
2
  const { file } = require('mrm-core');
3
3
 
4
4
  function task() {
@@ -6,7 +6,7 @@
6
6
  We as members, contributors, and leaders pledge to make participation in our
7
7
  community a harassment-free experience for everyone, regardless of age, body
8
8
  size, visible or invisible disability, ethnicity, sex characteristics, gender
9
- identity and expression, level of experience, education, socio-economic status,
9
+ identity and expression, level of experience, education, socioeconomic status,
10
10
  nationality, personal appearance, race, caste, color, religion, or sexual identity
11
11
  and orientation.
12
12
 
@@ -119,11 +119,11 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119
119
  version 2.0, available at
120
120
  [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
121
121
 
122
- Community Impact Guidelines were inspired by
122
+ Community Impact Guidelines were inspired by
123
123
  [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124
124
 
125
125
  For answers to common questions about this code of conduct, see the FAQ at
126
- [https://www.contributor-covenant.org/faq][FAQ]. Translations are available
126
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available
127
127
  at [https://www.contributor-covenant.org/translations][translations].
128
128
 
129
129
  [homepage]: https://www.contributor-covenant.org
@@ -131,4 +131,3 @@ at [https://www.contributor-covenant.org/translations][translations].
131
131
  [Mozilla CoC]: https://github.com/mozilla/diversity
132
132
  [FAQ]: https://www.contributor-covenant.org/faq
133
133
  [translations]: https://www.contributor-covenant.org/translations
134
-
package/core/block.js CHANGED
@@ -23,8 +23,7 @@ function block({
23
23
  marker = (mark) => `# ${mark} generated by mrm`,
24
24
  path,
25
25
  block: blockName,
26
- // @ts-ignore
27
- insertBefore = 'begin',
26
+ // insertBefore = 'begin',
28
27
  insertAfter,
29
28
  }) {
30
29
  const EOL = '\n';
@@ -54,7 +53,7 @@ function block({
54
53
  const replaceBlock = beginBlock + EOL + blockContent + EOL + endBlock;
55
54
 
56
55
  if (found.exists) {
57
- return fullContent.substr(0, found.startIndex) + replaceBlock + fullContent.substr(found.endIndex);
56
+ return fullContent.slice(0, Math.max(0, found.startIndex)) + replaceBlock + fullContent.slice(found.endIndex);
58
57
  }
59
58
 
60
59
  // insert