Skip to content

Commit

Permalink
fix: use proper package name for org-related packages
Browse files Browse the repository at this point in the history
  • Loading branch information
byCedric authored Apr 1, 2024
1 parent c961317 commit fe8c9a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/package.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Pattern to match the last `node_modules/<name>` occurance in a string */
const NODE_MODULES_NAME_PATTERN = /(?:.*\/)?node_modules\/([^/]+)/i;
/** Pattern to match the last `node_modules/@<org>/<name>` or `node_modules/<name>` occurrence in a string */
const NODE_MODULES_NAME_PATTERN = /(?:.*\/)?node_modules\/((?:@[^/]+\/[^/]+)|[^/]+)/i;
/** A simple map to return previously resolved package names from paths */
const packageNameCache = new Map<string, string>();

Expand Down

0 comments on commit fe8c9a2

Please sign in to comment.