diff --git a/packages/crc32/package.json b/packages/crc32/package.json index e4635e5e..c7d2ab93 100644 --- a/packages/crc32/package.json +++ b/packages/crc32/package.json @@ -2,12 +2,13 @@ "name": "@aws-crypto/crc32", "version": "5.1.0", "scripts": { - "prepublishOnly": "tsc", + "prepublishOnly": "tsc -p tsconfig.json && tsc -p tsconfig.module.json", "pretest": "tsc -p tsconfig.test.json", "test": "mocha --require ts-node/register test/**/*test.ts" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./build/main/index.js", + "module": "./build/module/index.js", + "types": "./build/main/index.d.ts", "repository": { "type": "git", "url": "git@github.com:aws/aws-sdk-js-crypto-helpers.git" diff --git a/packages/crc32/tsconfig.json b/packages/crc32/tsconfig.json index 1691089a..2b996d08 100644 --- a/packages/crc32/tsconfig.json +++ b/packages/crc32/tsconfig.json @@ -1,22 +1,8 @@ { + "extends": "../tsconfig.json", "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" + "outDir": "./build/main", }, "include": ["src/**/*.ts"], "exclude": ["node_modules/**"] diff --git a/packages/crc32/tsconfig.module.json b/packages/crc32/tsconfig.module.json new file mode 100644 index 00000000..7d0cfddc --- /dev/null +++ b/packages/crc32/tsconfig.module.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "build/module", + "module": "esnext", + } +} diff --git a/packages/crc32/tsconfig.test.json b/packages/crc32/tsconfig.test.json index 57f7d5b1..15513fed 100644 --- a/packages/crc32/tsconfig.test.json +++ b/packages/crc32/tsconfig.test.json @@ -4,7 +4,6 @@ "sourceMap": false, "inlineSourceMap": true, "inlineSources": true, - "rootDir": "./src", - "outDir": "./build" + } } diff --git a/packages/crc32c/package.json b/packages/crc32c/package.json index dabbe247..58b14b0c 100644 --- a/packages/crc32c/package.json +++ b/packages/crc32c/package.json @@ -2,12 +2,13 @@ "name": "@aws-crypto/crc32c", "version": "5.1.0", "scripts": { - "prepublishOnly": "tsc", + "prepublishOnly": "tsc -p tsconfig.json && tsc -p tsconfig.module.json", "pretest": "tsc -p tsconfig.test.json", "test": "mocha --require ts-node/register test/**/*test.ts" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./build/main/index.js", + "module": "./build/module/index.js", + "types": "./build/main/index.d.ts", "repository": { "type": "git", "url": "git@github.com:aws/aws-sdk-js-crypto-helpers.git" diff --git a/packages/crc32c/tsconfig.json b/packages/crc32c/tsconfig.json index 1691089a..2b996d08 100644 --- a/packages/crc32c/tsconfig.json +++ b/packages/crc32c/tsconfig.json @@ -1,22 +1,8 @@ { + "extends": "../tsconfig.json", "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" + "outDir": "./build/main", }, "include": ["src/**/*.ts"], "exclude": ["node_modules/**"] diff --git a/packages/crc32c/tsconfig.module.json b/packages/crc32c/tsconfig.module.json new file mode 100644 index 00000000..7d0cfddc --- /dev/null +++ b/packages/crc32c/tsconfig.module.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "build/module", + "module": "esnext", + } +} diff --git a/packages/crc32c/tsconfig.test.json b/packages/crc32c/tsconfig.test.json index 57f7d5b1..15513fed 100644 --- a/packages/crc32c/tsconfig.test.json +++ b/packages/crc32c/tsconfig.test.json @@ -4,7 +4,6 @@ "sourceMap": false, "inlineSourceMap": true, "inlineSources": true, - "rootDir": "./src", - "outDir": "./build" + } } diff --git a/packages/random-source-browser/package.json b/packages/random-source-browser/package.json index d6e3dff1..16b52a16 100644 --- a/packages/random-source-browser/package.json +++ b/packages/random-source-browser/package.json @@ -2,7 +2,7 @@ "name": "@aws-crypto/random-source-browser", "version": "5.1.0", "scripts": { - "prepublishOnly": "tsc", + "prepublishOnly": "tsc -p tsconfig.json && tsc -p tsconfig.module.json", "pretest": "tsc -p tsconfig.test.json", "test": "mocha --require ts-node/register test/**/*test.ts" }, @@ -22,6 +22,7 @@ "@aws-sdk/util-locate-window": "^3.0.0", "tslib": "^2.6.2" }, - "main": "./build/index.js", - "types": "./build/index.d.ts" + "main": "./build/main/index.js", + "module": "./build/module/index.js", + "types": "./build/main/index.d.ts" } diff --git a/packages/random-source-browser/tsconfig.json b/packages/random-source-browser/tsconfig.json index 09cdc3ae..fb9aa95f 100644 --- a/packages/random-source-browser/tsconfig.json +++ b/packages/random-source-browser/tsconfig.json @@ -1,15 +1,9 @@ { + "extends": "../tsconfig.json", "compilerOptions": { - "target": "es5", - "module": "commonjs", - "lib": ["dom", "es5", "es2015.promise", "es2015.collection"], - "declaration": true, - "sourceMap": true, - "strict": true, "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true + "outDir": "./build/main", + "lib": ["dom"], }, "include": ["src/**/*.ts"], "exclude": ["node_modules/**"] diff --git a/packages/random-source-browser/tsconfig.module.json b/packages/random-source-browser/tsconfig.module.json new file mode 100644 index 00000000..7d0cfddc --- /dev/null +++ b/packages/random-source-browser/tsconfig.module.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "build/module", + "module": "esnext", + } +} diff --git a/packages/random-source-browser/tsconfig.test.json b/packages/random-source-browser/tsconfig.test.json index 3a682bed..3c1e0f06 100644 --- a/packages/random-source-browser/tsconfig.test.json +++ b/packages/random-source-browser/tsconfig.test.json @@ -4,8 +4,5 @@ "sourceMap": false, "inlineSourceMap": true, "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "types": ["node"] } } diff --git a/packages/random-source-node/package.json b/packages/random-source-node/package.json index c0f1d3e6..32839cc9 100644 --- a/packages/random-source-node/package.json +++ b/packages/random-source-node/package.json @@ -2,8 +2,11 @@ "name": "@aws-crypto/random-source-node", "version": "5.1.0", "description": "A Node.JS implementation of the AWS SDK for JavaScript's `randomValues` interface", - "main": "./build/index.js", + "main": "./build/main/index.js", + "module": "./build/module/index.js", + "types": "./build/main/index.d.ts", "scripts": { + "prepublishOnly": "tsc -p tsconfig.json && tsc -p tsconfig.module.json", "pretest": "tsc -p tsconfig.test.json", "test": "mocha --require ts-node/register test/**/*test.ts" }, @@ -22,7 +25,6 @@ "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" }, - "types": "./build/index.d.ts", "engines": { "node": ">=16.0.0" } diff --git a/packages/random-source-node/tsconfig.json b/packages/random-source-node/tsconfig.json index f2fb4f27..2b996d08 100644 --- a/packages/random-source-node/tsconfig.json +++ b/packages/random-source-node/tsconfig.json @@ -1,15 +1,8 @@ { + "extends": "../tsconfig.json", "compilerOptions": { - "target": "es5", - "module": "commonjs", - "lib": ["es5", "es2015.promise", "es2015.collection"], - "declaration": true, - "sourceMap": true, - "strict": true, "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true + "outDir": "./build/main", }, "include": ["src/**/*.ts"], "exclude": ["node_modules/**"] diff --git a/packages/random-source-node/tsconfig.module.json b/packages/random-source-node/tsconfig.module.json new file mode 100644 index 00000000..7d0cfddc --- /dev/null +++ b/packages/random-source-node/tsconfig.module.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "build/module", + "module": "esnext", + } +} diff --git a/packages/random-source-node/tsconfig.test.json b/packages/random-source-node/tsconfig.test.json index 57f7d5b1..15513fed 100644 --- a/packages/random-source-node/tsconfig.test.json +++ b/packages/random-source-node/tsconfig.test.json @@ -4,7 +4,6 @@ "sourceMap": false, "inlineSourceMap": true, "inlineSources": true, - "rootDir": "./src", - "outDir": "./build" + } } diff --git a/packages/random-source-universal/package.json b/packages/random-source-universal/package.json index 5601edba..e8d07a4f 100644 --- a/packages/random-source-universal/package.json +++ b/packages/random-source-universal/package.json @@ -2,7 +2,7 @@ "name": "@aws-crypto/random-source-universal", "version": "5.1.0", "scripts": { - "prepublishOnly": "tsc", + "prepublishOnly": "tsc -p tsconfig.json && tsc -p tsconfig.module.json", "pretest": "tsc -p tsconfig.test.json", "test": "mocha --require ts-node/register test/**/*test.ts" }, @@ -26,8 +26,9 @@ "browser": { "@aws/crypto-random-source-node": false }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./build/main/index.js", + "module": "./build/module/index.js", + "types": "./build/main/index.d.ts", "engines": { "node": ">=16.0.0" } diff --git a/packages/random-source-universal/tsconfig.json b/packages/random-source-universal/tsconfig.json index 09cdc3ae..fb9aa95f 100644 --- a/packages/random-source-universal/tsconfig.json +++ b/packages/random-source-universal/tsconfig.json @@ -1,15 +1,9 @@ { + "extends": "../tsconfig.json", "compilerOptions": { - "target": "es5", - "module": "commonjs", - "lib": ["dom", "es5", "es2015.promise", "es2015.collection"], - "declaration": true, - "sourceMap": true, - "strict": true, "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true + "outDir": "./build/main", + "lib": ["dom"], }, "include": ["src/**/*.ts"], "exclude": ["node_modules/**"] diff --git a/packages/random-source-universal/tsconfig.module.json b/packages/random-source-universal/tsconfig.module.json new file mode 100644 index 00000000..7d0cfddc --- /dev/null +++ b/packages/random-source-universal/tsconfig.module.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "build/module", + "module": "esnext", + } +} diff --git a/packages/random-source-universal/tsconfig.test.json b/packages/random-source-universal/tsconfig.test.json index 57f7d5b1..15513fed 100644 --- a/packages/random-source-universal/tsconfig.test.json +++ b/packages/random-source-universal/tsconfig.test.json @@ -4,7 +4,6 @@ "sourceMap": false, "inlineSourceMap": true, "inlineSources": true, - "rootDir": "./src", - "outDir": "./build" + } } diff --git a/packages/sha1-browser/package.json b/packages/sha1-browser/package.json index a01efe6d..7129acfa 100644 --- a/packages/sha1-browser/package.json +++ b/packages/sha1-browser/package.json @@ -2,7 +2,7 @@ "name": "@aws-crypto/sha1-browser", "version": "5.1.0", "scripts": { - "prepublishOnly": "tsc", + "prepublishOnly": "tsc -p tsconfig.json && tsc -p tsconfig.module.json", "pretest": "tsc -p tsconfig.test.json", "test": "mocha --require ts-node/register test/**/*test.ts" }, @@ -25,8 +25,9 @@ "@smithy/util-utf8": "^2.0.0", "tslib": "^2.6.2" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./build/main/index.js", + "module": "./build/module/index.js", + "types": "./build/main/index.d.ts", "publishConfig": { "access": "public" } diff --git a/packages/sha1-browser/tsconfig.json b/packages/sha1-browser/tsconfig.json index 9b37394a..fb9aa95f 100644 --- a/packages/sha1-browser/tsconfig.json +++ b/packages/sha1-browser/tsconfig.json @@ -1,21 +1,9 @@ { + "extends": "../tsconfig.json", "compilerOptions": { - "target": "es5", - "module": "commonjs", - "lib": [ - "dom", - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable" - ], - "declaration": true, - "sourceMap": true, - "strict": true, "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true + "outDir": "./build/main", + "lib": ["dom"], }, "include": ["src/**/*.ts"], "exclude": ["node_modules/**"] diff --git a/packages/sha1-browser/tsconfig.module.json b/packages/sha1-browser/tsconfig.module.json new file mode 100644 index 00000000..7d0cfddc --- /dev/null +++ b/packages/sha1-browser/tsconfig.module.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "build/module", + "module": "esnext", + } +} diff --git a/packages/sha1-browser/tsconfig.test.json b/packages/sha1-browser/tsconfig.test.json index 57f7d5b1..15513fed 100644 --- a/packages/sha1-browser/tsconfig.test.json +++ b/packages/sha1-browser/tsconfig.test.json @@ -4,7 +4,6 @@ "sourceMap": false, "inlineSourceMap": true, "inlineSources": true, - "rootDir": "./src", - "outDir": "./build" + } } diff --git a/packages/sha256-browser/package.json b/packages/sha256-browser/package.json index 8ece2e00..53520c82 100644 --- a/packages/sha256-browser/package.json +++ b/packages/sha256-browser/package.json @@ -2,7 +2,7 @@ "name": "@aws-crypto/sha256-browser", "version": "5.1.0", "scripts": { - "prepublishOnly": "tsc", + "prepublishOnly": "tsc -p tsconfig.json && tsc -p tsconfig.module.json", "pretest": "tsc -p tsconfig.test.json", "test": "mocha --require ts-node/register test/**/*test.ts" }, @@ -26,6 +26,7 @@ "@smithy/util-utf8": "^2.0.0", "tslib": "^2.6.2" }, - "main": "./build/index.js", - "types": "./build/index.d.ts" + "main": "./build/main/index.js", + "module": "./build/module/index.js", + "types": "./build/main/index.d.ts" } diff --git a/packages/sha256-browser/tsconfig.json b/packages/sha256-browser/tsconfig.json index 9b37394a..fb9aa95f 100644 --- a/packages/sha256-browser/tsconfig.json +++ b/packages/sha256-browser/tsconfig.json @@ -1,21 +1,9 @@ { + "extends": "../tsconfig.json", "compilerOptions": { - "target": "es5", - "module": "commonjs", - "lib": [ - "dom", - "es5", - "es2015.promise", - "es2015.collection", - "es2015.iterable" - ], - "declaration": true, - "sourceMap": true, - "strict": true, "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true + "outDir": "./build/main", + "lib": ["dom"], }, "include": ["src/**/*.ts"], "exclude": ["node_modules/**"] diff --git a/packages/sha256-browser/tsconfig.module.json b/packages/sha256-browser/tsconfig.module.json new file mode 100644 index 00000000..7d0cfddc --- /dev/null +++ b/packages/sha256-browser/tsconfig.module.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "build/module", + "module": "esnext", + } +} diff --git a/packages/sha256-browser/tsconfig.test.json b/packages/sha256-browser/tsconfig.test.json index 57f7d5b1..15513fed 100644 --- a/packages/sha256-browser/tsconfig.test.json +++ b/packages/sha256-browser/tsconfig.test.json @@ -4,7 +4,6 @@ "sourceMap": false, "inlineSourceMap": true, "inlineSources": true, - "rootDir": "./src", - "outDir": "./build" + } } diff --git a/packages/sha256-js/package.json b/packages/sha256-js/package.json index 4a534878..f2801001 100644 --- a/packages/sha256-js/package.json +++ b/packages/sha256-js/package.json @@ -2,12 +2,13 @@ "name": "@aws-crypto/sha256-js", "version": "5.1.0", "scripts": { - "prepublishOnly": "tsc", + "prepublishOnly": "tsc -p tsconfig.json && tsc -p tsconfig.module.json", "pretest": "tsc -p tsconfig.test.json", "test": "mocha --require ts-node/register test/**/*test.ts" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./build/main/index.js", + "module": "./build/module/index.js", + "types": "./build/main/index.d.ts", "repository": { "type": "git", "url": "git@github.com:aws/aws-sdk-js-crypto-helpers.git" diff --git a/packages/sha256-js/tsconfig.json b/packages/sha256-js/tsconfig.json index c242acb0..fb9aa95f 100644 --- a/packages/sha256-js/tsconfig.json +++ b/packages/sha256-js/tsconfig.json @@ -1,16 +1,9 @@ { + "extends": "../tsconfig.json", "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "lib": ["es5", "es2015.promise", "es2015.collection", "es2015.iterable"], "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true + "outDir": "./build/main", + "lib": ["dom"], }, "include": ["src/**/*.ts"], "exclude": ["node_modules/**"] diff --git a/packages/sha256-js/tsconfig.module.json b/packages/sha256-js/tsconfig.module.json new file mode 100644 index 00000000..7d0cfddc --- /dev/null +++ b/packages/sha256-js/tsconfig.module.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "build/module", + "module": "esnext", + } +} diff --git a/packages/sha256-js/tsconfig.test.json b/packages/sha256-js/tsconfig.test.json index 57f7d5b1..3c1e0f06 100644 --- a/packages/sha256-js/tsconfig.test.json +++ b/packages/sha256-js/tsconfig.test.json @@ -4,7 +4,5 @@ "sourceMap": false, "inlineSourceMap": true, "inlineSources": true, - "rootDir": "./src", - "outDir": "./build" } } diff --git a/packages/sha256-universal/package.json b/packages/sha256-universal/package.json index db8f67a3..58d0b171 100644 --- a/packages/sha256-universal/package.json +++ b/packages/sha256-universal/package.json @@ -2,7 +2,7 @@ "name": "@aws-crypto/sha256-universal", "version": "5.1.0", "scripts": { - "prepublishOnly": "tsc", + "prepublishOnly": "tsc -p tsconfig.json && tsc -p tsconfig.module.json", "pretest": "tsc -p tsconfig.test.json", "test": "mocha --require ts-node/register test/**/*test.ts" }, @@ -23,8 +23,9 @@ "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./build/main/index.js", + "module": "./build/module/index.js", + "types": "./build/main/index.d.ts", "browser": { "@aws-sdk/hash-node": false, "crypto": false diff --git a/packages/sha256-universal/tsconfig.json b/packages/sha256-universal/tsconfig.json index 09cdc3ae..2b996d08 100644 --- a/packages/sha256-universal/tsconfig.json +++ b/packages/sha256-universal/tsconfig.json @@ -1,15 +1,8 @@ { + "extends": "../tsconfig.json", "compilerOptions": { - "target": "es5", - "module": "commonjs", - "lib": ["dom", "es5", "es2015.promise", "es2015.collection"], - "declaration": true, - "sourceMap": true, - "strict": true, "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true + "outDir": "./build/main", }, "include": ["src/**/*.ts"], "exclude": ["node_modules/**"] diff --git a/packages/sha256-universal/tsconfig.module.json b/packages/sha256-universal/tsconfig.module.json new file mode 100644 index 00000000..7d0cfddc --- /dev/null +++ b/packages/sha256-universal/tsconfig.module.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "build/module", + "module": "esnext", + } +} diff --git a/packages/sha256-universal/tsconfig.test.json b/packages/sha256-universal/tsconfig.test.json index 57f7d5b1..15513fed 100644 --- a/packages/sha256-universal/tsconfig.test.json +++ b/packages/sha256-universal/tsconfig.test.json @@ -4,7 +4,6 @@ "sourceMap": false, "inlineSourceMap": true, "inlineSources": true, - "rootDir": "./src", - "outDir": "./build" + } } diff --git a/packages/supports-web-crypto/package.json b/packages/supports-web-crypto/package.json index 5053e550..d01bb67f 100644 --- a/packages/supports-web-crypto/package.json +++ b/packages/supports-web-crypto/package.json @@ -3,6 +3,7 @@ "version": "5.1.0", "description": "Provides functions for detecting if the host environment supports the WebCrypto API", "scripts": { + "prepublishOnly": "tsc -p tsconfig.json && tsc -p tsconfig.module.json", "pretest": "tsc -p tsconfig.test.json", "test": "mocha --require ts-node/register test/**/*test.ts" }, @@ -17,8 +18,9 @@ }, "homepage": "https://github.com/aws/aws-sdk-js-crypto-helpers/tree/master/packages/supports-web-crypto", "license": "Apache-2.0", - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./build/main/index.js", + "module": "./build/module/index.js", + "types": "./build/main/index.d.ts", "dependencies": { "tslib": "^2.6.2" } diff --git a/packages/supports-web-crypto/tsconfig.json b/packages/supports-web-crypto/tsconfig.json index e4def433..efca6de8 100644 --- a/packages/supports-web-crypto/tsconfig.json +++ b/packages/supports-web-crypto/tsconfig.json @@ -1,15 +1,9 @@ { + "extends": "../tsconfig.json", "compilerOptions": { - "module": "commonjs", - "target": "es5", - "lib": ["dom", "es5", "es2015.collection"], - "strict": true, - "sourceMap": true, - "declaration": true, + "lib": ["dom"], "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true + "outDir": "./build/main", }, "include": ["src/**/*.ts"], "exclude": ["node_modules/**"] diff --git a/packages/supports-web-crypto/tsconfig.module.json b/packages/supports-web-crypto/tsconfig.module.json new file mode 100644 index 00000000..7d0cfddc --- /dev/null +++ b/packages/supports-web-crypto/tsconfig.module.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "build/module", + "module": "esnext", + } +} diff --git a/packages/supports-web-crypto/tsconfig.test.json b/packages/supports-web-crypto/tsconfig.test.json index 57f7d5b1..15513fed 100644 --- a/packages/supports-web-crypto/tsconfig.test.json +++ b/packages/supports-web-crypto/tsconfig.test.json @@ -4,7 +4,6 @@ "sourceMap": false, "inlineSourceMap": true, "inlineSources": true, - "rootDir": "./src", - "outDir": "./build" + } } diff --git a/packages/tsconfig.json b/packages/tsconfig.json new file mode 100644 index 00000000..9fe0a046 --- /dev/null +++ b/packages/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "moduleResolution": "node", + "declaration": true, + "strict": true, + "sourceMap": true, + "downlevelIteration": true, + "lib": ["es5", "es2015.promise", "es2015.collection", "es2015.iterable"], + "importHelpers": true, + "noEmitHelpers": true + }, +} \ No newline at end of file diff --git a/packages/util/package.json b/packages/util/package.json index 82dda69a..ab0da50b 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -2,12 +2,13 @@ "name": "@aws-crypto/util", "version": "5.1.0", "scripts": { - "prepublishOnly": "tsc", + "prepublishOnly": "tsc -p tsconfig.json && tsc -p tsconfig.module.json", "pretest": "tsc -p tsconfig.test.json", "test": "mocha --require ts-node/register test/**/*test.ts" }, - "main": "./build/index.js", - "types": "./build/index.d.ts", + "main": "./build/main/index.js", + "module": "./build/module/index.js", + "types": "./build/main/index.d.ts", "repository": { "type": "git", "url": "git@github.com:aws/aws-sdk-js-crypto-helpers.git" diff --git a/packages/util/tsconfig.json b/packages/util/tsconfig.json index 1691089a..2b996d08 100644 --- a/packages/util/tsconfig.json +++ b/packages/util/tsconfig.json @@ -1,22 +1,8 @@ { + "extends": "../tsconfig.json", "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" + "outDir": "./build/main", }, "include": ["src/**/*.ts"], "exclude": ["node_modules/**"] diff --git a/packages/util/tsconfig.module.json b/packages/util/tsconfig.module.json new file mode 100644 index 00000000..7d0cfddc --- /dev/null +++ b/packages/util/tsconfig.module.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "build/module", + "module": "esnext", + } +} diff --git a/packages/util/tsconfig.test.json b/packages/util/tsconfig.test.json index 57f7d5b1..15513fed 100644 --- a/packages/util/tsconfig.test.json +++ b/packages/util/tsconfig.test.json @@ -4,7 +4,6 @@ "sourceMap": false, "inlineSourceMap": true, "inlineSources": true, - "rootDir": "./src", - "outDir": "./build" + } }