Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: Allow matching absolute paths#16

Open
timfish wants to merge 1 commit intonodejs:mainfrom
timfish:feat/match-absolute-paths
Open

feat: Allow matching absolute paths#16
timfish wants to merge 1 commit intonodejs:mainfrom
timfish:feat/match-absolute-paths

Conversation

@timfish
Copy link
Contributor

@timfish timfish commented May 22, 2025

Replaces ModuleMatcher struct with a CodeMatcher enum which allows matching to both dependency code and absolute paths.

This changes the matching API. Now you always pass the absolute path to the file and can optionally include the dependency details if this file is in a dependency in node_modules.

So the JavaScript API would change to something like this:

interface InstrumentationMatcher {
  // If this returns undefined, we know there's no transforming required for this specific file
  getTransformer(absolute_path: string, dependency?: { name: string, version: string, relative_path: string }): Transformer | undefined;
}

timfish added a commit to timfish/orchestrion-js that referenced this pull request Jul 30, 2025
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.

Allow injecting into non-dependency code

1 participant