Skip to content

Commit ad3cd23

Browse files
committed
Added regex comment
1 parent fc2123a commit ad3cd23

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/plugin-ext/src/common/plugin-identifiers.ts

+10
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@ export namespace PluginIdentifiers {
8282
return { id: probablyId.slice(0, endOfName) as UnversionedId, version: probablyId.slice(endOfName + 1) };
8383
}
8484

85+
/**
86+
* Regular expression to match plugin identifiers.
87+
*
88+
* The pattern matches strings in the format: `vendor.name@version`.
89+
*
90+
* Expected matching strings examples:
91+
* - `vendor.name@prerelease`
92+
93+
94+
*/
8595
const EXTENSION_IDENTIFIER_WITH_VERSION_REGEX = /^([^.]+\..+)@((prerelease)|(\d+\.\d+\.\d+(-.*)?))$/;
8696

8797
/**

0 commit comments

Comments
 (0)