Comments (5)
I would like to contribute. Will submit a PR with the regex and unit tests.
from aws-lambda-powertools-typescript.
Hi @karthikeyanjp, thank you for reaching out.
I'll assign the issue to you and help merge the PR once ready.
from aws-lambda-powertools-typescript.
Referring to format of error locations as mentioned in https://nodejs.org/api/errors.html#errorstack & https://v8.dev/docs/stack-trace-api , we can support the following pattern:
plain-filename.js:line:column
or/absolute/path/to/file.js:line:column
or<transport-protocol>:///url/to/module/file.mjs:line:column
wrapped in ().- location with multiple colon. Example
at Script.runInThisContext (node:vm:130:12)
- location from an
eval
statement.
Example:
Error: unknown:
at eval (eval at <anonymous> (file:///home/foo/bar/some-file.ts:1:35), <anonymous>:1:7)
at <anonymous> (/home/foo/bar/file-that-threw-the-error.ts:52:3)
For pattern (3), the current & above proposed regex will extact eval at <anonymous> (file:///home/foo/bar/some-file.ts:1:35), <anonymous>:1)
instead of /home/foo/bar/file-that-threw-the-error.ts:52:
as there are two nested locations embedded within ().
I am proposing the regex /\(([^)]*?):(\d+):(\d+)\)\\?$/
. I tested and it works for all the cases.
Submitted PR #2194 .
@dreamorosi please let me know your thoughts on the new regex.
from aws-lambda-powertools-typescript.
This issue is now closed. Please be mindful that future comments are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
from aws-lambda-powertools-typescript.
This is now released under v2.0.3 version!
from aws-lambda-powertools-typescript.
Related Issues (20)
- Maintenance: review API docs & README for Idempotency
- Maintenance: review API docs & README for Batch
- Maintenance: review API docs & README across repo
- Bug: jmespath custom functions introspection breaks when minifying HOT 2
- Docs: add development and bundling setup info HOT 1
- Maintenance: adopt AppConfig L2 constructs in Parameters integration tests
- Maintenance: mark `captureAWS` and `captureAWSClient` methods as deprecated in Tracer HOT 3
- Maintenance: move code snippets under `examples` HOT 1
- Maintenance: start linting markdown files HOT 2
- Feature request: allow `BaseProvider` in Parameters to not have a client
- Feature request: avoid tracing API calls made during init (top-level `await`) HOT 1
- Feature request: allow parser set event type of handler with middy HOT 1
- RFC: Event Handler router HOT 4
- Bug: Parser's S3 event notifications schemas HOT 4
- Maintenance: revamp issue & PR templates HOT 4
- Maintenance: Update roadmap April HOT 4
- Maintenance: update labels in automation HOT 2
- Bug: LambdaFunctionUrlSchema fails with CloudFront Origin Access Control (OAC) HOT 4
- Feature request: Plans for alternative parser implementations HOT 5
- Bug: When under load lambda throws error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-lambda-powertools-typescript.