@w5s/mrm-preset 1.0.0-alpha.24 → 1.0.0-alpha.25

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.
@@ -1,10 +1,10 @@
1
- @w5s/mrm-preset:build: cache hit, replaying output ff73855cd485f581
1
+ @w5s/mrm-preset:build: cache hit, replaying output 5c0df759a52c4169
2
2
  @w5s/mrm-preset:build: [build:*empty]
3
- @w5s/mrm-preset:build: [build:*empty] > @w5s/mrm-preset@1.0.0-alpha.23 build:empty
3
+ @w5s/mrm-preset:build: [build:*empty] > @w5s/mrm-preset@1.0.0-alpha.24 build:empty
4
4
  @w5s/mrm-preset:build: [build:*empty] > :
5
5
  @w5s/mrm-preset:build: [build:*empty]
6
6
  @w5s/mrm-preset:build: [build:*tsc]
7
- @w5s/mrm-preset:build: [build:*tsc] > @w5s/mrm-preset@1.0.0-alpha.23 build:tsc
7
+ @w5s/mrm-preset:build: [build:*tsc] > @w5s/mrm-preset@1.0.0-alpha.24 build:tsc
8
8
  @w5s/mrm-preset:build: [build:*tsc] > tsc --noEmit --skipLibCheck
9
9
  @w5s/mrm-preset:build: [build:*tsc]
10
10
  @w5s/mrm-preset:build: [build:*empty] npm run build:empty exited with code 0
@@ -1,44 +1,44 @@
1
- @w5s/mrm-preset:docs: cache hit, replaying output 30f80080599a5283
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: 
1
+ @w5s/mrm-preset:docs: cache hit, replaying output e0ac617902d31962
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: 
@@ -1,7 +1,7 @@
1
- @w5s/mrm-preset:format: cache hit, replaying output 2f358ad529628b10
1
+ @w5s/mrm-preset:format: cache hit, replaying output 155aaf8cc40e1540
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.23 format:src
5
- @w5s/mrm-preset:format: [format:*src] > eslint . --fix --ext=mjs,cjs,js,jsx,ts,tsx,json
4
+ @w5s/mrm-preset:format: [format:*src] > @w5s/mrm-preset@1.0.0-alpha.24 format:src
5
+ @w5s/mrm-preset:format: [format:*src] > eslint . --fix --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml
6
6
  @w5s/mrm-preset:format: [format:*src]
7
7
  @w5s/mrm-preset:format: [format:*src] npm run format:src exited with code 0
@@ -1,7 +1,7 @@
1
- @w5s/mrm-preset:lint: cache hit, replaying output ed455f28aafa405b
1
+ @w5s/mrm-preset:lint: cache hit, replaying output d52af03e6b9cc41d
2
2
  @w5s/mrm-preset:lint: [1] : exited with code 0
3
3
  @w5s/mrm-preset:lint: [lint:*src]
4
- @w5s/mrm-preset:lint: [lint:*src] > @w5s/mrm-preset@1.0.0-alpha.23 lint:src
5
- @w5s/mrm-preset:lint: [lint:*src] > eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json
4
+ @w5s/mrm-preset:lint: [lint:*src] > @w5s/mrm-preset@1.0.0-alpha.24 lint:src
5
+ @w5s/mrm-preset:lint: [lint:*src] > eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml
6
6
  @w5s/mrm-preset:lint: [lint:*src]
7
7
  @w5s/mrm-preset:lint: [lint:*src] npm run lint:src exited with code 0
@@ -1,2 +1,2 @@
1
- @w5s/mrm-preset:prepare: cache hit, replaying output a60e8700fb447fa6
1
+ @w5s/mrm-preset:prepare: cache hit, replaying output 4a6f50d0a2618ec1
2
2
  @w5s/mrm-preset:prepare: [0] : exited with code 0
