diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/tsconfig.mustache index dd4391c668a..fd2abf8a2ad 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/tsconfig.mustache @@ -4,8 +4,8 @@ "experimentalDecorators": true, "noImplicitAny": false, "suppressImplicitAnyIndexErrors": true, - "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", - "module": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}commonjs{{/supportsES6}}", + "target": "es6", + "module": "es6", "moduleResolution": "node", "removeComments": true, "sourceMap": true, diff --git a/modules/openapi-generator/src/main/resources/typescript-aurelia/package.json.mustache b/modules/openapi-generator/src/main/resources/typescript-aurelia/package.json.mustache index 91a55a9140c..14e2b1c73cb 100644 --- a/modules/openapi-generator/src/main/resources/typescript-aurelia/package.json.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-aurelia/package.json.mustache @@ -10,8 +10,7 @@ "browser": "./dist/Api.js", "typings": "./dist/Api.d.ts", "dependencies": { - {{^supportsES6}}"core-js": "^2.4.0", - {{/supportsES6}}"isomorphic-fetch": "^2.2.1", + "isomorphic-fetch": "^2.2.1", "aurelia-framework": "^1.3.1", "aurelia-http-client": "^1.3.0" }, diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache index 4ba75b22a0c..69e4dc47399 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache @@ -17,12 +17,10 @@ "license": "Unlicense", "main": "./dist/index.js", "typings": "./dist/index.d.ts", -{{#supportsES6}} "module": "./dist/esm/index.js", "sideEffects": false, -{{/supportsES6}} "scripts": { - "build": "tsc {{#supportsES6}}&& tsc -p tsconfig.esm.json{{/supportsES6}}", + "build": "tsc && tsc -p tsconfig.esm.json", "prepare": "npm run build" }, "dependencies": { diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/tsconfig.mustache index d0ebbd47a6b..6787045c385 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/tsconfig.mustache @@ -1,7 +1,7 @@ { "compilerOptions": { "declaration": true, - "target": "{{#supportsES6}}ES6{{/supportsES6}}{{^supportsES6}}ES5{{/supportsES6}}", + "target": "ES6", "module": "commonjs", "noImplicitAny": true, "outDir": "dist", diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/package.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/package.mustache index add4643dfe3..219ecab0195 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/package.mustache @@ -13,12 +13,10 @@ {{^packageAsSourceOnlyLibrary}} "main": "./dist/index.js", "typings": "./dist/index.d.ts", -{{#supportsES6}} "module": "./dist/esm/index.js", "sideEffects": false, -{{/supportsES6}} "scripts": { - "build": "tsc{{#supportsES6}} && tsc -p tsconfig.esm.json{{/supportsES6}}"{{^sagasAndRecords}}, + "build": "tsc && tsc -p tsconfig.esm.json"{{^sagasAndRecords}}, "prepare": "npm run build"{{/sagasAndRecords}} }, {{/packageAsSourceOnlyLibrary}} diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.mustache index a8778b09659..59125b6aaca 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.mustache @@ -1,7 +1,7 @@ { "compilerOptions": { "declaration": true, - "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", + "target": "es6", {{#sagasAndRecords}} "strict": true, {{/sagasAndRecords}} diff --git a/modules/openapi-generator/src/main/resources/typescript-inversify/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-inversify/tsconfig.mustache index dd4391c668a..fd2abf8a2ad 100644 --- a/modules/openapi-generator/src/main/resources/typescript-inversify/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-inversify/tsconfig.mustache @@ -4,8 +4,8 @@ "experimentalDecorators": true, "noImplicitAny": false, "suppressImplicitAnyIndexErrors": true, - "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", - "module": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}commonjs{{/supportsES6}}", + "target": "es6", + "module": "es6", "moduleResolution": "node", "removeComments": true, "sourceMap": true, diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/tsconfig.mustache index f255a8814fc..fa5e621b78b 100644 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/tsconfig.mustache @@ -3,7 +3,7 @@ "module": "commonjs", "noImplicitAny": false, "suppressImplicitAnyIndexErrors": true, - "target": "{{#supportsES6}}ES6{{/supportsES6}}{{^supportsES6}}ES5{{/supportsES6}}", + "target": "ES6", "moduleResolution": "node", "removeComments": true, "sourceMap": true, diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/tsconfig.mustache index 2e51b4661df..4cead039834 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/tsconfig.mustache @@ -5,7 +5,7 @@ "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, - "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", + "target": "es6", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", diff --git a/modules/openapi-generator/src/main/resources/typescript-node/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-node/tsconfig.mustache index de78697d22a..82a8b637ec9 100644 --- a/modules/openapi-generator/src/main/resources/typescript-node/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-node/tsconfig.mustache @@ -3,7 +3,7 @@ "module": "commonjs", "noImplicitAny": false, "suppressImplicitAnyIndexErrors": true, - "target": "{{#supportsES6}}ES6{{/supportsES6}}{{^supportsES6}}ES5{{/supportsES6}}", + "target": "ES6", "allowSyntheticDefaultImports": true, "esModuleInterop": true, "strict": true, diff --git a/modules/openapi-generator/src/main/resources/typescript-redux-query/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-redux-query/tsconfig.mustache index 420c3a44f88..582e3dba3c6 100644 --- a/modules/openapi-generator/src/main/resources/typescript-redux-query/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-redux-query/tsconfig.mustache @@ -1,7 +1,7 @@ { "compilerOptions": { "declaration": true, - "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", + "target": "es6", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/tsconfig.mustache index 0779a8b0037..236e4349cd7 100644 --- a/modules/openapi-generator/src/main/resources/typescript-rxjs/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/tsconfig.mustache @@ -1,7 +1,7 @@ { "compilerOptions": { "declaration": true, - "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", + "target": "es6", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", diff --git a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache index 1770f54dfa2..d1be496f1be 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache @@ -4,7 +4,7 @@ import {Configuration} from '../configuration{{importFileExtension}}'; import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http{{importFileExtension}}'; {{#platforms}} {{#node}} -import {{^supportsES6}}* as{{/supportsES6}} FormData from "form-data"; +import FormData from "form-data"; import { URLSearchParams } from 'url'; {{/node}} {{/platforms}} diff --git a/modules/openapi-generator/src/main/resources/typescript/http/http.mustache b/modules/openapi-generator/src/main/resources/typescript/http/http.mustache index 0ecca57cd86..07eef6289ba 100644 --- a/modules/openapi-generator/src/main/resources/typescript/http/http.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/http/http.mustache @@ -1,7 +1,7 @@ {{#platforms}} {{#node}} // TODO: evaluate if we can easily get rid of this library -import {{^supportsES6}}* as{{/supportsES6}} FormData from "form-data{{importFileExtension}}"; +import FormData from "form-data{{importFileExtension}}"; import { URL, URLSearchParams } from 'url{{importFileExtension}}'; import * as http from 'http{{importFileExtension}}'; import * as https from 'https{{importFileExtension}}'; diff --git a/modules/openapi-generator/src/main/resources/typescript/package.mustache b/modules/openapi-generator/src/main/resources/typescript/package.mustache index fe5d0cc19ec..d42810ec010 100644 --- a/modules/openapi-generator/src/main/resources/typescript/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/package.mustache @@ -15,21 +15,11 @@ ], "license": "Unlicense", "main": "./dist/index.js", - {{#supportsES6}} "type": "module", "module": "./dist/index.js", - {{/supportsES6}} - {{^supportsES6}} - "type": "commonjs", - {{/supportsES6}} "exports": { ".": { - {{#supportsES6}} "import": "./dist/index.js", - {{/supportsES6}} - {{^supportsES6}} - "require": "./dist/index.js", - {{/supportsES6}} "types": "./dist/index.d.js" } }, diff --git a/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache index b7aa518c46e..330c9a336de 100644 --- a/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache @@ -2,13 +2,8 @@ "compilerOptions": { "strict": true, /* Basic Options */ - {{#supportsES6}} "target": "es6", "esModuleInterop": true, - {{/supportsES6}} - {{^supportsES6}} - "target": "es5", - {{/supportsES6}} "moduleResolution": "node", "declaration": true, diff --git a/samples/client/others/typescript-rxjs/allOf-composition/tsconfig.json b/samples/client/others/typescript-rxjs/allOf-composition/tsconfig.json index 59a60838a05..6dee091ee8d 100644 --- a/samples/client/others/typescript-rxjs/allOf-composition/tsconfig.json +++ b/samples/client/others/typescript-rxjs/allOf-composition/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "declaration": true, - "target": "es5", + "target": "es6", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", diff --git a/samples/client/others/typescript/builds/with-unique-items/package.json b/samples/client/others/typescript/builds/with-unique-items/package.json index 5396cefd2a8..fe1ae8328e7 100644 --- a/samples/client/others/typescript/builds/with-unique-items/package.json +++ b/samples/client/others/typescript/builds/with-unique-items/package.json @@ -15,10 +15,11 @@ ], "license": "Unlicense", "main": "./dist/index.js", - "type": "commonjs", + "type": "module", + "module": "./dist/index.js", "exports": { ".": { - "require": "./dist/index.js", + "import": "./dist/index.js", "types": "./dist/index.d.js" } }, diff --git a/samples/client/others/typescript/builds/with-unique-items/tsconfig.json b/samples/client/others/typescript/builds/with-unique-items/tsconfig.json index aa173eb68f3..2cc80c60873 100644 --- a/samples/client/others/typescript/builds/with-unique-items/tsconfig.json +++ b/samples/client/others/typescript/builds/with-unique-items/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "strict": true, /* Basic Options */ - "target": "es5", + "target": "es6", + "esModuleInterop": true, "moduleResolution": "node", "declaration": true, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/tsconfig.json b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/tsconfig.json index c01ebe255d4..fd2abf8a2ad 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/tsconfig.json +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/tsconfig.json @@ -4,8 +4,8 @@ "experimentalDecorators": true, "noImplicitAny": false, "suppressImplicitAnyIndexErrors": true, - "target": "es5", - "module": "commonjs", + "target": "es6", + "module": "es6", "moduleResolution": "node", "removeComments": true, "sourceMap": true, diff --git a/samples/client/petstore/typescript-aurelia/default/package.json b/samples/client/petstore/typescript-aurelia/default/package.json index 2d613cc2661..a0d95c1ba7b 100644 --- a/samples/client/petstore/typescript-aurelia/default/package.json +++ b/samples/client/petstore/typescript-aurelia/default/package.json @@ -10,7 +10,6 @@ "browser": "./dist/Api.js", "typings": "./dist/Api.d.ts", "dependencies": { - "core-js": "^2.4.0", "isomorphic-fetch": "^2.2.1", "aurelia-framework": "^1.3.1", "aurelia-http-client": "^1.3.0" diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/FILES b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/FILES index aded8aa37a1..014d9704195 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/FILES +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/FILES @@ -18,4 +18,5 @@ model/some/levels/deep/pet.ts model/some/levels/deep/tag.ts model/some/levels/deep/user.ts package.json +tsconfig.esm.json tsconfig.json diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json index 8569103e4e4..dc2da01a43e 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json @@ -17,8 +17,10 @@ "license": "Unlicense", "main": "./dist/index.js", "typings": "./dist/index.d.ts", + "module": "./dist/esm/index.js", + "sideEffects": false, "scripts": { - "build": "tsc ", + "build": "tsc && tsc -p tsconfig.esm.json", "prepare": "npm run build" }, "dependencies": { diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/tsconfig.json b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/tsconfig.json index d953a374d81..ca233482140 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/tsconfig.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "declaration": true, - "target": "ES5", + "target": "ES6", "module": "commonjs", "noImplicitAny": true, "outDir": "dist", diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/FILES b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/FILES index 534fae710fb..37591a69f79 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/FILES +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/FILES @@ -8,4 +8,5 @@ configuration.ts git_push.sh index.ts package.json +tsconfig.esm.json tsconfig.json diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json b/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json index 8569103e4e4..dc2da01a43e 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json @@ -17,8 +17,10 @@ "license": "Unlicense", "main": "./dist/index.js", "typings": "./dist/index.d.ts", + "module": "./dist/esm/index.js", + "sideEffects": false, "scripts": { - "build": "tsc ", + "build": "tsc && tsc -p tsconfig.esm.json", "prepare": "npm run build" }, "dependencies": { diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/tsconfig.json b/samples/client/petstore/typescript-axios/builds/with-npm-version/tsconfig.json index d953a374d81..ca233482140 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/tsconfig.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "declaration": true, - "target": "ES5", + "target": "ES6", "module": "commonjs", "noImplicitAny": true, "outDir": "dist", diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/FILES b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/FILES index 38feffe8896..cfa1534a047 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/FILES +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/FILES @@ -15,4 +15,5 @@ src/models/Tag.ts src/models/User.ts src/models/index.ts src/runtime.ts +tsconfig.esm.json tsconfig.json diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/package.json b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/package.json index 0587300c451..7c6d9667c05 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/package.json +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/package.json @@ -9,8 +9,10 @@ }, "main": "./dist/index.js", "typings": "./dist/index.d.ts", + "module": "./dist/esm/index.js", + "sideEffects": false, "scripts": { - "build": "tsc", + "build": "tsc && tsc -p tsconfig.esm.json", "prepare": "npm run build" }, "devDependencies": { diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/tsconfig.json index 4567ec19899..368cedd5da0 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "declaration": true, - "target": "es5", + "target": "es6", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/FILES b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/FILES index 38feffe8896..cfa1534a047 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/FILES +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/FILES @@ -15,4 +15,5 @@ src/models/Tag.ts src/models/User.ts src/models/index.ts src/runtime.ts +tsconfig.esm.json tsconfig.json diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json b/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json index 0587300c451..7c6d9667c05 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json @@ -9,8 +9,10 @@ }, "main": "./dist/index.js", "typings": "./dist/index.d.ts", + "module": "./dist/esm/index.js", + "sideEffects": false, "scripts": { - "build": "tsc", + "build": "tsc && tsc -p tsconfig.esm.json", "prepare": "npm run build" }, "devDependencies": { diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json index 4567ec19899..368cedd5da0 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "declaration": true, - "target": "es5", + "target": "es6", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/FILES b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/FILES index 83b6414b911..568a95d0469 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/FILES +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/FILES @@ -9,4 +9,5 @@ src/apis/index.ts src/index.ts src/models/index.ts src/runtime.ts +tsconfig.esm.json tsconfig.json diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/package.json b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/package.json index 0587300c451..7c6d9667c05 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/package.json +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/package.json @@ -9,8 +9,10 @@ }, "main": "./dist/index.js", "typings": "./dist/index.d.ts", + "module": "./dist/esm/index.js", + "sideEffects": false, "scripts": { - "build": "tsc", + "build": "tsc && tsc -p tsconfig.esm.json", "prepare": "npm run build" }, "devDependencies": { diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/tsconfig.json index 4567ec19899..368cedd5da0 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "declaration": true, - "target": "es5", + "target": "es6", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", diff --git a/samples/client/petstore/typescript-jquery/npm/tsconfig.json b/samples/client/petstore/typescript-jquery/npm/tsconfig.json index e15ee4c5762..fa5e621b78b 100644 --- a/samples/client/petstore/typescript-jquery/npm/tsconfig.json +++ b/samples/client/petstore/typescript-jquery/npm/tsconfig.json @@ -3,7 +3,7 @@ "module": "commonjs", "noImplicitAny": false, "suppressImplicitAnyIndexErrors": true, - "target": "ES5", + "target": "ES6", "moduleResolution": "node", "removeComments": true, "sourceMap": true, diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/tsconfig.json b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/tsconfig.json index c71e17c1b8a..4cead039834 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/tsconfig.json +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/tsconfig.json @@ -5,7 +5,7 @@ "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, - "target": "es5", + "target": "es6", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", diff --git a/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/tsconfig.json b/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/tsconfig.json index c71e17c1b8a..4cead039834 100644 --- a/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/tsconfig.json +++ b/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/tsconfig.json @@ -5,7 +5,7 @@ "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, - "target": "es5", + "target": "es6", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", diff --git a/samples/client/petstore/typescript-node/npm/tsconfig.json b/samples/client/petstore/typescript-node/npm/tsconfig.json index afce3b7abd4..82a8b637ec9 100644 --- a/samples/client/petstore/typescript-node/npm/tsconfig.json +++ b/samples/client/petstore/typescript-node/npm/tsconfig.json @@ -3,7 +3,7 @@ "module": "commonjs", "noImplicitAny": false, "suppressImplicitAnyIndexErrors": true, - "target": "ES5", + "target": "ES6", "allowSyntheticDefaultImports": true, "esModuleInterop": true, "strict": true, diff --git a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/tsconfig.json b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/tsconfig.json index 4567ec19899..368cedd5da0 100644 --- a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/tsconfig.json +++ b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "declaration": true, - "target": "es5", + "target": "es6", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", diff --git a/samples/client/petstore/typescript-rxjs/builds/default/tsconfig.json b/samples/client/petstore/typescript-rxjs/builds/default/tsconfig.json index 59a60838a05..6dee091ee8d 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/tsconfig.json +++ b/samples/client/petstore/typescript-rxjs/builds/default/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "declaration": true, - "target": "es5", + "target": "es6", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/tsconfig.json b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/tsconfig.json index 59a60838a05..6dee091ee8d 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/tsconfig.json +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "declaration": true, - "target": "es5", + "target": "es6", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/tsconfig.json b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/tsconfig.json index 59a60838a05..6dee091ee8d 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/tsconfig.json +++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "declaration": true, - "target": "es5", + "target": "es6", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json index 8f6636e8cf8..75f0bc16826 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json @@ -15,10 +15,11 @@ ], "license": "Unlicense", "main": "./dist/index.js", - "type": "commonjs", + "type": "module", + "module": "./dist/index.js", "exports": { ".": { - "require": "./dist/index.js", + "import": "./dist/index.js", "types": "./dist/index.d.js" } }, diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json index aa173eb68f3..2cc80c60873 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "strict": true, /* Basic Options */ - "target": "es5", + "target": "es6", + "esModuleInterop": true, "moduleResolution": "node", "declaration": true, diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts index 5b3d37fe35a..e632d988105 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts @@ -2,7 +2,7 @@ import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; import {Configuration} from '../configuration'; import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; -import * as FormData from "form-data"; +import FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts index 3bb0a2de754..03b49fc7c85 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts @@ -2,7 +2,7 @@ import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; import {Configuration} from '../configuration'; import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; -import * as FormData from "form-data"; +import FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts index 352b499b378..24914bbcb54 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts @@ -2,7 +2,7 @@ import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; import {Configuration} from '../configuration'; import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; -import * as FormData from "form-data"; +import FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; diff --git a/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts index af0075aeba6..b590ffcb114 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts @@ -1,5 +1,5 @@ // TODO: evaluate if we can easily get rid of this library -import * as FormData from "form-data"; +import FormData from "form-data"; import { URL, URLSearchParams } from 'url'; import * as http from 'http'; import * as https from 'https'; diff --git a/samples/openapi3/client/petstore/typescript/builds/default/package.json b/samples/openapi3/client/petstore/typescript/builds/default/package.json index f75fc96c282..d35909520dc 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/default/package.json @@ -15,10 +15,11 @@ ], "license": "Unlicense", "main": "./dist/index.js", - "type": "commonjs", + "type": "module", + "module": "./dist/index.js", "exports": { ".": { - "require": "./dist/index.js", + "import": "./dist/index.js", "types": "./dist/index.d.js" } }, diff --git a/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json index 4a8d5cb2f33..29da7f2215e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "strict": true, /* Basic Options */ - "target": "es5", + "target": "es6", + "esModuleInterop": true, "moduleResolution": "node", "declaration": true, diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts index 93928166fcd..4dce7071fdb 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts @@ -2,7 +2,7 @@ import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; import {Configuration} from '../configuration'; import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; -import * as FormData from "form-data"; +import FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts index 7537e2b4ecc..0c9bb481fe0 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts @@ -2,7 +2,7 @@ import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; import {Configuration} from '../configuration'; import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; -import * as FormData from "form-data"; +import FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts index 9f81f5e77f0..58d91b17e22 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts @@ -2,7 +2,7 @@ import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; import {Configuration} from '../configuration'; import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; -import * as FormData from "form-data"; +import FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts index af0075aeba6..b590ffcb114 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts @@ -1,5 +1,5 @@ // TODO: evaluate if we can easily get rid of this library -import * as FormData from "form-data"; +import FormData from "form-data"; import { URL, URLSearchParams } from 'url'; import * as http from 'http'; import * as https from 'https'; diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/package.json b/samples/openapi3/client/petstore/typescript/builds/inversify/package.json index b6496f55d05..4cbafe1972c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/package.json @@ -15,10 +15,11 @@ ], "license": "Unlicense", "main": "./dist/index.js", - "type": "commonjs", + "type": "module", + "module": "./dist/index.js", "exports": { ".": { - "require": "./dist/index.js", + "import": "./dist/index.js", "types": "./dist/index.d.js" } }, diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json index e57dd6fe3b8..1a2adff4620 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "strict": true, /* Basic Options */ - "target": "es5", + "target": "es6", + "esModuleInterop": true, "moduleResolution": "node", "declaration": true, diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/package.json b/samples/openapi3/client/petstore/typescript/builds/jquery/package.json index ea49a041e5b..180967bc8f0 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/package.json @@ -15,10 +15,11 @@ ], "license": "Unlicense", "main": "./dist/index.js", - "type": "commonjs", + "type": "module", + "module": "./dist/index.js", "exports": { ".": { - "require": "./dist/index.js", + "import": "./dist/index.js", "types": "./dist/index.d.js" } }, diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json index aa173eb68f3..2cc80c60873 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "strict": true, /* Basic Options */ - "target": "es5", + "target": "es6", + "esModuleInterop": true, "moduleResolution": "node", "declaration": true, diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts index 5b3d37fe35a..e632d988105 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts @@ -2,7 +2,7 @@ import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; import {Configuration} from '../configuration'; import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; -import * as FormData from "form-data"; +import FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts index 3bb0a2de754..03b49fc7c85 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts @@ -2,7 +2,7 @@ import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; import {Configuration} from '../configuration'; import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; -import * as FormData from "form-data"; +import FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts index 352b499b378..24914bbcb54 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts @@ -2,7 +2,7 @@ import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; import {Configuration} from '../configuration'; import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; -import * as FormData from "form-data"; +import FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts index af0075aeba6..b590ffcb114 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts @@ -1,5 +1,5 @@ // TODO: evaluate if we can easily get rid of this library -import * as FormData from "form-data"; +import FormData from "form-data"; import { URL, URLSearchParams } from 'url'; import * as http from 'http'; import * as https from 'https'; diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/package.json b/samples/openapi3/client/petstore/typescript/builds/object_params/package.json index f75fc96c282..d35909520dc 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/package.json @@ -15,10 +15,11 @@ ], "license": "Unlicense", "main": "./dist/index.js", - "type": "commonjs", + "type": "module", + "module": "./dist/index.js", "exports": { ".": { - "require": "./dist/index.js", + "import": "./dist/index.js", "types": "./dist/index.d.js" } }, diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json index 4a8d5cb2f33..29da7f2215e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "strict": true, /* Basic Options */ - "target": "es5", + "target": "es6", + "esModuleInterop": true, "moduleResolution": "node", "declaration": true,