Skip to content

refactor: simplify nuspec file structure by consolidating file entries into a single pattern #9140

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

beyondkmp
Copy link
Collaborator

@beyondkmp beyondkmp commented Jun 4, 2025

fix #9092

The app output of electron-builder is placed in a temporary directory, so we can directly copy all files into lib\net45 without needing to perform filtering.

Copy link

changeset-bot bot commented Jun 4, 2025

🦋 Changeset detected

Latest commit: b9bd889

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
electron-builder-squirrel-windows Patch
app-builder-lib Patch
dmg-builder Patch
electron-builder Patch
electron-forge-maker-appimage Patch
electron-forge-maker-nsis-web Patch
electron-forge-maker-nsis Patch
electron-forge-maker-snap Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@beyondkmp beyondkmp requested a review from mmaietta June 4, 2025 05:16
@mmaietta
Copy link
Collaborator

mmaietta commented Jun 4, 2025

I don't think this is a necessary change. I'd prefer explicit file includes as opposed to a glob + exclude filter. Is there a performance benefit to this PR?

@beyondkmp
Copy link
Collaborator Author

The old version used to copy all files into \lib\net45, so this approach doesn't seem to be an issue.

@mmaietta
Copy link
Collaborator

mmaietta commented Jun 6, 2025

The old version used to copy all files into \lib\net45, so this approach doesn't seem to be an issue.

I don't see a reason for this change from the current functionality being provided - this simplification doesn't seem needed. Allowlists are always my more preferred approach when it comes to production assets, not blocklists using exclude="**\.git and other exclusions as we can't guarantee if other files might accidentally be included by the end-developer's app configuration/setup.

If we're needing to handle extraFiles in being included, then can we explicitly pipe those into the inclusion array?

@beyondkmp
Copy link
Collaborator Author

@mmaietta How about we make this template file customizable? If users need to include more files, they could specify their own template. If none is specified, the current default template would be used.

@mmaietta
Copy link
Collaborator

Hmmm, that's a great proposal to handle very advanced use cases, not sure if the average dev will understand how to go that deep into nuspec.

Is there a way we could just loop through a property on squirrel for customizing the accepted/to-be-copied files?
Similar how it already does for:

    <file src="<%- exe %>" target="lib\net45\<%- exe %>" />
    <% additionalFiles.forEach(function(f) { %>
    <file src="<%- f.src %>" target="<%- f.target %>" />
    <% }); %>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.exe files not included in package after upgrading from 25.1.8 to 26.0.12
2 participants