Skip to content

Conversation

@pre-martin
Copy link

"4 times empty string" looks like an error. To properly indent the manifest file after sanitizing it, either the number 4 or 4 spaces are required (or any other value or string).

See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#space for the details of JSON.stringify()

Indent manifest by 4 spaces.
@GeekyEggo
Copy link
Member

Hey Martin, this does indeed look to be an error, thanks for bringing it to our attention.

I notice this PR uses spaces, however the pack command is already using tabs (\t) elsewhere.

write(JSON.stringify(manifest, undefined, "\t"));

To remove the age-old “spaces vs tabs” debate, we’re going to introduce better format detection (and retention) of the manifest file. 👍

@pre-martin
Copy link
Author

Thanks for pointing that out. I didn't notice the formatting in the "version" method.

The worst thing is when tabs and spaces are mixed within the same file. That's why I've prepared an alternative pull request: #63

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.

2 participants