Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: installing local dep from directory that starts with @ #6350

Merged
merged 2 commits into from Apr 3, 2023
Merged

Conversation

zkochan
Copy link
Member

@zkochan zkochan commented Apr 3, 2023

close #6332

export function tryGetPackageId (registries: Registries, relDepPath: string) {
if (relDepPath[0] !== '/') {
return null
}
const sepIndex = relDepPath.indexOf('(')
if (sepIndex !== -1) {
return resolve(registries, relDepPath.slice(0, sepIndex))
if (sepIndex !== -1 && relDepPath.search(PEERS_SUFFIX_REGEX) !== -1) {

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on
library input
may run slow on strings with many repetitions of '(()'.
This
regular expression
that depends on
library input
may run slow on strings starting with '(' and with many repetitions of '('.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of '(()'.
This
regular expression
that depends on
library input
may run slow on strings starting with '(' and with many repetitions of '('.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of '(()'.
This
regular expression
that depends on
library input
may run slow on strings starting with '(' and with many repetitions of '('.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of '(()'.
This
regular expression
that depends on
library input
may run slow on strings starting with '(' and with many repetitions of '('.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of '(()'.
This
regular expression
that depends on
library input
may run slow on strings starting with '(' and with many repetitions of '('.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of '(()'.
This
regular expression
that depends on
library input
may run slow on strings starting with '(' and with many repetitions of '('.
if (sepIndex !== -1) {
return resolve(registries, relDepPath.slice(0, sepIndex))
if (sepIndex !== -1 && relDepPath.search(PEERS_SUFFIX_REGEX) !== -1) {
return resolve(registries, relDepPath.replace(PEERS_SUFFIX_REGEX, ''))

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on
library input
may run slow on strings with many repetitions of '(()'.
This
regular expression
that depends on
library input
may run slow on strings starting with '(' and with many repetitions of '('.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of '(()'.
This
regular expression
that depends on
library input
may run slow on strings starting with '(' and with many repetitions of '('.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of '(()'.
This
regular expression
that depends on
library input
may run slow on strings starting with '(' and with many repetitions of '('.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of '(()'.
This
regular expression
that depends on
library input
may run slow on strings starting with '(' and with many repetitions of '('.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of '(()'.
This
regular expression
that depends on
library input
may run slow on strings starting with '(' and with many repetitions of '('.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of '(()'.
This
regular expression
that depends on
library input
may run slow on strings starting with '(' and with many repetitions of '('.
@zkochan zkochan merged commit 94f94ee into main Apr 3, 2023
14 checks passed
@zkochan zkochan deleted the fix/6332 branch April 3, 2023 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY when using local package as dependency
1 participant