Skip to content

Commit 020f22d

Browse files
Merge pull request #23 from reload/dependabot/npm_and_yarn/prettier-3.6.2
2 parents d9bd263 + 7a215a3 commit 020f22d

File tree

8 files changed

+136
-67
lines changed

8 files changed

+136
-67
lines changed

dist/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
"@typescript-eslint/eslint-plugin": "^5.62.0",
6363
"@typescript-eslint/parser": "^5.62.0",
6464
"eslint": "^8.13.0",
65-
"eslint-plugin-prettier": "^4.2.5",
66-
"prettier": "^2.6.2",
65+
"eslint-plugin-prettier": "^5.0.0",
66+
"prettier": "^3.6.2",
6767
"tap-spec": "^5.0.0",
6868
"tape": "^5.9.0",
6969
"ts-node": "^10.9.2",

dist/src/utils/change-case.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 90 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@
3636
],
3737
"author": "Daniel Derevjanik <[email protected]>",
3838
"contributers": [
39-
{
40-
"name": "Daniel Derevjanik",
41-
"email": "[email protected]"
42-
},
43-
{
44-
"name": "Sander Hurlen",
45-
"email": "[email protected]"
46-
},
47-
{
48-
"name": "Arne Jørgensen",
49-
"email": "[email protected]"
50-
}
39+
{
40+
"name": "Daniel Derevjanik",
41+
"email": "[email protected]"
42+
},
43+
{
44+
"name": "Sander Hurlen",
45+
"email": "[email protected]"
46+
},
47+
{
48+
"name": "Arne Jørgensen",
49+
"email": "[email protected]"
50+
}
5151
],
5252
"license": "MIT",
5353
"bugs": {
@@ -62,8 +62,8 @@
6262
"@typescript-eslint/eslint-plugin": "^5.62.0",
6363
"@typescript-eslint/parser": "^5.62.0",
6464
"eslint": "^8.13.0",
65-
"eslint-plugin-prettier": "^4.2.5",
66-
"prettier": "^2.6.2",
65+
"eslint-plugin-prettier": "^5.0.0",
66+
"prettier": "^3.6.2",
6767
"tap-spec": "^5.0.0",
6868
"tape": "^5.9.0",
6969
"ts-node": "^10.9.2",

src/generator.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const defaultOptions: GeneratorOptions = {
3030
function addSafeImport(
3131
imports: OptionalKind<ImportDeclarationStructure>[],
3232
moduleSpecifier: string,
33-
namedImport: string
33+
namedImport: string,
3434
) {
3535
if (!imports.find((imp) => imp.moduleSpecifier == moduleSpecifier)) {
3636
imports.push({
@@ -57,7 +57,7 @@ function createProperty(
5757
type: string,
5858
doc: string,
5959
isArray: boolean,
60-
optional = true
60+
optional = true,
6161
): PropertySignatureStructure {
6262
return {
6363
kind: StructureKind.PropertySignature,
@@ -74,7 +74,7 @@ function generateDefinitionFile(
7474
defDir: string,
7575
stack: string[],
7676
generated: Definition[],
77-
options: GeneratorOptions
77+
options: GeneratorOptions,
7878
): void {
7979
const defName = definition.name;
8080
const defFilePath = path.join(defDir, `${defName}.ts`);
@@ -132,7 +132,7 @@ function generateDefinitionFile(
132132
export async function generate(
133133
parsedWsdl: ParsedWsdl,
134134
outDir: string,
135-
options: Partial<GeneratorOptions>
135+
options: Partial<GeneratorOptions>,
136136
): Promise<void> {
137137
const mergedOptions: GeneratorOptions = {
138138
...defaultOptions,
@@ -176,18 +176,18 @@ export async function generate(
176176
defDir,
177177
[method.paramDefinition.name],
178178
allDefinitions,
179-
mergedOptions
179+
mergedOptions,
180180
);
181181
addSafeImport(
182182
clientImports,
183183
`./definitions/${method.paramDefinition.name}${mergedOptions.esm ? ".js" : ""}`,
184-
method.paramDefinition.name
184+
method.paramDefinition.name,
185185
);
186186
}
187187
addSafeImport(
188188
portImports,
189189
`../definitions/${method.paramDefinition.name}${mergedOptions.esm ? ".js" : ""}`,
190-
method.paramDefinition.name
190+
method.paramDefinition.name,
191191
);
192192
}
193193
if (method.returnDefinition !== null) {
@@ -199,18 +199,18 @@ export async function generate(
199199
defDir,
200200
[method.returnDefinition.name],
201201
allDefinitions,
202-
mergedOptions
202+
mergedOptions,
203203
);
204204
addSafeImport(
205205
clientImports,
206206
`./definitions/${method.returnDefinition.name}${mergedOptions.esm ? ".js" : ""}`,
207-
method.returnDefinition.name
207+
method.returnDefinition.name,
208208
);
209209
}
210210
addSafeImport(
211211
portImports,
212212
`../definitions/${method.returnDefinition.name}${mergedOptions.esm ? ".js" : ""}`,
213-
method.returnDefinition.name
213+
method.returnDefinition.name,
214214
);
215215
}
216216
// TODO: Deduplicate PortMethods
@@ -344,7 +344,7 @@ export async function generate(
344344
namedExports: [def.name],
345345
moduleSpecifier: `./definitions/${def.name}${mergedOptions.esm ? ".js" : ""}`,
346346
isTypeOnly: true,
347-
}))
347+
})),
348348
);
349349
if (!mergedOptions.emitDefinitionsOnly) {
350350
// TODO: Aggregate all exports during declarations generation
@@ -365,14 +365,14 @@ export async function generate(
365365
namedExports: [service.name],
366366
moduleSpecifier: `./services/${service.name}${mergedOptions.esm ? ".js" : ""}`,
367367
isTypeOnly: true,
368-
}))
368+
})),
369369
);
370370
indexFile.addExportDeclarations(
371371
parsedWsdl.ports.map((port) => ({
372372
namedExports: [port.name],
373373
moduleSpecifier: `./ports/${port.name}${mergedOptions.esm ? ".js" : ""}`,
374374
isTypeOnly: true,
375-
}))
375+
})),
376376
);
377377
}
378378

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const defaultOptions: Options = {
8585
export async function parseAndGenerate(
8686
wsdlPath: string,
8787
outDir: string,
88-
options: Partial<Options> = {}
88+
options: Partial<Options> = {},
8989
): Promise<void> {
9090
const mergedOptions: Options = {
9191
...defaultOptions,

0 commit comments

Comments
 (0)