@@ -1,22 +1,20 @@
1
- @w5s/mrm-preset:test: cache hit, replaying output 5ce6efcefd19902b
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: Update package.json
17
- @w5s/mrm-preset:test: Update .vscode/settings.json
18
- @w5s/mrm-preset:test: Running cspell...
19
- @w5s/mrm-preset:test: Running jest...
20
- @w5s/mrm-preset:test: Running renovate...
21
- @w5s/mrm-preset:test: Running githooks...
22
- @w5s/mrm-preset:test: Running postconfigure...
1
+ @w5s/mrm-preset:test: cache hit, replaying output f2b96c6a11dc0dc5
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 licenses...
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: Update tsconfig.json
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,14 @@
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.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)
7
+
8
+ **Note:** Version bump only for package @w5s/mrm-preset
9
+
10
+
11
+
12
+
13
+
6
14
  # [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)
7
15
 
8
16
  **Note:** Version bump only for package @w5s/mrm-preset
@@ -42,13 +42,13 @@ function task({ mrmPreset, mrmTask, packageManager }) {
42
42
  // Add MRM default scripts
43
43
  pkg.script(packageFile, {
44
44
  name: 'configure',
45
- state: 'default',
46
- script: currentPackageManager === 'npm' ? `npm run mrm -- ${mrmTask}` : `yarn mrm ${mrmTask}`,
45
+ state: 'present',
46
+ default: currentPackageManager === 'npm' ? `npm run mrm -- ${mrmTask}` : `yarn mrm ${mrmTask}`,
47
47
  });
48
48
  pkg.script(packageFile, {
49
49
  name: 'mrm',
50
- state: 'default',
51
- script: `mrm --preset ${mrmPreset}`,
50
+ state: 'present',
51
+ default: `mrm --preset ${mrmPreset}`,
52
52
  });
53
53
  });
54
54
  }
@@ -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,7 @@ 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
57
55
  when: never
58
56
  - if: $CI_COMMIT_MESSAGE =~ /🔖 /
59
57
  when: never
@@ -77,7 +75,7 @@ variables:
77
75
  - npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
78
76
  - npm run release
79
77
 
80
- ##
78
+ # #
81
79
  # Generic trait for a trigger button for deploy stage.
82
80
  # Use DEPLOY_ENVIRONMENT variable to choose environment
83
81
  #
@@ -178,7 +176,7 @@ variables:
178
176
  CODE_ANALYSIS_HOUR: 7 # 7h UTC => 9h Paris
179
177
  # CODE_ANALYSIS_DISABLED: "🛑"
180
178
  rules:
181
- - if: "$CODE_ANALYSIS_DISABLED"
179
+ - if: $CODE_ANALYSIS_DISABLED
182
180
  when: never
183
181
  - if: '$CI_PIPELINE_SOURCE == "schedule"'
184
182
  when: always
@@ -228,9 +226,9 @@ variables:
228
226
  expire_in: 1 week
229
227
  paths:
230
228
  - dist
231
- - "packages/*/dist"
229
+ - 'packages/*/dist'
232
230
  - lib
233
- - "packages/*/lib"
231
+ - 'packages/*/lib'
234
232
  - node_modules
235
233
 
236
234
  .autodevops_node_docs:
@@ -244,9 +242,9 @@ variables:
244
242
  .autodevops_renovate:
245
243
  stage: prepare
246
244
  rules:
247
- - if: "$RENOVATE_DISABLED"
245
+ - if: $RENOVATE_DISABLED
248
246
  when: never
249
- - if: "$RENOVATE"
247
+ - if: $RENOVATE
250
248
  when: always
251
249
  - when: never
252
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/core/githooks.js CHANGED
@@ -31,7 +31,7 @@ function husky({ state }) {
31
31
  pkg.script(packageFile, {
32
32
  name: `${project.prepare}:husky`,
33
33
  state: hasHusky ? 'present' : 'absent',
34
- script: 'is-ci || husky install',
34
+ update: 'is-ci || husky install',
35
35
  });
36
36
  });
37
37
  }
