@w5s/mrm-preset 1.0.0-alpha.3 → 1.0.0-alpha.30

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 (56) hide show
  1. package/.turbo/turbo-build.log +6 -0
  2. package/.turbo/turbo-docs.log +10 -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 +0 -0
  7. package/.turbo/turbo-test.log +45 -0
  8. package/CHANGELOG.md +169 -9
  9. package/README.md +1 -1
  10. package/bootstrap/index.js +30 -50
  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 +54 -0
  15. package/ci/gitlab.js +1 -1
  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/contributing/templates/CODE_OF_CONDUCT.md +3 -4
  21. package/core/block.js +1 -1
  22. package/core/commitlint.js +3 -3
  23. package/core/cspell.js +1 -10
  24. package/core/eslint.js +25 -6
  25. package/{gitignore/template.js → core/git.ignore.js} +32 -6
  26. package/core/git.js +21 -18
  27. package/core/githooks.js +9 -8
  28. package/core/githubCI.js +56 -0
  29. package/core/jest.js +56 -74
  30. package/core/jsonFile.js +8 -7
  31. package/core/lintStaged.js +3 -3
  32. package/core/npm.js +50 -15
  33. package/core/pkg.js +102 -19
  34. package/core/project.js +6 -0
  35. package/core/semanticRelease.js +4 -4
  36. package/core/turbo.js +56 -0
  37. package/core/typedoc.js +7 -20
  38. package/core/vscode.js +16 -6
  39. package/cspell/index.js +26 -10
  40. package/editorconfig/index.js +7 -2
  41. package/eslint/index.js +91 -32
  42. package/githooks/index.js +47 -56
  43. package/gitignore/index.js +5 -22
  44. package/jest/index.js +13 -17
  45. package/lang/.eslintrc.json +2 -1
  46. package/lang/index.js +45 -42
  47. package/lang/templates/index.spec.ts +2 -1
  48. package/lang/templates/index.ts +1 -2
  49. package/licenses/index.js +26 -0
  50. package/package.json +20 -14
  51. package/postconfigure/index.js +3 -3
  52. package/project/index.js +265 -156
  53. package/release/index.js +5 -5
  54. package/renovate/index.js +7 -5
  55. package/tsconfig.json +3 -5
  56. package/core/workspace.js +0 -6
