@w5s/mrm-preset 1.2.1 → 1.3.0

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,6 +1,6 @@
1
1
  [1] : exited with code 0
2
2
  [tsc]
3
- [tsc] > @w5s/mrm-preset@1.2.0 build:tsc
3
+ [tsc] > @w5s/mrm-preset@1.2.1 build:tsc
4
4
  [tsc] > tsc --noEmit --skipLibCheck
5
5
  [tsc]
6
6
  [tsc] npm run build:tsc exited with code 0
@@ -1,6 +1,6 @@
1
1
  [1] : exited with code 0
2
2
  [src]
3
- [src] > @w5s/mrm-preset@1.2.0 lint:src
3
+ [src] > @w5s/mrm-preset@1.2.1 lint:src
4
4
  [src] > eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml
5
5
  [src]
6
6
  [src] npm run lint:src exited with code 0
@@ -1 +1,6 @@
1
- [0] : exited with code 0
1
+ [1] : exited with code 0
2
+ [template]
3
+ [template] > @w5s/mrm-preset@1.3.0 prepare:template
4
+ [template] > cp ../../.editorconfig editorconfig/_editorconfig
5
+ [template]
6
+ [template] npm run prepare:template exited with code 0
@@ -1,6 +1,6 @@
1
1
  [1] : exited with code 0
2
2
  [script]
3
- [script] > @w5s/mrm-preset@1.2.0 test:script
3
+ [script] > @w5s/mrm-preset@1.2.1 test:script
4
4
  [script] > mkdir _tester; cd _tester; mrm bootstrap --dir ..; mrm configure --dir ..
5
5
  [script]
6
6
  [script] mkdir: _tester: File exists
@@ -8,16 +8,20 @@
8
8
  [script] Running alias configure...
9
9
  [script] Running gitignore...
10
10
  [script] Running project...
11
+ [script] Update turbo.json
11
12
  [script] Running contributing...
12
13
  [script] Running licenses...
13
14
  [script] Running asdf...
14
15
  [script] Running release...
15
16
  [script] Running ci...
16
17
  [script] Running lang...
18
+ [script] Update tsconfig.json
17
19
  [script] Running commitlint...
20
+ [script] Update .vscode/extensions.json
18
21
  [script] Running editorconfig...
19
22
  [script] Running eslint...
20
23
  [script] Running cspell...
24
+ [script] Update .cspell.json
21
25
  [script] Running vitest...
22
26
  [script] Running renovate...
23
27
  [script] Running githooks...
package/CHANGELOG.md CHANGED
@@ -3,40 +3,34 @@
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.2.1](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.2.0...@w5s/mrm-preset@1.2.1) (2023-08-08)
7
-
6
+ # [1.3.0](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.2.1...@w5s/mrm-preset@1.3.0) (2023-09-28)
8
7
 
9
- ### 🐛 Bug Fixes
8
+ ### Features
10
9
 
