deno
16ca0b70 - fix(install): fix parse_npm_specifier for subpath specifiers

Commit
94 days ago
fix(install): fix parse_npm_specifier for subpath specifiers The hand-rolled parser returned the full "express/foo" / "@scope/pkg/ subpath" string when an npm specifier carried a subpath, which then produced bogus tsconfig `paths` entries (e.g. "npm:express/foo" → "./node_modules/express/foo") that wouldn't match the user's actual `import "npm:express"` and pointed at a directory that didn't exist. Delegate to deno_semver's NpmPackageReqReference, which already correctly parses subpaths, scoped/unscoped names, and version requirements, and pull just the package name out.
Author
Parents
Loading