Repository navigation
feat: per-platform packageContents for multi-file sub-packages - #7
Merged
Merged
Conversation
Some process plugins ship more than a standalone binary — e.g. a self-contained .NET app where the executable references DLLs and runtime files in the same directory. The new `packageContents` per-platform option points at a directory whose contents are copied recursively into the sub-package, instead of just the single `binaryPath` file. - `binaryPath` must be a file inside `packageContents`. It still names the executable in the npm reference URL and gets chmod 0o755 on Unix. - All other files in `packageContents` (including nested sub-directories like `runtimes/`) are copied verbatim and end up in the published tarball. - The tarball's sha256 covers everything, so dprint's per-platform verification still protects the whole package. Tests cover the multi-file copy (executable + DLLs + nested sub-dir file) and reject a binaryPath that isn't inside packageContents.
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.
Summary
Some process plugins ship more than a standalone binary — e.g. a self-contained .NET app where the executable references DLLs and a native runtime in the same directory (
dprint-plugin-roslynextracts to ~205 files). The new optionalpackageContentsper-platform field lets the helper ship the whole directory instead of just one file.```ts
platforms: [{
platform: "linux-x86_64",
binaryPath: "./out/linux-x64/dprint-plugin-roslyn",
packageContents: "./out/linux-x64",
}]
```
When set:
When `packageContents` is unset: behavior is unchanged (single-file copy).
Test plan