We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 804aef5 commit 3ca5a3dCopy full SHA for 3ca5a3d
1 file changed
javascript/extractor/lib/typescript/src/main.ts
@@ -245,6 +245,12 @@ function parseSingleFile(filename: string): {ast: ts.SourceFile, code: string} {
245
return {ast, code};
246
}
247
248
+/**
249
+ * Matches a path segment referencing a package in a node_modules folder, and extracts
250
+ * two capture groups: the package name, and the relative path in the package.
251
+ *
252
+ * For example `lib/node_modules/@foo/bar/src/index.js` extracts the capture groups [`@foo/bar`, `src/index.js`].
253
+ */
254
const nodeModulesRex = /[/\\]node_modules[/\\]((?:@[\w.-]+[/\\])?\w[\w.-]*)[/\\](.*)/;
255
256
function handleOpenProjectCommand(command: OpenProjectCommand) {
0 commit comments