@w5s/mrm-preset 1.0.0-alpha.19 → 1.0.0-alpha.22
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.
- package/.turbo/turbo-build.log +11 -11
- package/.turbo/turbo-docs.log +2 -1
- package/.turbo/turbo-format.log +35 -3
- package/.turbo/turbo-lint.log +7 -7
- package/.turbo/turbo-prepare.log +2 -2
- package/.turbo/turbo-test.log +2 -28
- package/CHANGELOG.md +24 -0
- package/LICENSE +21 -0
- package/README.md +1 -1
- package/bootstrap/index.js +3 -24
- package/ci/github.js +10 -3
- package/ci/gitlab.js +1 -1
- package/commitlint/index.js +4 -1
- package/config.json +1 -1
- package/contributing/index.js +1 -1
- package/core/githooks.js +2 -2
- package/core/githubCI.js +2 -2
- package/core/pkg.js +2 -2
- package/core/vscode.js +15 -5
- package/editorconfig/index.js +4 -1
- package/eslint/index.js +5 -2
- package/githooks/index.js +1 -1
- package/lang/index.js +26 -26
- package/lang/templates/index.spec.ts +1 -0
- package/lang/templates/index.ts +1 -2
- package/licenses/index.js +26 -0
- package/package.json +6 -6
- package/postconfigure/index.js +1 -1
- package/project/index.js +20 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
@w5s/mrm-preset:build: cache hit, replaying output [
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
1
|
+
[35m@w5s/mrm-preset:build[0m: cache hit, replaying output [2m17a19af6413482f1[0m
|
|
2
|
+
[35m@w5s/mrm-preset:build: [0m[0m[build:*empty][0m
|
|
3
|
+
[35m@w5s/mrm-preset:build: [0m[0m[build:*empty][0m > @w5s/mrm-preset@1.0.0-alpha.21 build:empty
|
|
4
|
+
[35m@w5s/mrm-preset:build: [0m[0m[build:*empty][0m > :
|
|
5
|
+
[35m@w5s/mrm-preset:build: [0m[0m[build:*empty][0m
|
|
6
|
+
[35m@w5s/mrm-preset:build: [0m[0m[build:*tsc][0m
|
|
7
|
+
[35m@w5s/mrm-preset:build: [0m[0m[build:*tsc][0m > @w5s/mrm-preset@1.0.0-alpha.21 build:tsc
|
|
8
|
+
[35m@w5s/mrm-preset:build: [0m[0m[build:*tsc][0m > tsc --noEmit --skipLibCheck
|
|
9
|
+
[35m@w5s/mrm-preset:build: [0m[0m[build:*tsc][0m
|
|
10
|
+
[35m@w5s/mrm-preset:build: [0m[0m[build:*empty][0m [0mnpm run build:empty exited with code 0[0m
|
|
11
|
+
[35m@w5s/mrm-preset:build: [0m[0m[build:*tsc][0m [0mnpm run build:tsc exited with code 0[0m
|
package/.turbo/turbo-docs.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@w5s/mrm-preset:docs: cache hit, replaying output [
|
|
1
|
+
[33m@w5s/mrm-preset:docs[0m: cache hit, replaying output [2m9310052946be99ff[0m
|
|
2
2
|
[33m@w5s/mrm-preset:docs: [0mStarting markdown-magic [ '**/*.md', '!node_modules/**' ]
|
|
3
3
|
[33m@w5s/mrm-preset:docs: [0mℹ Notice:
|
|
4
4
|
[33m@w5s/mrm-preset:docs: [0m Missing transforms "BASIC_RULES","JSX_RULES" in _tester/node_modules/eslint-plugin-react/README.md
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
[33m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=# W5s Typescript configuration _(${name})_
|
|
37
37
|
[33m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=> ${description}&unknownTxt=
|
|
38
38
|
[33m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=```console\nnpm install --save-dev ${name}\n```
|
|
39
|
+
[33m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=Typescript: ${peerDependencies.typescript}&unknownTxt=
|
|
39
40
|
[33m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[${license}][license-url] © ${author}
|
|
40
41
|
[33m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
|
|
41
42
|
[33m@w5s/mrm-preset:docs: [0m ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
|
package/.turbo/turbo-format.log
CHANGED
|
@@ -1,7 +1,39 @@
|
|
|
1
|
-
@w5s/mrm-preset:format: cache hit, replaying output
|
|
1
|
+
@w5s/mrm-preset:format: cache hit, replaying output 04a98d2ee4410b2f
|
|
2
2
|
@w5s/mrm-preset:format: [1] : exited with code 0
|
|
3
3
|
@w5s/mrm-preset:format: [format:*src]
|
|
4
|
-
@w5s/mrm-preset:format: [format:*src] > @w5s/mrm-preset@1.0.0-alpha.
|
|
4
|
+
@w5s/mrm-preset:format: [format:*src] > @w5s/mrm-preset@1.0.0-alpha.21 format:src
|
|
5
5
|
@w5s/mrm-preset:format: [format:*src] > eslint . --fix --ext=mjs,cjs,js,jsx,ts,tsx,json
|
|
6
6
|
@w5s/mrm-preset:format: [format:*src]
|
|
7
|
-
@w5s/mrm-preset:format: [format:*src]
|
|
7
|
+
@w5s/mrm-preset:format: [format:*src]
|
|
8
|
+
@w5s/mrm-preset:format: [format:*src] Oops! Something went wrong! :(
|
|
9
|
+
@w5s/mrm-preset:format: [format:*src]
|
|
10
|
+
@w5s/mrm-preset:format: [format:*src] ESLint: 8.23.0
|
|
11
|
+
@w5s/mrm-preset:format: [format:*src]
|
|
12
|
+
@w5s/mrm-preset:format: [format:*src] Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/jpolo/Workspace/w5s/project-config/packages/eslint-config/index.js from /Users/jpolo/Workspace/w5s/project-config/node_modules/@eslint/eslintrc/dist/eslintrc.cjs not supported.
|
|
13
|
+
@w5s/mrm-preset:format: [format:*src] index.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
|
|
14
|
+
@w5s/mrm-preset:format: [format:*src] Instead rename index.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in /Users/jpolo/Workspace/w5s/project-config/packages/eslint-config/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
|
|
15
|
+
@w5s/mrm-preset:format: [format:*src]
|
|
16
|
+
@w5s/mrm-preset:format: [format:*src] at Object.module.exports [as default] (/Users/jpolo/Workspace/w5s/project-config/node_modules/import-fresh/index.js:32:59)
|
|
17
|
+
@w5s/mrm-preset:format: [format:*src] at loadJSConfigFile (/Users/jpolo/Workspace/w5s/project-config/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2559:47)
|
|
18
|
+
@w5s/mrm-preset:format: [format:*src] at loadConfigFile (/Users/jpolo/Workspace/w5s/project-config/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2643:20)
|
|
19
|
+
@w5s/mrm-preset:format: [format:*src] at ConfigArrayFactory._loadConfigData (/Users/jpolo/Workspace/w5s/project-config/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2947:42)
|
|
20
|
+
@w5s/mrm-preset:format: [format:*src] at ConfigArrayFactory._loadExtendedShareableConfig (/Users/jpolo/Workspace/w5s/project-config/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3248:21)
|
|
21
|
+
@w5s/mrm-preset:format: [format:*src] at ConfigArrayFactory._loadExtends (/Users/jpolo/Workspace/w5s/project-config/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3119:25)
|
|
22
|
+
@w5s/mrm-preset:format: [format:*src] at ConfigArrayFactory._normalizeObjectConfigDataBody (/Users/jpolo/Workspace/w5s/project-config/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3058:25)
|
|
23
|
+
@w5s/mrm-preset:format: [format:*src] at _normalizeObjectConfigDataBody.next (<anonymous>)
|
|
24
|
+
@w5s/mrm-preset:format: [format:*src] at ConfigArrayFactory._normalizeObjectConfigData (/Users/jpolo/Workspace/w5s/project-config/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3003:20)
|
|
25
|
+
@w5s/mrm-preset:format: [format:*src] at _normalizeObjectConfigData.next (<anonymous>)
|
|
26
|
+
@w5s/mrm-preset:format: [format:*src] at ConfigArrayFactory.loadInDirectory (/Users/jpolo/Workspace/w5s/project-config/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2849:28)
|
|
27
|
+
@w5s/mrm-preset:format: [format:*src] at CascadingConfigArrayFactory._loadConfigInAncestors (/Users/jpolo/Workspace/w5s/project-config/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3833:46)
|
|
28
|
+
@w5s/mrm-preset:format: [format:*src] at CascadingConfigArrayFactory._loadConfigInAncestors (/Users/jpolo/Workspace/w5s/project-config/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3852:20)
|
|
29
|
+
@w5s/mrm-preset:format: [format:*src] at CascadingConfigArrayFactory._loadConfigInAncestors (/Users/jpolo/Workspace/w5s/project-config/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3852:20)
|
|
30
|
+
@w5s/mrm-preset:format: [format:*src] at CascadingConfigArrayFactory.getConfigArrayForFile (/Users/jpolo/Workspace/w5s/project-config/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3754:18)
|
|
31
|
+
@w5s/mrm-preset:format: [format:*src] at FileEnumerator._iterateFilesRecursive (/Users/jpolo/Workspace/w5s/project-config/node_modules/eslint/lib/cli-engine/file-enumerator.js:446:49)
|
|
32
|
+
@w5s/mrm-preset:format: [format:*src] at _iterateFilesRecursive.next (<anonymous>)
|
|
33
|
+
@w5s/mrm-preset:format: [format:*src] at FileEnumerator.iterateFiles (/Users/jpolo/Workspace/w5s/project-config/node_modules/eslint/lib/cli-engine/file-enumerator.js:297:49)
|
|
34
|
+
@w5s/mrm-preset:format: [format:*src] at iterateFiles.next (<anonymous>)
|
|
35
|
+
@w5s/mrm-preset:format: [format:*src] at CLIEngine.executeOnFiles (/Users/jpolo/Workspace/w5s/project-config/node_modules/eslint/lib/cli-engine/cli-engine.js:786:48)
|
|
36
|
+
@w5s/mrm-preset:format: [format:*src] at ESLint.lintFiles (/Users/jpolo/Workspace/w5s/project-config/node_modules/eslint/lib/eslint/eslint.js:550:23)
|
|
37
|
+
@w5s/mrm-preset:format: [format:*src] at Object.execute (/Users/jpolo/Workspace/w5s/project-config/node_modules/eslint/lib/cli.js:395:36)
|
|
38
|
+
@w5s/mrm-preset:format: [format:*src] at async main (/Users/jpolo/Workspace/w5s/project-config/node_modules/eslint/bin/eslint.js:135:24)
|
|
39
|
+
@w5s/mrm-preset:format: [format:*src] npm run format:src exited with code SIGINT
|
package/.turbo/turbo-lint.log
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@w5s/mrm-preset:lint: cache hit, replaying output [
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[
|
|
1
|
+
[33m@w5s/mrm-preset:lint[0m: cache hit, replaying output [2m59b9e0a41d10b062[0m
|
|
2
|
+
[33m@w5s/mrm-preset:lint: [0m[0m[1][0m [0m: exited with code 0[0m
|
|
3
|
+
[33m@w5s/mrm-preset:lint: [0m[0m[lint:*src][0m
|
|
4
|
+
[33m@w5s/mrm-preset:lint: [0m[0m[lint:*src][0m > @w5s/mrm-preset@1.0.0-alpha.21 lint:src
|
|
5
|
+
[33m@w5s/mrm-preset:lint: [0m[0m[lint:*src][0m > eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json
|
|
6
|
+
[33m@w5s/mrm-preset:lint: [0m[0m[lint:*src][0m
|
|
7
|
+
[33m@w5s/mrm-preset:lint: [0m[0m[lint:*src][0m [0mnpm run lint:src exited with code 0[0m
|
package/.turbo/turbo-prepare.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@w5s/mrm-preset:prepare: cache hit, replaying output
|
|
2
|
-
|
|
1
|
+
@w5s/mrm-preset:prepare: cache hit, replaying output 860bf65f3e79fa8d
|
|
2
|
+
@w5s/mrm-preset:prepare: [0] : exited with code 0
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,38 +1,12 @@
|
|
|
1
|
-
@w5s/mrm-preset:test: cache hit, replaying output [
|
|
1
|
+
[33m@w5s/mrm-preset:test[0m: cache hit, replaying output [2me3db7c613f4cc625[0m
|
|
2
2
|
[33m@w5s/mrm-preset:test: [0mmkdir: _tester: File exists
|
|
3
3
|
[33m@w5s/mrm-preset:test: [0m[36mRunning bootstrap...[39m
|
|
4
4
|
[33m@w5s/mrm-preset:test: [0m[33mRunning alias configure...[39m
|
|
5
5
|
[33m@w5s/mrm-preset:test: [0m[36mRunning gitignore...[39m
|
|
6
6
|
[33m@w5s/mrm-preset:test: [0m[36mRunning project...[39m
|
|
7
7
|
[33m@w5s/mrm-preset:test: [0m[32mUpdate package.json[39m
|
|
8
|
-
[33m@w5s/mrm-preset:test: [0mUninstalling npm-run-all...
|
|
9
|
-
[33m@w5s/mrm-preset:test: [0m
|
|
10
|
-
[33m@w5s/mrm-preset:test: [0mremoved 19 packages, and audited 1391 packages in 3s
|
|
11
|
-
[33m@w5s/mrm-preset:test: [0m
|
|
12
|
-
[33m@w5s/mrm-preset:test: [0m143 packages are looking for funding
|
|
13
|
-
[33m@w5s/mrm-preset:test: [0m run `npm fund` for details
|
|
14
|
-
[33m@w5s/mrm-preset:test: [0m
|
|
15
|
-
[33m@w5s/mrm-preset:test: [0m6 moderate severity vulnerabilities
|
|
16
|
-
[33m@w5s/mrm-preset:test: [0m
|
|
17
|
-
[33m@w5s/mrm-preset:test: [0mTo address all issues (including breaking changes), run:
|
|
18
|
-
[33m@w5s/mrm-preset:test: [0m npm audit fix --force
|
|
19
|
-
[33m@w5s/mrm-preset:test: [0m
|
|
20
|
-
[33m@w5s/mrm-preset:test: [0mRun `npm audit` for details.
|
|
21
|
-
[33m@w5s/mrm-preset:test: [0mInstalling concurrently...
|
|
22
|
-
[33m@w5s/mrm-preset:test: [0m
|
|
23
|
-
[33m@w5s/mrm-preset:test: [0madded 12 packages, and audited 1403 packages in 7s
|
|
24
|
-
[33m@w5s/mrm-preset:test: [0m
|
|
25
|
-
[33m@w5s/mrm-preset:test: [0m144 packages are looking for funding
|
|
26
|
-
[33m@w5s/mrm-preset:test: [0m run `npm fund` for details
|
|
27
|
-
[33m@w5s/mrm-preset:test: [0m
|
|
28
|
-
[33m@w5s/mrm-preset:test: [0m6 moderate severity vulnerabilities
|
|
29
|
-
[33m@w5s/mrm-preset:test: [0m
|
|
30
|
-
[33m@w5s/mrm-preset:test: [0mTo address all issues (including breaking changes), run:
|
|
31
|
-
[33m@w5s/mrm-preset:test: [0m npm audit fix --force
|
|
32
|
-
[33m@w5s/mrm-preset:test: [0m
|
|
33
|
-
[33m@w5s/mrm-preset:test: [0mRun `npm audit` for details.
|
|
34
8
|
[33m@w5s/mrm-preset:test: [0m[36mRunning contributing...[39m
|
|
35
|
-
[33m@w5s/mrm-preset:test: [0m[36mRunning
|
|
9
|
+
[33m@w5s/mrm-preset:test: [0m[36mRunning licenses...[39m
|
|
36
10
|
[33m@w5s/mrm-preset:test: [0m[36mRunning release...[39m
|
|
37
11
|
[33m@w5s/mrm-preset:test: [0m[36mRunning ci...[39m
|
|
38
12
|
[33m@w5s/mrm-preset:test: [0m[36mRunning lang...[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
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.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)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @w5s/mrm-preset
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [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)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @w5s/mrm-preset
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [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)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @w5s/mrm-preset
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
# [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
31
|
|
|
8
32
|
**Note:** Version bump only for package @w5s/mrm-preset
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Julien Polo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
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 --package=@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
|
package/bootstrap/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const { packageJson
|
|
2
|
+
const path = require('node:path');
|
|
3
|
+
const { packageJson } = require('mrm-core');
|
|
4
4
|
const npm = require('../core/npm.js');
|
|
5
5
|
const pkg = require('../core/pkg.js');
|
|
6
6
|
const { gitIgnoreTemplate } = require('../core/git.js');
|
|
@@ -14,7 +14,7 @@ const { gitIgnoreTemplate } = require('../core/git.js');
|
|
|
14
14
|
* }} config
|
|
15
15
|
* @returns {void}
|
|
16
16
|
*/
|
|
17
|
-
function task({ mrmPreset, mrmTask,
|
|
17
|
+
function task({ mrmPreset, mrmTask, packageManager }) {
|
|
18
18
|
/**
|
|
19
19
|
* setup package.json from following object
|
|
20
20
|
*/
|
|
@@ -51,21 +51,6 @@ function task({ mrmPreset, mrmTask, packageArchetype, packageManager }) {
|
|
|
51
51
|
script: `mrm --preset ${mrmPreset}`,
|
|
52
52
|
});
|
|
53
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
|
-
});
|
|
69
54
|
}
|
|
70
55
|
|
|
71
56
|
task.description = 'Bootstrap a new project.';
|
|
@@ -81,12 +66,6 @@ task.parameters = {
|
|
|
81
66
|
message: 'Default MRM task name ?',
|
|
82
67
|
type: 'input',
|
|
83
68
|
},
|
|
84
|
-
packageArchetype: {
|
|
85
|
-
choices: ['library', 'application', 'workspace'],
|
|
86
|
-
message: 'What Archetype of package ?',
|
|
87
|
-
name: 'packageArchetype',
|
|
88
|
-
type: 'input',
|
|
89
|
-
},
|
|
90
69
|
packageManager: {
|
|
91
70
|
default: 'yarn@berry',
|
|
92
71
|
choices: ['yarn@berry', 'yarn@classic', 'npm'],
|
package/ci/github.js
CHANGED
|
@@ -6,6 +6,13 @@ const pkg = require('../core/pkg.js');
|
|
|
6
6
|
function task() {
|
|
7
7
|
const state = 'present';
|
|
8
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`;
|
|
9
16
|
githubCI.workflow({
|
|
10
17
|
name: 'node.js.yml',
|
|
11
18
|
state,
|
|
@@ -14,10 +21,10 @@ function task() {
|
|
|
14
21
|
...config,
|
|
15
22
|
on: {
|
|
16
23
|
push: {
|
|
17
|
-
branches: [
|
|
24
|
+
branches: [baseBranch],
|
|
18
25
|
},
|
|
19
26
|
pull_request: {
|
|
20
|
-
branches: [
|
|
27
|
+
branches: [baseBranch],
|
|
21
28
|
},
|
|
22
29
|
},
|
|
23
30
|
jobs: {
|
|
@@ -34,7 +41,7 @@ function task() {
|
|
|
34
41
|
cache: packageManager,
|
|
35
42
|
},
|
|
36
43
|
},
|
|
37
|
-
{ run:
|
|
44
|
+
{ run: packageInstall },
|
|
38
45
|
{ run: `${packageManager} run build` },
|
|
39
46
|
{ run: `${packageManager} validate` },
|
|
40
47
|
],
|
package/ci/gitlab.js
CHANGED
package/commitlint/index.js
CHANGED
|
@@ -23,7 +23,10 @@ function createCommitLint({ commitLintPreset: commitLintPresetDefault }) {
|
|
|
23
23
|
state: gitPresent ? 'present' : 'absent',
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
vscodeRecommendedExtension(
|
|
26
|
+
vscodeRecommendedExtension({
|
|
27
|
+
name: 'seatonjiang.gitmoji-vscode',
|
|
28
|
+
state: gitPresent ? 'present' : 'absent',
|
|
29
|
+
});
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
task.description = 'Setup CommitLint';
|
package/config.json
CHANGED
package/contributing/index.js
CHANGED
package/core/githooks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const { execSync } = require('child_process');
|
|
2
|
-
const path = require('path');
|
|
1
|
+
const { execSync } = require('node:child_process');
|
|
2
|
+
const path = require('node:path');
|
|
3
3
|
const { file, packageJson, makeDirs } = require('mrm-core');
|
|
4
4
|
const project = require('./project.js');
|
|
5
5
|
const npm = require('./npm.js');
|
package/core/githubCI.js
CHANGED
package/core/pkg.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
const { intersect } = require('semver-intersect');
|
|
6
6
|
const { packageJson, file, json } = require('mrm-core');
|
|
7
7
|
const glob = require('glob');
|
|
8
|
-
const path = require('path');
|
|
8
|
+
const path = require('node:path');
|
|
9
9
|
const jsonFile = require('./jsonFile.js');
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -136,7 +136,7 @@ function hasDependency(packageFile, packageName, dependencyType) {
|
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
138
|
*
|
|
139
|
-
* @param {import('mrm-core').
|
|
139
|
+
* @param {import('mrm-core').Json} packageFile
|
|
140
140
|
* @param {Record<string, string>} engineVersionMap
|
|
141
141
|
*/
|
|
142
142
|
function engineMinVersion(packageFile, engineVersionMap) {
|
package/core/vscode.js
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
const { json } = require('mrm-core');
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @param {
|
|
4
|
+
* @param {{
|
|
5
|
+
* name: string,
|
|
6
|
+
* state: 'present'|'absent',
|
|
7
|
+
* }} recommendation
|
|
5
8
|
*/
|
|
6
|
-
function vscodeRecommendedExtension(
|
|
9
|
+
function vscodeRecommendedExtension(recommendation) {
|
|
7
10
|
const packageFile = json('.vscode/extensions.json');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
if (recommendation.state === 'present') {
|
|
12
|
+
packageFile.merge({
|
|
13
|
+
recommendations: [recommendation.name],
|
|
14
|
+
});
|
|
15
|
+
} else {
|
|
16
|
+
packageFile.set(
|
|
17
|
+
'recommendations',
|
|
18
|
+
packageFile.get('recommendations', []).filter((/** @type {string} */ _) => _ !== recommendation.name)
|
|
19
|
+
);
|
|
20
|
+
}
|
|
11
21
|
packageFile.save();
|
|
12
22
|
}
|
|
13
23
|
exports.vscodeRecommendedExtension = vscodeRecommendedExtension;
|
package/editorconfig/index.js
CHANGED
|
@@ -43,7 +43,10 @@ function createEditorConfig(defaults) {
|
|
|
43
43
|
|
|
44
44
|
editorConfigFile.save();
|
|
45
45
|
|
|
46
|
-
vscodeRecommendedExtension(
|
|
46
|
+
vscodeRecommendedExtension({
|
|
47
|
+
name: 'editorconfig.editorconfig',
|
|
48
|
+
state: 'present',
|
|
49
|
+
});
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
task.description = 'Adds EditorConfig file';
|
package/eslint/index.js
CHANGED
|
@@ -4,7 +4,7 @@ const npm = require('../core/npm.js');
|
|
|
4
4
|
const { gitIgnore } = require('../core/git.js');
|
|
5
5
|
const { eslintIgnore, eslintConfig } = require('../core/eslint.js');
|
|
6
6
|
const project = require('../core/project.js');
|
|
7
|
-
const { vscodeSettings } = require('../core/vscode.js');
|
|
7
|
+
const { vscodeSettings, vscodeRecommendedExtension } = require('../core/vscode.js');
|
|
8
8
|
|
|
9
9
|
function createESLint({ eslintPreset: eslintPresetDefault = 'eslint:recommended' }) {
|
|
10
10
|
/**
|
|
@@ -28,7 +28,6 @@ function createESLint({ eslintPreset: eslintPresetDefault = 'eslint:recommended'
|
|
|
28
28
|
'coverage/',
|
|
29
29
|
'build/',
|
|
30
30
|
'.cache/',
|
|
31
|
-
'**/tsconfig.json',
|
|
32
31
|
'.vscode/**',
|
|
33
32
|
'public/',
|
|
34
33
|
]);
|
|
@@ -131,6 +130,10 @@ function createESLint({ eslintPreset: eslintPresetDefault = 'eslint:recommended'
|
|
|
131
130
|
});
|
|
132
131
|
|
|
133
132
|
// VSCode support
|
|
133
|
+
vscodeRecommendedExtension({
|
|
134
|
+
name: 'dbaeumer.vscode-eslint',
|
|
135
|
+
state: 'present',
|
|
136
|
+
});
|
|
134
137
|
vscodeSettings({
|
|
135
138
|
state: 'present',
|
|
136
139
|
update: (settings) => ({
|
package/githooks/index.js
CHANGED
package/lang/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const path = require('path');
|
|
1
|
+
const path = require('node:path');
|
|
2
2
|
const { json, file, template, packageJson } = require('mrm-core');
|
|
3
3
|
const npm = require('../core/npm.js');
|
|
4
4
|
const { gitIgnore } = require('../core/git.js');
|
|
5
5
|
const project = require('../core/project.js');
|
|
6
6
|
const { eslintIgnore } = require('../core/eslint.js');
|
|
7
|
-
const { typedoc } = require('../core/typedoc.js');
|
|
7
|
+
// const { typedoc } = require('../core/typedoc.js');
|
|
8
8
|
const pkg = require('../core/pkg.js');
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -66,7 +66,7 @@ function createLang({ language: languageDefault = 'typescript', tsConfig: tsConf
|
|
|
66
66
|
rootDir: './src',
|
|
67
67
|
},
|
|
68
68
|
extends: `./${tsConfigSettingsName}`,
|
|
69
|
-
include: ['
|
|
69
|
+
include: ['src'],
|
|
70
70
|
})
|
|
71
71
|
.save();
|
|
72
72
|
|
|
@@ -103,29 +103,29 @@ function createLang({ language: languageDefault = 'typescript', tsConfig: tsConf
|
|
|
103
103
|
state: 'present',
|
|
104
104
|
});
|
|
105
105
|
|
|
106
|
-
typedoc({
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
});
|
|
106
|
+
// typedoc({
|
|
107
|
+
// state: isApplication ? 'absent' : 'present',
|
|
108
|
+
// update: (config) => ({
|
|
109
|
+
// // Default values
|
|
110
|
+
// tsconfig: 'tsconfig.json',
|
|
111
|
+
// excludePrivate: true,
|
|
112
|
+
// excludeExternals: true,
|
|
113
|
+
// readme: 'README.md',
|
|
114
|
+
// theme: 'default',
|
|
115
|
+
// // Inherits current
|
|
116
|
+
// ...config,
|
|
117
|
+
// // Force values
|
|
118
|
+
// out: 'public',
|
|
119
|
+
// exclude: [
|
|
120
|
+
// '**/build/**/*',
|
|
121
|
+
// '**/example/**/*',
|
|
122
|
+
// '**/lib/**/*',
|
|
123
|
+
// '**/node_modules/**',
|
|
124
|
+
// '**/__tests__/*.(ts|tsx)',
|
|
125
|
+
// '**/*.(spec|test).(ts|tsx)',
|
|
126
|
+
// ],
|
|
127
|
+
// }),
|
|
128
|
+
// });
|
|
129
129
|
};
|
|
130
130
|
|
|
131
131
|
task.description = 'Setup Programming Language';
|
package/lang/templates/index.ts
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const { packageJson } = require('mrm-core');
|
|
2
|
+
const pkg = require('../core/pkg.js');
|
|
3
|
+
const jsonFile = require('../core/jsonFile.js');
|
|
4
|
+
|
|
5
|
+
function task() {
|
|
6
|
+
pkg.withPackageJson((packageFile) => {
|
|
7
|
+
jsonFile.value(packageFile, {
|
|
8
|
+
path: 'license',
|
|
9
|
+
state: 'present',
|
|
10
|
+
default: 'UNLICENSED',
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
const license = packageJson().get('license');
|
|
14
|
+
|
|
15
|
+
pkg.forEachWorkspace(({ packageFile }) => {
|
|
16
|
+
jsonFile.value(packageFile, {
|
|
17
|
+
path: 'license',
|
|
18
|
+
state: 'present',
|
|
19
|
+
default: license,
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
task.description = 'Setup License';
|
|
25
|
+
task.parameters = {};
|
|
26
|
+
module.exports = task;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@w5s/mrm-preset",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.22",
|
|
4
4
|
"description": "Mrm configuration presets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mrm",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"author": "Julien Polo <julien.polo@gmail.com>",
|
|
21
|
+
"type": "commonjs",
|
|
21
22
|
"main": "config.json",
|
|
22
23
|
"scripts": {
|
|
23
24
|
"build": "concurrently \"npm:build:*\" ",
|
|
@@ -41,15 +42,14 @@
|
|
|
41
42
|
"sync-directory": "^5.0.0"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
|
-
"@types/debug": "
|
|
45
|
-
"mrm": "4.
|
|
45
|
+
"@types/debug": "4.1.7",
|
|
46
|
+
"mrm": "4.1.0"
|
|
46
47
|
},
|
|
47
48
|
"engines": {
|
|
48
|
-
"node": ">=16.
|
|
49
|
-
"yarn": ">=1.x"
|
|
49
|
+
"node": ">=16.0.0"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "75cfedc045da9b86c0009201f837e2d200bd19f0"
|
|
55
55
|
}
|
package/postconfigure/index.js
CHANGED
package/project/index.js
CHANGED
|
@@ -2,6 +2,7 @@ const { dirname } = require('node:path');
|
|
|
2
2
|
const { packageJson, json, makeDirs } = require('mrm-core');
|
|
3
3
|
const git = require('../core/git.js');
|
|
4
4
|
const pkg = require('../core/pkg.js');
|
|
5
|
+
const jsonFile = require('../core/pkg.js');
|
|
5
6
|
const npm = require('../core/npm.js');
|
|
6
7
|
const { vscodeTask } = require('../core/vscode.js');
|
|
7
8
|
const project = require('../core/project.js');
|
|
@@ -54,6 +55,20 @@ function task() {
|
|
|
54
55
|
makeDirs(dirs);
|
|
55
56
|
}
|
|
56
57
|
|
|
58
|
+
const setDefault = (/** @type {import("mrm-core").Json} */ currentPackageFile, /** @type {boolean} */ _root) => {
|
|
59
|
+
jsonFile.value(currentPackageFile, {
|
|
60
|
+
path: undefined,
|
|
61
|
+
state: 'present',
|
|
62
|
+
update: (content) => ({
|
|
63
|
+
type: 'module',
|
|
64
|
+
license: 'UNLICENSED',
|
|
65
|
+
version: '1.0.0-alpha.0',
|
|
66
|
+
description: '',
|
|
67
|
+
...content,
|
|
68
|
+
}),
|
|
69
|
+
default: {},
|
|
70
|
+
});
|
|
71
|
+
};
|
|
57
72
|
const addScripts = (/** @type {import("mrm-core").Json} */ currentPackageFile, /** @type {boolean} */ root) => {
|
|
58
73
|
const useWorkspace = pkg.hasWorkspaces(currentPackageFile);
|
|
59
74
|
|
|
@@ -157,6 +172,7 @@ function task() {
|
|
|
157
172
|
: undefined,
|
|
158
173
|
});
|
|
159
174
|
|
|
175
|
+
setDefault(packageFile, false);
|
|
160
176
|
addScripts(packageFile, true);
|
|
161
177
|
|
|
162
178
|
pkg.script(packageFile, {
|
|
@@ -181,7 +197,11 @@ function task() {
|
|
|
181
197
|
}
|
|
182
198
|
: undefined,
|
|
183
199
|
});
|
|
200
|
+
setDefault(workspace.packageFile, false);
|
|
184
201
|
addScripts(workspace.packageFile, false);
|
|
202
|
+
|
|
203
|
+
// Engine
|
|
204
|
+
pkg.engineMinVersion(workspace.packageFile, { node: rootEngineMinVersion.node });
|
|
185
205
|
});
|
|
186
206
|
|
|
187
207
|
// workspace
|