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

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 (51) hide show
  1. package/.turbo/turbo-build.log +11 -0
  2. package/.turbo/turbo-docs.log +43 -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 +19 -0
  7. package/CHANGELOG.md +237 -0
  8. package/README.md +1 -1
  9. package/bootstrap/index.js +43 -42
  10. package/ci/_gitlab/AutoDevopsInclude.gitlab-ci.yml +2 -0
  11. package/ci/github.js +47 -0
  12. package/ci/gitlab.js +1 -1
  13. package/ci/index.js +7 -2
  14. package/commitlint/index.js +5 -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 +1 -1
  36. package/cspell/index.js +20 -10
  37. package/editorconfig/index.js +3 -1
  38. package/eslint/index.js +81 -32
  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 +4 -1
  43. package/lang/index.js +22 -19
  44. package/licenses/index.js +26 -0
  45. package/package.json +17 -12
  46. package/postconfigure/index.js +3 -3
  47. package/project/index.js +217 -156
  48. package/release/index.js +5 -5
  49. package/renovate/index.js +7 -5
  50. package/tsconfig.json +2 -1
  51. package/core/workspace.js +0 -6
@@ -0,0 +1,11 @@
1
+ @w5s/mrm-preset:build: cache hit, replaying output 997280f5aaf899ce
2
+ @w5s/mrm-preset:build: [build:*empty]
3
+ @w5s/mrm-preset:build: [build:*empty] > @w5s/mrm-preset@1.0.0-alpha.19 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.19 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,43 @@
1
+ @w5s/mrm-preset:docs: cache hit, replaying output c068eefb6cfef61f
2
+ @w5s/mrm-preset:docs: Starting markdown-magic [ '**/*.md', '!node_modules/**' ]
3
+ @w5s/mrm-preset:docs: ℹ Notice:
4
+ @w5s/mrm-preset:docs: Missing transforms "BASIC_RULES","JSX_RULES" in _tester/node_modules/eslint-plugin-react/README.md
5
+ @w5s/mrm-preset:docs:
6
+ @w5s/mrm-preset:docs: ✔ README.md Updated
7
+ @w5s/mrm-preset:docs: Transforms run
8
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=# W5s Mrm Preset _(${name})_
9
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=> ${description}&unknownTxt=
10
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=[${license}][license-url] © ${author}
11
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
12
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
13
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
14
+ @w5s/mrm-preset:docs:
15
+ @w5s/mrm-preset:docs: ✔ _tester/node_modules/@w5s/mrm-preset/README.md Updated
16
+ @w5s/mrm-preset:docs: Transforms run
17
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=# W5s Mrm Preset _(${name})_
18
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=> ${description}&unknownTxt=
19
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=[${license}][license-url] © ${author}
20
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
21
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
22
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
23
+ @w5s/mrm-preset:docs:
24
+ @w5s/mrm-preset:docs: ✔ _tester/node_modules/@w5s/eslint-config/README.md Updated
25
+ @w5s/mrm-preset:docs: Transforms run
26
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=# W5s ESLint configuration _(${name})_
27
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=> ${description}&unknownTxt=
28
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=```console\nnpm install --save-dev ${name}\n```
29
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=[${license}][license-url] © ${author}
30
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
31
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
32
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
33
+ @w5s/mrm-preset:docs:
34
+ @w5s/mrm-preset:docs: ✔ _tester/node_modules/@w5s/ts-config/README.md Updated
35
+ @w5s/mrm-preset:docs: Transforms run
36
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=# W5s Typescript configuration _(${name})_
37
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=> ${description}&unknownTxt=
38
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=```console\nnpm install --save-dev ${name}\n```
39
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=[${license}][license-url] © ${author}
40
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
41
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
42
+ @w5s/mrm-preset:docs: ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
43
+ @w5s/mrm-preset:docs:
@@ -0,0 +1,7 @@
1
+ @w5s/mrm-preset:format: cache hit, replaying output 787e0ab6858ee343
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.19 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 f7c8b4fc8efaad53
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.19 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 981774263f12be8a
2
+ @w5s/mrm-preset:prepare: [0] : exited with code 0
@@ -0,0 +1,19 @@
1
+ @w5s/mrm-preset:test: cache hit, replaying output 05c009fdd04ce5a0
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: Running contributing...
8
+ @w5s/mrm-preset:test: Running license...
9
+ @w5s/mrm-preset:test: Running release...
10
+ @w5s/mrm-preset:test: Running ci...
11
+ @w5s/mrm-preset:test: Running lang...
12
+ @w5s/mrm-preset:test: Running commitlint...
13
+ @w5s/mrm-preset:test: Running editorconfig...
14
+ @w5s/mrm-preset:test: Running eslint...
15
+ @w5s/mrm-preset:test: Running cspell...
16
+ @w5s/mrm-preset:test: Running jest...
17
+ @w5s/mrm-preset:test: Running renovate...
18
+ @w5s/mrm-preset:test: Running githooks...
19
+ @w5s/mrm-preset:test: Running postconfigure...
package/CHANGELOG.md CHANGED
@@ -3,6 +3,243 @@
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.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)
7
+
8
+ **Note:** Version bump only for package @w5s/mrm-preset
9
+
10
+
11
+
12
+
13
+
14
+ # [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)
15
+
16
+ **Note:** Version bump only for package @w5s/mrm-preset
17
+
18
+
19
+
20
+
21
+
22
+ # [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)
23
+
24
+ **Note:** Version bump only for package @w5s/mrm-preset
25
+
26
+
27
+
28
+
29
+
30
+ # [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)
31
+
32
+ **Note:** Version bump only for package @w5s/mrm-preset
33
+
34
+
35
+
36
+
37
+
38
+ # [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)
39
+
40
+ **Note:** Version bump only for package @w5s/mrm-preset
41
+
42
+
43
+
44
+
45
+
46
+ # [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)
47
+
48
+
49
+ ### Bug Fixes
50
+
51
+ * correct require extension eslint rule ([94798d6](https://github.com/w5s/project-config/commit/94798d6579b93d92f44021f9f77971994ca5ce5e))
52
+
53
+
54
+
55
+
56
+
57
+ # [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)
58
+
59
+
60
+ ### Bug Fixes
61
+
62
+ * remove test from build ([506f19d](https://github.com/w5s/project-config/commit/506f19d71b3fc16613d37d10c022a08dbcf70376))
63
+
64
+
65
+
66
+
67
+
68
+ # [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)
69
+
70
+
71
+ ### Bug Fixes
72
+
73
+ * add prepare task to turbo configuration ([717d59a](https://github.com/w5s/project-config/commit/717d59a724c1de8cb37f37c23aae8f4cc57fc231))
74
+ * remove --quiet option on format ([268b0a7](https://github.com/w5s/project-config/commit/268b0a76dbd03cfa6729988472948a66e2b749c9))
75
+
76
+
77
+
78
+
79
+
80
+ # [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)
81
+
82
+
83
+ ### Bug Fixes
84
+
85
+ * improve cspell output ([a5721b5](https://github.com/w5s/project-config/commit/a5721b5c8e97817dc68e9444f4443d3cb7893a27))
86
+
87
+
88
+
89
+
90
+
91
+ # [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)
92
+
93
+
94
+ ### Bug Fixes
95
+
96
+ * add spellcheck task to turbo config ([1029c2b](https://github.com/w5s/project-config/commit/1029c2b97b12b44618ce741d045b02712f0ebf18))
97
+ * clean non useful empty script when possible ([2e7e60a](https://github.com/w5s/project-config/commit/2e7e60a400506bbca00db653813668fa47f8f065))
98
+ * correct docs task in turbo ([0fca8c9](https://github.com/w5s/project-config/commit/0fca8c9ca0389b090e6aa2a66d47ab63b1cb138e))
99
+ * remove uneeded @types/jest typing ([475f6bb](https://github.com/w5s/project-config/commit/475f6bbdc101d31460cd8ffb7f5deb3b97176d5c))
100
+ * remove uneeded cspell script ([ba8d38b](https://github.com/w5s/project-config/commit/ba8d38b8053a24a7937c24c270f5d61d3dad71c7))
101
+
102
+
103
+ ### Features
104
+
105
+ * configure spellcheck ([4be6a96](https://github.com/w5s/project-config/commit/4be6a96d6d30e1085b73c0befcab1d3fa30475ab))
106
+ * improve eslint mrm support for workspaces ([2dacc2e](https://github.com/w5s/project-config/commit/2dacc2e867ebb74c8de777af2ce9f173426ebc33))
107
+ * improve turbo support for lint and format ([76e19e0](https://github.com/w5s/project-config/commit/76e19e02918aba66a2e6e9c06a7d0bed99500ecc))
108
+
109
+
110
+
111
+
112
+
113
+ # [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)
114
+
115
+
116
+ ### Bug Fixes
117
+
118
+ * correct prepare package script ([f2d5fbf](https://github.com/w5s/project-config/commit/f2d5fbfc4e7b66dece1d1139e2ba3835bcf524a1))
119
+
120
+
121
+ ### Features
122
+
123
+ * add minimal support for yarn + github ci ([b9ae537](https://github.com/w5s/project-config/commit/b9ae53746fa9a3f92a1ca0e3600e20cdda583a45))
124
+
125
+
126
+
127
+
128
+
129
+ # [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)
130
+
131
+
132
+ ### Bug Fixes
133
+
134
+ * remove tsc on lint-staged because buggy ([6b0f4f2](https://github.com/w5s/project-config/commit/6b0f4f2c6d5d06f959ee1edc5cc6266464747d7e))
135
+
136
+
137
+
138
+
139
+
140
+ # [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)
141
+
142
+
143
+ ### Bug Fixes
144
+
145
+ * correct default mrm task ([1a59cb1](https://github.com/w5s/project-config/commit/1a59cb1a114c2cba091c4729b5e66e5a5354004e))
146
+
147
+
148
+
149
+
150
+
151
+ # [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)
152
+
153
+
154
+ ### Bug Fixes
155
+
156
+ * add missing $schema for tsconfig ([c33c7ae](https://github.com/w5s/project-config/commit/c33c7aeba405d651eba19187436724780dd90aff))
157
+ * remove unused typedoc script ([51238f0](https://github.com/w5s/project-config/commit/51238f04b8f3d95baac7f0a367ba1c07061d2ce4))
158
+
159
+
160
+
161
+
162
+
163
+ # [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)
164
+
165
+
166
+ ### Bug Fixes
167
+
168
+ * correct bootstrap step ([da7f539](https://github.com/w5s/project-config/commit/da7f539560ba143f830c9ea824b0d79c6a50522c))
169
+ * correct is-ci script that fails in some yarn berry ([4e4707d](https://github.com/w5s/project-config/commit/4e4707d7e8c0cd2c88e1dc6bc94705317dcf9e98))
170
+ * improve yarn check ([3af241a](https://github.com/w5s/project-config/commit/3af241af004d747518733983260eb295aa75e5cb))
171
+
172
+
173
+
174
+
175
+
176
+ # [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)
177
+
178
+
179
+ ### Bug Fixes
180
+
181
+ * correct gitignore task ([b4f0903](https://github.com/w5s/project-config/commit/b4f0903561c97500aef65488ef06ccd7eae0db80))
182
+ * remove jest on lint-staged ([2fbc851](https://github.com/w5s/project-config/commit/2fbc85132ab380429d6966bff47b176bcfb51f6d))
183
+ * shorten eslint extensions ([aecc870](https://github.com/w5s/project-config/commit/aecc870ce0b288436208757376bc05504bff3331))
184
+
185
+
186
+ ### Features
187
+
188
+ * use es-jest as default jest preset ([61535d9](https://github.com/w5s/project-config/commit/61535d9c47c25150becc564a5dd273d7cc14b579))
189
+
190
+
191
+
192
+
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)
195
+
196
+
197
+ ### Bug Fixes
198
+
199
+ * change bootstrap behavior ([497c83a](https://github.com/w5s/project-config/commit/497c83a4082f7fd4e3b8b6913802ebcb21caa65a))
200
+ * remove lint-staged + cspell integration ([6747c83](https://github.com/w5s/project-config/commit/6747c83ec997034d25d136bc5aa008ed108ceb96))
201
+ * use UNLICENSED for default license ([608ee8f](https://github.com/w5s/project-config/commit/608ee8f0bf57fec94636587b116d5bda0fb4ee3f))
202
+
203
+
204
+ ### Features
205
+
206
+ * add gitignore for yarn v2 ([06c547a](https://github.com/w5s/project-config/commit/06c547a6b7813f935678c29b410aee62da5b3866))
207
+ * add support for yarn berry ([2b77669](https://github.com/w5s/project-config/commit/2b77669a29316825a38470c80a48aff8ab068f7f))
208
+
209
+
210
+
211
+
212
+
213
+ # [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)
214
+
215
+
216
+ ### Bug Fixes
217
+
218
+ * correct eslint vscode settings ([a32e0fb](https://github.com/w5s/project-config/commit/a32e0fb739cbe349565b26ea412cdf37e3d56bdb))
219
+ * correct mrm preset url ([ad6f030](https://github.com/w5s/project-config/commit/ad6f03091e0a294c043974b564e24c79023e659b))
220
+ * correct typo ([2218859](https://github.com/w5s/project-config/commit/221885997fec37149f7e349b00a58fbcb3bfb8db))
221
+ * rollback to eslint.validate vscode setting ([769a2e1](https://github.com/w5s/project-config/commit/769a2e100083aca4f5e9037fa539fcf1f6002d65))
222
+
223
+
224
+ ### Features
225
+
226
+ * improve typescript eslint configuration ([efc6f1c](https://github.com/w5s/project-config/commit/efc6f1cef876e8fc5d4d1d1b94ca90a6805fbbbf))
227
+
228
+
229
+
230
+
231
+
232
+ # [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)
233
+
234
+
235
+ ### Features
236
+
237
+ * use airbnb-base as default presets ([e499fc1](https://github.com/w5s/project-config/commit/e499fc115023571e749072db33d774b443b68bb7))
238
+
239
+
240
+
241
+
242
+
6
243
  # [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
244
 
8
245
 
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,15 +1,16 @@
1
1
  /* eslint-disable sort-keys-fix/sort-keys-fix */
2
- const path = require('path');
2
+ const path = require('node:path');
3
3
  const { packageJson, file } = require('mrm-core');
4
- const npm = require('../core/npm');
5
- const pkg = require('../core/pkg');
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
  */
@@ -18,53 +19,53 @@ function task({ mrmPreset, mrmTask, packageArchetype, packageManager }) {
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
-
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
- }
28
+ }).save();
29
+ gitIgnoreTemplate(['macOS', 'NodeJS', 'VisualStudioCode']);
56
30
 
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
+ });
54
+
55
+ pkg.withPackageJson((packageFile) => {
56
+ pkg.value(packageFile, {
57
+ path: 'mrmConfig.packageArchetype',
58
+ state: 'present',
59
+ update: packageArchetype,
60
+ default: () => {
61
+ if (file('lerna.json').exists() || Boolean(packageFile.get('workspaces'))) {
62
+ return 'workspace';
63
+ }
64
+
65
+ return 'library';
66
+ },
67
+ });
68
+ });
68
69
  }
69
70
 
70
71
  task.description = 'Bootstrap a new project.';
@@ -87,8 +88,8 @@ task.parameters = {
87
88
  type: 'input',
88
89
  },
89
90
  packageManager: {
90
- default: 'yarn',
91
- choices: ['yarn', 'npm'],
91
+ default: 'yarn@berry',
92
+ choices: ['yarn@berry', 'yarn@classic', 'npm'],
92
93
  message: 'Which default package manager ?',
93
94
  name: 'packageManager',
94
95
  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,47 @@
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
+ githubCI.workflow({
10
+ name: 'node.js.yml',
11
+ state,
12
+ update: (config) => ({
13
+ name: 'Node.js CI',
14
+ ...config,
15
+ on: {
16
+ push: {
17
+ branches: ['main'],
18
+ },
19
+ pull_request: {
20
+ branches: ['main'],
21
+ },
22
+ },
23
+ jobs: {
24
+ ...config.jobs,
25
+ build: {
26
+ 'runs-on': 'ubuntu-latest',
27
+ steps: [
28
+ { uses: 'actions/checkout@v3' },
29
+ {
30
+ name: 'Use Node.js',
31
+ uses: 'actions/setup-node@v3',
32
+ with: {
33
+ 'node-version': 'lts/*',
34
+ cache: packageManager,
35
+ },
36
+ },
37
+ { run: `${packageManager} install` },
38
+ { run: `${packageManager} run build` },
39
+ { run: `${packageManager} validate` },
40
+ ],
41
+ },
42
+ },
43
+ }),
44
+ });
45
+ }
46
+
47
+ 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,8 @@ function createCommitLint({ commitLintPreset: commitLintPresetDefault }) {
21
22
  preset: commitLintPreset,
22
23
  state: gitPresent ? 'present' : 'absent',
23
24
  });
25
+
26
+ vscodeRecommendedExtension(['seatonjiang.gitmoji-vscode']);
24
27
  }
25
28
 
26
29
  task.description = 'Setup CommitLint';
package/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
@@ -1,6 +1,6 @@
1
- const pkg = require('./pkg');
2
- const npm = require('./npm');
3
- const { gitHook } = require('./githooks');
1
+ const pkg = require('./pkg.js');
2
+ const npm = require('./npm.js');
3
+ const { gitHook } = require('./githooks.js');
4
4
 
5
5
  /**
6
6
  * @param {{