Skip to content

Commit

Permalink
chore: update core tsconfig based on @tsconfig/node16 (#6038)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed May 7, 2024
1 parent 809b7b5 commit 80a4f29
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
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
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
@@ -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
@@ -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
@@ -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 80a4f29

Please sign in to comment.