@@ -0,0 +1,6 @@
1
+ [1] : exited with code 0
2
+ [build:*tsc]
3
+ [build:*tsc] > @w5s/mrm-preset@1.0.0-alpha.29 build:tsc
4
+ [build:*tsc] > tsc --noEmit --skipLibCheck
5
+ [build:*tsc]
6
+ [build:*tsc] npm run build:tsc exited with code 0
@@ -0,0 +1,10 @@
1
+ Starting markdown-magic [ '**/*.md', '!node_modules/**' ]
2
+ ✔ README.md Updated
3
+ Transforms run
4
+ ⁕ PKGJSON:template=# W5s Mrm Preset _(${name})_
5
+ ⁕ PKGJSON:template=> ${description}&unknownTxt=
6
+ ⁕ PKGJSON:template=[${license}][license-url] © ${author}
7
+ ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
8
+ ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
9
+ ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
10
+
@@ -0,0 +1,6 @@
1
+ [1] : exited with code 0
2
+ [format:*src]
3
+ [format:*src] > @w5s/mrm-preset@1.0.0-alpha.29 format:src
4
+ [format:*src] > eslint . --fix --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml
5
+ [format:*src]
6
+ [format:*src] npm run format:src exited with code 0
@@ -0,0 +1,6 @@
1
+ [1] : exited with code 0
2
+ [lint:*src]
3
+ [lint:*src] > @w5s/mrm-preset@1.0.0-alpha.29 lint:src
4
+ [lint:*src] > eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml
5
+ [lint:*src]
6
+ [lint:*src] npm run lint:src exited with code 0
@@ -0,0 +1 @@
1
+ [0] : exited with code 0
File without changes
@@ -0,0 +1,45 @@
1
+ [test:*src]
2
+ [test:*src] > @w5s/mrm-preset@1.0.0-alpha.29 test:src
3
+ [test:*src] > mkdir _tester; cd _tester; mrm bootstrap --dir ..; mrm configure --dir ..
4
+ [test:*src]
5
+ [test:*src] mkdir: _tester: File exists
6
+ [test:*src] Running bootstrap...
7
+ [test:*src] Running alias configure...
8
+ [test:*src] Running gitignore...
9
+ [test:*src] Running project...
10
+ [test:*src] Running contributing...
11
+ [test:*src] Running licenses...
12
+ [test:*src] Running release...
13
+ [test:*src] Running ci...
14
+ [test:*src] Running lang...
15
+ [test:*src] Update tsconfig.json
16
+ [test:*src] Running commitlint...
17
+ [test:*src] Update .vscode/extensions.json
18
+ [test:*src] Running editorconfig...
19
+ [test:*src] Running eslint...
20
+ [test:*src] Running cspell...
21
+ [test:*src] Update cSpell.json
22
+ [test:*src] Update package.json
23
+ [test:*src] Running jest...
24
+ [test:*src] Running renovate...
25
+ [test:*src] Running githooks...
26
+ [test:*src] Running postconfigure...
27
+ [test:*src] Error: to format code
28
+ [test:*src]
29
+ [test:*src] > _tester@1.0.0-alpha.0 format
30
+ [test:*src] > concurrently "npm:format:*" ":"
31
+ [test:*src]
32
+ [test:*src] [1] : exited with code 0
33
+ [test:*src] [format:*root]
34
+ [test:*src] [format:*root] > _tester@1.0.0-alpha.0 format:root
35
+ [test:*src] [format:*root] > eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml --fix
36
+ [test:*src] [format:*root]
37
+ [test:*src] [format:*root]
38
+ [test:*src] [format:*root] /Users/julienpolo/Workspace/Personal/project-config/packages/mrm-preset/_tester/src/index.spec.ts
39
+ [test:*src] [format:*root] 1:20 error 'test' is defined but never used @typescript-eslint/no-unused-vars
40
+ [test:*src] [format:*root]
41
+ [test:*src] [format:*root] ✖ 1 problem (1 error, 0 warnings)
42
+ [test:*src] [format:*root]
43
+ [test:*src] [format:*root] npm run format:root exited with code 1
44
+ [test:*src]
45
+ [test:*src] npm run test:src exited with code 0
package/CHANGELOG.md CHANGED
@@ -3,38 +3,198 @@
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.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)
6
+ # [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)
7
+
8
+ **Note:** Version bump only for package @w5s/mrm-preset
9
+
10
+ # [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)
11
+
12
+ **Note:** Version bump only for package @w5s/mrm-preset
13
+
14
+ # [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)
15
+
16
+ **Note:** Version bump only for package @w5s/mrm-preset
17
+
18
+ # [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)
19
+
20
+ **Note:** Version bump only for package @w5s/mrm-preset
21
+
22
+ # [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)
23
+
24
+ **Note:** Version bump only for package @w5s/mrm-preset
25
+
26
+ # [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)
27
+
28
+ **Note:** Version bump only for package @w5s/mrm-preset
29
+
30
+ # [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)
31
+
32
+ **Note:** Version bump only for package @w5s/mrm-preset
33
+
34
+ # [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)
35
+
36
+ **Note:** Version bump only for package @w5s/mrm-preset
37
+
38
+ # [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)
39
+
40
+ **Note:** Version bump only for package @w5s/mrm-preset
41
+
42
+ # [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)
43
+
44
+ **Note:** Version bump only for package @w5s/mrm-preset
45
+
46
+ # [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)
47
+
48
+ **Note:** Version bump only for package @w5s/mrm-preset
49
+
50
+ # [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)
7
51
 