package/core/jest.js CHANGED
@@ -38,20 +38,22 @@ function jest({ state }) {
38
38
 
39
39
  pkg.script(packageFile, {
40
40
  name: project.coverage,
41
- script: hasWorkspaces ? pkg.emptyScript : 'jest --coverage',
42
- state: !hasJest || hasWorkspaces ? 'default' : 'present',
41
+ update: (_) => (hasWorkspaces ? _ : 'jest --coverage'),
42
+ state: 'present',
43
+ default: pkg.emptyScript,
43
44
  });
44
45
  pkg.script(packageFile, {
45
46
  name: project.test,
46
- script: hasWorkspaces ? pkg.emptyScript : 'jest',
47
- state: !hasJest || hasWorkspaces ? 'default' : 'present',
47
+ update: (_) => (hasWorkspaces ? _ : 'jest'),
48
+ state: 'present',
49
+ default: pkg.emptyScript,
48
50
  });
49
51
  });
50
52
 
51
53
  // Dependencies
52
54
  npm.dependency({
53
55
  dev: true,
54
- name: ['jest', 'es-jest'],
56
+ name: ['jest', 'es-jest', '@jest/globals'],
55
57
  state: hasJest ? 'present' : 'absent',
56
58
  });
57
59
 
package/core/pkg.js CHANGED
@@ -1,6 +1,10 @@
1
1
  /* cSpell: disable */
2
2
  // @ts-check
3
3
 
4
+ /**
5
+ * @typedef {string|boolean|number|null|Array<unknown>|Record<string, unknown>} JsonValue
6
+ */
7
+
4
8
  // @ts-ignore
5
9
  const { intersect } = require('semver-intersect');
6
10
  const { packageJson, file, json } = require('mrm-core');
@@ -69,19 +73,20 @@ function forEachWorkspace(fn) {
69
73
  }
70
74
 
71
75
  /**
76
+ * @template {undefined|JsonValue} T
72
77
  * @param {import('mrm-core').Json} packageFile
73
78
  * @param {{
74
79
  * name: string,
75
- * state: 'present'|'absent'|'default',
76
- * script: string,
80
+ * state: 'present'|'absent',
81
+ * update?: T | ((previousValue: T) => T)
82
+ * default?: T | (() => T)
77
83
  * }} options
78
84
  */
