update ts template to remove supportsES6 option

This commit is contained in:
William Cheng 2023-07-27 09:53:59 +08:00
parent ce3bd1f79d
commit d49b20b3ba
66 changed files with 94 additions and 88 deletions

View File

@ -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,

View File

@ -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"
},

View File

@ -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": {

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"target": "{{#supportsES6}}ES6{{/supportsES6}}{{^supportsES6}}ES5{{/supportsES6}}",
"target": "ES6",
"module": "commonjs",
"noImplicitAny": true,
"outDir": "dist",

View File

@ -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}}

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}",
"target": "es6",
{{#sagasAndRecords}}
"strict": true,
{{/sagasAndRecords}}

View File

@ -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,

View File

@ -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,

View File

@ -5,7 +5,7 @@
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}",
"target": "es6",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",

View File

@ -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,

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}",
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}",
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",

View File

@ -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}}

View File

@ -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}}';

View File

@ -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"
}
},

View File

@ -2,13 +2,8 @@
"compilerOptions": {
"strict": true,
/* Basic Options */
{{#supportsES6}}
"target": "es6",
"esModuleInterop": true,
{{/supportsES6}}
{{^supportsES6}}
"target": "es5",
{{/supportsES6}}
"moduleResolution": "node",
"declaration": true,

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"target": "es5",
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",

View File

@ -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"
}
},

View File

@ -2,7 +2,8 @@
"compilerOptions": {
"strict": true,
/* Basic Options */
"target": "es5",
"target": "es6",
"esModuleInterop": true,
"moduleResolution": "node",
"declaration": true,

View File

@ -4,8 +4,8 @@
"experimentalDecorators": true,
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"target": "es5",
"module": "commonjs",
"target": "es6",
"module": "es6",
"moduleResolution": "node",
"removeComments": true,
"sourceMap": true,

View File

@ -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"

View File

@ -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

View File

@ -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": {

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"target": "ES5",
"target": "ES6",
"module": "commonjs",
"noImplicitAny": true,
"outDir": "dist",

View File

@ -8,4 +8,5 @@ configuration.ts
git_push.sh
index.ts
package.json
tsconfig.esm.json
tsconfig.json

View File

@ -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": {

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"target": "ES5",
"target": "ES6",
"module": "commonjs",
"noImplicitAny": true,
"outDir": "dist",

View File

@ -15,4 +15,5 @@ src/models/Tag.ts
src/models/User.ts
src/models/index.ts
src/runtime.ts
tsconfig.esm.json
tsconfig.json

View File

@ -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": {

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"target": "es5",
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",

View File

@ -15,4 +15,5 @@ src/models/Tag.ts
src/models/User.ts
src/models/index.ts
src/runtime.ts
tsconfig.esm.json
tsconfig.json

View File

@ -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": {

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"target": "es5",
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",

View File

@ -9,4 +9,5 @@ src/apis/index.ts
src/index.ts
src/models/index.ts
src/runtime.ts
tsconfig.esm.json
tsconfig.json

View File

@ -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": {

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"target": "es5",
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",

View File

@ -3,7 +3,7 @@
"module": "commonjs",
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"target": "ES5",
"target": "ES6",
"moduleResolution": "node",
"removeComments": true,
"sourceMap": true,

View File

@ -5,7 +5,7 @@
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"target": "es6",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",

View File

@ -5,7 +5,7 @@
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"target": "es6",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",

View File

@ -3,7 +3,7 @@
"module": "commonjs",
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"target": "ES5",
"target": "ES6",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"strict": true,

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"target": "es5",
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"target": "es5",
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"target": "es5",
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"target": "es5",
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",

View File

@ -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"
}
},

View File

@ -2,7 +2,8 @@
"compilerOptions": {
"strict": true,
/* Basic Options */
"target": "es5",
"target": "es6",
"esModuleInterop": true,
"moduleResolution": "node",
"declaration": true,

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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"
}
},

View File

@ -2,7 +2,8 @@
"compilerOptions": {
"strict": true,
/* Basic Options */
"target": "es5",
"target": "es6",
"esModuleInterop": true,
"moduleResolution": "node",
"declaration": true,

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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"
}
},

View File

@ -2,7 +2,8 @@
"compilerOptions": {
"strict": true,
/* Basic Options */
"target": "es5",
"target": "es6",
"esModuleInterop": true,
"moduleResolution": "node",
"declaration": true,

View File

@ -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"
}
},

View File

@ -2,7 +2,8 @@
"compilerOptions": {
"strict": true,
/* Basic Options */
"target": "es5",
"target": "es6",
"esModuleInterop": true,
"moduleResolution": "node",
"declaration": true,

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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"
}
},

View File

@ -2,7 +2,8 @@
"compilerOptions": {
"strict": true,
/* Basic Options */
"target": "es5",
"target": "es6",
"esModuleInterop": true,
"moduleResolution": "node",
"declaration": true,