Skip to content

Commit

Permalink
Added regex comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dhuebner committed Dec 6, 2024
1 parent fc2123a commit ad3cd23
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/plugin-ext/src/common/plugin-identifiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ export namespace PluginIdentifiers {
return { id: probablyId.slice(0, endOfName) as UnversionedId, version: probablyId.slice(endOfName + 1) };
}

/**
* Regular expression to match plugin identifiers.
*
* The pattern matches strings in the format: `vendor.name@version`.
*
* Expected matching strings examples:
* - `vendor.name@prerelease`
* - `[email protected]`
* - `[email protected]`
*/
const EXTENSION_IDENTIFIER_WITH_VERSION_REGEX = /^([^.]+\..+)@((prerelease)|(\d+\.\d+\.\d+(-.*)?))$/;

/**
Expand Down

0 comments on commit ad3cd23

Please sign in to comment.