mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
- Upgraded to use jest + babel instead of ts-jest
This commit is contained in:
parent
d026426331
commit
c4bc1e1787
6
.babelrc.js
Normal file
6
.babelrc.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@babel/preset-env',
|
||||
'@babel/preset-typescript'
|
||||
]
|
||||
};
|
||||
@ -1,17 +1,4 @@
|
||||
module.exports = {
|
||||
testRegex: '\\.spec\\.tsx?$',
|
||||
testEnvironment: 'node',
|
||||
transform: {
|
||||
'\\.tsx?$': 'ts-jest'
|
||||
},
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
compiler: 'typescript',
|
||||
tsConfig: {
|
||||
declaration: false,
|
||||
declarationMap: false,
|
||||
sourceMap: false
|
||||
}
|
||||
}
|
||||
}
|
||||
testRegex: '\\.spec\\.ts$',
|
||||
testEnvironment: 'node'
|
||||
};
|
||||
|
||||
@ -57,6 +57,9 @@
|
||||
"prettier:fix": "prettier \"./src/**/*.ts\" --write"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.7.0",
|
||||
"@babel/preset-env": "7.7.1",
|
||||
"@babel/preset-typescript": "7.7.0",
|
||||
"@types/jest": "24.0.22",
|
||||
"@types/js-yaml": "3.12.1",
|
||||
"@types/mkdirp": "0.5.2",
|
||||
@ -79,7 +82,6 @@
|
||||
"path": "0.12.7",
|
||||
"prettier": "1.18.2",
|
||||
"rimraf": "3.0.0",
|
||||
"ts-jest": "24.1.0",
|
||||
"typescript": "3.7.2",
|
||||
"yup": "0.27.0"
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import * as camelcase from 'camelcase';
|
||||
import camelCase from 'camelcase';
|
||||
|
||||
/**
|
||||
* Convert the input value to a correct service classname. This converts
|
||||
@ -6,7 +6,7 @@ import * as camelcase from 'camelcase';
|
||||
* @param value
|
||||
*/
|
||||
export function getServiceClassName(value: string): string {
|
||||
const name = camelcase(value, { pascalCase: true });
|
||||
const name = camelCase(value, { pascalCase: true });
|
||||
if (name && !name.endsWith('Service')) {
|
||||
return `${name}Service`;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import * as camelcase from 'camelcase';
|
||||
import camelCase from 'camelcase';
|
||||
|
||||
/**
|
||||
* Convert the input value to a correct operation (method) classname. This converts
|
||||
@ -7,5 +7,5 @@ import * as camelcase from 'camelcase';
|
||||
* @param value
|
||||
*/
|
||||
export function getServiceOperationName(value: string): string {
|
||||
return camelcase(value);
|
||||
return camelCase(value);
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import * as camelcase from 'camelcase';
|
||||
import camelCase from 'camelcase';
|
||||
|
||||
/**
|
||||
* Convert the input value to a correct service classname. This converts
|
||||
@ -6,7 +6,7 @@ import * as camelcase from 'camelcase';
|
||||
* @param value
|
||||
*/
|
||||
export function getServiceClassName(value: string): string {
|
||||
const name = camelcase(value, { pascalCase: true });
|
||||
const name = camelCase(value, { pascalCase: true });
|
||||
if (name && !name.endsWith('Service')) {
|
||||
return `${name}Service`;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import * as camelcase from 'camelcase';
|
||||
import camelCase from 'camelcase';
|
||||
|
||||
/**
|
||||
* Convert the input value to a correct operation (method) classname. This converts
|
||||
@ -7,5 +7,5 @@ import * as camelcase from 'camelcase';
|
||||
* @param value
|
||||
*/
|
||||
export function getServiceOperationName(value: string): string {
|
||||
return camelcase(value);
|
||||
return camelCase(value);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user