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

Update toDependency util to handle versions containing @ symbols #248

Merged
merged 1 commit into from
Sep 24, 2019

Conversation

Blasz
Copy link
Collaborator

@Blasz Blasz commented Sep 23, 2019

E.g. local file path installs could have @ symbols, especially if the
local path contains the fully scoped package name.

Fixes #239.

E.g. local file path installs could have @ symbols, especially if the
local path contains the fully scoped package name.
@@ -48,6 +48,18 @@ describe('options', () => {
expect(toDependency(nameWithVersion)).toEqual({ name: nameWithVersion });
nameWithVersion = `@packageName@${version}`;
expect(toDependency(nameWithVersion)).toEqual({ name, version });
// Version with @ symbol
expect(toDependency(`packageName@file:local/@my-packages`)).toEqual({
Copy link
Member

Choose a reason for hiding this comment

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

I found this example slightly confusing, but as explained irl, its looking at an unscoped package name with a path that contains an '@'. Super unlikely to ever happen, but an important code path to double check that the logic is correct.

@lukebatchelor lukebatchelor merged commit e9ee1fa into boltpkg:master Sep 24, 2019
@lukebatchelor
Copy link
Member

Released in 0.24.2 🎉

@Blasz Blasz deleted the fix-@-upgrades branch October 2, 2019 08:07
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.

Local paths containing '@' aren't handled properly
3 participants