@virmator/format 13.3.11 → 13.3.13
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/dist/format.d.ts +22 -21
- package/dist/format.js +24 -23
- package/package.json +6 -4
package/dist/format.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RuntimeEnv } from '@augment-vir/common';
|
|
2
|
+
import { NpmDepType, PackageType } from '@virmator/core';
|
|
2
3
|
/** A virmator plugin for formatting code. */
|
|
3
4
|
export declare const virmatorFormatPlugin: Readonly<Readonly<{
|
|
4
5
|
name: string;
|
|
@@ -24,14 +25,14 @@ export declare const virmatorFormatPlugin: Readonly<Readonly<{
|
|
|
24
25
|
readonly prettier: {
|
|
25
26
|
readonly copyFromPath: string;
|
|
26
27
|
readonly copyToPath: "prettier.config.mjs";
|
|
27
|
-
readonly env: [
|
|
28
|
+
readonly env: [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
28
29
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
29
30
|
readonly required: true;
|
|
30
31
|
};
|
|
31
32
|
readonly prettierIgnore: {
|
|
32
33
|
readonly copyFromPath: string;
|
|
33
34
|
readonly copyToPath: ".prettierignore";
|
|
34
|
-
readonly env: [
|
|
35
|
+
readonly env: [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
35
36
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
36
37
|
readonly required: true;
|
|
37
38
|
};
|
|
@@ -39,42 +40,42 @@ export declare const virmatorFormatPlugin: Readonly<Readonly<{
|
|
|
39
40
|
readonly npmDeps: {
|
|
40
41
|
readonly prettier: {
|
|
41
42
|
readonly type: NpmDepType.Dev;
|
|
42
|
-
readonly env: readonly [
|
|
43
|
+
readonly env: readonly [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
43
44
|
readonly packageType: readonly [PackageType.MonoRoot, PackageType.TopPackage];
|
|
44
45
|
};
|
|
45
46
|
readonly 'prettier-plugin-jsdoc': {
|
|
46
47
|
readonly type: NpmDepType.Dev;
|
|
47
|
-
readonly env: readonly [
|
|
48
|
+
readonly env: readonly [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
48
49
|
readonly packageType: readonly [PackageType.MonoRoot, PackageType.TopPackage];
|
|
49
50
|
};
|
|
50
51
|
readonly 'prettier-plugin-multiline-arrays': {
|
|
51
52
|
readonly type: NpmDepType.Dev;
|
|
52
|
-
readonly env: readonly [
|
|
53
|
+
readonly env: readonly [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
53
54
|
readonly packageType: readonly [PackageType.MonoRoot, PackageType.TopPackage];
|
|
54
55
|
};
|
|
55
56
|
readonly 'prettier-plugin-organize-imports': {
|
|
56
57
|
readonly type: NpmDepType.Dev;
|
|
57
|
-
readonly env: readonly [
|
|
58
|
+
readonly env: readonly [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
58
59
|
readonly packageType: readonly [PackageType.MonoRoot, PackageType.TopPackage];
|
|
59
60
|
};
|
|
60
61
|
readonly 'prettier-plugin-packagejson': {
|
|
61
62
|
readonly type: NpmDepType.Dev;
|
|
62
|
-
readonly env: readonly [
|
|
63
|
+
readonly env: readonly [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
63
64
|
readonly packageType: readonly [PackageType.MonoRoot, PackageType.TopPackage];
|
|
64
65
|
};
|
|
65
66
|
readonly 'prettier-plugin-sort-json': {
|
|
66
67
|
readonly type: NpmDepType.Dev;
|
|
67
|
-
readonly env: readonly [
|
|
68
|
+
readonly env: readonly [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
68
69
|
readonly packageType: readonly [PackageType.MonoRoot, PackageType.TopPackage];
|
|
69
70
|
};
|
|
70
71
|
readonly 'prettier-plugin-toml': {
|
|
71
72
|
readonly type: NpmDepType.Dev;
|
|
72
|
-
readonly env: readonly [
|
|
73
|
+
readonly env: readonly [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
73
74
|
readonly packageType: readonly [PackageType.MonoRoot, PackageType.TopPackage];
|
|
74
75
|
};
|
|
75
76
|
readonly 'prettier-plugin-interpolated-html-tags': {
|
|
76
77
|
readonly type: NpmDepType.Dev;
|
|
77
|
-
readonly env: readonly [
|
|
78
|
+
readonly env: readonly [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
78
79
|
readonly packageType: readonly [PackageType.MonoRoot, PackageType.TopPackage];
|
|
79
80
|
};
|
|
80
81
|
};
|
|
@@ -104,14 +105,14 @@ export declare const virmatorFormatPlugin: Readonly<Readonly<{
|
|
|
104
105
|
readonly prettier: {
|
|
105
106
|
readonly copyFromPath: string;
|
|
106
107
|
readonly copyToPath: "prettier.config.mjs";
|
|
107
|
-
readonly env: [
|
|
108
|
+
readonly env: [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
108
109
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
109
110
|
readonly required: true;
|
|
110
111
|
};
|
|
111
112
|
readonly prettierIgnore: {
|
|
112
113
|
readonly copyFromPath: string;
|
|
113
114
|
readonly copyToPath: ".prettierignore";
|
|
114
|
-
readonly env: [
|
|
115
|
+
readonly env: [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
115
116
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
116
117
|
readonly required: true;
|
|
117
118
|
};
|
|
@@ -119,42 +120,42 @@ export declare const virmatorFormatPlugin: Readonly<Readonly<{
|
|
|
119
120
|
readonly npmDeps: {
|
|
120
121
|
readonly prettier: {
|
|
121
122
|
readonly type: NpmDepType.Dev;
|
|
122
|
-
readonly env: readonly [
|
|
123
|
+
readonly env: readonly [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
123
124
|
readonly packageType: readonly [PackageType.MonoRoot, PackageType.TopPackage];
|
|
124
125
|
};
|
|
125
126
|
readonly 'prettier-plugin-jsdoc': {
|
|
126
127
|
readonly type: NpmDepType.Dev;
|
|
127
|
-
readonly env: readonly [
|
|
128
|
+
readonly env: readonly [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
128
129
|
readonly packageType: readonly [PackageType.MonoRoot, PackageType.TopPackage];
|
|
129
130
|
};
|
|
130
131
|
readonly 'prettier-plugin-multiline-arrays': {
|
|
131
132
|
readonly type: NpmDepType.Dev;
|
|
132
|
-
readonly env: readonly [
|
|
133
|
+
readonly env: readonly [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
133
134
|
readonly packageType: readonly [PackageType.MonoRoot, PackageType.TopPackage];
|
|
134
135
|
};
|
|
135
136
|
readonly 'prettier-plugin-organize-imports': {
|
|
136
137
|
readonly type: NpmDepType.Dev;
|
|
137
|
-
readonly env: readonly [
|
|
138
|
+
readonly env: readonly [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
138
139
|
readonly packageType: readonly [PackageType.MonoRoot, PackageType.TopPackage];
|
|
139
140
|
};
|
|
140
141
|
readonly 'prettier-plugin-packagejson': {
|
|
141
142
|
readonly type: NpmDepType.Dev;
|
|
142
|
-
readonly env: readonly [
|
|
143
|
+
readonly env: readonly [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
143
144
|
readonly packageType: readonly [PackageType.MonoRoot, PackageType.TopPackage];
|
|
144
145
|
};
|
|
145
146
|
readonly 'prettier-plugin-sort-json': {
|
|
146
147
|
readonly type: NpmDepType.Dev;
|
|
147
|
-
readonly env: readonly [
|
|
148
|
+
readonly env: readonly [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
148
149
|
readonly packageType: readonly [PackageType.MonoRoot, PackageType.TopPackage];
|
|
149
150
|
};
|
|
150
151
|
readonly 'prettier-plugin-toml': {
|
|
151
152
|
readonly type: NpmDepType.Dev;
|
|
152
|
-
readonly env: readonly [
|
|
153
|
+
readonly env: readonly [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
153
154
|
readonly packageType: readonly [PackageType.MonoRoot, PackageType.TopPackage];
|
|
154
155
|
};
|
|
155
156
|
readonly 'prettier-plugin-interpolated-html-tags': {
|
|
156
157
|
readonly type: NpmDepType.Dev;
|
|
157
|
-
readonly env: readonly [
|
|
158
|
+
readonly env: readonly [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
158
159
|
readonly packageType: readonly [PackageType.MonoRoot, PackageType.TopPackage];
|
|
159
160
|
};
|
|
160
161
|
};
|
package/dist/format.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { check } from '@augment-vir/assert';
|
|
2
|
+
import { RuntimeEnv } from '@augment-vir/common';
|
|
3
|
+
import { defineVirmatorPlugin, NpmDepType, PackageType } from '@virmator/core';
|
|
3
4
|
import mri from 'mri';
|
|
4
5
|
import { join } from 'node:path';
|
|
5
6
|
const defaultFormatExtensions = [
|
|
@@ -58,8 +59,8 @@ export const virmatorFormatPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
58
59
|
copyFromPath: join('configs', 'prettier.config.share.mjs'),
|
|
59
60
|
copyToPath: 'prettier.config.mjs',
|
|
60
61
|
env: [
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
RuntimeEnv.Node,
|
|
63
|
+
RuntimeEnv.Web,
|
|
63
64
|
],
|
|
64
65
|
packageType: [
|
|
65
66
|
PackageType.TopPackage,
|
|
@@ -71,8 +72,8 @@ export const virmatorFormatPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
71
72
|
copyFromPath: join('configs', 'prettierignore.txt'),
|
|
72
73
|
copyToPath: '.prettierignore',
|
|
73
74
|
env: [
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
RuntimeEnv.Node,
|
|
76
|
+
RuntimeEnv.Web,
|
|
76
77
|
],
|
|
77
78
|
packageType: [
|
|
78
79
|
PackageType.TopPackage,
|
|
@@ -85,8 +86,8 @@ export const virmatorFormatPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
85
86
|
prettier: {
|
|
86
87
|
type: NpmDepType.Dev,
|
|
87
88
|
env: [
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
RuntimeEnv.Node,
|
|
90
|
+
RuntimeEnv.Web,
|
|
90
91
|
],
|
|
91
92
|
packageType: [
|
|
92
93
|
PackageType.MonoRoot,
|
|
@@ -96,8 +97,8 @@ export const virmatorFormatPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
96
97
|
'prettier-plugin-jsdoc': {
|
|
97
98
|
type: NpmDepType.Dev,
|
|
98
99
|
env: [
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
RuntimeEnv.Node,
|
|
101
|
+
RuntimeEnv.Web,
|
|
101
102
|
],
|
|
102
103
|
packageType: [
|
|
103
104
|
PackageType.MonoRoot,
|
|
@@ -107,8 +108,8 @@ export const virmatorFormatPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
107
108
|
'prettier-plugin-multiline-arrays': {
|
|
108
109
|
type: NpmDepType.Dev,
|
|
109
110
|
env: [
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
RuntimeEnv.Node,
|
|
112
|
+
RuntimeEnv.Web,
|
|
112
113
|
],
|
|
113
114
|
packageType: [
|
|
114
115
|
PackageType.MonoRoot,
|
|
@@ -118,8 +119,8 @@ export const virmatorFormatPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
118
119
|
'prettier-plugin-organize-imports': {
|
|
119
120
|
type: NpmDepType.Dev,
|
|
120
121
|
env: [
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
RuntimeEnv.Node,
|
|
123
|
+
RuntimeEnv.Web,
|
|
123
124
|
],
|
|
124
125
|
packageType: [
|
|
125
126
|
PackageType.MonoRoot,
|
|
@@ -129,8 +130,8 @@ export const virmatorFormatPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
129
130
|
'prettier-plugin-packagejson': {
|
|
130
131
|
type: NpmDepType.Dev,
|
|
131
132
|
env: [
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
RuntimeEnv.Node,
|
|
134
|
+
RuntimeEnv.Web,
|
|
134
135
|
],
|
|
135
136
|
packageType: [
|
|
136
137
|
PackageType.MonoRoot,
|
|
@@ -140,8 +141,8 @@ export const virmatorFormatPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
140
141
|
'prettier-plugin-sort-json': {
|
|
141
142
|
type: NpmDepType.Dev,
|
|
142
143
|
env: [
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
RuntimeEnv.Node,
|
|
145
|
+
RuntimeEnv.Web,
|
|
145
146
|
],
|
|
146
147
|
packageType: [
|
|
147
148
|
PackageType.MonoRoot,
|
|
@@ -151,8 +152,8 @@ export const virmatorFormatPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
151
152
|
'prettier-plugin-toml': {
|
|
152
153
|
type: NpmDepType.Dev,
|
|
153
154
|
env: [
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
RuntimeEnv.Node,
|
|
156
|
+
RuntimeEnv.Web,
|
|
156
157
|
],
|
|
157
158
|
packageType: [
|
|
158
159
|
PackageType.MonoRoot,
|
|
@@ -162,8 +163,8 @@ export const virmatorFormatPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
162
163
|
'prettier-plugin-interpolated-html-tags': {
|
|
163
164
|
type: NpmDepType.Dev,
|
|
164
165
|
env: [
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
RuntimeEnv.Node,
|
|
167
|
+
RuntimeEnv.Web,
|
|
167
168
|
],
|
|
168
169
|
packageType: [
|
|
169
170
|
PackageType.MonoRoot,
|
|
@@ -193,7 +194,7 @@ export const virmatorFormatPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
193
194
|
...filteredArgs,
|
|
194
195
|
formatString,
|
|
195
196
|
]
|
|
196
|
-
.filter(isTruthy)
|
|
197
|
+
.filter(check.isTruthy)
|
|
197
198
|
.join(' ');
|
|
198
199
|
await runShellCommand(prettierCommand, { cwd: cwdPackagePath }, {
|
|
199
200
|
logTransform: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@virmator/format",
|
|
3
|
-
"version": "13.3.
|
|
3
|
+
"version": "13.3.13",
|
|
4
4
|
"description": "Default format plugin for virmator.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"virmator",
|
|
@@ -31,12 +31,14 @@
|
|
|
31
31
|
"test:update": "npm test update"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@augment-vir/
|
|
35
|
-
"@
|
|
34
|
+
"@augment-vir/assert": "^30.0.4",
|
|
35
|
+
"@augment-vir/common": "^30.0.4",
|
|
36
|
+
"@virmator/core": "^13.3.13",
|
|
36
37
|
"mri": "^1.2.0"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
|
-
"@
|
|
40
|
+
"@augment-vir/test": "^30.0.4",
|
|
41
|
+
"@types/node": "^22.5.5",
|
|
40
42
|
"c8": "^10.1.2",
|
|
41
43
|
"istanbul-smart-text-reporter": "^1.1.4",
|
|
42
44
|
"prettier": "^3.3.3",
|