Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use a common tsconfig for the monorepo #1297

Merged
merged 13 commits into from
Jul 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ lerna-debug.log
package-lock.json

!serviceModels/logs
build
dist

.idea/
*.iml
Expand Down
5 changes: 4 additions & 1 deletion jest.config.base.js
Original file line number Diff line number Diff line change
@@ -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)"
]
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 7 additions & 4 deletions packages/abort-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
18 changes: 18 additions & 0 deletions packages/abort-controller/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -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/"]
}
Original file line number Diff line number Diff line change
@@ -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/"]
}
11 changes: 0 additions & 11 deletions packages/abort-controller/tsconfig.test.json

This file was deleted.

11 changes: 7 additions & 4 deletions packages/body-checksum-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
25 changes: 25 additions & 0 deletions packages/body-checksum-browser/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -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/"]
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": true,
"strict": true,
"sourceMap": true,
"sourceMap": false,
"downlevelIteration": true,
"importHelpers": true,
"noEmitHelpers": true,
Expand All @@ -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/"]
}
11 changes: 0 additions & 11 deletions packages/body-checksum-browser/tsconfig.test.json

This file was deleted.

11 changes: 7 additions & 4 deletions packages/body-checksum-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
24 changes: 24 additions & 0 deletions packages/body-checksum-node/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -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/"]
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": true,
"strict": true,
"sourceMap": true,
"sourceMap": false,
"downlevelIteration": true,
"importHelpers": true,
"noEmitHelpers": true,
Expand All @@ -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/"]
}
11 changes: 0 additions & 11 deletions packages/body-checksum-node/tsconfig.test.json

This file was deleted.

11 changes: 7 additions & 4 deletions packages/chunked-blob-reader-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
25 changes: 25 additions & 0 deletions packages/chunked-blob-reader-native/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -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/"]
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": true,
"strict": true,
"sourceMap": true,
"sourceMap": false,
"downlevelIteration": true,
"importHelpers": true,
"noEmitHelpers": true,
Expand All @@ -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/"]
}
11 changes: 0 additions & 11 deletions packages/chunked-blob-reader-native/tsconfig.test.json

This file was deleted.

11 changes: 7 additions & 4 deletions packages/chunked-blob-reader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
Loading