Skip to content

Commit 18645a5

Browse files
committed
chore(maintenance): enable isolatedModules and isolate cache (#1765)
* chore(layers) widen version check in e2e * chore(maintenance): enable isolatedModules * chore: remove redundant comments from tsconfig * chore: changed path of tsbuild cache
1 parent 2a512ee commit 18645a5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+105
-93
lines changed

Diff for: .gitignore

+1-6
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,4 @@ site
4949
tmp
5050

5151
# TS build files
52-
tsconfig.tsbuildinfo
53-
<<<<<<< HEAD
54-
.tsbuildinfo
55-
=======
56-
tsconfig.esm.tsbuildinfo
57-
>>>>>>> 0bc7960c (feat(logger): add esmodule support (#1734))
52+
*.tsbuildinfo

Diff for: packages/batch/package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@
1818
"test:e2e:nodejs20x": "echo 'Not Implemented'",
1919
"test:e2e": "echo 'Not Implemented'",
2020
"watch": "jest --watch",
21-
"build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json",
22-
"build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json",
21+
"build:cjs": "tsc --build tsconfig.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json",
22+
"build:esm": "tsc --build tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json",
2323
"build": "npm run build:esm & npm run build:cjs",
2424
"lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .",
2525
"lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .",
26-
"prebuild": "rimraf ./lib",
27-
"prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ."
26+
"prepack": "node ../../.github/scripts/release_patch_package_json.js ."
2827
},
2928
"lint-staged": {
3029
"*.{js,ts}": "npm run lint-fix"

Diff for: packages/batch/tsconfig.esm.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"compilerOptions": {
44
"baseUrl": ".",
55
"outDir": "./lib/esm",
6-
"rootDir": "./src"
6+
"rootDir": "./src",
7+
"tsBuildInfoFile": ".tsbuildinfo/esm.json"
78
},
89
"include": [
910
"./src/**/*"

Diff for: packages/batch/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"compilerOptions": {
44
"outDir": "./lib/cjs/",
55
"rootDir": "./src",
6+
"tsBuildInfoFile": ".tsbuildinfo/cjs.json"
67
},
78
"include": [
89
"./src/**/*"

Diff for: packages/commons/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
"test:e2e": "echo 'Not Applicable'",
1717
"watch": "jest --watch",
1818
"generateVersionFile": "echo \"// this file is auto generated, do not modify\nexport const PT_VERSION = '$(jq -r '.version' package.json)';\" > src/version.ts",
19-
"build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json",
20-
"build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json",
19+
"build:cjs": "tsc --build tsconfig.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json",
20+
"build:esm": "tsc --build tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json",
2121
"build": "npm run build:esm & npm run build:cjs",
2222
"lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .",
2323
"lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .",
24-
"prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ."
24+
"prepack": "node ../../.github/scripts/release_patch_package_json.js ."
2525
},
2626
"lint-staged": {
2727
"*.{js,ts}": "npm run lint-fix"

Diff for: packages/commons/src/types/LambdaInterface.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import type { Handler } from 'aws-lambda';
22

3-
export type SyncHandler<T extends Handler> = (
3+
type SyncHandler<T extends Handler> = (
44
event: Parameters<T>[0],
55
context: Parameters<T>[1],
66
callback: Parameters<T>[2]
77
) => void;
88

9-
export type AsyncHandler<T extends Handler> = (
9+
type AsyncHandler<T extends Handler> = (
1010
event: Parameters<T>[0],
1111
context: Parameters<T>[1]
1212
) => Promise<NonNullable<Parameters<Parameters<T>[2]>[1]>>;
@@ -23,4 +23,9 @@ type HandlerMethodDecorator = (
2323
| TypedPropertyDescriptor<AsyncHandler<Handler>>
2424
) => void;
2525

26-
export { LambdaInterface, HandlerMethodDecorator };
26+
export type {
27+
AsyncHandler,
28+
SyncHandler,
29+
LambdaInterface,
30+
HandlerMethodDecorator,
31+
};

Diff for: packages/commons/src/types/awsSdk.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ interface SdkClient {
1919
*/
2020
type MiddlewareArgsLike = { request: { headers: { [key: string]: string } } };
2121

22-
export { SdkClient, MiddlewareArgsLike };
22+
export type { SdkClient, MiddlewareArgsLike };

Diff for: packages/commons/src/types/index.ts

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
export {
1+
export type {
22
MiddlewareLikeObj,
33
MiddyLikeRequest,
44
CleanupFunction,
55
} from './middy.js';
6-
export { SdkClient, MiddlewareArgsLike } from './awsSdk.js';
7-
export { JSONPrimitive, JSONValue, JSONObject, JSONArray } from './json.js';
8-
export {
6+
export type { SdkClient, MiddlewareArgsLike } from './awsSdk.js';
7+
export type {
8+
JSONPrimitive,
9+
JSONValue,
10+
JSONObject,
11+
JSONArray,
12+
} from './json.js';
13+
export type {
914
SyncHandler,
1015
AsyncHandler,
1116
LambdaInterface,

Diff for: packages/commons/src/types/middy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ type MiddyLikeRequest = {
5757
*/
5858
type CleanupFunction = (request: MiddyLikeRequest) => Promise<void>;
5959

60-
export { MiddlewareLikeObj, MiddyLikeRequest, CleanupFunction };
60+
export type { MiddlewareLikeObj, MiddyLikeRequest, CleanupFunction };

Diff for: packages/commons/tsconfig.esm.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"compilerOptions": {
44
"baseUrl": ".",
55
"outDir": "./lib/esm",
6-
"rootDir": "./src"
6+
"rootDir": "./src",
7+
"tsBuildInfoFile": ".tsbuildinfo/esm.json"
78
},
89
"include": [
910
"./src/**/*"

Diff for: packages/commons/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"compilerOptions": {
44
"outDir": "./lib/cjs/",
55
"rootDir": "./src",
6+
"tsBuildInfoFile": ".tsbuildinfo/cjs.json"
67
},
78
"include": [
89
"./src/**/*"

Diff for: packages/idempotency/package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@
1818
"test:e2e:nodejs20x": "RUNTIME=nodejs20x jest --group=e2e",
1919
"test:e2e": "jest --group=e2e",
2020
"watch": "jest --watch",
21-
"build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json",
22-
"build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json",
21+
"build:cjs": "tsc --build tsconfig.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json",
22+
"build:esm": "tsc --build tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json",
2323
"build": "npm run build:esm & npm run build:cjs",
2424
"lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .",
2525
"lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .",
26-
"prebuild": "rimraf ./lib",
27-
"prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ."
26+
"prepack": "node ../../.github/scripts/release_patch_package_json.js ."
2827
},
2928
"lint-staged": {
3029
"*.{js,ts}": "npm run lint-fix"
@@ -137,4 +136,4 @@
137136
"aws-sdk-client-mock": "^3.0.1",
138137
"aws-sdk-client-mock-jest": "^3.0.1"
139138
}
140-
}
139+
}

Diff for: packages/idempotency/src/types/BasePersistenceLayer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ interface BasePersistenceLayerInterface {
1515
getRecord(data: unknown): Promise<IdempotencyRecord>;
1616
}
1717

18-
export { BasePersistenceLayerOptions, BasePersistenceLayerInterface };
18+
export type { BasePersistenceLayerOptions, BasePersistenceLayerInterface };

Diff for: packages/idempotency/src/types/ConfigServiceInterface.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ interface ConfigServiceInterface {
88
getIdempotencyEnabled(): boolean;
99
}
1010

11-
export { ConfigServiceInterface };
11+
export type { ConfigServiceInterface };

Diff for: packages/idempotency/src/types/IdempotencyOptions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ type IdempotencyConfigOptions = {
179179
lambdaContext?: Context;
180180
};
181181

182-
export {
182+
export type {
183183
AnyFunction,
184184
IdempotencyConfigOptions,
185185
ItempotentFunctionOptions,

Diff for: packages/idempotency/src/types/IdempotencyRecord.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ type IdempotencyRecordOptions = {
1313
payloadHash?: string;
1414
};
1515

16-
export { IdempotencyRecordStatusValue, IdempotencyRecordOptions };
16+
export type { IdempotencyRecordStatusValue, IdempotencyRecordOptions };

Diff for: packages/idempotency/src/types/LRUCache.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ type LRUCacheOptions = {
55
maxSize: number;
66
};
77

8-
export { LRUCacheOptions };
8+
export type { LRUCacheOptions };

Diff for: packages/idempotency/src/types/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
export {
1+
export type {
22
IdempotencyRecordOptions,
33
IdempotencyRecordStatusValue,
44
} from './IdempotencyRecord.js';
5-
export {
5+
export type {
66
BasePersistenceLayerInterface,
77
BasePersistenceLayerOptions,
88
} from './BasePersistenceLayer.js';
9-
export {
9+
export type {
1010
IdempotencyConfigOptions,
1111
IdempotencyLambdaHandlerOptions,
1212
IdempotencyHandlerOptions,

Diff for: packages/idempotency/tsconfig.esm.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"compilerOptions": {
44
"baseUrl": ".",
55
"outDir": "./lib/esm",
6-
"rootDir": "./src"
6+
"rootDir": "./src",
7+
"tsBuildInfoFile": ".tsbuildinfo/esm.json"
78
},
89
"include": [
910
"./src/**/*"

Diff for: packages/idempotency/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"compilerOptions": {
44
"outDir": "./lib/cjs",
55
"rootDir": "./src",
6+
"tsBuildInfoFile": ".tsbuildinfo/cjs.json"
67
},
78
"include": [
89
"./src/**/*"

Diff for: packages/logger/package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@
1818
"test:e2e:nodejs20x": "RUNTIME=nodejs20x jest --group=e2e",
1919
"test:e2e": "jest --group=e2e",
2020
"watch": "jest --watch --group=unit",
21-
"build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json",
22-
"build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json",
21+
"build:cjs": "tsc --build tsconfig.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json",
22+
"build:esm": "tsc --build tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json",
2323
"build": "npm run build:esm & npm run build:cjs",
2424
"lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .",
2525
"lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .",
26-
"prebuild": "rimraf ./lib",
27-
"prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ."
26+
"prepack": "node ../../.github/scripts/release_patch_package_json.js ."
2827
},
2928
"lint-staged": {
3029
"*.{js,ts}": "npm run lint-fix"

Diff for: packages/logger/src/types/ConfigServiceInterface.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ interface ConfigServiceInterface {
8282
isValueTrue(value: string): boolean;
8383
}
8484

85-
export { ConfigServiceInterface };
85+
export type { ConfigServiceInterface };

Diff for: packages/logger/src/types/Logger.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ type LoggerInterface = {
8686
warn(input: LogItemMessage, ...extraInput: LogItemExtraInput): void;
8787
};
8888

89-
export {
89+
export type {
9090
LogFunction,
9191
LoggerInterface,
9292
LogItemMessage,

Diff for: packages/logger/src/types/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export type {
66
LogAttributes,
77
LogLevel,
88
} from './Log.js';
9-
109
export type {
1110
LogItemMessage,
1211
LogItemExtraInput,

Diff for: packages/logger/tsconfig.esm.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
"compilerOptions": {
44
"baseUrl": ".",
55
"outDir": "./lib/esm",
6-
"rootDir": "./src"
6+
"rootDir": "./src",
7+
"tsBuildInfoFile": ".tsbuildinfo/esm.json"
78
},
8-
"include": ["./src/**/*"]
9-
}
9+
"include": [
10+
"./src/**/*"
11+
]
12+
}

Diff for: packages/logger/tsconfig.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "./lib/cjs/",
5-
"rootDir": "./src"
5+
"rootDir": "./src",
6+
"tsBuildInfoFile": ".tsbuildinfo/cjs.json"
67
},
7-
"include": ["./src/**/*"]
8-
}
8+
"include": [
9+
"./src/**/*"
10+
]
11+
}

Diff for: packages/metrics/package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@
1717
"test:e2e:nodejs20x": "RUNTIME=nodejs20x jest --group=e2e",
1818
"test:e2e": "jest --group=e2e",
1919
"watch": "jest --group=unit --watch ",
20-
"build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json",
21-
"build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json",
20+
"build:cjs": "tsc --build tsconfig.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json",
21+
"build:esm": "tsc --build tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json",
2222
"build": "npm run build:esm & npm run build:cjs",
2323
"lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .",
2424
"lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .",
25-
"prebuild": "rimraf ./lib",
26-
"prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ."
25+
"prepack": "node ../../.github/scripts/release_patch_package_json.js ."
2726
},
2827
"lint-staged": {
2928
"*.{js,ts}": "npm run lint-fix"

Diff for: packages/metrics/src/types/ConfigServiceInterface.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ interface ConfigServiceInterface {
1010
isDevMode(): boolean;
1111
}
1212

13-
export { ConfigServiceInterface };
13+
export type { ConfigServiceInterface };

Diff for: packages/metrics/src/types/Metrics.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ type MetricDefinition = {
6868
StorageResolution?: MetricResolution;
6969
};
7070

71-
export {
71+
export type {
7272
MetricsOptions,
7373
Dimensions,
7474
EmfOutput,

Diff for: packages/metrics/src/types/MetricsInterface.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ interface MetricsInterface {
2929
singleMetric(): Metrics;
3030
}
3131

32-
export { MetricsInterface };
32+
export type { MetricsInterface };

Diff for: packages/metrics/src/types/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export {
1+
export type {
22
MetricsOptions,
33
Dimensions,
44
EmfOutput,
@@ -9,5 +9,5 @@ export {
99
MetricResolution,
1010
MetricUnit,
1111
} from './Metrics.js';
12-
export { ConfigServiceInterface } from './ConfigServiceInterface.js';
13-
export { MetricsInterface } from './MetricsInterface.js';
12+
export type { ConfigServiceInterface } from './ConfigServiceInterface.js';
13+
export type { MetricsInterface } from './MetricsInterface.js';

Diff for: packages/metrics/tsconfig.esm.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"compilerOptions": {
44
"baseUrl": ".",
55
"outDir": "./lib/esm",
6-
"rootDir": "./src"
6+
"rootDir": "./src",
7+
"tsBuildInfoFile": ".tsbuildinfo/esm.json"
78
},
89
"include": [
910
"./src/**/*"

Diff for: packages/metrics/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"compilerOptions": {
44
"outDir": "./lib/cjs",
55
"rootDir": "./src",
6+
"tsBuildInfoFile": ".tsbuildinfo/cjs.json"
67
},
78
"include": [
89
"./src/**/*"

Diff for: packages/parameters/package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@
1818
"test:e2e:nodejs20x": "RUNTIME=nodejs20x jest --group=e2e",
1919
"test:e2e": "jest --group=e2e",
2020
"watch": "jest --watch",
21-
"build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json",
22-
"build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json",
21+
"build:cjs": "tsc --build tsconfig.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json",
22+
"build:esm": "tsc --build tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json",
2323
"build": "npm run build:esm & npm run build:cjs",
2424
"lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .",
2525
"lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .",
26-
"prebuild": "rimraf ./lib",
27-
"prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ."
26+
"prepack": "node ../../.github/scripts/release_patch_package_json.js ."
2827
},
2928
"lint-staged": {
3029
"*.{js,ts}": "npm run lint-fix"
@@ -199,4 +198,4 @@
199198
"optional": true
200199
}
201200
}
202-
}
201+
}

Diff for: packages/parameters/src/types/ConfigServiceInterface.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ interface ConfigServiceInterface {
88
getSSMDecrypt(): string;
99
}
1010

11-
export { ConfigServiceInterface };
11+
export type { ConfigServiceInterface };

0 commit comments

Comments
 (0)