Ensure package.json is writable in *.vsix#508
Merged
joaomoreno merged 2 commits intomicrosoft:masterfrom Nov 20, 2020
Merged
Conversation
joaomoreno
requested changes
Nov 19, 2020
Member
joaomoreno
left a comment
There was a problem hiding this comment.
Makes sense. But why not simply implement onFile on the ManifestProcessor and change the file mode when the package.json file comes along? This would be a much smaller change.
Contributor
Author
|
Thanks for the suggestion, I have made the required changes. |
joaomoreno
reviewed
Nov 20, 2020
VSC requires the manifest file unpacked from the .vsix archive to be marked as writable (see [1]). Since generating writable artifacts is difficult in some build systems (such as Bazel), it would be helpful if vsce itself could ensure that the file mode of the manifest is correct. With this commit, the correct file mode on `package.json` is set automatically by the packaging process via a new `Processor` and yazl's `mode` argument. [1]: https://github.com/microsoft/vscode/blob/88144f6d31718288c7a2c6fb741e0646d40804cf/src/vs/platform/extensionManagement/node/extensionsScanner.ts#L144
joaomoreno
reviewed
Nov 20, 2020
Member
joaomoreno
left a comment
There was a problem hiding this comment.
Looking great! Wanna try adding a test for it? It should be relatively straightforward.
Contributor
Author
|
I added a unit test for |
Member
|
Great work, thanks! 🍻 |
Contributor
Author
|
Would it be possible to get an NPM release of 1.83.0? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VSC requires the manifest file unpacked from the .vsix archive to be
marked as writable (see 1). Since generating writable artifacts is
difficult in some build systems (such as Bazel), it would be helpful if
vsce itself could ensure that the file mode of the manifest is correct.
With this commit, the correct file mode on
package.jsonis setautomatically by the packaging process via a new
Processorand yazl'smodeargument.