diff --git a/.gitignore b/.gitignore index e5b43ab5df491..be9f96ae6d45e 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,7 @@ lerna-debug.log package-lock.json !serviceModels/logs -build +dist .idea/ *.iml diff --git a/jest.config.base.js b/jest.config.base.js index b007138537bb4..f87dc686d48c2 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -1,4 +1,7 @@ module.exports = { // remove testMatch once we move to ts-jest - testMatch: ["**/__tests__/**/*.js?(x)", "**/?(*.)+(spec|test).js?(x)"] + testMatch: [ + "**/__tests__/**/*.js?(x)", + "**/dist/cjs/?(*.)+(spec|test).js?(x)" + ] }; diff --git a/package.json b/package.json index 08b8de6beb2bc..ee815b83497b2 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "generate-clients": "node ./scripts/generate-clients", "bootstrap": "yarn", "clean": "yarn clear-build-cache && yarn clear-build-info && lerna clean", - "clear-build-cache": "rimraf ./packages/*/build/* ./clients/*/*/build/*", + "clear-build-cache": "rimraf ./packages/*/build ./packages/*/build-es ./clients/*/dist", "clear-build-info": "rimraf ./packages/*/*.tsbuildinfo ./clients/*/*/*.tsbuildinfo", "build:crypto-dependencies": "lerna run --scope '@aws-sdk/types' --scope '@aws-sdk/util-utf8-browser' --scope '@aws-sdk/util-locate-window' --scope '@aws-sdk/hash-node' --include-dependencies pretest", "build:protocols": "yarn build:crypto-dependencies && lerna run --scope '@aws-sdk/aws-*' --include-dependencies pretest", diff --git a/packages/abort-controller/package.json b/packages/abort-controller/package.json index e7c23ddb8278f..3a2285c162abc 100644 --- a/packages/abort-controller/package.json +++ b/packages/abort-controller/package.json @@ -2,11 +2,14 @@ "name": "@aws-sdk/abort-controller", "version": "1.0.0-gamma.1", "description": "A simple abort controller library", - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "author": { diff --git a/packages/abort-controller/tsconfig.cjs.json b/packages/abort-controller/tsconfig.cjs.json new file mode 100644 index 0000000000000..2eabdae30bab8 --- /dev/null +++ b/packages/abort-controller/tsconfig.cjs.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "lib": ["es5", "es2015.collection"], + "strict": true, + "sourceMap": false, + "declaration": true, + "stripInternal": true, + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/abort-controller/tsconfig.json b/packages/abort-controller/tsconfig.es.json similarity index 53% rename from packages/abort-controller/tsconfig.json rename to packages/abort-controller/tsconfig.es.json index 5dc4771dee5b6..2d8f0823549fa 100644 --- a/packages/abort-controller/tsconfig.json +++ b/packages/abort-controller/tsconfig.es.json @@ -1,16 +1,18 @@ { "compilerOptions": { - "module": "commonjs", - "target": "es5", "lib": ["es5", "es2015.collection"], "strict": true, - "sourceMap": true, + "sourceMap": false, "declaration": true, "stripInternal": true, "rootDir": "./src", - "outDir": "./build", + "outDir": "./dist/es", "importHelpers": true, "noEmitHelpers": true, - "incremental": true - } + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/abort-controller/tsconfig.test.json b/packages/abort-controller/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/abort-controller/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/body-checksum-browser/package.json b/packages/body-checksum-browser/package.json index b62e673bd98eb..9594b1a0949ee 100644 --- a/packages/body-checksum-browser/package.json +++ b/packages/body-checksum-browser/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/body-checksum-browser", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/body-checksum-browser/tsconfig.cjs.json b/packages/body-checksum-browser/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b7f6c6e72bb8 --- /dev/null +++ b/packages/body-checksum-browser/tsconfig.cjs.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/chunked-blob-reader/tsconfig.json b/packages/body-checksum-browser/tsconfig.es.json similarity index 63% rename from packages/chunked-blob-reader/tsconfig.json rename to packages/body-checksum-browser/tsconfig.es.json index d34b347073161..35151692ffd04 100644 --- a/packages/chunked-blob-reader/tsconfig.json +++ b/packages/body-checksum-browser/tsconfig.es.json @@ -1,10 +1,8 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, @@ -17,7 +15,11 @@ "es2015.symbol.wellknown" ], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/body-checksum-browser/tsconfig.test.json b/packages/body-checksum-browser/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/body-checksum-browser/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/body-checksum-node/package.json b/packages/body-checksum-node/package.json index 08e60f62a35db..8fdb23b16409f 100644 --- a/packages/body-checksum-node/package.json +++ b/packages/body-checksum-node/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/body-checksum-node", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/body-checksum-node/tsconfig.cjs.json b/packages/body-checksum-node/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/body-checksum-node/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/body-checksum-node/tsconfig.json b/packages/body-checksum-node/tsconfig.es.json similarity index 62% rename from packages/body-checksum-node/tsconfig.json rename to packages/body-checksum-node/tsconfig.es.json index 38b94cda274ec..d851fa69216d5 100644 --- a/packages/body-checksum-node/tsconfig.json +++ b/packages/body-checksum-node/tsconfig.es.json @@ -1,10 +1,8 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, @@ -16,7 +14,11 @@ "es2015.symbol.wellknown" ], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/body-checksum-node/tsconfig.test.json b/packages/body-checksum-node/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/body-checksum-node/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/chunked-blob-reader-native/package.json b/packages/chunked-blob-reader-native/package.json index 12df84d7bd3b8..365e4f790c0fa 100644 --- a/packages/chunked-blob-reader-native/package.json +++ b/packages/chunked-blob-reader-native/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/chunked-blob-reader-native", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/chunked-blob-reader-native/tsconfig.cjs.json b/packages/chunked-blob-reader-native/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b7f6c6e72bb8 --- /dev/null +++ b/packages/chunked-blob-reader-native/tsconfig.cjs.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/hash-blob-browser/tsconfig.json b/packages/chunked-blob-reader-native/tsconfig.es.json similarity index 63% rename from packages/hash-blob-browser/tsconfig.json rename to packages/chunked-blob-reader-native/tsconfig.es.json index d34b347073161..35151692ffd04 100644 --- a/packages/hash-blob-browser/tsconfig.json +++ b/packages/chunked-blob-reader-native/tsconfig.es.json @@ -1,10 +1,8 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, @@ -17,7 +15,11 @@ "es2015.symbol.wellknown" ], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/chunked-blob-reader-native/tsconfig.test.json b/packages/chunked-blob-reader-native/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/chunked-blob-reader-native/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/chunked-blob-reader/package.json b/packages/chunked-blob-reader/package.json index 57f94aa1e395b..125c071562783 100644 --- a/packages/chunked-blob-reader/package.json +++ b/packages/chunked-blob-reader/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/chunked-blob-reader", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/chunked-blob-reader/tsconfig.cjs.json b/packages/chunked-blob-reader/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b7f6c6e72bb8 --- /dev/null +++ b/packages/chunked-blob-reader/tsconfig.cjs.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/body-checksum-browser/tsconfig.json b/packages/chunked-blob-reader/tsconfig.es.json similarity index 63% rename from packages/body-checksum-browser/tsconfig.json rename to packages/chunked-blob-reader/tsconfig.es.json index d34b347073161..35151692ffd04 100644 --- a/packages/body-checksum-browser/tsconfig.json +++ b/packages/chunked-blob-reader/tsconfig.es.json @@ -1,10 +1,8 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, @@ -17,7 +15,11 @@ "es2015.symbol.wellknown" ], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/chunked-blob-reader/tsconfig.test.json b/packages/chunked-blob-reader/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/chunked-blob-reader/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/chunked-stream-reader-node/package.json b/packages/chunked-stream-reader-node/package.json index db589de248edf..97c6714de20a3 100644 --- a/packages/chunked-stream-reader-node/package.json +++ b/packages/chunked-stream-reader-node/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/chunked-stream-reader-node", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/chunked-stream-reader-node/tsconfig.cjs.json b/packages/chunked-stream-reader-node/tsconfig.cjs.json new file mode 100644 index 0000000000000..53c202090f631 --- /dev/null +++ b/packages/chunked-stream-reader-node/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/chunked-stream-reader-node/tsconfig.es.json b/packages/chunked-stream-reader-node/tsconfig.es.json new file mode 100644 index 0000000000000..3b273a6b62373 --- /dev/null +++ b/packages/chunked-stream-reader-node/tsconfig.es.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/chunked-stream-reader-node/tsconfig.json b/packages/chunked-stream-reader-node/tsconfig.json deleted file mode 100644 index bafa90138733d..0000000000000 --- a/packages/chunked-stream-reader-node/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "target": "es2017", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/chunked-stream-reader-node/tsconfig.test.json b/packages/chunked-stream-reader-node/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/chunked-stream-reader-node/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/client-documentation-generator/package.json b/packages/client-documentation-generator/package.json index 18d05fb8468ab..3b7c0d609e0c6 100644 --- a/packages/client-documentation-generator/package.json +++ b/packages/client-documentation-generator/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/client-documentation-generator", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "exit 0" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/client-documentation-generator/tsconfig.cjs.json b/packages/client-documentation-generator/tsconfig.cjs.json new file mode 100644 index 0000000000000..34e3e24465a97 --- /dev/null +++ b/packages/client-documentation-generator/tsconfig.cjs.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": false, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": ["es2015"], + "rootDir": "./src", + "outDir": "./dist/cjs", + "experimentalDecorators": true, + "pretty": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/client-documentation-generator/tsconfig.json b/packages/client-documentation-generator/tsconfig.es.json similarity index 57% rename from packages/client-documentation-generator/tsconfig.json rename to packages/client-documentation-generator/tsconfig.es.json index c1ff6d96b8b2f..e60dc3a550e01 100644 --- a/packages/client-documentation-generator/tsconfig.json +++ b/packages/client-documentation-generator/tsconfig.es.json @@ -1,18 +1,20 @@ { "compilerOptions": { - "target": "es2015", - "module": "commonjs", "declaration": true, "strict": false, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, "lib": ["es2015"], "rootDir": "./src", - "outDir": "./build", + "outDir": "./dist/es", "experimentalDecorators": true, "pretty": true, - "incremental": true - } + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/client-documentation-generator/tsconfig.test.json b/packages/client-documentation-generator/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/client-documentation-generator/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/config-resolver/package.json b/packages/config-resolver/package.json index 498db3d810c51..1d9a44adddedc 100644 --- a/packages/config-resolver/package.json +++ b/packages/config-resolver/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/config-resolver", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/config-resolver/tsconfig.cjs.json b/packages/config-resolver/tsconfig.cjs.json new file mode 100644 index 0000000000000..dbf3678f2c00f --- /dev/null +++ b/packages/config-resolver/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/config-resolver/tsconfig.es.json b/packages/config-resolver/tsconfig.es.json new file mode 100644 index 0000000000000..58023c506f1a9 --- /dev/null +++ b/packages/config-resolver/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/config-resolver/tsconfig.json b/packages/config-resolver/tsconfig.json deleted file mode 100644 index ea8af88585557..0000000000000 --- a/packages/config-resolver/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/config-resolver/tsconfig.test.json b/packages/config-resolver/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/config-resolver/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/credential-provider-cognito-identity/package.json b/packages/credential-provider-cognito-identity/package.json index ff2506b8622f8..fa6cd680faf59 100644 --- a/packages/credential-provider-cognito-identity/package.json +++ b/packages/credential-provider-cognito-identity/package.json @@ -2,9 +2,9 @@ "name": "@aws-sdk/credential-provider-cognito-identity", "version": "1.0.0-gamma.2", "scripts": { - "prepublishOnly": "tsc", - "pretest": "yarn build:cjs && yarn build:es", - "build:cjs": "tsc -p tsconfig.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, diff --git a/packages/credential-provider-cognito-identity/tsconfig.json b/packages/credential-provider-cognito-identity/tsconfig.cjs.json similarity index 64% rename from packages/credential-provider-cognito-identity/tsconfig.json rename to packages/credential-provider-cognito-identity/tsconfig.cjs.json index b9974d3ad8171..eb1fa156fbcb1 100644 --- a/packages/credential-provider-cognito-identity/tsconfig.json +++ b/packages/credential-provider-cognito-identity/tsconfig.cjs.json @@ -1,7 +1,5 @@ { "compilerOptions": { - "target": "es2017", - "module": "commonjs", "declaration": true, "strict": true, "sourceMap": true, @@ -10,9 +8,11 @@ "noEmitHelpers": true, "lib": ["dom"], "rootDir": "./src", - "outDir": "dist/cjs", - "incremental": true, + "outDir": "./dist/cjs", "declarationDir": "./dist/cjs", - "noUnusedLocals": true - } + "noUnusedLocals": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] } diff --git a/packages/credential-provider-cognito-identity/tsconfig.es.json b/packages/credential-provider-cognito-identity/tsconfig.es.json index 53aca8568598e..f59cc9ba9aba2 100644 --- a/packages/credential-provider-cognito-identity/tsconfig.es.json +++ b/packages/credential-provider-cognito-identity/tsconfig.es.json @@ -1,12 +1,11 @@ { - "extends": "./tsconfig", "compilerOptions": { - "target": "es5", - "module": "esnext", - "moduleResolution": "node", "declaration": false, - "declarationDir": null, + "strict": true, + "sourceMap": true, "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, "lib": [ "dom", "es5", @@ -15,6 +14,15 @@ "es2015.iterable", "es2015.symbol.wellknown" ], - "outDir": "dist/es" - } + "rootDir": "./src", + "outDir": "./dist/es", + "declarationDir": null, + "noUnusedLocals": true, + "baseUrl": ".", + "target": "es5", + "module": "esnext", + "moduleResolution": "node" + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/credential-provider-env/package.json b/packages/credential-provider-env/package.json index 0c93cfba27c42..cf52783379a66 100644 --- a/packages/credential-provider-env/package.json +++ b/packages/credential-provider-env/package.json @@ -2,10 +2,13 @@ "name": "@aws-sdk/credential-provider-env", "version": "1.0.0-gamma.1", "description": "AWS credential provider that sources credentials from known environment variables", - "main": "./build/index.js", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "keywords": [ @@ -28,5 +31,5 @@ "jest": "^25.1.0", "typescript": "~3.8.3" }, - "types": "./build/index.d.ts" + "types": "./dist/cjs/index.d.ts" } diff --git a/packages/credential-provider-env/tsconfig.cjs.json b/packages/credential-provider-env/tsconfig.cjs.json new file mode 100644 index 0000000000000..219097ec0421d --- /dev/null +++ b/packages/credential-provider-env/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "lib": ["es5", "es2015.promise", "es2015.collection"], + "sourceRoot": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/credential-provider-ini/tsconfig.json b/packages/credential-provider-env/tsconfig.es.json old mode 100755 new mode 100644 similarity index 52% rename from packages/credential-provider-ini/tsconfig.json rename to packages/credential-provider-env/tsconfig.es.json index 7993e67d24bb4..623d75b15c278 --- a/packages/credential-provider-ini/tsconfig.json +++ b/packages/credential-provider-env/tsconfig.es.json @@ -1,15 +1,17 @@ { "compilerOptions": { - "module": "commonjs", - "target": "es5", "declaration": true, "strict": true, - "sourceMap": true, - "importHelpers": true, + "sourceMap": false, "lib": ["es5", "es2015.promise", "es2015.collection"], "sourceRoot": "./src", - "outDir": "./build", + "outDir": "./dist/es", + "importHelpers": true, "noEmitHelpers": true, - "incremental": true - } + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/credential-provider-env/tsconfig.test.json b/packages/credential-provider-env/tsconfig.test.json deleted file mode 100644 index c5ce824ff9a13..0000000000000 --- a/packages/credential-provider-env/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "sourceRoot": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/credential-provider-imds/package.json b/packages/credential-provider-imds/package.json index c84093fb1ca95..3fbe107117e29 100644 --- a/packages/credential-provider-imds/package.json +++ b/packages/credential-provider-imds/package.json @@ -2,10 +2,13 @@ "name": "@aws-sdk/credential-provider-imds", "version": "1.0.0-gamma.1", "description": "AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service", - "main": "./build/index.js", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "keywords": [ @@ -28,5 +31,5 @@ "jest": "^25.1.0", "typescript": "~3.8.3" }, - "types": "./build/index.d.ts" + "types": "./dist/cjs/index.d.ts" } diff --git a/packages/credential-provider-imds/tsconfig.cjs.json b/packages/credential-provider-imds/tsconfig.cjs.json new file mode 100644 index 0000000000000..0e4a46b610104 --- /dev/null +++ b/packages/credential-provider-imds/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "importHelpers": true, + "lib": ["es5", "es2015.promise", "es2015.collection"], + "sourceRoot": "./src", + "outDir": "./dist/cjs", + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/credential-provider-imds/tsconfig.json b/packages/credential-provider-imds/tsconfig.es.json old mode 100755 new mode 100644 similarity index 52% rename from packages/credential-provider-imds/tsconfig.json rename to packages/credential-provider-imds/tsconfig.es.json index 7993e67d24bb4..7da8685f1ce4a --- a/packages/credential-provider-imds/tsconfig.json +++ b/packages/credential-provider-imds/tsconfig.es.json @@ -1,15 +1,17 @@ { "compilerOptions": { - "module": "commonjs", - "target": "es5", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "importHelpers": true, "lib": ["es5", "es2015.promise", "es2015.collection"], "sourceRoot": "./src", - "outDir": "./build", + "outDir": "./dist/es", "noEmitHelpers": true, - "incremental": true - } + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/credential-provider-imds/tsconfig.test.json b/packages/credential-provider-imds/tsconfig.test.json deleted file mode 100644 index c5ce824ff9a13..0000000000000 --- a/packages/credential-provider-imds/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "sourceRoot": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/credential-provider-ini/package.json b/packages/credential-provider-ini/package.json index d4f80f20887b7..8fa179f5a1b17 100644 --- a/packages/credential-provider-ini/package.json +++ b/packages/credential-provider-ini/package.json @@ -2,10 +2,13 @@ "name": "@aws-sdk/credential-provider-ini", "version": "1.0.0-gamma.1", "description": "AWS credential provider that sources credentials from ~/.aws/credentials and ~/.aws/config", - "main": "./build/index.js", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "keywords": [ @@ -29,5 +32,5 @@ "jest": "^25.1.0", "typescript": "~3.8.3" }, - "types": "./build/index.d.ts" + "types": "./dist/cjs/index.d.ts" } diff --git a/packages/credential-provider-ini/tsconfig.cjs.json b/packages/credential-provider-ini/tsconfig.cjs.json new file mode 100644 index 0000000000000..0e4a46b610104 --- /dev/null +++ b/packages/credential-provider-ini/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "importHelpers": true, + "lib": ["es5", "es2015.promise", "es2015.collection"], + "sourceRoot": "./src", + "outDir": "./dist/cjs", + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/credential-provider-process/tsconfig.json b/packages/credential-provider-ini/tsconfig.es.json old mode 100755 new mode 100644 similarity index 52% rename from packages/credential-provider-process/tsconfig.json rename to packages/credential-provider-ini/tsconfig.es.json index 7993e67d24bb4..7da8685f1ce4a --- a/packages/credential-provider-process/tsconfig.json +++ b/packages/credential-provider-ini/tsconfig.es.json @@ -1,15 +1,17 @@ { "compilerOptions": { - "module": "commonjs", - "target": "es5", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "importHelpers": true, "lib": ["es5", "es2015.promise", "es2015.collection"], "sourceRoot": "./src", - "outDir": "./build", + "outDir": "./dist/es", "noEmitHelpers": true, - "incremental": true - } + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/credential-provider-ini/tsconfig.test.json b/packages/credential-provider-ini/tsconfig.test.json deleted file mode 100644 index c5ce824ff9a13..0000000000000 --- a/packages/credential-provider-ini/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "sourceRoot": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/credential-provider-node/package.json b/packages/credential-provider-node/package.json index 3bef890551b7e..29a0adbfffdfc 100644 --- a/packages/credential-provider-node/package.json +++ b/packages/credential-provider-node/package.json @@ -5,10 +5,13 @@ "engines": { "node": ">=8.10" }, - "main": "./build/index.js", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "keywords": [ @@ -36,5 +39,5 @@ "jest": "^25.1.0", "typescript": "~3.8.3" }, - "types": "./build/index.d.ts" + "types": "./dist/cjs/index.d.ts" } diff --git a/packages/credential-provider-node/tsconfig.cjs.json b/packages/credential-provider-node/tsconfig.cjs.json new file mode 100644 index 0000000000000..d08e9cbcc8333 --- /dev/null +++ b/packages/credential-provider-node/tsconfig.cjs.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/credential-provider-node/tsconfig.es.json b/packages/credential-provider-node/tsconfig.es.json new file mode 100644 index 0000000000000..f7b02496f25fe --- /dev/null +++ b/packages/credential-provider-node/tsconfig.es.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "rootDir": "./src", + "outDir": "./dist/es", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/credential-provider-node/tsconfig.json b/packages/credential-provider-node/tsconfig.json deleted file mode 100644 index e304ef22eaf8f..0000000000000 --- a/packages/credential-provider-node/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es2017", - "declaration": true, - "strict": true, - "sourceMap": true, - "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/credential-provider-node/tsconfig.test.json b/packages/credential-provider-node/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/credential-provider-node/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/credential-provider-process/package.json b/packages/credential-provider-process/package.json index 1dbd78537980f..963cabce50160 100644 --- a/packages/credential-provider-process/package.json +++ b/packages/credential-provider-process/package.json @@ -2,10 +2,13 @@ "name": "@aws-sdk/credential-provider-process", "version": "1.0.0-gamma.1", "description": "AWS credential provider that sources credential_process from ~/.aws/credentials and ~/.aws/config", - "main": "./build/index.js", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "keywords": [ @@ -30,5 +33,5 @@ "jest": "^25.1.0", "typescript": "~3.8.3" }, - "types": "./build/index.d.ts" + "types": "./dist/cjs/index.d.ts" } diff --git a/packages/credential-provider-process/tsconfig.cjs.json b/packages/credential-provider-process/tsconfig.cjs.json new file mode 100644 index 0000000000000..0e4a46b610104 --- /dev/null +++ b/packages/credential-provider-process/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "importHelpers": true, + "lib": ["es5", "es2015.promise", "es2015.collection"], + "sourceRoot": "./src", + "outDir": "./dist/cjs", + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/credential-provider-env/tsconfig.json b/packages/credential-provider-process/tsconfig.es.json old mode 100755 new mode 100644 similarity index 52% rename from packages/credential-provider-env/tsconfig.json rename to packages/credential-provider-process/tsconfig.es.json index 33f49b8bd6492..7da8685f1ce4a --- a/packages/credential-provider-env/tsconfig.json +++ b/packages/credential-provider-process/tsconfig.es.json @@ -1,15 +1,17 @@ { "compilerOptions": { - "module": "commonjs", - "target": "es5", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, + "importHelpers": true, "lib": ["es5", "es2015.promise", "es2015.collection"], "sourceRoot": "./src", - "outDir": "./build", - "importHelpers": true, + "outDir": "./dist/es", "noEmitHelpers": true, - "incremental": true - } + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/credential-provider-process/tsconfig.test.json b/packages/credential-provider-process/tsconfig.test.json deleted file mode 100644 index c5ce824ff9a13..0000000000000 --- a/packages/credential-provider-process/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "sourceRoot": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/eventstream-handler-node/package.json b/packages/eventstream-handler-node/package.json index 3bc56ba45eed2..afddea51c181e 100644 --- a/packages/eventstream-handler-node/package.json +++ b/packages/eventstream-handler-node/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/eventstream-handler-node", "version": "1.0.0-gamma.0", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" @@ -27,4 +30,4 @@ "engines": { "node": ">= 10.0.0" } -} \ No newline at end of file +} diff --git a/packages/eventstream-handler-node/tsconfig.cjs.json b/packages/eventstream-handler-node/tsconfig.cjs.json new file mode 100644 index 0000000000000..0b34a5afa4c2d --- /dev/null +++ b/packages/eventstream-handler-node/tsconfig.cjs.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": ["es2018.asynciterable"], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/eventstream-serde-config-resolver/tsconfig.json b/packages/eventstream-handler-node/tsconfig.es.json similarity index 53% rename from packages/eventstream-serde-config-resolver/tsconfig.json rename to packages/eventstream-handler-node/tsconfig.es.json index 30f910550c82a..44a46469cf3b5 100644 --- a/packages/eventstream-serde-config-resolver/tsconfig.json +++ b/packages/eventstream-handler-node/tsconfig.es.json @@ -1,16 +1,18 @@ { "compilerOptions": { - "target": "es2017", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, "lib": ["es2018.asynciterable"], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/eventstream-handler-node/tsconfig.test.json b/packages/eventstream-handler-node/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/eventstream-handler-node/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/eventstream-marshaller/package.json b/packages/eventstream-marshaller/package.json index 5cf2c64e7d5f4..abb28eeb0e145 100644 --- a/packages/eventstream-marshaller/package.json +++ b/packages/eventstream-marshaller/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/eventstream-marshaller", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest --coverage" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/eventstream-marshaller/tsconfig.cjs.json b/packages/eventstream-marshaller/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/eventstream-marshaller/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/eventstream-marshaller/tsconfig.es.json b/packages/eventstream-marshaller/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/eventstream-marshaller/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/eventstream-marshaller/tsconfig.json b/packages/eventstream-marshaller/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/eventstream-marshaller/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/eventstream-marshaller/tsconfig.test.json b/packages/eventstream-marshaller/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/eventstream-marshaller/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/eventstream-serde-browser/package.json b/packages/eventstream-serde-browser/package.json index 4cde63709bab7..eea9b83c350cb 100644 --- a/packages/eventstream-serde-browser/package.json +++ b/packages/eventstream-serde-browser/package.json @@ -2,13 +2,16 @@ "name": "@aws-sdk/eventstream-serde-browser", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", "module": "./build/index.js", - "types": "./build/index.d.ts", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/eventstream-serde-browser/tsconfig.cjs.json b/packages/eventstream-serde-browser/tsconfig.cjs.json new file mode 100644 index 0000000000000..4bbcd817703b9 --- /dev/null +++ b/packages/eventstream-serde-browser/tsconfig.cjs.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": ["es2018.asynciterable", "DOM"], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/eventstream-serde-browser/tsconfig.json b/packages/eventstream-serde-browser/tsconfig.es.json similarity index 54% rename from packages/eventstream-serde-browser/tsconfig.json rename to packages/eventstream-serde-browser/tsconfig.es.json index 0c13ac5852ffb..a14ba96e649c0 100644 --- a/packages/eventstream-serde-browser/tsconfig.json +++ b/packages/eventstream-serde-browser/tsconfig.es.json @@ -1,16 +1,18 @@ { "compilerOptions": { - "target": "ES5", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, "lib": ["es2018.asynciterable", "DOM"], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/eventstream-serde-browser/tsconfig.test.json b/packages/eventstream-serde-browser/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/eventstream-serde-browser/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/eventstream-serde-config-resolver/package.json b/packages/eventstream-serde-config-resolver/package.json index 8e24c1445bdb0..e2df3960efd55 100644 --- a/packages/eventstream-serde-config-resolver/package.json +++ b/packages/eventstream-serde-config-resolver/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/eventstream-serde-config-resolver", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/eventstream-serde-config-resolver/tsconfig.cjs.json b/packages/eventstream-serde-config-resolver/tsconfig.cjs.json new file mode 100644 index 0000000000000..0b34a5afa4c2d --- /dev/null +++ b/packages/eventstream-serde-config-resolver/tsconfig.cjs.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": ["es2018.asynciterable"], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/eventstream-handler-node/tsconfig.json b/packages/eventstream-serde-config-resolver/tsconfig.es.json similarity index 53% rename from packages/eventstream-handler-node/tsconfig.json rename to packages/eventstream-serde-config-resolver/tsconfig.es.json index 30f910550c82a..44a46469cf3b5 100644 --- a/packages/eventstream-handler-node/tsconfig.json +++ b/packages/eventstream-serde-config-resolver/tsconfig.es.json @@ -1,16 +1,18 @@ { "compilerOptions": { - "target": "es2017", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, "lib": ["es2018.asynciterable"], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/eventstream-serde-config-resolver/tsconfig.test.json b/packages/eventstream-serde-config-resolver/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/eventstream-serde-config-resolver/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/eventstream-serde-node/package.json b/packages/eventstream-serde-node/package.json index bb2b702120d4f..80f2d9e9ffd1e 100644 --- a/packages/eventstream-serde-node/package.json +++ b/packages/eventstream-serde-node/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/eventstream-serde-node", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" @@ -28,4 +31,4 @@ "engines": { "node": ">= 10.0.0" } -} \ No newline at end of file +} diff --git a/packages/eventstream-serde-node/tsconfig.cjs.json b/packages/eventstream-serde-node/tsconfig.cjs.json new file mode 100644 index 0000000000000..0b34a5afa4c2d --- /dev/null +++ b/packages/eventstream-serde-node/tsconfig.cjs.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": ["es2018.asynciterable"], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/eventstream-serde-node/tsconfig.json b/packages/eventstream-serde-node/tsconfig.es.json similarity index 53% rename from packages/eventstream-serde-node/tsconfig.json rename to packages/eventstream-serde-node/tsconfig.es.json index 30f910550c82a..44a46469cf3b5 100644 --- a/packages/eventstream-serde-node/tsconfig.json +++ b/packages/eventstream-serde-node/tsconfig.es.json @@ -1,16 +1,18 @@ { "compilerOptions": { - "target": "es2017", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, "lib": ["es2018.asynciterable"], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/eventstream-serde-node/tsconfig.test.json b/packages/eventstream-serde-node/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/eventstream-serde-node/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/eventstream-serde-universal/package.json b/packages/eventstream-serde-universal/package.json index e753ba453efba..d19372fc3dcc5 100644 --- a/packages/eventstream-serde-universal/package.json +++ b/packages/eventstream-serde-universal/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/eventstream-serde-universal", "version": "1.0.0-gamma.0", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" @@ -27,4 +30,4 @@ "engines": { "node": ">= 10.0.0" } -} \ No newline at end of file +} diff --git a/packages/eventstream-serde-universal/tsconfig.cjs.json b/packages/eventstream-serde-universal/tsconfig.cjs.json new file mode 100644 index 0000000000000..0b34a5afa4c2d --- /dev/null +++ b/packages/eventstream-serde-universal/tsconfig.cjs.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": ["es2018.asynciterable"], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/eventstream-serde-universal/tsconfig.json b/packages/eventstream-serde-universal/tsconfig.es.json similarity index 53% rename from packages/eventstream-serde-universal/tsconfig.json rename to packages/eventstream-serde-universal/tsconfig.es.json index 30f910550c82a..44a46469cf3b5 100644 --- a/packages/eventstream-serde-universal/tsconfig.json +++ b/packages/eventstream-serde-universal/tsconfig.es.json @@ -1,16 +1,18 @@ { "compilerOptions": { - "target": "es2017", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, "lib": ["es2018.asynciterable"], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/eventstream-serde-universal/tsconfig.test.json b/packages/eventstream-serde-universal/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/eventstream-serde-universal/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/fetch-http-handler/package.json b/packages/fetch-http-handler/package.json index 438303d542aaf..3f5b498a429e4 100644 --- a/packages/fetch-http-handler/package.json +++ b/packages/fetch-http-handler/package.json @@ -3,8 +3,10 @@ "version": "1.0.0-gamma.2", "description": "Provides a way to make requests", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest --coverage && karma start karma.conf.js" }, "author": { @@ -12,8 +14,9 @@ "url": "https://aws.amazon.com/javascript/" }, "license": "Apache-2.0", - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "dependencies": { "@aws-sdk/protocol-http": "1.0.0-gamma.1", "@aws-sdk/querystring-builder": "1.0.0-gamma.1", diff --git a/packages/fetch-http-handler/tsconfig.cjs.json b/packages/fetch-http-handler/tsconfig.cjs.json new file mode 100644 index 0000000000000..38b1397de47f4 --- /dev/null +++ b/packages/fetch-http-handler/tsconfig.cjs.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": ["dom", "es5", "es2015.promise", "es2015.iterable"], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/fetch-http-handler/tsconfig.json b/packages/fetch-http-handler/tsconfig.es.json similarity index 56% rename from packages/fetch-http-handler/tsconfig.json rename to packages/fetch-http-handler/tsconfig.es.json index 103e6ce9a0431..865a88d9f1dec 100644 --- a/packages/fetch-http-handler/tsconfig.json +++ b/packages/fetch-http-handler/tsconfig.es.json @@ -1,16 +1,18 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, "lib": ["dom", "es5", "es2015.promise", "es2015.iterable"], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/fetch-http-handler/tsconfig.test.json b/packages/fetch-http-handler/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/fetch-http-handler/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/hash-blob-browser/package.json b/packages/hash-blob-browser/package.json index e5066bb59e23c..0affff5b8294d 100644 --- a/packages/hash-blob-browser/package.json +++ b/packages/hash-blob-browser/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/hash-blob-browser", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "karma start karma.conf.js" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/hash-blob-browser/tsconfig.cjs.json b/packages/hash-blob-browser/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b7f6c6e72bb8 --- /dev/null +++ b/packages/hash-blob-browser/tsconfig.cjs.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/chunked-blob-reader-native/tsconfig.json b/packages/hash-blob-browser/tsconfig.es.json similarity index 63% rename from packages/chunked-blob-reader-native/tsconfig.json rename to packages/hash-blob-browser/tsconfig.es.json index d34b347073161..35151692ffd04 100644 --- a/packages/chunked-blob-reader-native/tsconfig.json +++ b/packages/hash-blob-browser/tsconfig.es.json @@ -1,10 +1,8 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, @@ -17,7 +15,11 @@ "es2015.symbol.wellknown" ], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/hash-blob-browser/tsconfig.test.json b/packages/hash-blob-browser/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/hash-blob-browser/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/hash-node/package.json b/packages/hash-node/package.json index 769ec91baee63..b5aeb673e18a1 100644 --- a/packages/hash-node/package.json +++ b/packages/hash-node/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/hash-node", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/hash-node/tsconfig.cjs.json b/packages/hash-node/tsconfig.cjs.json new file mode 100644 index 0000000000000..53c202090f631 --- /dev/null +++ b/packages/hash-node/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/hash-node/tsconfig.es.json b/packages/hash-node/tsconfig.es.json new file mode 100644 index 0000000000000..3b273a6b62373 --- /dev/null +++ b/packages/hash-node/tsconfig.es.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/hash-node/tsconfig.json b/packages/hash-node/tsconfig.json deleted file mode 100644 index bafa90138733d..0000000000000 --- a/packages/hash-node/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "target": "es2017", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/hash-node/tsconfig.test.json b/packages/hash-node/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/hash-node/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/hash-stream-node/package.json b/packages/hash-stream-node/package.json index 05489685ed352..5222550028baa 100644 --- a/packages/hash-stream-node/package.json +++ b/packages/hash-stream-node/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/hash-stream-node", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/hash-stream-node/tsconfig.cjs.json b/packages/hash-stream-node/tsconfig.cjs.json new file mode 100644 index 0000000000000..53c202090f631 --- /dev/null +++ b/packages/hash-stream-node/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/hash-stream-node/tsconfig.es.json b/packages/hash-stream-node/tsconfig.es.json new file mode 100644 index 0000000000000..3b273a6b62373 --- /dev/null +++ b/packages/hash-stream-node/tsconfig.es.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/hash-stream-node/tsconfig.json b/packages/hash-stream-node/tsconfig.json deleted file mode 100644 index bafa90138733d..0000000000000 --- a/packages/hash-stream-node/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "target": "es2017", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/hash-stream-node/tsconfig.test.json b/packages/hash-stream-node/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/hash-stream-node/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/invalid-dependency/package.json b/packages/invalid-dependency/package.json index d3acff6f425f5..bde3d4f7f8a08 100644 --- a/packages/invalid-dependency/package.json +++ b/packages/invalid-dependency/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/invalid-dependency", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/invalid-dependency/tsconfig.cjs.json b/packages/invalid-dependency/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/invalid-dependency/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/invalid-dependency/tsconfig.es.json b/packages/invalid-dependency/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/invalid-dependency/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/invalid-dependency/tsconfig.json b/packages/invalid-dependency/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/invalid-dependency/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/invalid-dependency/tsconfig.test.json b/packages/invalid-dependency/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/invalid-dependency/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/is-array-buffer/package.json b/packages/is-array-buffer/package.json index 1a1cd159ff815..968ddec308685 100644 --- a/packages/is-array-buffer/package.json +++ b/packages/is-array-buffer/package.json @@ -3,8 +3,10 @@ "version": "1.0.0-gamma.1", "description": "Provides a function for detecting if an argument is an ArrayBuffer", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "author": { @@ -12,13 +14,14 @@ "url": "https://aws.amazon.com/javascript/" }, "license": "Apache-2.0", - "main": "./build/index.js", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", "devDependencies": { "@types/jest": "^25.1.4", "jest": "^25.1.0", "typescript": "~3.8.3" }, - "types": "./build/index.d.ts", + "types": "./dist/cjs/index.d.ts", "dependencies": { "tslib": "^1.8.0" } diff --git a/packages/is-array-buffer/tsconfig.cjs.json b/packages/is-array-buffer/tsconfig.cjs.json new file mode 100644 index 0000000000000..8e69a8627e589 --- /dev/null +++ b/packages/is-array-buffer/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "lib": ["es5", "es2015.collection"], + "declaration": true, + "strict": true, + "sourceMap": false, + "sourceRoot": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/is-array-buffer/tsconfig.json b/packages/is-array-buffer/tsconfig.es.json similarity index 50% rename from packages/is-array-buffer/tsconfig.json rename to packages/is-array-buffer/tsconfig.es.json index 57706f5fe3e96..bd67b69e12a20 100644 --- a/packages/is-array-buffer/tsconfig.json +++ b/packages/is-array-buffer/tsconfig.es.json @@ -1,15 +1,17 @@ { "compilerOptions": { - "target": "es5", "lib": ["es5", "es2015.collection"], - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "sourceRoot": "./src", - "outDir": "./build", + "outDir": "./dist/es", "importHelpers": true, "noEmitHelpers": true, - "incremental": true - } + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/is-array-buffer/tsconfig.test.json b/packages/is-array-buffer/tsconfig.test.json deleted file mode 100644 index c5ce824ff9a13..0000000000000 --- a/packages/is-array-buffer/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "sourceRoot": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/karma-credential-loader/package.json b/packages/karma-credential-loader/package.json index b81c7d6eef4e7..ecfedb2d375e2 100644 --- a/packages/karma-credential-loader/package.json +++ b/packages/karma-credential-loader/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/karma-credential-loader", "version": "1.0.0-gamma.0", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", - "test": "jest" + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", + "test": "jest --passWithNoTests" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/karma-credential-loader/tsconfig.cjs.json b/packages/karma-credential-loader/tsconfig.cjs.json new file mode 100644 index 0000000000000..dfefe01853328 --- /dev/null +++ b/packages/karma-credential-loader/tsconfig.cjs.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "declaration": false, + "strict": false, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": ["es2015"], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/karma-credential-loader/tsconfig.json b/packages/karma-credential-loader/tsconfig.es.json similarity index 51% rename from packages/karma-credential-loader/tsconfig.json rename to packages/karma-credential-loader/tsconfig.es.json index 216ffb1e63e0f..264ee2c93e8d1 100644 --- a/packages/karma-credential-loader/tsconfig.json +++ b/packages/karma-credential-loader/tsconfig.es.json @@ -1,16 +1,18 @@ { "compilerOptions": { - "target": "es2015", - "module": "commonjs", "declaration": false, "strict": false, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, "lib": ["es2015"], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/karma-credential-loader/tsconfig.test.json b/packages/karma-credential-loader/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/karma-credential-loader/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/md5-js/package.json b/packages/md5-js/package.json index 294f34dff7337..0a3b050b88ed8 100644 --- a/packages/md5-js/package.json +++ b/packages/md5-js/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/md5-js", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/md5-js/tsconfig.cjs.json b/packages/md5-js/tsconfig.cjs.json new file mode 100644 index 0000000000000..32d324f2e3678 --- /dev/null +++ b/packages/md5-js/tsconfig.cjs.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "exclude": ["./build/**"], + "include": ["src/"], + "extends": "../../tsconfig.cjs.json" +} diff --git a/packages/md5-js/tsconfig.es.json b/packages/md5-js/tsconfig.es.json new file mode 100644 index 0000000000000..bc4bcc3740800 --- /dev/null +++ b/packages/md5-js/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "include": ["src/"], + "extends": "../../tsconfig.es.json" +} diff --git a/packages/md5-js/tsconfig.test.json b/packages/md5-js/tsconfig.test.json deleted file mode 100644 index e82a6678acd86..0000000000000 --- a/packages/md5-js/tsconfig.test.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - }, - "exclude": ["./build/**"] -} diff --git a/packages/middleware-apply-body-checksum/package.json b/packages/middleware-apply-body-checksum/package.json index c6dc5ccd6eff0..30375ef5f5111 100644 --- a/packages/middleware-apply-body-checksum/package.json +++ b/packages/middleware-apply-body-checksum/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-apply-body-checksum", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest --coverage" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-apply-body-checksum/tsconfig.cjs.json b/packages/middleware-apply-body-checksum/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-apply-body-checksum/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-apply-body-checksum/tsconfig.es.json b/packages/middleware-apply-body-checksum/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-apply-body-checksum/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-apply-body-checksum/tsconfig.json b/packages/middleware-apply-body-checksum/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/middleware-apply-body-checksum/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-apply-body-checksum/tsconfig.test.json b/packages/middleware-apply-body-checksum/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-apply-body-checksum/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-bucket-endpoint/package.json b/packages/middleware-bucket-endpoint/package.json index 273d03df39766..337efab1ef2b2 100644 --- a/packages/middleware-bucket-endpoint/package.json +++ b/packages/middleware-bucket-endpoint/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-bucket-endpoint", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-bucket-endpoint/tsconfig.cjs.json b/packages/middleware-bucket-endpoint/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-bucket-endpoint/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-bucket-endpoint/tsconfig.es.json b/packages/middleware-bucket-endpoint/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-bucket-endpoint/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-bucket-endpoint/tsconfig.json b/packages/middleware-bucket-endpoint/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/middleware-bucket-endpoint/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-bucket-endpoint/tsconfig.test.json b/packages/middleware-bucket-endpoint/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-bucket-endpoint/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-content-length/package.json b/packages/middleware-content-length/package.json index fdc4fe5345ccb..179b0d7a63c06 100644 --- a/packages/middleware-content-length/package.json +++ b/packages/middleware-content-length/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-content-length", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-content-length/tsconfig.cjs.json b/packages/middleware-content-length/tsconfig.cjs.json new file mode 100644 index 0000000000000..dbf3678f2c00f --- /dev/null +++ b/packages/middleware-content-length/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-content-length/tsconfig.es.json b/packages/middleware-content-length/tsconfig.es.json new file mode 100644 index 0000000000000..58023c506f1a9 --- /dev/null +++ b/packages/middleware-content-length/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-content-length/tsconfig.json b/packages/middleware-content-length/tsconfig.json deleted file mode 100644 index ea8af88585557..0000000000000 --- a/packages/middleware-content-length/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/middleware-content-length/tsconfig.test.json b/packages/middleware-content-length/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-content-length/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-eventstream/package.json b/packages/middleware-eventstream/package.json index 443af3d74bdcf..ad803d6f9a4d0 100644 --- a/packages/middleware-eventstream/package.json +++ b/packages/middleware-eventstream/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-eventstream", "version": "1.0.0-gamma.0", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" @@ -23,4 +26,4 @@ "jest": "^24.7.1", "typescript": "~3.8.3" } -} \ No newline at end of file +} diff --git a/packages/middleware-eventstream/tsconfig.cjs.json b/packages/middleware-eventstream/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-eventstream/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-eventstream/tsconfig.es.json b/packages/middleware-eventstream/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-eventstream/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-eventstream/tsconfig.json b/packages/middleware-eventstream/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/middleware-eventstream/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-eventstream/tsconfig.test.json b/packages/middleware-eventstream/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-eventstream/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-expect-continue/package.json b/packages/middleware-expect-continue/package.json index 17fcbf37bfece..2462e0102c12d 100644 --- a/packages/middleware-expect-continue/package.json +++ b/packages/middleware-expect-continue/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-expect-continue", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-expect-continue/tsconfig.cjs.json b/packages/middleware-expect-continue/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-expect-continue/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-expect-continue/tsconfig.es.json b/packages/middleware-expect-continue/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-expect-continue/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-expect-continue/tsconfig.json b/packages/middleware-expect-continue/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/middleware-expect-continue/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-expect-continue/tsconfig.test.json b/packages/middleware-expect-continue/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-expect-continue/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-header-default/package.json b/packages/middleware-header-default/package.json index b79323f2980cb..8a5d2ed036a4b 100644 --- a/packages/middleware-header-default/package.json +++ b/packages/middleware-header-default/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-header-default", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-header-default/tsconfig.cjs.json b/packages/middleware-header-default/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-header-default/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-header-default/tsconfig.es.json b/packages/middleware-header-default/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-header-default/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-header-default/tsconfig.json b/packages/middleware-header-default/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/middleware-header-default/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-header-default/tsconfig.test.json b/packages/middleware-header-default/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-header-default/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-host-header/package.json b/packages/middleware-host-header/package.json index d110c29a770ed..8e80a178a80ce 100644 --- a/packages/middleware-host-header/package.json +++ b/packages/middleware-host-header/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-host-header", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-host-header/tsconfig.cjs.json b/packages/middleware-host-header/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-host-header/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-host-header/tsconfig.es.json b/packages/middleware-host-header/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-host-header/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-host-header/tsconfig.json b/packages/middleware-host-header/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/middleware-host-header/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-host-header/tsconfig.test.json b/packages/middleware-host-header/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-host-header/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-location-constraint/package.json b/packages/middleware-location-constraint/package.json index 47962f6d4990f..153bfb8b0cb52 100644 --- a/packages/middleware-location-constraint/package.json +++ b/packages/middleware-location-constraint/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-location-constraint", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-location-constraint/tsconfig.cjs.json b/packages/middleware-location-constraint/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-location-constraint/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-location-constraint/tsconfig.es.json b/packages/middleware-location-constraint/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-location-constraint/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-location-constraint/tsconfig.json b/packages/middleware-location-constraint/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/middleware-location-constraint/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-location-constraint/tsconfig.test.json b/packages/middleware-location-constraint/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-location-constraint/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-retry/package.json b/packages/middleware-retry/package.json index 78387cefcb855..aa3de55438101 100644 --- a/packages/middleware-retry/package.json +++ b/packages/middleware-retry/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-retry", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-retry/tsconfig.cjs.json b/packages/middleware-retry/tsconfig.cjs.json new file mode 100644 index 0000000000000..9e0850223e86d --- /dev/null +++ b/packages/middleware-retry/tsconfig.cjs.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "noUnusedLocals": true, + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-retry/tsconfig.json b/packages/middleware-retry/tsconfig.es.json similarity index 65% rename from packages/middleware-retry/tsconfig.json rename to packages/middleware-retry/tsconfig.es.json index 8070b4b742560..4fa2a1c8cebd6 100644 --- a/packages/middleware-retry/tsconfig.json +++ b/packages/middleware-retry/tsconfig.es.json @@ -1,10 +1,8 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, @@ -18,7 +16,11 @@ "es2015.symbol.wellknown" ], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/middleware-retry/tsconfig.test.json b/packages/middleware-retry/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-retry/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-api-gateway/package.json b/packages/middleware-sdk-api-gateway/package.json index 3806d51ed8435..e0ac31fcdc3ed 100644 --- a/packages/middleware-sdk-api-gateway/package.json +++ b/packages/middleware-sdk-api-gateway/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-sdk-api-gateway", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-sdk-api-gateway/tsconfig.cjs.json b/packages/middleware-sdk-api-gateway/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-sdk-api-gateway/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-api-gateway/tsconfig.es.json b/packages/middleware-sdk-api-gateway/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-sdk-api-gateway/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-api-gateway/tsconfig.json b/packages/middleware-sdk-api-gateway/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/middleware-sdk-api-gateway/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-api-gateway/tsconfig.test.json b/packages/middleware-sdk-api-gateway/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-sdk-api-gateway/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-ec2/package.json b/packages/middleware-sdk-ec2/package.json index e897a3d327279..f66e9ce3edd06 100644 --- a/packages/middleware-sdk-ec2/package.json +++ b/packages/middleware-sdk-ec2/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-sdk-ec2", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-sdk-ec2/tsconfig.cjs.json b/packages/middleware-sdk-ec2/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-sdk-ec2/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-ec2/tsconfig.es.json b/packages/middleware-sdk-ec2/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-sdk-ec2/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-ec2/tsconfig.json b/packages/middleware-sdk-ec2/tsconfig.json deleted file mode 100755 index 38b94cda274ec..0000000000000 --- a/packages/middleware-sdk-ec2/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-ec2/tsconfig.test.json b/packages/middleware-sdk-ec2/tsconfig.test.json deleted file mode 100755 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-sdk-ec2/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-glacier/package.json b/packages/middleware-sdk-glacier/package.json index e386322fada35..2ff8bb0d48e35 100644 --- a/packages/middleware-sdk-glacier/package.json +++ b/packages/middleware-sdk-glacier/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-sdk-glacier", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-sdk-glacier/tsconfig.cjs.json b/packages/middleware-sdk-glacier/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b7f6c6e72bb8 --- /dev/null +++ b/packages/middleware-sdk-glacier/tsconfig.cjs.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-glacier/tsconfig.es.json b/packages/middleware-sdk-glacier/tsconfig.es.json new file mode 100644 index 0000000000000..35151692ffd04 --- /dev/null +++ b/packages/middleware-sdk-glacier/tsconfig.es.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-glacier/tsconfig.json b/packages/middleware-sdk-glacier/tsconfig.json deleted file mode 100644 index d34b347073161..0000000000000 --- a/packages/middleware-sdk-glacier/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "dom", - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-glacier/tsconfig.test.json b/packages/middleware-sdk-glacier/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-sdk-glacier/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-machinelearning/package.json b/packages/middleware-sdk-machinelearning/package.json index f35f3f9656323..9b2714c1e28f1 100644 --- a/packages/middleware-sdk-machinelearning/package.json +++ b/packages/middleware-sdk-machinelearning/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-sdk-machinelearning", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-sdk-machinelearning/tsconfig.cjs.json b/packages/middleware-sdk-machinelearning/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-sdk-machinelearning/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-machinelearning/tsconfig.es.json b/packages/middleware-sdk-machinelearning/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-sdk-machinelearning/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-machinelearning/tsconfig.json b/packages/middleware-sdk-machinelearning/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/middleware-sdk-machinelearning/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-machinelearning/tsconfig.test.json b/packages/middleware-sdk-machinelearning/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-sdk-machinelearning/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-rds/package.json b/packages/middleware-sdk-rds/package.json index df795f8f06c7b..98ce5967e92cb 100644 --- a/packages/middleware-sdk-rds/package.json +++ b/packages/middleware-sdk-rds/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-sdk-rds", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-sdk-rds/tsconfig.cjs.json b/packages/middleware-sdk-rds/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-sdk-rds/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-rds/tsconfig.es.json b/packages/middleware-sdk-rds/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-sdk-rds/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-rds/tsconfig.json b/packages/middleware-sdk-rds/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/middleware-sdk-rds/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-rds/tsconfig.test.json b/packages/middleware-sdk-rds/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-sdk-rds/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-route53/package.json b/packages/middleware-sdk-route53/package.json index df1dfe98f4c8a..4d4838976254c 100644 --- a/packages/middleware-sdk-route53/package.json +++ b/packages/middleware-sdk-route53/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-sdk-route53", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-sdk-route53/tsconfig.cjs.json b/packages/middleware-sdk-route53/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-sdk-route53/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-route53/tsconfig.es.json b/packages/middleware-sdk-route53/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-sdk-route53/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-route53/tsconfig.json b/packages/middleware-sdk-route53/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/middleware-sdk-route53/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-route53/tsconfig.test.json b/packages/middleware-sdk-route53/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-sdk-route53/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-s3-control/package.json b/packages/middleware-sdk-s3-control/package.json index 00c074e940224..793dc02929149 100644 --- a/packages/middleware-sdk-s3-control/package.json +++ b/packages/middleware-sdk-s3-control/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-sdk-s3-control", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-sdk-s3-control/tsconfig.cjs.json b/packages/middleware-sdk-s3-control/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-sdk-s3-control/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-s3-control/tsconfig.es.json b/packages/middleware-sdk-s3-control/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-sdk-s3-control/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-s3-control/tsconfig.json b/packages/middleware-sdk-s3-control/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/middleware-sdk-s3-control/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-s3-control/tsconfig.test.json b/packages/middleware-sdk-s3-control/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-sdk-s3-control/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-s3/package.json b/packages/middleware-sdk-s3/package.json index 3a7c676ad68ea..3b6c92cf57c9a 100644 --- a/packages/middleware-sdk-s3/package.json +++ b/packages/middleware-sdk-s3/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-sdk-s3", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-sdk-s3/tsconfig.cjs.json b/packages/middleware-sdk-s3/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-sdk-s3/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-s3/tsconfig.es.json b/packages/middleware-sdk-s3/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-sdk-s3/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-s3/tsconfig.test.json b/packages/middleware-sdk-s3/tsconfig.test.json deleted file mode 100644 index 57f7d5b140803..0000000000000 --- a/packages/middleware-sdk-s3/tsconfig.test.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build" - } -} diff --git a/packages/middleware-sdk-sqs/package.json b/packages/middleware-sdk-sqs/package.json index 2825505651e7f..564477f48df5b 100644 --- a/packages/middleware-sdk-sqs/package.json +++ b/packages/middleware-sdk-sqs/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-sdk-sqs", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-sdk-sqs/tsconfig.cjs.json b/packages/middleware-sdk-sqs/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-sdk-sqs/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-sqs/tsconfig.es.json b/packages/middleware-sdk-sqs/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-sdk-sqs/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-sdk-sqs/tsconfig.json b/packages/middleware-sdk-sqs/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/middleware-sdk-sqs/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-sqs/tsconfig.test.json b/packages/middleware-sdk-sqs/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-sdk-sqs/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-sdk-transcribe-streaming/package.json b/packages/middleware-sdk-transcribe-streaming/package.json index e31d35991f9cb..dd2aa61502f2a 100644 --- a/packages/middleware-sdk-transcribe-streaming/package.json +++ b/packages/middleware-sdk-transcribe-streaming/package.json @@ -3,15 +3,15 @@ "version": "1.0.0-gamma.0", "main": "./dist/cjs/index.js", "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "scripts": { - "build:cjs": "tsc -p tsconfig.json", + "build:cjs": "tsc -p tsconfig.cjs.json", "build:es": "tsc -p tsconfig.es.json", "build": "yarn build:es && yarn build:cjs", "prepublishOnly": "yarn build", "pretest": "yarn build", "test": "jest --passWithNoTests" }, - "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-sdk-transcribe-streaming/tsconfig.json b/packages/middleware-sdk-transcribe-streaming/tsconfig.cjs.json similarity index 74% rename from packages/middleware-sdk-transcribe-streaming/tsconfig.json rename to packages/middleware-sdk-transcribe-streaming/tsconfig.cjs.json index 551f36accf08b..f993d6309bd55 100644 --- a/packages/middleware-sdk-transcribe-streaming/tsconfig.json +++ b/packages/middleware-sdk-transcribe-streaming/tsconfig.cjs.json @@ -1,7 +1,5 @@ { "compilerOptions": { - "target": "es2017", - "module": "commonjs", "declaration": true, "lib": ["DOM"], "sourceMap": true, @@ -11,6 +9,8 @@ "outDir": "./dist/cjs", "importHelpers": true, "noEmitHelpers": true, - "incremental": true - } + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] } diff --git a/packages/middleware-sdk-transcribe-streaming/tsconfig.es.json b/packages/middleware-sdk-transcribe-streaming/tsconfig.es.json index 8bacf65d673d4..f88cd41045472 100644 --- a/packages/middleware-sdk-transcribe-streaming/tsconfig.es.json +++ b/packages/middleware-sdk-transcribe-streaming/tsconfig.es.json @@ -1,11 +1,7 @@ { - "extends": "./tsconfig.json", "compilerOptions": { - "target": "ES2015", - "module": "esNext", - "moduleResolution": "node", - "lib": ["es5", "es2015.promise", "es2015.collection", "DOM"], "declaration": true, + "lib": ["es5", "es2015.promise", "es2015.collection", "DOM"], "sourceMap": true, "strict": true, "stripInternal": true, @@ -13,6 +9,12 @@ "outDir": "./dist/es", "importHelpers": true, "noEmitHelpers": true, + "baseUrl": ".", + "target": "ES2015", + "module": "esNext", + "moduleResolution": "node", "incremental": true - } + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/middleware-serde/package.json b/packages/middleware-serde/package.json index f35199743649c..37b15775b6af5 100644 --- a/packages/middleware-serde/package.json +++ b/packages/middleware-serde/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-serde", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-serde/tsconfig.cjs.json b/packages/middleware-serde/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-serde/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-serde/tsconfig.es.json b/packages/middleware-serde/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-serde/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-serde/tsconfig.json b/packages/middleware-serde/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/middleware-serde/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-serde/tsconfig.test.json b/packages/middleware-serde/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-serde/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-signing/package.json b/packages/middleware-signing/package.json index fb6f7089a0029..a52916212942e 100644 --- a/packages/middleware-signing/package.json +++ b/packages/middleware-signing/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-signing", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-signing/tsconfig.cjs.json b/packages/middleware-signing/tsconfig.cjs.json new file mode 100644 index 0000000000000..dbf3678f2c00f --- /dev/null +++ b/packages/middleware-signing/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-signing/tsconfig.es.json b/packages/middleware-signing/tsconfig.es.json new file mode 100644 index 0000000000000..58023c506f1a9 --- /dev/null +++ b/packages/middleware-signing/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-signing/tsconfig.json b/packages/middleware-signing/tsconfig.json deleted file mode 100644 index ea8af88585557..0000000000000 --- a/packages/middleware-signing/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/middleware-signing/tsconfig.test.json b/packages/middleware-signing/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-signing/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-ssec/package.json b/packages/middleware-ssec/package.json index 1feeb87d9add2..35b2213c832ea 100644 --- a/packages/middleware-ssec/package.json +++ b/packages/middleware-ssec/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-ssec", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-ssec/tsconfig.cjs.json b/packages/middleware-ssec/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-ssec/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-ssec/tsconfig.es.json b/packages/middleware-ssec/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-ssec/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-ssec/tsconfig.json b/packages/middleware-ssec/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/middleware-ssec/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-ssec/tsconfig.test.json b/packages/middleware-ssec/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-ssec/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-stack/package.json b/packages/middleware-stack/package.json index f5e2a6c3458de..5abb675cecb07 100644 --- a/packages/middleware-stack/package.json +++ b/packages/middleware-stack/package.json @@ -3,8 +3,10 @@ "version": "1.0.0-gamma.1", "description": "Provides a means for composing multiple middleware functions into a single handler", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "author": { @@ -13,8 +15,9 @@ "url": "https://aws.amazon.com/javascript/" }, "license": "Apache-2.0", - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "dependencies": { "@aws-sdk/types": "1.0.0-gamma.1", "tslib": "^1.8.0" diff --git a/packages/middleware-stack/tsconfig.cjs.json b/packages/middleware-stack/tsconfig.cjs.json new file mode 100644 index 0000000000000..32fb42d0aaade --- /dev/null +++ b/packages/middleware-stack/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "lib": ["es5", "es2015.promise", "es2015.collection"], + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-stack/tsconfig.json b/packages/middleware-stack/tsconfig.es.json similarity index 52% rename from packages/middleware-stack/tsconfig.json rename to packages/middleware-stack/tsconfig.es.json index b477606bf9abd..5c5cba2f486f1 100644 --- a/packages/middleware-stack/tsconfig.json +++ b/packages/middleware-stack/tsconfig.es.json @@ -1,15 +1,17 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "lib": ["es5", "es2015.promise", "es2015.collection"], "rootDir": "./src", - "outDir": "./build", + "outDir": "./dist/es", "importHelpers": true, "noEmitHelpers": true, - "incremental": true - } + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/middleware-stack/tsconfig.test.json b/packages/middleware-stack/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-stack/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-user-agent/package.json b/packages/middleware-user-agent/package.json index cfd7d9026f94a..be62f987b89d6 100644 --- a/packages/middleware-user-agent/package.json +++ b/packages/middleware-user-agent/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/middleware-user-agent", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest --passWithNoTests" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/middleware-user-agent/tsconfig.cjs.json b/packages/middleware-user-agent/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/middleware-user-agent/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/middleware-user-agent/tsconfig.es.json b/packages/middleware-user-agent/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/middleware-user-agent/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/middleware-user-agent/tsconfig.json b/packages/middleware-user-agent/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/middleware-user-agent/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/middleware-user-agent/tsconfig.test.json b/packages/middleware-user-agent/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/middleware-user-agent/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/node-http-handler/package.json b/packages/node-http-handler/package.json index 0818310cfe669..fea1e68550266 100644 --- a/packages/node-http-handler/package.json +++ b/packages/node-http-handler/package.json @@ -3,8 +3,10 @@ "version": "1.0.0-gamma.1", "description": "Provides a way to make requests", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest --coverage" }, "author": { @@ -13,8 +15,9 @@ "url": "https://aws.amazon.com/javascript/" }, "license": "Apache-2.0", - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "dependencies": { "@aws-sdk/abort-controller": "1.0.0-gamma.1", "@aws-sdk/protocol-http": "1.0.0-gamma.1", diff --git a/packages/node-http-handler/src/server.mock.ts b/packages/node-http-handler/src/server.mock.ts index 58ed7430be822..b2f88622f9a00 100644 --- a/packages/node-http-handler/src/server.mock.ts +++ b/packages/node-http-handler/src/server.mock.ts @@ -15,7 +15,7 @@ import { Readable } from "stream"; import { HttpResponse } from "@aws-sdk/types"; -const fixturesDir = join(__dirname, "..", "fixtures"); +const fixturesDir = join(__dirname, "../..", "fixtures"); export function createResponseFunction(httpResp: HttpResponse) { return function (request: IncomingMessage, response: ServerResponse) { diff --git a/packages/node-http-handler/tsconfig.cjs.json b/packages/node-http-handler/tsconfig.cjs.json new file mode 100644 index 0000000000000..881d34034c40f --- /dev/null +++ b/packages/node-http-handler/tsconfig.cjs.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "noEmitHelpers": true, + "importHelpers": true, + "lib": ["es5", "es2015.promise", "es2015.iterable"], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/node-http-handler/tsconfig.json b/packages/node-http-handler/tsconfig.es.json similarity index 55% rename from packages/node-http-handler/tsconfig.json rename to packages/node-http-handler/tsconfig.es.json index e1413b6faf619..5dc2dbd22f09b 100644 --- a/packages/node-http-handler/tsconfig.json +++ b/packages/node-http-handler/tsconfig.es.json @@ -1,16 +1,18 @@ { "compilerOptions": { - "target": "es2017", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "noEmitHelpers": true, "importHelpers": true, "lib": ["es5", "es2015.promise", "es2015.iterable"], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/node-http-handler/tsconfig.test.json b/packages/node-http-handler/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/node-http-handler/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/property-provider/package.json b/packages/property-provider/package.json index 2cb6586b3eb61..128ac96f906f7 100644 --- a/packages/property-provider/package.json +++ b/packages/property-provider/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/property-provider", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/property-provider/tsconfig.cjs.json b/packages/property-provider/tsconfig.cjs.json new file mode 100644 index 0000000000000..dbf3678f2c00f --- /dev/null +++ b/packages/property-provider/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/property-provider/tsconfig.es.json b/packages/property-provider/tsconfig.es.json new file mode 100644 index 0000000000000..58023c506f1a9 --- /dev/null +++ b/packages/property-provider/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/property-provider/tsconfig.json b/packages/property-provider/tsconfig.json deleted file mode 100644 index ea8af88585557..0000000000000 --- a/packages/property-provider/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/property-provider/tsconfig.test.json b/packages/property-provider/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/property-provider/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/protocol-http/package.json b/packages/protocol-http/package.json index 7dde2616c2b92..ab99d24a791f9 100644 --- a/packages/protocol-http/package.json +++ b/packages/protocol-http/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/protocol-http", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "email": "", diff --git a/packages/protocol-http/tsconfig.cjs.json b/packages/protocol-http/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b7f6c6e72bb8 --- /dev/null +++ b/packages/protocol-http/tsconfig.cjs.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/protocol-http/tsconfig.es.json b/packages/protocol-http/tsconfig.es.json new file mode 100644 index 0000000000000..35151692ffd04 --- /dev/null +++ b/packages/protocol-http/tsconfig.es.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/protocol-http/tsconfig.json b/packages/protocol-http/tsconfig.json deleted file mode 100644 index d34b347073161..0000000000000 --- a/packages/protocol-http/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "dom", - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/protocol-http/tsconfig.test.json b/packages/protocol-http/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/protocol-http/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/querystring-builder/package.json b/packages/querystring-builder/package.json index 99a32ec4eea55..467cd7c9bbca4 100644 --- a/packages/querystring-builder/package.json +++ b/packages/querystring-builder/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/querystring-builder", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/querystring-builder/tsconfig.cjs.json b/packages/querystring-builder/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/querystring-builder/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/querystring-builder/tsconfig.es.json b/packages/querystring-builder/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/querystring-builder/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/querystring-builder/tsconfig.json b/packages/querystring-builder/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/querystring-builder/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/querystring-builder/tsconfig.test.json b/packages/querystring-builder/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/querystring-builder/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/querystring-parser/package.json b/packages/querystring-parser/package.json index a3ae16e0b412a..589fdba1c670f 100644 --- a/packages/querystring-parser/package.json +++ b/packages/querystring-parser/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/querystring-parser", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/querystring-parser/tsconfig.cjs.json b/packages/querystring-parser/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/querystring-parser/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/querystring-parser/tsconfig.es.json b/packages/querystring-parser/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/querystring-parser/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/querystring-parser/tsconfig.json b/packages/querystring-parser/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/querystring-parser/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/querystring-parser/tsconfig.test.json b/packages/querystring-parser/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/querystring-parser/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/region-provider/package.json b/packages/region-provider/package.json index e1c6840783aad..1b4b161238881 100644 --- a/packages/region-provider/package.json +++ b/packages/region-provider/package.json @@ -2,11 +2,14 @@ "name": "@aws-sdk/region-provider", "version": "1.0.0-gamma.1", "description": "AWS region provider for Node.JS. Will determine the default region to use for AWS clients by checking known environment variables and shared configuration files", - "main": "./build/index.js", - "typings": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "keywords": [ diff --git a/packages/region-provider/tsconfig.cjs.json b/packages/region-provider/tsconfig.cjs.json new file mode 100644 index 0000000000000..dbf3678f2c00f --- /dev/null +++ b/packages/region-provider/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/region-provider/tsconfig.es.json b/packages/region-provider/tsconfig.es.json new file mode 100644 index 0000000000000..58023c506f1a9 --- /dev/null +++ b/packages/region-provider/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/region-provider/tsconfig.json b/packages/region-provider/tsconfig.json deleted file mode 100644 index ea8af88585557..0000000000000 --- a/packages/region-provider/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/region-provider/tsconfig.test.json b/packages/region-provider/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/region-provider/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/retry-config-provider/package.json b/packages/retry-config-provider/package.json index 954d3301a83ed..aedb1ef0fce01 100644 --- a/packages/retry-config-provider/package.json +++ b/packages/retry-config-provider/package.json @@ -2,11 +2,14 @@ "name": "@aws-sdk/retry-config-provider", "version": "1.0.0-gamma.0", "description": "AWS retry configuration provider for Node.JS. Will determine the default retry configuration to use for AWS clients by checking known environment variables and shared configuration files", - "main": "./build/index.js", - "typings": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "keywords": [ diff --git a/packages/retry-config-provider/tsconfig.cjs.json b/packages/retry-config-provider/tsconfig.cjs.json new file mode 100644 index 0000000000000..dbf3678f2c00f --- /dev/null +++ b/packages/retry-config-provider/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/retry-config-provider/tsconfig.es.json b/packages/retry-config-provider/tsconfig.es.json new file mode 100644 index 0000000000000..58023c506f1a9 --- /dev/null +++ b/packages/retry-config-provider/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/retry-config-provider/tsconfig.json b/packages/retry-config-provider/tsconfig.json deleted file mode 100644 index ea8af88585557..0000000000000 --- a/packages/retry-config-provider/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/retry-config-provider/tsconfig.test.json b/packages/retry-config-provider/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/retry-config-provider/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/s3-request-presigner/package.json b/packages/s3-request-presigner/package.json index d5eca5c231490..09fe312d6263e 100644 --- a/packages/s3-request-presigner/package.json +++ b/packages/s3-request-presigner/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/s3-request-presigner", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/s3-request-presigner/tsconfig.cjs.json b/packages/s3-request-presigner/tsconfig.cjs.json new file mode 100644 index 0000000000000..04e4c1d145652 --- /dev/null +++ b/packages/s3-request-presigner/tsconfig.cjs.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown", + "dom" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/s3-request-presigner/tsconfig.json b/packages/s3-request-presigner/tsconfig.es.json similarity index 63% rename from packages/s3-request-presigner/tsconfig.json rename to packages/s3-request-presigner/tsconfig.es.json index 7f807f5532acb..c1262d98b3b66 100644 --- a/packages/s3-request-presigner/tsconfig.json +++ b/packages/s3-request-presigner/tsconfig.es.json @@ -1,10 +1,8 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, @@ -17,7 +15,11 @@ "dom" ], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/s3-request-presigner/tsconfig.test.json b/packages/s3-request-presigner/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/s3-request-presigner/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/service-error-classification/package.json b/packages/service-error-classification/package.json index 56623b99acc23..46aae2357cc3f 100644 --- a/packages/service-error-classification/package.json +++ b/packages/service-error-classification/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/service-error-classification", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/service-error-classification/tsconfig.cjs.json b/packages/service-error-classification/tsconfig.cjs.json new file mode 100644 index 0000000000000..ae72d093e6645 --- /dev/null +++ b/packages/service-error-classification/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "noUnusedLocals": true, + "lib": ["es5", "es2015.collection", "es2015.iterable"], + "rootDir": "./src", + "outDir": "./dist/cjs", + "downlevelIteration": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/service-error-classification/tsconfig.es.json b/packages/service-error-classification/tsconfig.es.json new file mode 100644 index 0000000000000..428075a1e7ad3 --- /dev/null +++ b/packages/service-error-classification/tsconfig.es.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "noUnusedLocals": true, + "lib": ["es5", "es2015.collection", "es2015.iterable"], + "rootDir": "./src", + "outDir": "./dist/es", + "downlevelIteration": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/service-error-classification/tsconfig.json b/packages/service-error-classification/tsconfig.json deleted file mode 100644 index 231c372b2d902..0000000000000 --- a/packages/service-error-classification/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "noUnusedLocals": true, - "lib": ["es5", "es2015.collection", "es2015.iterable"], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/service-error-classification/tsconfig.test.json b/packages/service-error-classification/tsconfig.test.json deleted file mode 100644 index c386062f2c748..0000000000000 --- a/packages/service-error-classification/tsconfig.test.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "downlevelIteration": true, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/sha256-tree-hash/package.json b/packages/sha256-tree-hash/package.json index 8a04b12ab6cf1..b2b9271011137 100644 --- a/packages/sha256-tree-hash/package.json +++ b/packages/sha256-tree-hash/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/sha256-tree-hash", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/sha256-tree-hash/tsconfig.cjs.json b/packages/sha256-tree-hash/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b7f6c6e72bb8 --- /dev/null +++ b/packages/sha256-tree-hash/tsconfig.cjs.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/sha256-tree-hash/tsconfig.es.json b/packages/sha256-tree-hash/tsconfig.es.json new file mode 100644 index 0000000000000..35151692ffd04 --- /dev/null +++ b/packages/sha256-tree-hash/tsconfig.es.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/sha256-tree-hash/tsconfig.json b/packages/sha256-tree-hash/tsconfig.json deleted file mode 100644 index d34b347073161..0000000000000 --- a/packages/sha256-tree-hash/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "dom", - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/sha256-tree-hash/tsconfig.test.json b/packages/sha256-tree-hash/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/sha256-tree-hash/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/shared-ini-file-loader/package.json b/packages/shared-ini-file-loader/package.json index e841b59ed6641..89c5c25a00700 100644 --- a/packages/shared-ini-file-loader/package.json +++ b/packages/shared-ini-file-loader/package.json @@ -11,8 +11,10 @@ "typescript": "~3.8.3" }, "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "author": { @@ -20,6 +22,7 @@ "url": "https://aws.amazon.com/javascript/" }, "license": "Apache-2.0", - "main": "./build/index.js", - "types": "./build/index.d.ts" + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts" } diff --git a/packages/shared-ini-file-loader/tsconfig.cjs.json b/packages/shared-ini-file-loader/tsconfig.cjs.json new file mode 100644 index 0000000000000..6406600cc66ac --- /dev/null +++ b/packages/shared-ini-file-loader/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "strict": true, + "sourceMap": false, + "declaration": true, + "lib": ["es5", "es2015.promise", "es2015.collection"], + "sourceRoot": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/shared-ini-file-loader/tsconfig.es.json b/packages/shared-ini-file-loader/tsconfig.es.json new file mode 100644 index 0000000000000..619e0db0cdee9 --- /dev/null +++ b/packages/shared-ini-file-loader/tsconfig.es.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "strict": true, + "sourceMap": false, + "declaration": true, + "lib": ["es5", "es2015.promise", "es2015.collection"], + "sourceRoot": "./src", + "outDir": "./dist/es", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/shared-ini-file-loader/tsconfig.json b/packages/shared-ini-file-loader/tsconfig.json deleted file mode 100644 index ff7a5bbbf6185..0000000000000 --- a/packages/shared-ini-file-loader/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "strict": true, - "sourceMap": true, - "declaration": true, - "lib": ["es5", "es2015.promise", "es2015.collection"], - "sourceRoot": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/shared-ini-file-loader/tsconfig.test.json b/packages/shared-ini-file-loader/tsconfig.test.json deleted file mode 100644 index c5ce824ff9a13..0000000000000 --- a/packages/shared-ini-file-loader/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "sourceRoot": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/signature-v4/package.json b/packages/signature-v4/package.json index c0f965ad12f47..ecf12c18af1c1 100644 --- a/packages/signature-v4/package.json +++ b/packages/signature-v4/package.json @@ -4,8 +4,9 @@ "description": "A standalone implementation of the AWS Signature V4 request signing algorithm", "main": "./dist/cjs/index.js", "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "scripts": { - "build:cjs": "tsc -p tsconfig.json", + "build:cjs": "tsc -p tsconfig.cjs.json", "build:es": "tsc -p tsconfig.es.json", "build": "yarn build:es && yarn build:cjs", "prepublishOnly": "yarn build", @@ -31,6 +32,5 @@ "@types/jest": "^25.1.4", "jest": "^25.1.0", "typescript": "~3.8.3" - }, - "types": "./dist/cjs/index.d.ts" + } } diff --git a/packages/signature-v4/tsconfig.json b/packages/signature-v4/tsconfig.cjs.json similarity index 74% rename from packages/signature-v4/tsconfig.json rename to packages/signature-v4/tsconfig.cjs.json index 52a212645cb64..7dfb6d9715c32 100644 --- a/packages/signature-v4/tsconfig.json +++ b/packages/signature-v4/tsconfig.cjs.json @@ -1,7 +1,5 @@ { "compilerOptions": { - "target": "es2017", - "module": "commonjs", "declaration": true, "sourceMap": true, "strict": true, @@ -11,6 +9,8 @@ "importHelpers": true, "noEmitHelpers": true, "noUnusedLocals": true, - "incremental": true - } + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] } diff --git a/packages/signature-v4/tsconfig.es.json b/packages/signature-v4/tsconfig.es.json index b2a8d5451ea63..9a92585e29384 100644 --- a/packages/signature-v4/tsconfig.es.json +++ b/packages/signature-v4/tsconfig.es.json @@ -1,10 +1,5 @@ { - "extends": "./tsconfig.json", "compilerOptions": { - "target": "es5", - "module": "esNext", - "moduleResolution": "node", - "lib": ["es5", "es2015.promise", "es2015.collection"], "declaration": true, "sourceMap": true, "strict": true, @@ -14,6 +9,13 @@ "importHelpers": true, "noEmitHelpers": true, "noUnusedLocals": true, + "baseUrl": ".", + "target": "es5", + "module": "esNext", + "moduleResolution": "node", + "lib": ["es5", "es2015.promise", "es2015.collection"], "incremental": true - } + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/smithy-client/package.json b/packages/smithy-client/package.json index b0f4ceb529c07..d1d20d52c6207 100644 --- a/packages/smithy-client/package.json +++ b/packages/smithy-client/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/smithy-client", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest --passWithNoTests" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/md5-js/tsconfig.json b/packages/smithy-client/tsconfig.cjs.json similarity index 60% rename from packages/md5-js/tsconfig.json rename to packages/smithy-client/tsconfig.cjs.json index 853a177369666..fcabfc7935ed2 100644 --- a/packages/md5-js/tsconfig.json +++ b/packages/smithy-client/tsconfig.cjs.json @@ -1,13 +1,12 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, + "noUnusedLocals": true, "lib": [ "es5", "es2015.promise", @@ -16,9 +15,11 @@ "es2015.symbol.wellknown" ], "rootDir": "./src", - "outDir": "./build", - "incremental": true + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." }, - "exclude": ["./src/**/*.spec.ts", "./build/**"], - "include": ["./src/**/*.ts"] + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] } diff --git a/packages/smithy-client/tsconfig.json b/packages/smithy-client/tsconfig.es.json similarity index 64% rename from packages/smithy-client/tsconfig.json rename to packages/smithy-client/tsconfig.es.json index 28c8abe6f6dcb..af82260ead508 100644 --- a/packages/smithy-client/tsconfig.json +++ b/packages/smithy-client/tsconfig.es.json @@ -1,10 +1,8 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, @@ -17,7 +15,11 @@ "es2015.symbol.wellknown" ], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/smithy-client/tsconfig.test.json b/packages/smithy-client/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/smithy-client/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/types/package.json b/packages/types/package.json index 426a97843fb8e..b8a9ac5196345 100755 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,20 +1,22 @@ { "name": "@aws-sdk/types", "version": "1.0.0-gamma.1", - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "description": "Types for the AWS SDK", "devDependencies": { "typescript": "~3.8.3" }, "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "exit 0" }, "author": { "name": "AWS SDK for JavaScript Team", - "email": "", "url": "https://aws.amazon.com/javascript/" }, "license": "Apache-2.0" diff --git a/packages/middleware-sdk-s3/tsconfig.json b/packages/types/tsconfig.cjs.json similarity index 56% rename from packages/middleware-sdk-s3/tsconfig.json rename to packages/types/tsconfig.cjs.json index 3b158f68b794d..e7f0ce81337c0 100644 --- a/packages/middleware-sdk-s3/tsconfig.json +++ b/packages/types/tsconfig.cjs.json @@ -1,13 +1,5 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, "lib": [ "es5", "es2015.promise", @@ -15,7 +7,12 @@ "es2015.iterable", "es2015.symbol.wellknown" ], + "strict": true, + "declaration": true, "rootDir": "./src", - "outDir": "./build" - } + "outDir": "./dist/cjs", + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] } diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.es.json old mode 100755 new mode 100644 similarity index 67% rename from packages/types/tsconfig.json rename to packages/types/tsconfig.es.json index 11a86f9444024..12d8086d2f19f --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.es.json @@ -1,7 +1,5 @@ { "compilerOptions": { - "module": "commonjs", - "target": "es5", "lib": [ "es5", "es2015.promise", @@ -12,7 +10,9 @@ "strict": true, "declaration": true, "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/url-parser-browser/package.json b/packages/url-parser-browser/package.json index 3a4d35fa406f7..9dd68ab1fae40 100644 --- a/packages/url-parser-browser/package.json +++ b/packages/url-parser-browser/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/url-parser-browser", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/url-parser-browser/tsconfig.cjs.json b/packages/url-parser-browser/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b7f6c6e72bb8 --- /dev/null +++ b/packages/url-parser-browser/tsconfig.cjs.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/url-parser-browser/tsconfig.es.json b/packages/url-parser-browser/tsconfig.es.json new file mode 100644 index 0000000000000..35151692ffd04 --- /dev/null +++ b/packages/url-parser-browser/tsconfig.es.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/url-parser-browser/tsconfig.json b/packages/url-parser-browser/tsconfig.json deleted file mode 100644 index d34b347073161..0000000000000 --- a/packages/url-parser-browser/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "dom", - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/url-parser-browser/tsconfig.test.json b/packages/url-parser-browser/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/url-parser-browser/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/url-parser-node/package.json b/packages/url-parser-node/package.json index 40ca9f5d5c378..1687a6c5d53b5 100644 --- a/packages/url-parser-node/package.json +++ b/packages/url-parser-node/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/url-parser-node", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/url-parser-node/tsconfig.cjs.json b/packages/url-parser-node/tsconfig.cjs.json new file mode 100644 index 0000000000000..53c202090f631 --- /dev/null +++ b/packages/url-parser-node/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/url-parser-node/tsconfig.es.json b/packages/url-parser-node/tsconfig.es.json new file mode 100644 index 0000000000000..3b273a6b62373 --- /dev/null +++ b/packages/url-parser-node/tsconfig.es.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/url-parser-node/tsconfig.json b/packages/url-parser-node/tsconfig.json deleted file mode 100644 index bafa90138733d..0000000000000 --- a/packages/url-parser-node/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "target": "es2017", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/url-parser-node/tsconfig.test.json b/packages/url-parser-node/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/url-parser-node/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-base64-browser/package.json b/packages/util-base64-browser/package.json index a04ed06a57805..87082a2a24d6d 100644 --- a/packages/util-base64-browser/package.json +++ b/packages/util-base64-browser/package.json @@ -2,10 +2,13 @@ "name": "@aws-sdk/util-base64-browser", "version": "1.0.0-gamma.1", "description": "A pure JS Base64 <-> UInt8Array converter", - "main": "./build/index.js", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "author": { @@ -22,5 +25,5 @@ "jest": "^25.1.0", "typescript": "~3.8.3" }, - "types": "./build/index.d.ts" + "types": "./dist/cjs/index.d.ts" } diff --git a/packages/util-base64-browser/tsconfig.cjs.json b/packages/util-base64-browser/tsconfig.cjs.json new file mode 100644 index 0000000000000..237e6076b659c --- /dev/null +++ b/packages/util-base64-browser/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "sourceMap": false, + "strict": true, + "lib": ["es5", "es2015.collection"], + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/util-base64-browser/tsconfig.es.json b/packages/util-base64-browser/tsconfig.es.json new file mode 100644 index 0000000000000..859a054c3beed --- /dev/null +++ b/packages/util-base64-browser/tsconfig.es.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "sourceMap": false, + "strict": true, + "lib": ["es5", "es2015.collection"], + "rootDir": "./src", + "outDir": "./dist/es", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/util-base64-browser/tsconfig.json b/packages/util-base64-browser/tsconfig.json deleted file mode 100644 index afc8c8ab5dc29..0000000000000 --- a/packages/util-base64-browser/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "sourceMap": true, - "strict": true, - "lib": ["es5", "es2015.collection"], - "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/util-base64-browser/tsconfig.test.json b/packages/util-base64-browser/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/util-base64-browser/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-base64-node/package.json b/packages/util-base64-node/package.json index e52a0259965ae..c4ac133224000 100644 --- a/packages/util-base64-node/package.json +++ b/packages/util-base64-node/package.json @@ -2,10 +2,13 @@ "name": "@aws-sdk/util-base64-node", "version": "1.0.0-gamma.1", "description": "A Node.JS Base64 <-> UInt8Array converter", - "main": "./build/index.js", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "author": { @@ -23,5 +26,5 @@ "jest": "^25.1.0", "typescript": "~3.8.3" }, - "types": "./build/index.d.ts" + "types": "./dist/cjs/index.d.ts" } diff --git a/packages/util-base64-node/tsconfig.cjs.json b/packages/util-base64-node/tsconfig.cjs.json new file mode 100644 index 0000000000000..09336eddda194 --- /dev/null +++ b/packages/util-base64-node/tsconfig.cjs.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "declaration": true, + "sourceMap": false, + "strict": true, + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/util-base64-node/tsconfig.es.json b/packages/util-base64-node/tsconfig.es.json new file mode 100644 index 0000000000000..d0d56774aebda --- /dev/null +++ b/packages/util-base64-node/tsconfig.es.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "declaration": true, + "sourceMap": false, + "strict": true, + "rootDir": "./src", + "outDir": "./dist/es", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/util-base64-node/tsconfig.json b/packages/util-base64-node/tsconfig.json deleted file mode 100644 index 52457e6ebeef6..0000000000000 --- a/packages/util-base64-node/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "compilerOptions": { - "target": "es2017", - "module": "commonjs", - "declaration": true, - "sourceMap": true, - "strict": true, - "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/util-base64-node/tsconfig.test.json b/packages/util-base64-node/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/util-base64-node/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-body-length-browser/package.json b/packages/util-body-length-browser/package.json index 04414da2063f1..d7bb414a89ef0 100644 --- a/packages/util-body-length-browser/package.json +++ b/packages/util-body-length-browser/package.json @@ -3,12 +3,15 @@ "description": "Determines the length of a request body in browsers", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/util-body-length-browser/tsconfig.cjs.json b/packages/util-body-length-browser/tsconfig.cjs.json new file mode 100644 index 0000000000000..4f866fdf86fb1 --- /dev/null +++ b/packages/util-body-length-browser/tsconfig.cjs.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown", + "dom" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/util-body-length-browser/tsconfig.json b/packages/util-body-length-browser/tsconfig.es.json similarity index 63% rename from packages/util-body-length-browser/tsconfig.json rename to packages/util-body-length-browser/tsconfig.es.json index 4fe7c1e7a45f4..ff0f614368ce7 100644 --- a/packages/util-body-length-browser/tsconfig.json +++ b/packages/util-body-length-browser/tsconfig.es.json @@ -1,10 +1,8 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "lib": [ "es5", @@ -15,9 +13,13 @@ "dom" ], "rootDir": "./src", - "outDir": "./build", + "outDir": "./dist/es", "importHelpers": true, "noEmitHelpers": true, - "incremental": true - } + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/util-body-length-browser/tsconfig.test.json b/packages/util-body-length-browser/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/util-body-length-browser/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-body-length-node/package.json b/packages/util-body-length-node/package.json index 43a3f7be15fb8..a9bdfe1bffa79 100644 --- a/packages/util-body-length-node/package.json +++ b/packages/util-body-length-node/package.json @@ -3,8 +3,10 @@ "description": "Determines the length of a request body in node.js", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "devDependencies": { @@ -13,8 +15,9 @@ "jest": "^25.1.0", "typescript": "~3.8.3" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/util-body-length-node/tsconfig.cjs.json b/packages/util-body-length-node/tsconfig.cjs.json new file mode 100644 index 0000000000000..31b6b798db8f3 --- /dev/null +++ b/packages/util-body-length-node/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/util-body-length-node/tsconfig.es.json b/packages/util-body-length-node/tsconfig.es.json new file mode 100644 index 0000000000000..63f38a08c12f7 --- /dev/null +++ b/packages/util-body-length-node/tsconfig.es.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "rootDir": "./src", + "outDir": "./dist/es", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/util-body-length-node/tsconfig.json b/packages/util-body-length-node/tsconfig.json deleted file mode 100644 index 66eebccdf4d97..0000000000000 --- a/packages/util-body-length-node/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "target": "es2017", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/util-body-length-node/tsconfig.test.json b/packages/util-body-length-node/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/util-body-length-node/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-buffer-from/package.json b/packages/util-buffer-from/package.json index cd7119efc688e..fce50db5bccd2 100644 --- a/packages/util-buffer-from/package.json +++ b/packages/util-buffer-from/package.json @@ -2,8 +2,10 @@ "name": "@aws-sdk/util-buffer-from", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "author": { @@ -21,6 +23,7 @@ "jest": "^25.1.0", "typescript": "~3.8.3" }, - "main": "./build/index.js", - "types": "./build/index.d.ts" + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts" } diff --git a/packages/util-buffer-from/tsconfig.cjs.json b/packages/util-buffer-from/tsconfig.cjs.json new file mode 100644 index 0000000000000..19fcc1dafdca8 --- /dev/null +++ b/packages/util-buffer-from/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "sourceMap": false, + "strict": true, + "lib": ["es5", "es2015.collection"], + "sourceRoot": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/util-buffer-from/tsconfig.json b/packages/util-buffer-from/tsconfig.es.json similarity index 50% rename from packages/util-buffer-from/tsconfig.json rename to packages/util-buffer-from/tsconfig.es.json index 7ca3d74fa548d..9e6367d3eedf9 100644 --- a/packages/util-buffer-from/tsconfig.json +++ b/packages/util-buffer-from/tsconfig.es.json @@ -1,15 +1,17 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", "declaration": true, - "sourceMap": true, + "sourceMap": false, "strict": true, "lib": ["es5", "es2015.collection"], "sourceRoot": "./src", - "outDir": "./build", + "outDir": "./dist/es", "importHelpers": true, "noEmitHelpers": true, - "incremental": true - } + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/util-buffer-from/tsconfig.test.json b/packages/util-buffer-from/tsconfig.test.json deleted file mode 100644 index c5ce824ff9a13..0000000000000 --- a/packages/util-buffer-from/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "sourceRoot": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-create-request/package.json b/packages/util-create-request/package.json index 67fd9139b2c64..792b916a2d05b 100644 --- a/packages/util-create-request/package.json +++ b/packages/util-create-request/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/util-create-request", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/util-create-request/tsconfig.cjs.json b/packages/util-create-request/tsconfig.cjs.json new file mode 100644 index 0000000000000..b43892f84e800 --- /dev/null +++ b/packages/util-create-request/tsconfig.cjs.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "declaration": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/util-create-request/tsconfig.es.json b/packages/util-create-request/tsconfig.es.json new file mode 100644 index 0000000000000..ab7583c78ae72 --- /dev/null +++ b/packages/util-create-request/tsconfig.es.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "declaration": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/util-create-request/tsconfig.json b/packages/util-create-request/tsconfig.json deleted file mode 100644 index a78ee0126a519..0000000000000 --- a/packages/util-create-request/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-create-request/tsconfig.test.json b/packages/util-create-request/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/util-create-request/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-format-url/package.json b/packages/util-format-url/package.json index e750ff07c5479..0e04e0a458752 100644 --- a/packages/util-format-url/package.json +++ b/packages/util-format-url/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/util-format-url", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/util-format-url/tsconfig.cjs.json b/packages/util-format-url/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/util-format-url/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/util-format-url/tsconfig.es.json b/packages/util-format-url/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/util-format-url/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/util-format-url/tsconfig.json b/packages/util-format-url/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/util-format-url/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-format-url/tsconfig.test.json b/packages/util-format-url/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/util-format-url/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-hex-encoding/package.json b/packages/util-hex-encoding/package.json index 22c03bfc43de6..10f0ad9047b1f 100644 --- a/packages/util-hex-encoding/package.json +++ b/packages/util-hex-encoding/package.json @@ -3,8 +3,10 @@ "version": "1.0.0-gamma.1", "description": "Converts binary buffers to and from lowercase hexadecimal encoding", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "author": { @@ -12,7 +14,8 @@ "url": "https://aws.amazon.com/javascript/" }, "license": "Apache-2.0", - "main": "./build/index.js", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", "dependencies": { "tslib": "^1.8.0" }, @@ -21,5 +24,5 @@ "jest": "^25.1.0", "typescript": "~3.8.3" }, - "types": "./build/index.d.ts" + "types": "./dist/cjs/index.d.ts" } diff --git a/packages/util-hex-encoding/tsconfig.cjs.json b/packages/util-hex-encoding/tsconfig.cjs.json new file mode 100644 index 0000000000000..219097ec0421d --- /dev/null +++ b/packages/util-hex-encoding/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "lib": ["es5", "es2015.promise", "es2015.collection"], + "sourceRoot": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/util-hex-encoding/tsconfig.es.json b/packages/util-hex-encoding/tsconfig.es.json new file mode 100644 index 0000000000000..623d75b15c278 --- /dev/null +++ b/packages/util-hex-encoding/tsconfig.es.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "lib": ["es5", "es2015.promise", "es2015.collection"], + "sourceRoot": "./src", + "outDir": "./dist/es", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/util-hex-encoding/tsconfig.json b/packages/util-hex-encoding/tsconfig.json deleted file mode 100644 index c88e712379cb0..0000000000000 --- a/packages/util-hex-encoding/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "lib": ["es5", "es2015.promise", "es2015.collection"], - "sourceRoot": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/util-hex-encoding/tsconfig.test.json b/packages/util-hex-encoding/tsconfig.test.json deleted file mode 100644 index c5ce824ff9a13..0000000000000 --- a/packages/util-hex-encoding/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "sourceRoot": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-locate-window/package.json b/packages/util-locate-window/package.json index 180ab860b908f..c2c8a3829abf8 100644 --- a/packages/util-locate-window/package.json +++ b/packages/util-locate-window/package.json @@ -2,8 +2,10 @@ "name": "@aws-sdk/util-locate-window", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "author": { @@ -20,6 +22,7 @@ "jest": "^25.1.0", "typescript": "~3.8.3" }, - "main": "./build/index.js", - "types": "./build/index.d.ts" + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts" } diff --git a/packages/util-locate-window/tsconfig.cjs.json b/packages/util-locate-window/tsconfig.cjs.json new file mode 100644 index 0000000000000..9618856304448 --- /dev/null +++ b/packages/util-locate-window/tsconfig.cjs.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "declaration": true, + "sourceMap": false, + "noImplicitUseStrict": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "lib": ["dom", "es5", "es2015.collection"], + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/util-locate-window/tsconfig.json b/packages/util-locate-window/tsconfig.es.json similarity index 60% rename from packages/util-locate-window/tsconfig.json rename to packages/util-locate-window/tsconfig.es.json index 993e92170c7e1..04426275851e0 100644 --- a/packages/util-locate-window/tsconfig.json +++ b/packages/util-locate-window/tsconfig.es.json @@ -1,18 +1,20 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", "declaration": true, - "sourceMap": true, + "sourceMap": false, "noImplicitUseStrict": true, "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, "lib": ["dom", "es5", "es2015.collection"], "rootDir": "./src", - "outDir": "./build", + "outDir": "./dist/es", "importHelpers": true, "noEmitHelpers": true, - "incremental": true - } + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/util-locate-window/tsconfig.test.json b/packages/util-locate-window/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/util-locate-window/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-uri-escape/package.json b/packages/util-uri-escape/package.json index 5d8d9f53db255..bdf0be8326aee 100644 --- a/packages/util-uri-escape/package.json +++ b/packages/util-uri-escape/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/util-uri-escape", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/util-uri-escape/tsconfig.cjs.json b/packages/util-uri-escape/tsconfig.cjs.json new file mode 100644 index 0000000000000..5b5bee45eabf0 --- /dev/null +++ b/packages/util-uri-escape/tsconfig.cjs.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/util-uri-escape/tsconfig.es.json b/packages/util-uri-escape/tsconfig.es.json new file mode 100644 index 0000000000000..d851fa69216d5 --- /dev/null +++ b/packages/util-uri-escape/tsconfig.es.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/util-uri-escape/tsconfig.json b/packages/util-uri-escape/tsconfig.json deleted file mode 100644 index 38b94cda274ec..0000000000000 --- a/packages/util-uri-escape/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "lib": [ - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable", - "es2015.symbol.wellknown" - ], - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-uri-escape/tsconfig.test.json b/packages/util-uri-escape/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/util-uri-escape/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-user-agent-browser/package.json b/packages/util-user-agent-browser/package.json index 1299edc9d209b..bb9e868476e79 100644 --- a/packages/util-user-agent-browser/package.json +++ b/packages/util-user-agent-browser/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/util-user-agent-browser", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/util-user-agent-browser/tsconfig.cjs.json b/packages/util-user-agent-browser/tsconfig.cjs.json new file mode 100644 index 0000000000000..0001141b4be47 --- /dev/null +++ b/packages/util-user-agent-browser/tsconfig.cjs.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": ["es5", "es2015.collection", "dom"], + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/util-user-agent-browser/tsconfig.json b/packages/util-user-agent-browser/tsconfig.es.json similarity index 54% rename from packages/util-user-agent-browser/tsconfig.json rename to packages/util-user-agent-browser/tsconfig.es.json index cbdfcdf520d45..ddb703f5c8a8c 100644 --- a/packages/util-user-agent-browser/tsconfig.json +++ b/packages/util-user-agent-browser/tsconfig.es.json @@ -1,16 +1,18 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", "declaration": true, "strict": true, - "sourceMap": true, + "sourceMap": false, "downlevelIteration": true, "importHelpers": true, "noEmitHelpers": true, "lib": ["es5", "es2015.collection", "dom"], "rootDir": "./src", - "outDir": "./build", - "incremental": true - } + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] } diff --git a/packages/util-user-agent-browser/tsconfig.test.json b/packages/util-user-agent-browser/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/util-user-agent-browser/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-user-agent-node/package.json b/packages/util-user-agent-node/package.json index df23a6acc586e..ddbbe1eef3b32 100644 --- a/packages/util-user-agent-node/package.json +++ b/packages/util-user-agent-node/package.json @@ -2,12 +2,15 @@ "name": "@aws-sdk/util-user-agent-node", "version": "1.0.0-gamma.1", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" diff --git a/packages/util-user-agent-node/tsconfig.cjs.json b/packages/util-user-agent-node/tsconfig.cjs.json new file mode 100644 index 0000000000000..53c202090f631 --- /dev/null +++ b/packages/util-user-agent-node/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "rootDir": "./src", + "outDir": "./dist/cjs", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/util-user-agent-node/tsconfig.es.json b/packages/util-user-agent-node/tsconfig.es.json new file mode 100644 index 0000000000000..3b273a6b62373 --- /dev/null +++ b/packages/util-user-agent-node/tsconfig.es.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "strict": true, + "sourceMap": false, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "rootDir": "./src", + "outDir": "./dist/es", + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/util-user-agent-node/tsconfig.json b/packages/util-user-agent-node/tsconfig.json deleted file mode 100644 index bafa90138733d..0000000000000 --- a/packages/util-user-agent-node/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "target": "es2017", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "importHelpers": true, - "noEmitHelpers": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-user-agent-node/tsconfig.test.json b/packages/util-user-agent-node/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/util-user-agent-node/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-utf8-browser/package.json b/packages/util-utf8-browser/package.json index 82edc92985c9a..ec53d192e88a1 100644 --- a/packages/util-utf8-browser/package.json +++ b/packages/util-utf8-browser/package.json @@ -2,10 +2,13 @@ "name": "@aws-sdk/util-utf8-browser", "version": "1.0.0-gamma.1", "description": "A browser UTF-8 string <-> UInt8Array converter", - "main": "./build/index.js", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "author": { @@ -21,5 +24,5 @@ "jest": "^25.1.0", "typescript": "~3.8.3" }, - "types": "./build/index.d.ts" + "types": "./dist/cjs/index.d.ts" } diff --git a/packages/util-utf8-browser/tsconfig.cjs.json b/packages/util-utf8-browser/tsconfig.cjs.json new file mode 100644 index 0000000000000..237e6076b659c --- /dev/null +++ b/packages/util-utf8-browser/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "sourceMap": false, + "strict": true, + "lib": ["es5", "es2015.collection"], + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/util-utf8-browser/tsconfig.es.json b/packages/util-utf8-browser/tsconfig.es.json new file mode 100644 index 0000000000000..859a054c3beed --- /dev/null +++ b/packages/util-utf8-browser/tsconfig.es.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "declaration": true, + "sourceMap": false, + "strict": true, + "lib": ["es5", "es2015.collection"], + "rootDir": "./src", + "outDir": "./dist/es", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/util-utf8-browser/tsconfig.json b/packages/util-utf8-browser/tsconfig.json deleted file mode 100644 index afc8c8ab5dc29..0000000000000 --- a/packages/util-utf8-browser/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "sourceMap": true, - "strict": true, - "lib": ["es5", "es2015.collection"], - "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/util-utf8-browser/tsconfig.test.json b/packages/util-utf8-browser/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/util-utf8-browser/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/util-utf8-node/package.json b/packages/util-utf8-node/package.json index 865848d0ba8aa..f028efcf6078b 100644 --- a/packages/util-utf8-node/package.json +++ b/packages/util-utf8-node/package.json @@ -2,10 +2,13 @@ "name": "@aws-sdk/util-utf8-node", "version": "1.0.0-gamma.1", "description": "A Node.JS UTF-8 string <-> UInt8Array converter", - "main": "./build/index.js", + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "author": { @@ -26,5 +29,5 @@ "jest": { "testEnvironment": "node" }, - "types": "./build/index.d.ts" + "types": "./dist/cjs/index.d.ts" } diff --git a/packages/util-utf8-node/tsconfig.cjs.json b/packages/util-utf8-node/tsconfig.cjs.json new file mode 100644 index 0000000000000..09336eddda194 --- /dev/null +++ b/packages/util-utf8-node/tsconfig.cjs.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "declaration": true, + "sourceMap": false, + "strict": true, + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/util-utf8-node/tsconfig.es.json b/packages/util-utf8-node/tsconfig.es.json new file mode 100644 index 0000000000000..d0d56774aebda --- /dev/null +++ b/packages/util-utf8-node/tsconfig.es.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "declaration": true, + "sourceMap": false, + "strict": true, + "rootDir": "./src", + "outDir": "./dist/es", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/util-utf8-node/tsconfig.json b/packages/util-utf8-node/tsconfig.json deleted file mode 100644 index 52457e6ebeef6..0000000000000 --- a/packages/util-utf8-node/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "compilerOptions": { - "target": "es2017", - "module": "commonjs", - "declaration": true, - "sourceMap": true, - "strict": true, - "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/util-utf8-node/tsconfig.test.json b/packages/util-utf8-node/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/util-utf8-node/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/packages/xml-builder/package.json b/packages/xml-builder/package.json index 591549d5d43b3..c52c83cf25fdd 100644 --- a/packages/xml-builder/package.json +++ b/packages/xml-builder/package.json @@ -11,8 +11,10 @@ "typescript": "~3.8.3" }, "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", + "prepublishOnly": "yarn build:cjs && yarn build:es", + "pretest": "yarn build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", "test": "jest" }, "author": { @@ -20,6 +22,7 @@ "url": "https://aws.amazon.com/javascript/" }, "license": "Apache-2.0", - "main": "./build/index.js", - "types": "./build/index.d.ts" + "main": "./dist/cjs/index.js", + "module": "./dist/es/index.js", + "types": "./dist/cjs/index.d.ts" } diff --git a/packages/xml-builder/tsconfig.cjs.json b/packages/xml-builder/tsconfig.cjs.json new file mode 100644 index 0000000000000..263d7b7ba5d00 --- /dev/null +++ b/packages/xml-builder/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "strict": true, + "sourceMap": false, + "declaration": true, + "lib": ["es5", "es2015.collection"], + "rootDir": "./src", + "outDir": "./dist/cjs", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/packages/xml-builder/tsconfig.es.json b/packages/xml-builder/tsconfig.es.json new file mode 100644 index 0000000000000..1bc560bce213f --- /dev/null +++ b/packages/xml-builder/tsconfig.es.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "strict": true, + "sourceMap": false, + "declaration": true, + "lib": ["es5", "es2015.collection"], + "rootDir": "./src", + "outDir": "./dist/es", + "importHelpers": true, + "noEmitHelpers": true, + "inlineSourceMap": true, + "inlineSources": true, + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/packages/xml-builder/tsconfig.json b/packages/xml-builder/tsconfig.json deleted file mode 100644 index e426fc9df3aba..0000000000000 --- a/packages/xml-builder/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "strict": true, - "sourceMap": true, - "declaration": true, - "lib": ["es5", "es2015.collection"], - "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/xml-builder/tsconfig.test.json b/packages/xml-builder/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321fb..0000000000000 --- a/packages/xml-builder/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json new file mode 100644 index 0000000000000..109f5b9a76adf --- /dev/null +++ b/tsconfig.cjs.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "moduleResolution": "node", + "target": "es5" + } +} diff --git a/tsconfig.es.json b/tsconfig.es.json new file mode 100644 index 0000000000000..d4dbc3abc72c2 --- /dev/null +++ b/tsconfig.es.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "target": "es5", + "module": "esnext", + "moduleResolution": "node" + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000000000..54a32f6d804d6 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + /** + * Must allow: + */ + "downlevelIteration": true, + "resolveJsonModule": true, + "experimentalDecorators": true, + "noUnusedParameters": false, + "removeComments": false, + "incremental": true, + /** + * Nice to have: + */ + // "preserveConstEnums": true, + "module": "commonjs", + "moduleResolution": "node", + "target": "es5", + "lib": ["es2015", "dom"], + "baseUrl": ".", + "paths": { + "@aws-sdk/*": ["packages/*/src"], + "@aws-sdk/client-*": ["clients/client-*/"], + "@aws-sdk/aws-*": ["protocol_tests/aws-*/"] + } + }, + "include": ["packages/"], + "exclude": ["node_modules/", "packages/*/build/"] +}