Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Handle packages from organizations on link #1138

Merged
merged 1 commit into from
Jul 22, 2019
Merged

Conversation

spalladino
Copy link
Contributor

Fixes #1137

@spalladino spalladino requested a review from ylv-io July 20, 2019 19:58
Copy link
Contributor

@ylv-io ylv-io left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and small fix! 👍

@@ -74,6 +74,15 @@ export default class Dependency {
return this.fromNameWithVersion(nameAndVersion);
}

public static splitNameAndVersion(nameAndVersion: string): [string, string] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public static splitNameAndVersion(nameAndVersion: string): [string, string] {
public static splitNameAndVersion(nameAndVersion: string): [string, string] {
const isOrg = nameAndVersion.startsWith('@');
const [name, version] = (isOrg ? nameAndVersion.slice(1) : nameAndVersion).split('@');
return [isOrg ? `@${name}` : name, version];
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm why the extra indentation? Looks odd.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A glitch during copy-paste. Github actually doesn't allow to make multiple line suggestions yet.

@spalladino spalladino merged commit 2640124 into master Jul 22, 2019
@spalladino spalladino deleted the fix/link-org-packages branch July 22, 2019 13:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error "Could not find dependency ." when installing @openzeppelin/contracts-ethereum-package
2 participants