11
- - Fix doc configuration in mrm ([fe81b1a](https://github.com/w5s/project-config/commit/fe81b1a))
10
+ - Simplify editorconfig configuration ([7b1a5fd](https://github.com/w5s/project-config/commit/7b1a5fd))
12
11
 
13
12
  **Note:** Version bump only for package @w5s/mrm-preset
14
13
 
14
+ ## [1.2.1](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.2.0...@w5s/mrm-preset@1.2.1) (2023-08-08)
15
15
 
16
+ ### 🐛 Bug Fixes
16
17
 
18
+ - Fix doc configuration in mrm ([fe81b1a](https://github.com/w5s/project-config/commit/fe81b1a))
17
19
 
20
+ **Note:** Version bump only for package @w5s/mrm-preset
18
21
 
19
22
  # [1.2.0](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.1.1...@w5s/mrm-preset@1.2.0) (2023-08-01)
20
23
 
21
-
22
24
  ### ✨ Features
23
25
 
24
26
  - Add support for asdf ([a67f3b5](https://github.com/w5s/project-config/commit/a67f3b5)) - Add support for turbo caching in github actions ([d61aca7](https://github.com/w5s/project-config/commit/d61aca7))
25
27
 
26
28
  **Note:** Version bump only for package @w5s/mrm-preset
27
29
 
28
-
29
-
30
-
31
-
32
30
  ## [1.1.1](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.1.0...@w5s/mrm-preset@1.1.1) (2023-07-12)
33
31
 
34
32
  **Note:** Version bump only for package @w5s/mrm-preset
35
33
 
36
-
37
-
38
-
39
-
40
34
  # [1.1.0](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.4...@w5s/mrm-preset@1.1.0) (2023-07-04)
41
35
 
42
36
  ### ✨ Features
@@ -0,0 +1,59 @@
1
+ # http://editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ continuation_indent_size = 4
7
+ curly_bracket_next_line = false
8
+ end_of_line = lf
9
+ indent_brace_style = Stroustrup
10
+ indent_size = 2
11
+ indent_style = space
12
+ insert_final_newline = true
13
+ spaces_around_brackets = outside
14
+ spaces_around_operators = true
15
+ trim_trailing_whitespace = true
16
+
17
+ [*.{json,json5,webmanifest}]
18
+ indent_size = 2
19
+ indent_style = space
20
+ insert_final_newline = ignore
21
+
22
+ [*.{yml,yaml}]
23
+ indent_size = 2
24
+ indent_style = space
25
+
26
+ [*.{bat,reg,ps1,vbs,cs,cmd,fs,ahk}]
27
+ end_of_line = crlf
28
+
29
+ [*.{sh,zsh}]
30
+ end_of_line = lf
31
+
32
+ [*.{css,sass,scss,less,pcss}]
33
+ indent_size = 2
34
+ indent_style = space
35
+ max_line_length = 120
36
+ quote_type = single
37
+
38
+ [*.{js,jsx,jsm,ts,tsx,cjs,cjs,cjsx,cts,ctsx,mjs,mts,mtsx,js.hbs}]
39
+ indent_size = 2
40
+ indent_style = space
41
+ max_line_length = 120
42
+ quote_type = single
43
+
44
+ [*.{htm,html,svg,vue}]
45
+ indent_size = 2
46
+ indent_style = space
47
+
48
+ [*.{md,mdwn,mdown,markdown,mdx,apib}]
49
+ indent_size = 4
50
+ indent_style = space
51
+ insert_final_newline = true
52
+ trim_trailing_whitespace = false
53
+
54
+ [*.{py,robot}]
55
+ indent_size = 4
56
+ indent_style = space
57
+
58
+ [{Makefile,**.mk,**.make}]
59
+ indent_style = tab
@@ -1,119 +1,22 @@
1
- const { ini } = require('mrm-core');
2
- const createDebug = require('debug');
3
- const { vscodeRecommendedExtension } = require('../core/vscode.js');
4
-
5
- /**
6
- *
7
- * @param {Record<string, Partial<{
8
- * charset: string,
9
- * continuation_indent_size: number,
10
- * curly_bracket_next_line: boolean,
11
- * end_of_line: 'lf'|'crlf',
12
- * indent_brace_style: 'Stroustrup',
13
- * indent_size: number,
14
- * indent_style: 'tab'|'space',
15
- * insert_final_newline: boolean|'ignore',
16
- * max_line_length: number,
17
- * quote_type: 'single'|'double',
18
- * root: boolean,
19
- * spaces_around_brackets: 'outside',
20
- * spaces_around_operators: boolean,
21
- * trim_trailing_whitespace: boolean,
22
- * }>>} defaults
23
- */
24
- function createEditorConfig(defaults) {
25
- const debug = createDebug('mrm-editorconfig');
26
-
27
- /**
28
- * @param {string} section
29
- * @param {defaults} existing
30
- */
31
- function mergeSection(section, existing = {}) {
32
- return Object.assign(existing, defaults[section] || {});
33
- }
34
-
35
- function task() {
36
- const editorConfigFile = ini('.editorconfig', 'http://editorconfig.org');
1
+ const { readFileSync } = require('node:fs');
37
2
 
38
- Object.keys(defaults).forEach((name) => {
39
- const values = mergeSection(name, editorConfigFile.get(name));
40
- debug('section %s: %o', name, values);
41
- editorConfigFile.set(name, values);
42
- });
43
-
44
- editorConfigFile.save();
3
+ const { vscodeRecommendedExtension } = require('../core/vscode.js');
4
+ const block = require('../core/block.js');
45
5
 
46
- vscodeRecommendedExtension({
47
- name: 'editorconfig.editorconfig',
48
- state: 'present',
49
- });
50
- }
6
+ function task() {
7
+ const templateContent = readFileSync(require.resolve('./_editorconfig'), 'utf8');
51
8
 
52
- task.description = 'Adds EditorConfig file';
9
+ block({
10
+ block: templateContent,
11
+ path: '.editorconfig',
12
+ });
53
13
 
54
- return task;
14
+ vscodeRecommendedExtension({
15
+ name: 'editorconfig.editorconfig',
16
+ state: 'present',
17
+ });
55
18
  }
56
19
 
57
- module.exports = createEditorConfig({
58
- '*': {
59
- // eslint-disable-next-line unicorn/text-encoding-identifier-case
60
- charset: 'utf-8',
61
- continuation_indent_size: 4,
62
- curly_bracket_next_line: false,
63
- end_of_line: 'lf',
64
- indent_brace_style: 'Stroustrup',
65
- indent_size: 2,
66
- indent_style: 'space',
67
- insert_final_newline: true,
68
- spaces_around_brackets: 'outside',
69
- spaces_around_operators: true,
70
- trim_trailing_whitespace: true,
71
- },
72
- '*.{json,json5,webmanifest}': {
73
- indent_size: 2,
74
- indent_style: 'space',
75
- insert_final_newline: 'ignore',
76
- },
77
- '*.{yml,yaml}': {
78
- indent_size: 2,
79
- indent_style: 'space',
80
- },
81
- '*.{bat,reg,ps1,vbs,cs,cmd,fs,ahk}': {
82
- end_of_line: 'crlf',
83
- },
84
- '*.{sh,zsh}': {
85
- end_of_line: 'lf',
86
- },
87
- '*.{css,sass,scss,less,pcss}': {
88
- indent_size: 2,
89
- indent_style: 'space',
90
- max_line_length: 120,
91
- quote_type: 'single',
92
- },
93
- '*.{js,jsx,jsm,ts,tsx,cjs,cjs,cjsx,cts,ctsx,mjs,mts,mtsx,js.hbs}': {
94
- indent_size: 2,
95
- indent_style: 'space',
96
- max_line_length: 120,
97
- quote_type: 'single',
98
- },
99
- '*.{htm,html,svg,vue}': {
100
- indent_size: 2,
101
- indent_style: 'space',
102
- },
103
- '*.{md,mdwn,mdown,markdown,mdx,apib}': {
104
- indent_size: 4,
105
- indent_style: 'space',
106
- insert_final_newline: true,
107
- trim_trailing_whitespace: false,
108
- },
109
- '*.{py,robot}': {
110
- indent_size: 4,
111
- indent_style: 'space',
112
- },
113
- Makefile: {
114
- indent_style: 'tab',
115
- },
116
- _global: {
117
- root: true,
118
- },
119
- });
20
+ task.description = 'Adds EditorConfig file';
21
+
22
+ module.exports = task;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/mrm-preset",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "description": "Mrm configuration presets",
5
5
  "keywords": [
6
6
  "mrm",
@@ -36,5 +36,5 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "16aaafb3d78f8485ca110ee2842005e6b938111b"
39
+ "gitHead": "40aa9e728c83ee50a5a381817c59df91458cf6a0"
40
40
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/mrm-preset",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "description": "Mrm configuration presets",
5
5
  "keywords": [
6
6
  "mrm",
@@ -32,6 +32,7 @@
32
32
  "postpack": "npx clean-package restore",
33
33
  "prepack": "npx clean-package",
34
34
  "prepare": "concurrently \"npm:prepare:*\" \":\"",
35
+ "prepare:template": "cp ../../.editorconfig editorconfig/_editorconfig",
35
36
  "spellcheck": "cspell --no-progress '**'",
36
37
  "test": "concurrently \"npm:test:*\" \":\"",
37
38
  "test:script": "mkdir _tester; cd _tester; mrm bootstrap --dir ..; mrm configure --dir .."
@@ -44,8 +45,8 @@
44
45
  "sync-directory": "^6.0.0"
45
46
  },
46
47
  "devDependencies": {
47
- "@types/debug": "4.1.8",
48
- "mrm": "4.1.17",
48
+ "@types/debug": "4.1.9",
49
+ "mrm": "4.1.22",
49
50
  "mrm-preset-default": "4.1.11"
50
51
  },
51
52
  "clean-package": "../../clean-package.config.cjs",
@@ -55,5 +56,5 @@
55
56
  "publishConfig": {
56
57
  "access": "public"
57
58
  },
58
- "gitHead": "16aaafb3d78f8485ca110ee2842005e6b938111b"
59
+ "gitHead": "40aa9e728c83ee50a5a381817c59df91458cf6a0"
59
60
  }