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

chore: use linefix to ensure platform line endings #135

Merged
merged 2 commits into from
May 11, 2023

Conversation

stevenh
Copy link
Contributor

@stevenh stevenh commented May 10, 2023

Use linefix so that when developing changes the results of npm run prepare always have unix line endings so git diff commands don't show line ending changes for the ncc generated files.

Use lec so that when developing changes the results of npm run prepare
always have unix line endings so git diff commands don't show line
ending changes for the ncc generated files.
Copy link
Owner

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

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

This is a very good idea, but isn’t there a way in ncc to tell it to create reproducible builds regardless of OS? I would even like to get rid of ncc altogether as it feels like a huge cludge just to get actions going. Maybe using something like rollup instead might be able to create vastly better bundles and even properly bundle-split the common code.

As I often maintain this on windows, looking at git diff output is a huge pain sometimes.

"resolved": "https://registry.npmjs.org/lec/-/lec-1.0.1.tgz",
"integrity": "sha512-3pIFvYBrdpfMK2cxP4xRBOrM56x1A1SykesXJ1I8/b6sUWvPYhM8p/1jIig0kRrmaKhW9c182GRgNOwwUh3i3A==",
"dependencies": {
"coffee-script": "^1.10.0",
Copy link
Owner

Choose a reason for hiding this comment

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

uff, jesus… I srsly don’t want to pull in coffeescript of all things for something as trivial as this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately it doesn't seem like ncc has any options there, seems to be hard coded to windows line endings which is odd. There's an open issue about line endings which doesn't look like it's going to be fixed.

Ahh yes, that's a bit heavy isn't it :(

I'll see if there's something lighter, thanks for the consideration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

linefix seems to do the trick and has zero dependencies.

Replace lec with linefix which is much lighter weight having no external
dependencies.
@stevenh stevenh changed the title chore: use lec to ensure unix line endings chore: use linefix to ensure platform line endings May 11, 2023
@Swatinem Swatinem merged commit 68aeeba into Swatinem:master May 11, 2023
20 checks passed
@stevenh stevenh deleted the chore/line-endings branch May 17, 2023 11:28
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.

None yet

2 participants