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

Add basename option #1478

Closed
wants to merge 3 commits into from
Closed

Add basename option #1478

wants to merge 3 commits into from

Conversation

Cefold
Copy link

@Cefold Cefold commented Feb 15, 2023

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:
Add basename option to generateFinalBasename, that we could avoid this error if the appname has space.

@Cefold Cefold requested a review from a team as a code owner February 15, 2023 22:32
@welcome
Copy link

welcome bot commented Feb 15, 2023

Thanks for opening a pull request!

Here are some highlighted action items that will help get it across the finish line, from the
pull request guidelines:

  • Follow the JavaScript coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes in NEWS.md and other docs.
  • Include tests when adding/changing behavior.

Development and triage is community-driven, so please be patient and we will get back to you as soon as we can.

@codecov
Copy link

codecov bot commented Feb 15, 2023

Codecov Report

Merging #1478 (710a627) into main (512e3af) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1478   +/-   ##
=======================================
  Coverage   95.58%   95.58%           
=======================================
  Files          15       15           
  Lines         793      793           
=======================================
  Hits          758      758           
  Misses         35       35           
Impacted Files Coverage Δ
src/copy-filter.js 100.00% <ø> (ø)
src/common.js 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@malept malept left a comment

Choose a reason for hiding this comment

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

I think there are better solutions for this problem than adding yet another confusing option to Packager, but I'll let other Ecosystem WG members weigh in.

@Cefold
Copy link
Author

Cefold commented Feb 15, 2023

I think there are better solutions for this problem than adding yet another confusing option to Packager, but I'll let other Ecosystem WG members weigh in.

We could also try this: ${sanitizeAppName(opts.name.replace(' ', ''))}-${opts.platform}-${opts.arch}, but it might break electron-forge or other dependents.

@malept
Copy link
Member

malept commented Feb 15, 2023

Regardless of the implementation, it'd be best if you added tests which showed what the intended behavior is supposed to be.

@Cefold
Copy link
Author

Cefold commented Jun 14, 2023

Any recommendation from WG-ecosystem?

@felixrieseberg
Copy link
Member

felixrieseberg commented Jul 5, 2023

I just came across this problem, too. This solution here would fix my problem. Spaces in folders are bad, even on macOS.

The real problem is that electron-packager lets you disable the use of tmpdir but doesn't let you control what the folder is named it'll use to package. I'd love to override the folder name - or, alternatively, have it use name over productName for the folder naming.

@malept I think I'm generally in favor of merging it in.

@malept
Copy link
Member

malept commented Jul 5, 2023

 have it use name over productName for the folder naming.

I'd be more inclined to do this than add another flag, but I currently lack the context of what might break if we did that.

@felixrieseberg
Copy link
Member

In theory, the internal folder structure is an implementation detail and not part of the API, so we could change it in a minor version.

@felixrieseberg
Copy link
Member

I'd love to fix this problem! I tried a few things here and I believe that changing how we generate the name is the best thing we can do, because either solution will require a change in electron-forge.

I'm closing this PR here. @Cefold I am so sorry about how long it took for us to actually act here.

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.

3 participants