Skip to content

Commit

Permalink
chore: update core tsconfig based on @tsconfig/node16 (aws#6038)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored and siddsriv committed May 8, 2024
1 parent b0e4b2f commit a8e9ab0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 26 deletions.
7 changes: 0 additions & 7 deletions packages/util-dynamodb/src/convertToAttr.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,8 @@ describe("convertToAttr", () => {
[true, false].forEach((convertClassInstanceToMap) => {
const maxSafe = BigInt(Number.MAX_SAFE_INTEGER);
[
// @ts-expect-error BigInt literals are not available when targeting lower than ES2020.
1n,
// @ts-expect-error BigInt literals are not available when targeting lower than ES2020.
maxSafe * 2n,
// @ts-expect-error BigInt literals are not available when targeting lower than ES2020.
maxSafe * -2n,
BigInt(Number.MAX_VALUE),
BigInt("0x1fffffffffffff"),
Expand All @@ -120,11 +117,8 @@ describe("convertToAttr", () => {
[true, false].forEach((convertClassInstanceToMap) => {
const maxSafe = BigInt(Number.MAX_SAFE_INTEGER);
[
// @ts-expect-error BigInt literals are not available when targeting lower than ES2020.
1n,
// @ts-expect-error BigInt literals are not available when targeting lower than ES2020.
maxSafe * 2n,
// @ts-expect-error BigInt literals are not available when targeting lower than ES2020.
maxSafe * -2n,
BigInt(Number.MAX_VALUE),
BigInt("0x1fffffffffffff"),
Expand Down Expand Up @@ -263,7 +257,6 @@ describe("convertToAttr", () => {
});

it("bigint set", () => {
// @ts-expect-error BigInt literals are not available when targeting lower than ES2020.
const bigNum = BigInt(Number.MAX_SAFE_INTEGER) + 2n;
const set = new Set([bigNum, -bigNum]);
expect(convertToAttr(set)).toEqual({ NS: Array.from(set).map((num) => num.toString()) });
Expand Down
3 changes: 0 additions & 3 deletions packages/util-dynamodb/src/convertToAttrToNative.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ describe("convertToAttrToNative", () => {
describe("bigint", () => {
const maxSafe = BigInt(Number.MAX_SAFE_INTEGER);
[
// @ts-expect-error BigInt literals are not available when targeting lower than ES2020.
maxSafe * 2n,
// @ts-expect-error BigInt literals are not available when targeting lower than ES2020.
maxSafe * -2n,
BigInt(Number.MAX_VALUE),
BigInt("0x1fffffffffffffff"),
Expand Down Expand Up @@ -147,7 +145,6 @@ describe("convertToAttrToNative", () => {
});

describe("bigint set", () => {
// @ts-expect-error BigInt literals are not available when targeting lower than ES2020.
const bigNum = BigInt(Number.MAX_SAFE_INTEGER) + 2n;
const set = new Set([bigNum, -bigNum]);

Expand Down
9 changes: 1 addition & 8 deletions tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"importHelpers": true,
"module": "commonjs",
"noEmitHelpers": false,
"target": "ES2018",
"strict": true
}
"extends": "./tsconfig.json"
}
7 changes: 2 additions & 5 deletions tsconfig.es.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"importHelpers": true,
"module": "esnext",
"noEmitHelpers": false,
"target": "ES2020",
"strict": true
"lib": ["dom"],
"module": "esnext"
}
}
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"extends": "@tsconfig/node16/tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"downlevelIteration": true,
"esModuleInterop": true,
"incremental": true,
"lib": ["es2015", "dom"],
"importHelpers": true,
"module": "commonjs",
"moduleResolution": "node",
"noEmitHelpers": false,
"noFallthroughCasesInSwitch": true,
"paths": {
"@aws-sdk/*": ["packages/*/"],
Expand All @@ -17,7 +18,6 @@
"preserveConstEnums": true,
"removeComments": true,
"resolveJsonModule": true,
"target": "es5",
"useUnknownInCatchVariables": false,
"experimentalDecorators": true,
"jsx": "react",
Expand Down

0 comments on commit a8e9ab0

Please sign in to comment.