Skip to content

chore(maintenance): adopt TypeScript 5.x #1672

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

Merged
merged 4 commits into from
Sep 13, 2023
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/core/logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ This functionality will include the following keys in your structured logs:
=== "Decorator"

!!! info
Decorators can only be attached to a class declaration, method, accessor, property, or parameter. Therefore, if you prefer to write your handler as a standard function rather than a Class method, use the middleware or the manual instrumentation instead. See the [official TypeScript documentation](https://www.typescriptlang.org/docs/handbook/decorators.html) for more details.
Powertools decorators can only be attached to class methods and follow the experimetal decorators proposal implementation found in TypeScript 4.x. As such, you need to enable the `experimentalDecorators` compiler option in your `tsconfig.json` file to use them.

```typescript hl_lines="8"
--8<-- "docs/snippets/logger/decorator.ts"
Expand Down
2 changes: 1 addition & 1 deletion docs/core/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ You can add default dimensions to your metrics by passing them as parameters in
=== "with logMetrics decorator"

!!! info
Decorators can only be attached to a class declaration, method, accessor, property, or parameter. Therefore, if you prefer to write your handler as a standard function rather than a Class method, use the middleware or the manual instrumentation instead. See the [official TypeScript documentation](https://www.typescriptlang.org/docs/handbook/decorators.html) for more details.
Powertools decorators can only be attached to class methods and follow the experimetal decorators proposal implementation found in TypeScript 4.x. As such, you need to enable the `experimentalDecorators` compiler option in your `tsconfig.json` file to use them.

```typescript hl_lines="12"
--8<-- "docs/snippets/metrics/defaultDimensionsDecorator.ts"
Expand Down
2 changes: 1 addition & 1 deletion docs/core/tracer.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ You can quickly start by importing the `Tracer` class, initialize it outside the
=== "Decorator"

!!! info
Decorators can only be attached to a class declaration, method, accessor, property, or parameter. Therefore, if you prefer to write your handler as a standard function rather than a Class method, use the middleware or the manual instrumentation instead. See the [official TypeScript documentation](https://www.typescriptlang.org/docs/handbook/decorators.html) for more details.
Powertools decorators can only be attached to class methods and follow the experimetal decorators proposal implementation found in TypeScript 4.x. As such, you need to enable the `experimentalDecorators` compiler option in your `tsconfig.json` file to use them.

```typescript hl_lines="8"
--8<-- "docs/snippets/tracer/decorator.ts"
Expand Down
15 changes: 5 additions & 10 deletions examples/cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,14 @@
"@aws-sdk/client-ssm": "^3.360.0",
"@aws-sdk/lib-dynamodb": "^3.360.0",
"@types/aws-lambda": "^8.10.109",
"@types/jest": "^29.2.4",
"@types/jest": "^29.5.4",
"@types/node": "18.11.17",
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
"aws-cdk": "^2.73.0",
"esbuild": "^0.16.9",
"eslint-import-resolver-node": "^0.3.6",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.26.0",
"jest": "^29.3.1",
"ts-jest": "^29.0.3",
"esbuild": "^0.19.2",
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"typescript": "^4.9.4"
"typescript": "^5.2.2"
},
"dependencies": {
"@middy/core": "^3.6.2",
Expand Down
16 changes: 5 additions & 11 deletions examples/sam/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@
},
"devDependencies": {
"@types/aws-lambda": "^8.10.109",
"@types/jest": "^29.2.4",
"@types/jest": "^29.5.4",
"@types/node": "18.11.17",
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
"eslint": "^8.30.0",
"eslint-import-resolver-node": "^0.3.6",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.26.0",
"jest": "^29.3.1",
"ts-jest": "^29.0.3",
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"typescript": "^4.9.4"
"typescript": "^5.2.2"
},
"dependencies": {
"@aws-lambda-powertools/logger": "^1.12.1",
Expand All @@ -44,7 +38,7 @@
"@aws-sdk/client-ssm": "^3.360.0",
"@aws-sdk/lib-dynamodb": "^3.360.0",
"@middy/core": "^3.6.2",
"esbuild": "^0.18.14",
"esbuild": "^0.19.2",
"phin": "^3.7.0"
}
}
Loading