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 packageName generation #114

Merged
merged 4 commits into from
Mar 3, 2020

Conversation

andreban
Copy link
Member

  • Fixes regex to handle multiple invalid characters
  • Moves generatePackageId to util.
  • Adds a test for multiple invalid characters

Closes #113

@andreban andreban requested a review from PEConn February 29, 2020 09:15
@@ -25,6 +25,10 @@ import {WebManifestIcon} from './types/WebManifest';
const execPromise = promisify(exec);
const extractZipPromise = promisify(extractZip);

// Regex for disallowed characters on Android Packages, as per
// https://developer.android.com/guide/topics/manifest/manifest-element.html#package
const DISALLOWED_ANDROID_PACKAGE_CHARS_REGEX = /[^ a-zA-Z0-9_\.]/g;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think there should be a space in here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that shouldn't be there. Removed and added a test for input with spaces.

- Removes extra space from the regex.
- Adds a test for input with spaces.
@andreban andreban merged commit 8e7f6f4 into GoogleChromeLabs:master Mar 3, 2020
@andreban andreban added the bug Something isn't working label Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace all occurrences of the dashes to underscores in package id
2 participants