You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**ESM support**| Added ESM support via dual CommonJS and ESM bundling, enabling top-level `await` and tree-shaking. | - |
15
15
|**Middy.js**| Updated import path for Middy.js middlewares to leverage subpath exports - i.e. `@aws-lambda-powertools/tracer/middleware`. | Yes |
16
16
|**Types imports**| Updated import path for TypeScript types to leverage subpath exports - i.e. `@aws-lambda-powertools/logger/types`. | Yes |
17
17
|**Logger**| Changed [log sampling](./core/logger.md#sampling-logs) to dynamically switch log level to `DEBUG` on a percentage of requests. | - |
18
18
|**Logger**| Updated [custom log formatter](#custom-log-formatter) to include standard as well as persistent keys. | Yes |
19
+
|**Logger**| Removed `ContextExamples` from `@aws-lambda-powertools/commons` package. | Yes |
19
20
|**Logger and Tracer**| Removed deprecated `createLogger` and `createTracer` helper functions in favor of direct instantiation. | Yes |
20
21
21
22
@@ -280,6 +281,56 @@ In v2, you have more control over **standard** (`attributes`) and [**custom keys
280
281
2. `LogItem` is the new return object instead of a plain object.
281
282
3. If you prefer adding at the initialization, use: <br/><br/> **`LogItem({persistentAttributes: additionalLogAttributes, attributes: baseAttributes})`**
282
283
284
+
### ContextExamples for testing
285
+
286
+
In v1, we have provided a `ContextExamples` object to help you with testing.
287
+
288
+
In v2, we have removed the `ContextExamples` from the `@aws-lambda-powertools/commons` package, so you need to create it in your tests:
289
+
290
+
=== "Before"
291
+
292
+
```typescript
293
+
import { ContextExamples as dummyContext } from '@aws-lambda-powertools/commons';
0 commit comments