52
+ **Note:** Version bump only for package @w5s/mrm-preset
53
+
54
+ # [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)
55
+
56
+ **Note:** Version bump only for package @w5s/mrm-preset
57
+
58
+ # [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)
59
+
60
+ **Note:** Version bump only for package @w5s/mrm-preset
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
+ ### Bug Fixes
65
+
66
+ - correct require extension eslint rule ([94798d6](https://github.com/w5s/project-config/commit/94798d6579b93d92f44021f9f77971994ca5ce5e))
67
+
68
+ # [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)
69
+
70
+ ### Bug Fixes
71
+
72
+ - remove test from build ([506f19d](https://github.com/w5s/project-config/commit/506f19d71b3fc16613d37d10c022a08dbcf70376))
73
+
74
+ # [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)
75
+
76
+ ### Bug Fixes
77
+
78
+ - add prepare task to turbo configuration ([717d59a](https://github.com/w5s/project-config/commit/717d59a724c1de8cb37f37c23aae8f4cc57fc231))
79
+ - remove --quiet option on format ([268b0a7](https://github.com/w5s/project-config/commit/268b0a76dbd03cfa6729988472948a66e2b749c9))
80
+
81
+ # [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)
82
+
83
+ ### Bug Fixes
84
+
85
+ - improve cspell output ([a5721b5](https://github.com/w5s/project-config/commit/a5721b5c8e97817dc68e9444f4443d3cb7893a27))
86
+
87
+ # [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)
88
+
89
+ ### Bug Fixes
90
+
91
+ - add spellcheck task to turbo config ([1029c2b](https://github.com/w5s/project-config/commit/1029c2b97b12b44618ce741d045b02712f0ebf18))
92
+ - clean non useful empty script when possible ([2e7e60a](https://github.com/w5s/project-config/commit/2e7e60a400506bbca00db653813668fa47f8f065))
93
+ - correct docs task in turbo ([0fca8c9](https://github.com/w5s/project-config/commit/0fca8c9ca0389b090e6aa2a66d47ab63b1cb138e))
94
+ - remove uneeded @types/jest typing ([475f6bb](https://github.com/w5s/project-config/commit/475f6bbdc101d31460cd8ffb7f5deb3b97176d5c))
95
+ - remove uneeded cspell script ([ba8d38b](https://github.com/w5s/project-config/commit/ba8d38b8053a24a7937c24c270f5d61d3dad71c7))
8
96
 
9
97
  ### Features
10
98
 
11
- * use airbnb-base as default presets ([e499fc1](https://github.com/w5s/project-config/commit/e499fc115023571e749072db33d774b443b68bb7))
99
+ - configure spellcheck ([4be6a96](https://github.com/w5s/project-config/commit/4be6a96d6d30e1085b73c0befcab1d3fa30475ab))
100
+ - improve eslint mrm support for workspaces ([2dacc2e](https://github.com/w5s/project-config/commit/2dacc2e867ebb74c8de777af2ce9f173426ebc33))
101
+ - improve turbo support for lint and format ([76e19e0](https://github.com/w5s/project-config/commit/76e19e02918aba66a2e6e9c06a7d0bed99500ecc))
102
+
103
+ # [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)
12
104
 
105
+ ### Bug Fixes
13
106
 
107
+ - correct prepare package script ([f2d5fbf](https://github.com/w5s/project-config/commit/f2d5fbfc4e7b66dece1d1139e2ba3835bcf524a1))
14
108
 
109
+ ### Features
15
110
 
111
+ - add minimal support for yarn + github ci ([b9ae537](https://github.com/w5s/project-config/commit/b9ae53746fa9a3f92a1ca0e3600e20cdda583a45))
16
112
 
17
- # [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)
113
+ # [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)
114
+
115
+ ### Bug Fixes
116
+
117
+ - remove tsc on lint-staged because buggy ([6b0f4f2](https://github.com/w5s/project-config/commit/6b0f4f2c6d5d06f959ee1edc5cc6266464747d7e))
118
+
119
+ # [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)
120
+
121
+ ### Bug Fixes
122
+
123
+ - correct default mrm task ([1a59cb1](https://github.com/w5s/project-config/commit/1a59cb1a114c2cba091c4729b5e66e5a5354004e))
124
+
125
+ # [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)
126
+
127
+ ### Bug Fixes
128
+
129
+ - add missing $schema for tsconfig ([c33c7ae](https://github.com/w5s/project-config/commit/c33c7aeba405d651eba19187436724780dd90aff))
130
+ - remove unused typedoc script ([51238f0](https://github.com/w5s/project-config/commit/51238f04b8f3d95baac7f0a367ba1c07061d2ce4))
131
+
132
+ # [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)
133
+
134
+ ### Bug Fixes
135
+
136
+ - correct bootstrap step ([da7f539](https://github.com/w5s/project-config/commit/da7f539560ba143f830c9ea824b0d79c6a50522c))
137
+ - correct is-ci script that fails in some yarn berry ([4e4707d](https://github.com/w5s/project-config/commit/4e4707d7e8c0cd2c88e1dc6bc94705317dcf9e98))
138
+ - improve yarn check ([3af241a](https://github.com/w5s/project-config/commit/3af241af004d747518733983260eb295aa75e5cb))
139
+
140
+ # [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)
18
141
 
142
+ ### Bug Fixes
143
+
144
+ - correct gitignore task ([b4f0903](https://github.com/w5s/project-config/commit/b4f0903561c97500aef65488ef06ccd7eae0db80))
145
+ - remove jest on lint-staged ([2fbc851](https://github.com/w5s/project-config/commit/2fbc85132ab380429d6966bff47b176bcfb51f6d))
146
+ - shorten eslint extensions ([aecc870](https://github.com/w5s/project-config/commit/aecc870ce0b288436208757376bc05504bff3331))
19
147
 
20
148
  ### Features
21
149
 
22
- * enable source.fixAll for vscode ([d484156](https://github.com/w5s/project-config/commit/d484156c063f2bf9f5cb3212878aa07bb4f8fd6f))
23
- * improve arrow-body-style configuration ([a4ee8a9](https://github.com/w5s/project-config/commit/a4ee8a9f3912285b45287afc4ccae2fa57431c6a))
150
+ - use es-jest as default jest preset ([61535d9](https://github.com/w5s/project-config/commit/61535d9c47c25150becc564a5dd273d7cc14b579))
24
151
 
152
+ # [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)
25
153
 
154
+ ### Bug Fixes
26
155
 
156
+ - change bootstrap behavior ([497c83a](https://github.com/w5s/project-config/commit/497c83a4082f7fd4e3b8b6913802ebcb21caa65a))
157
+ - remove lint-staged + cspell integration ([6747c83](https://github.com/w5s/project-config/commit/6747c83ec997034d25d136bc5aa008ed108ceb96))
158
+ - use UNLICENSED for default license ([608ee8f](https://github.com/w5s/project-config/commit/608ee8f0bf57fec94636587b116d5bda0fb4ee3f))
27
159
 
160
+ ### Features
28
161
 
29
- # 1.0.0-alpha.1 (2022-02-12)
162
+ - add gitignore for yarn v2 ([06c547a](https://github.com/w5s/project-config/commit/06c547a6b7813f935678c29b410aee62da5b3866))
163
+ - add support for yarn berry ([2b77669](https://github.com/w5s/project-config/commit/2b77669a29316825a38470c80a48aff8ab068f7f))
30
164
 
165
+ # [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)
31
166
 
32
167
  ### Bug Fixes
33
168
 
34
- * correct generate cspell.json ([e638b75](https://github.com/w5s/project-config/commit/e638b75ead5d3ffd34b0c74b95b237d29b542406))
169
+ - correct eslint vscode settings ([a32e0fb](https://github.com/w5s/project-config/commit/a32e0fb739cbe349565b26ea412cdf37e3d56bdb))
170
+ - correct mrm preset url ([ad6f030](https://github.com/w5s/project-config/commit/ad6f03091e0a294c043974b564e24c79023e659b))
171
+ - correct typo ([2218859](https://github.com/w5s/project-config/commit/221885997fec37149f7e349b00a58fbcb3bfb8db))
172
+ - rollback to eslint.validate vscode setting ([769a2e1](https://github.com/w5s/project-config/commit/769a2e100083aca4f5e9037fa539fcf1f6002d65))
173
+
174
+ ### Features
175
+
176
+ - improve typescript eslint configuration ([efc6f1c](https://github.com/w5s/project-config/commit/efc6f1cef876e8fc5d4d1d1b94ca90a6805fbbbf))
177
+
178
+ # [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)
179
+
180
+ ### Features
181
+
182
+ - use airbnb-base as default presets ([e499fc1](https://github.com/w5s/project-config/commit/e499fc115023571e749072db33d774b443b68bb7))
183
+
184
+ # [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)
185
+
186
+ ### Features
187
+
188
+ - enable source.fixAll for vscode ([d484156](https://github.com/w5s/project-config/commit/d484156c063f2bf9f5cb3212878aa07bb4f8fd6f))
189
+ - improve arrow-body-style configuration ([a4ee8a9](https://github.com/w5s/project-config/commit/a4ee8a9f3912285b45287afc4ccae2fa57431c6a))
190
+
191
+ # 1.0.0-alpha.1 (2022-02-12)
192
+
193
+ ### Bug Fixes
35
194
 
195
+ - correct generate cspell.json ([e638b75](https://github.com/w5s/project-config/commit/e638b75ead5d3ffd34b0c74b95b237d29b542406))
36
196
 
37
197
  ### Features
38
198
 
39
- * add cspell check on lint-staged in mrm ([d8a744f](https://github.com/w5s/project-config/commit/d8a744f1f297c2308cd15ce1f19958f9302eee5d))
40
- * add mrm-preset package ([1409046](https://github.com/w5s/project-config/commit/1409046e772755148f9885ce39c8f86afef4e50d))
199
+ - add cspell check on lint-staged in mrm ([d8a744f](https://github.com/w5s/project-config/commit/d8a744f1f297c2308cd15ce1f19958f9302eee5d))
200
+ - add mrm-preset package ([1409046](https://github.com/w5s/project-config/commit/1409046e772755148f9885ce39c8f86afef4e50d))
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: 'present',
46
+ default: currentPackageManager === 'npm' ? `npm run mrm -- ${mrmTask}` : `yarn mrm ${mrmTask}`,
47
+ });
48
+ pkg.script(packageFile, {
49
+ name: 'mrm',
50
+ state: 'present',
51
+ default: `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',
@@ -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:
@@ -1,20 +1,20 @@
1
1
  # https://fotoallerlei.com/blog/post/2020/automatic-dependency-updates-with-renovate-and-gitlab/post
2
2
  .renovate:
3
3
  variables:
4
- RENOVATE_GIT_AUTHOR: "${GITLAB_USER_NAME} <${GITLAB_USER_EMAIL}>"
5
- RENOVATE_DRY_RUN: "false"
6
- RENOVATE_LOG_LEVEL: "debug"
7
- RENOVATE_ALLOWED_POST_UPGRADE: "^pod ,^yarn "
4
+ RENOVATE_GIT_AUTHOR: '${GITLAB_USER_NAME} <${GITLAB_USER_EMAIL}>'
5
+ RENOVATE_DRY_RUN: 'false'
6
+ RENOVATE_LOG_LEVEL: debug
7
+ RENOVATE_ALLOWED_POST_UPGRADE: '^pod ,^yarn '
8
8
  # RENOVATE_DISABLED: "🛑"
9
9
  rules:
10
- - if: "$RENOVATE_DISABLED"
10
+ - if: $RENOVATE_DISABLED
11
11
  when: never
12
12
  - if: '$CI_PIPELINE_SOURCE == "schedule"'
13
13
  when: always
14
14
  - when: never
15
15
  image:
16
16
  name: renovate/renovate
17
- entrypoint: [""]
17
+ entrypoint: ['']
18
18
  script:
19
19
  - >
20
20
  renovate
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';