79
- function script(packageFile, { name, state, script: scriptName }) {
80
- if (state === 'absent') {
81
- packageFile.unset(['scripts', name]);
82
- } else if (state === 'present' || (state === 'default' && !packageFile.get(['scripts', name]))) {
83
- packageFile.set(['scripts', name], scriptName);
84
- }
85
+ function script(packageFile, options) {
86
+ jsonFile.value(packageFile, {
87
+ ...options,
88
+ path: ['scripts', options.name],
89
+ });
85
90
  }
86
91
 
87
92
  const defaultManager = 'npm';
package/cspell/index.js CHANGED
@@ -28,7 +28,7 @@ function task() {
28
28
  const workspaceMatchers = pkg.listWorkspaceMatchers(packageFile);
29
29
  pkg.script(packageFile, {
30
30
  name: project.spellcheck,
31
- script: `cspell --no-progress '**' ${
31
+ update: `cspell --no-progress '**' ${
32
32
  hasWorkspaces ? `${workspaceMatchers.map((_) => `--exclude='${_}/**'`).join(' ')} && turbo run spellcheck` : ''
33
33
  }`,
34
34
  state: 'present',
@@ -37,7 +37,7 @@ function task() {
37
37
  pkg.forEachWorkspace(({ packageFile }) => {
38
38
  pkg.script(packageFile, {
39
39
  name: project.spellcheck,
40
- script: `cspell --no-progress '**'`,
40
+ update: `cspell --no-progress '**'`,
41
41
  state: 'present',
42
42
  });
43
43
  });
package/eslint/index.js CHANGED
@@ -19,6 +19,7 @@ function createESLint({ eslintPreset: eslintPresetDefault = 'eslint:recommended'
19
19
  const hasTypescript = pkg.hasDependency(packageFileDefault, 'typescript', 'dev');
20
20
  const hasJSX = true;
21
21
  const hasJSON = true;
22
+ const hasYAML = true;
22
23
 
23
24
  // Should be added first
24
25
  gitIgnore('ESLint', ['.eslintcache']);
@@ -74,6 +75,8 @@ function createESLint({ eslintPreset: eslintPresetDefault = 'eslint:recommended'
74
75
  json: hasJSON,
75
76
  jsonc: hasJSON,
76
77
  json5: hasJSON,
78
+ yml: hasYAML,
79
+ yaml: hasYAML,
77
80
  };
78
81
  const extList = Object.keys(extsMap).filter((ext) => extsMap[ext]);
79
82
  const extOption = ` --ext=${extList.join(',')}`;
@@ -87,46 +90,50 @@ function createESLint({ eslintPreset: eslintPresetDefault = 'eslint:recommended'
87
90
  // workspaces
88
91
  pkg.script(packageFile, {
89
92
  name: `${project.lint}:root`,
90
- script: `eslint .${extOption}${ignorePatterns}`,
93
+ update: `eslint .${extOption}${ignorePatterns}`,
91
94
  state: hasWorkspaces ? 'present' : 'absent',
92
95
  });
93
96
  pkg.script(packageFile, {
94
97
  name: `${project.format}:root`,
95
- script: `eslint .${extOption}${ignorePatterns} --fix`,
98
+ update: `eslint .${extOption}${ignorePatterns} --fix`,
96
99
  state: hasWorkspaces ? 'present' : 'absent',
97
100
  });
98
101
  pkg.script(packageFile, {
99
102
  name: `${project.lint}:packages`,
100
- script: `turbo run ${project.lint}`,
103
+ update: `turbo run ${project.lint}`,
101
104
  state: hasWorkspaces ? 'present' : 'absent',
102
105
  });
103
106
  pkg.script(packageFile, {
104
107
  name: `${project.format}:packages`,
105
- script: `turbo run ${project.format}`,
108
+ update: `turbo run ${project.format}`,
106
109
  state: hasWorkspaces ? 'present' : 'absent',
107
110
  });
108
111
  // regular package
109
112
  pkg.script(packageFile, {
110
113
  name: `${project.lint}:src`,
111
- script: `eslint .${extOption}`,
114
+ update: `eslint .${extOption}`,
112
115
  state: !hasWorkspaces ? 'present' : 'absent',
113
116
  });
114
117
  pkg.script(packageFile, {
115
118
  name: `${project.format}:src`,
116
- script: `eslint . --fix${extOption}`,
119
+ update: `eslint . --fix${extOption}`,
117
120
  state: !hasWorkspaces ? 'present' : 'absent',
118
121
  });
119
122
  });
120
123
  pkg.forEachWorkspace(({ packageFile }) => {
124
+ const updater = (/** @type {boolean} */ format) => (/** @type {string} */ _) =>
125
+ _ == null || _ === '' || _.trimStart().startsWith('eslint')
126
+ ? `eslint .${format ? ' --fix' : ''}${extOption}`
127
+ : _;
121
128
  pkg.script(packageFile, {
122
129
  name: `${project.lint}:src`,
123
- script: `eslint .${extOption}`,
124
- state: 'default',
130
+ update: updater(),
131
+ state: 'present',
125
132
  });
126
133
  pkg.script(packageFile, {
127
134
  name: `${project.format}:src`,
128
- script: `eslint . --fix${extOption}`,
129
- state: 'default',
135
+ update: updater(true),
136
+ state: 'present',
130
137
  });
131
138
  });
132
139
 
@@ -153,6 +160,8 @@ function createESLint({ eslintPreset: eslintPresetDefault = 'eslint:recommended'
153
160
  js: 'javascript',
154
161
  tsx: 'typescriptreact',
155
162
  ts: 'typescript',
163
+ yaml: 'yaml',
164
+ yml: 'yaml',
156
165
  }[ext] || ext)
157
166
  )
158
167
  )
package/lang/index.js CHANGED
@@ -84,7 +84,7 @@ function createLang({ language: languageDefault = 'typescript', tsConfig: tsConf
84
84
  if (isApplication) {
85
85
  pkg.script(_packageFile, {
86
86
  name: project.develop,
87
- script:
87
+ update:
88
88
  "NODE_ENV=development ts-node-dev --require='tsconfig-paths/register' -r dotenv/config -- ./src/index.ts dotenv_config_path=.env",
89
89
  state: 'present',
90
90
  });
@@ -1,5 +1,5 @@
1
1
  import { describe, test, expect } from '@jest/globals'
2
- import { main } from '.';
2
+ import { main } from './index.js';
3
3
 
4
4
  describe('index', () => {
5
5
  test('main', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/mrm-preset",
3
- "version": "1.0.0-alpha.24",
3
+ "version": "1.0.0-alpha.25",
4
4
  "description": "Mrm configuration presets",
5
5
  "keywords": [
6
6
  "mrm",
@@ -27,9 +27,9 @@
27
27
  "clean": "concurrently \"npm:clean:*\" \":\"",
28
28
  "docs": "md-magic --path '**/*.md' --ignore='node_modules'",
29
29
  "format": "concurrently \"npm:format:*\" \":\"",
30
- "format:src": "eslint . --fix --ext=mjs,cjs,js,jsx,ts,tsx,json",
30
+ "format:src": "eslint . --fix --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml",
31
31
  "lint": "concurrently \"npm:lint:*\" \":\"",
32
- "lint:src": "eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json",
32
+ "lint:src": "eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml",
33
33
  "prepare": "concurrently \"npm:prepare:*\" \":\"",
34
34
  "spellcheck": "cspell --no-progress '**'",
35
35
  "test": "mkdir _tester; cd _tester; mrm bootstrap --dir ..; mrm configure --dir .."
@@ -51,5 +51,5 @@
51
51
  "publishConfig": {
52
52
  "access": "public"
53
53
  },
54
- "gitHead": "91ea210deb64edee4df9604ec1ca84ba562b69f7"
54
+ "gitHead": "f75f847322f3dcb879e5a52e09dd834ab15b9186"
55
55
  }
package/project/index.js CHANGED
@@ -55,18 +55,26 @@ function task() {
55
55
  makeDirs(dirs);
56
56
  }
57
57
 
58
- const setDefault = (/** @type {import("mrm-core").Json} */ currentPackageFile, /** @type {boolean} */ _root) => {
58
+ const setDefault = (/** @type {import("mrm-core").Json} */ currentPackageFile, /** @type {boolean} */ root) => {
59
59
  jsonFile.value(currentPackageFile, {
60
- path: undefined,
60
+ path: 'type',
61
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: {},
62
+ default: 'module',
63
+ });
64
+ jsonFile.value(currentPackageFile, {
65
+ path: 'license',
66
+ state: 'present',
67
+ update: (_) => _ ?? (root && rootUseWorkspace ? 'UNLICENSED' : undefined),
68
+ });
69
+ jsonFile.value(currentPackageFile, {
70
+ path: 'version',
71
+ state: root && rootUseWorkspace ? 'absent' : 'present',
72
+ default: '1.0.0-alpha.0',
73
+ });
74
+ jsonFile.value(currentPackageFile, {
75
+ path: 'description',
76
+ state: 'present',
77
+ update: (_) => _ ?? (root && rootUseWorkspace ? '' : undefined),
70
78
  });
71
79
  };
72
80
  const addScripts = (/** @type {import("mrm-core").Json} */ currentPackageFile, /** @type {boolean} */ root) => {
@@ -75,24 +83,24 @@ function task() {
75
83
  // build
76
84
  pkg.script(currentPackageFile, {
77
85
  name: project.build,
78
- script: npmRunAll(project.build, false),
86
+ update: npmRunAll(project.build, false),
79
87
  state: 'present',
80
88
  });
81
89
  pkg.script(currentPackageFile, {
82
90
  name: `${project.build}:packages`,
83
- script: turboRun(project.build),
91
+ update: turboRun(project.build),
84
92
  state: useWorkspace ? 'present' : 'absent',
85
93
  });
86
94
 
87
95
  // lint
88
96
  pkg.script(currentPackageFile, {
89
97
  name: project.lint,
90
- script: npmRunAll(project.lint, true),
98
+ update: npmRunAll(project.lint, true),
91
99
  state: 'present',
92
100
  });
93
101
  pkg.script(currentPackageFile, {
94
102
  name: project.format,
95
- script: npmRunAll(project.format, true),
103
+ update: npmRunAll(project.format, true),
96
104
  state: 'present',
97
105
  });
98
106
 
@@ -104,26 +112,27 @@ function task() {
104
112
  // });
105
113
  pkg.script(currentPackageFile, {
106
114
  name: project.test,
107
- script: useWorkspace ? npmRunAll(project.test, false) : pkg.emptyScript,
108
- state: useWorkspace ? 'present' : 'default',
115
+ update: useWorkspace ? npmRunAll(project.test, false) : undefined,
116
+ state: 'present',
117
+ default: pkg.emptyScript,
109
118
  });
110
119
 
111
120
  // prepare
112
121
  pkg.script(currentPackageFile, {
113
122
  name: project.prepare,
114
- script: npmRunAll(project.prepare, true),
123
+ update: npmRunAll(project.prepare, true),
115
124
  state: 'present',
116
125
  });
117
126
 
118
127
  // clean
119
128
  pkg.script(currentPackageFile, {
120
129
  name: project.clean,
121
- script: npmRunAll(project.clean, true),
130
+ update: npmRunAll(project.clean, true),
122
131
  state: 'present',
123
132
  });
124
133
  pkg.script(currentPackageFile, {
125
134
  name: `${project.clean}:packages`,
126
- script: turboRun(project.clean),
135
+ update: turboRun(project.clean),
127
136
  state: useWorkspace ? 'present' : 'absent',
128
137
  });
129
138
 
@@ -132,29 +141,29 @@ function task() {
132
141
  // rescue
133
142
  pkg.script(currentPackageFile, {
134
143
  name: project.rescue,
135
- script: `${gitSupported ? 'git clean -fdx' : ''};${packageManager} install`,
144
+ update: `${gitSupported ? 'git clean -fdx' : ''};${packageManager} install`,
136
145
  state: root ? 'present' : 'absent',
137
146
  });
138
147
 
139
148
  // release
140
149
  pkg.script(currentPackageFile, {
141
150
  name: project.release,
142
- script: pkg.emptyScript,
143
- state: root ? 'default' : 'absent',
151
+ default: pkg.emptyScript,
152
+ state: root ? 'present' : 'absent',
144
153
  });
145
154
 
146
155
  // code analysis
147
156
  pkg.script(currentPackageFile, {
148
157
  name: project.codeAnalysis,
149
- script: pkg.emptyScript,
150
- state: root ? 'default' : 'absent',
158
+ default: pkg.emptyScript,
159
+ state: root ? 'present' : 'absent',
151
160
  });
152
161
 
153
162
  // develop & auto build & load
154
163
  pkg.script(currentPackageFile, {
155
164
  name: project.develop,
156
- script: pkg.emptyScript,
157
- state: root ? 'default' : 'absent',
165
+ default: pkg.emptyScript,
166
+ state: root ? 'present' : 'absent',
158
167
  });
159
168
  };
160
169
 
@@ -177,7 +186,7 @@ function task() {
177
186
 
178
187
  pkg.script(packageFile, {
179
188
  name: project.validate,
180
- script: `${npmRun(project.build)} && ${npmRun(project.lint)} && ${npmRun(project.test)}`,
189
+ update: `${npmRun(project.build)} && ${npmRun(project.lint)} && ${npmRun(project.test)}`,
181
190
  state: 'present',
182
191
  });
183
192
 
package/release/index.js CHANGED
@@ -11,7 +11,7 @@ function task() {
11
11
  pkg.script(packageFile, {
12
12
  name: project.release,
13
13
  // eslint-disable-next-line no-template-curly-in-string
14
- script: useWorkspace ? 'is-ci && lerna publish --yes || lerna publish' : semanticRelease.command(),
14
+ update: useWorkspace ? 'is-ci && lerna publish --yes || lerna publish' : semanticRelease.command(),
15
15
  state: 'present',
16
16
  });
17
17
  });