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

Don't track compiled production assets in git #148

Merged
merged 4 commits into from
Oct 30, 2023
Merged

Don't track compiled production assets in git #148

merged 4 commits into from
Oct 30, 2023

Conversation

mattheu
Copy link
Member

@mattheu mattheu commented Jun 5, 2023

Ideally, we would not have built assets tracked in git.

We have a script that builds production versions when you run npm version, and they will be included in a version published on NPM, which is the recommended way to use this file.

What do we lose. Right now you can just install from git... and that won't be possible. I was thinking about whether it was possible to include them in tagged releases only? Or a release branch? But i'm not really sure if this is necessary TBH. Is anyone using this project in this way?

@tomjn
Copy link
Contributor

tomjn commented Jul 26, 2023

Do we still want the package lock file?

@mattheu
Copy link
Member Author

mattheu commented Jul 27, 2023

Do we still want the package lock file?

@tomjn not sure what you mean... Yes, I think we do still need it?

kadamwhite
kadamwhite previously approved these changes Oct 25, 2023
Copy link
Contributor

@kadamwhite kadamwhite left a comment

Choose a reason for hiding this comment

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

+1, @mattheu.

I do think it would be useful to set up a build-to-branch or build-to-tag action, we have a couple to choose from: H2 has a build-to-release-branch action, so we could have a branch which tracks main but includes built assets; and we've also set up release actions before which add built assets when you create a version tag (and publish that as a release). But I don't think adding such a workflow is blocking.

@kadamwhite
Copy link
Contributor

I can't speak for @tomjn but I'm guessing he was thinking that if we're not including built assets and treating this only as a set of components, omitting the package lock might remove some friction around resolving package updates. I've heard a number of arguments over the years that lockfiles should be omitted from dependencies, and only used in the parent app or build system.

@tomjn
Copy link
Contributor

tomjn commented Oct 25, 2023 via email

tomjn
tomjn previously approved these changes Oct 26, 2023
@tomjn
Copy link
Contributor

tomjn commented Oct 26, 2023

I've approved, we can always remove the lock file in another PR

# Conflicts:
#	dist/index.asset.php
#	dist/index.js
@mattheu mattheu dismissed stale reviews from tomjn and kadamwhite via 9b71bac October 30, 2023 11:31
@mattheu
Copy link
Member Author

mattheu commented Oct 30, 2023

Ah I see what you're saying - remove the lock file from the distributed version. OK that makes sense. But yeah, lets do a separate PR for that as it's a slightly different change.

@mattheu mattheu merged commit affa1b9 into main Oct 30, 2023
2 checks passed
@mattheu mattheu deleted the ignore-dist branch October 30, 2023 11:33
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