Skip to content

feat: Expose Transformer moduleName and filePath#74

Merged
timfish merged 4 commits into
mainfrom
feat/expose-moduleName
May 26, 2026
Merged

feat: Expose Transformer moduleName and filePath#74
timfish merged 4 commits into
mainfrom
feat/expose-moduleName

Conversation

@timfish
Copy link
Copy Markdown
Contributor

@timfish timfish commented May 26, 2026

For dianostics we would like to track modules which have been transformed. This is easier to do if we can see which module a transformer matches!

Copy link
Copy Markdown
Contributor

@jsumners-nr jsumners-nr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but the doc can be more complete. Do you think it would be valuable to also expose the resolved directory for the module?

Comment thread lib/transformer.js Outdated
@bizob2828
Copy link
Copy Markdown
Contributor

Looks good, but the doc can be more complete. Do you think it would be valuable to also expose the resolved directory for the module?

The resolved directory would help a ton for things we've had to do in our agent.

Comment thread index.d.ts
Co-authored-by: James Sumners <jsumners@newrelic.com>
@timfish
Copy link
Copy Markdown
Contributor Author

timfish commented May 26, 2026

The resolved directory would help a ton for things we've had to do in our agent.

I exposed filePath too. To get the absolute path at transform time we will need to do this in tracing-hooks, etc.

@timfish timfish requested a review from bengl May 26, 2026 12:53
@timfish timfish requested a review from Qard May 26, 2026 12:56
@timfish timfish changed the title feat: Expose Transformer moduleName feat: Expose Transformer moduleName and filePath May 26, 2026
@timfish timfish merged commit 954539b into main May 26, 2026
8 checks passed
@timfish timfish deleted the feat/expose-moduleName branch May 26, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants