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

feat: Add enforce lockfile bootstrap command config #600

Merged
merged 22 commits into from
Dec 22, 2023

Conversation

Ayman-Barghout
Copy link
Contributor

@Ayman-Barghout Ayman-Barghout commented Nov 13, 2023

Description

This change is to ensure which versions are being used, as minor changes sadly can have breaking changes to your codebase (conflicting names for example), so this option is to make sure all machines/environments are running the same versions.

This resolves #575.

Edit: Enforcing it on CI isn't a good idea as some monorepos don't check in lock files for packages if they are published, so it should always be optional.

Type of Change

  • feat -- New feature (non-breaking change which adds functionality)
  • 🛠️ fix -- Bug fix (non-breaking change which fixes an issue)
  • ! -- Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 refactor -- Code refactor
  • ci -- Build configuration change
  • 📝 docs -- Documentation
  • 🗑️ chore -- Chore

@CLAassistant
Copy link

CLAassistant commented Nov 13, 2023

CLA assistant check
All committers have signed the CLA.

@Ayman-Barghout Ayman-Barghout changed the title Add enforce lockfile bootstrap command config and make it default for CI environments feat: Add enforce lockfile bootstrap command config and make it default for CI environments Nov 13, 2023
@Ayman-Barghout Ayman-Barghout changed the title feat: Add enforce lockfile bootstrap command config and make it default for CI environments feat: Add enforce lockfile bootstrap command config Nov 13, 2023
Copy link
Collaborator

@spydon spydon left a comment

Choose a reason for hiding this comment

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

Lgtm!

@spydon
Copy link
Collaborator

spydon commented Nov 21, 2023

@Ayman-Barghout the analyzer warnings are already fixed in #602, no harm in fixing them in here too to show that it is green though, as long as the other one is merged first. :)

@Ayman-Barghout
Copy link
Contributor Author

@Ayman-Barghout the analyzer warnings are already fixed in #602, no harm in fixing them in here too to show that it is green though as long as the other one is merged first. :)

Oh, my bad, didn't notice :) sure thing, I am gonna wait till #602 merge then 🙌

packages/melos/lib/src/workspace_configs.dart Outdated Show resolved Hide resolved
@Salakar
Copy link
Member

Salakar commented Dec 4, 2023

Could we add this as a flag to bootstrap too, melos bootstrap --enforce-lockfile?

@spydon
Copy link
Collaborator

spydon commented Dec 14, 2023

@Ayman-Barghout did you see Salakar's comment?

@Ayman-Barghout
Copy link
Contributor Author

@Ayman-Barghout did you see Salakar's comment?

Sadly not, just noticed it when you pinged 🙂 will work on it ASAP

@spydon
Copy link
Collaborator

spydon commented Dec 18, 2023

@Ayman-Barghout you can have a look at #604 to see how to do it :)

@Ayman-Barghout
Copy link
Contributor Author

@spydon @Salakar fixed and thanks for the help! 🙏

Copy link
Collaborator

@spydon spydon left a comment

Choose a reason for hiding this comment

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

One final comment, the rest looks good!

docs/commands/bootstrap.mdx Outdated Show resolved Hide resolved
docs/commands/bootstrap.mdx Outdated Show resolved Hide resolved
docs/commands/bootstrap.mdx Outdated Show resolved Hide resolved
docs/commands/bootstrap.mdx Outdated Show resolved Hide resolved
docs/commands/bootstrap.mdx Outdated Show resolved Hide resolved
docs/commands/bootstrap.mdx Outdated Show resolved Hide resolved
docs/configuration/overview.mdx Outdated Show resolved Hide resolved
docs/configuration/overview.mdx Outdated Show resolved Hide resolved
Copy link
Collaborator

@spydon spydon left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution :)

@spydon spydon merged commit b9c6d0c into invertase:main Dec 22, 2023
10 checks passed
Salakar pushed a commit that referenced this pull request Dec 29, 2023
* Enforce lockfile for CI environments

* Add enforce lockfile to bootstrap command config

* Enforce lockfile based on the bootstrap command workspace config

* Update overview.mdx with enforce lockfile option

* Update the `docstring` for `enforceLockfile` to include it is default for CI

* Update workspace config and bootstrap tests to include the new enforceLockfile property

* Stop enforcing lock file on CI by default

* Remove unnecessary parenthesis as linter is complaining

* Update enforcing lock files to be inclusive of Dart as well as Flutter

Co-authored-by: Lukas Klingsbo <[email protected]>

* Add `--enforce-lockfile` as a bootstrap flag

* Fix duplicate calling of enforce lockfile flag

* Consolidate bootstrap flags documentation

* Update docs/commands/bootstrap.mdx for clarity

Co-authored-by: Lukas Klingsbo <[email protected]>

* Update docs/commands/bootstrap.mdx for clarity

Co-authored-by: Lukas Klingsbo <[email protected]>

* Update docs/commands/bootstrap.mdx for clarity

Co-authored-by: Lukas Klingsbo <[email protected]>

* Update docs/commands/bootstrap.mdx for clarity

Co-authored-by: Lukas Klingsbo <[email protected]>

* Update docs/commands/bootstrap.mdx formatting

Co-authored-by: Lukas Klingsbo <[email protected]>

* Update docs/configuration/overview.mdx for better clarity

Co-authored-by: Lukas Klingsbo <[email protected]>

* Update docs/configuration/overview.mdx for better clarity

Co-authored-by: Lukas Klingsbo <[email protected]>

---------

Co-authored-by: Lukas Klingsbo <[email protected]>
spydon added a commit that referenced this pull request Jan 11, 2024
* Enforce lockfile for CI environments

* Add enforce lockfile to bootstrap command config

* Enforce lockfile based on the bootstrap command workspace config

* Update overview.mdx with enforce lockfile option

* Update the `docstring` for `enforceLockfile` to include it is default for CI

* Update workspace config and bootstrap tests to include the new enforceLockfile property

* Stop enforcing lock file on CI by default

* Remove unnecessary parenthesis as linter is complaining

* Update enforcing lock files to be inclusive of Dart as well as Flutter

Co-authored-by: Lukas Klingsbo <[email protected]>

* Add `--enforce-lockfile` as a bootstrap flag

* Fix duplicate calling of enforce lockfile flag

* Consolidate bootstrap flags documentation

* Update docs/commands/bootstrap.mdx for clarity

Co-authored-by: Lukas Klingsbo <[email protected]>

* Update docs/commands/bootstrap.mdx for clarity

Co-authored-by: Lukas Klingsbo <[email protected]>

* Update docs/commands/bootstrap.mdx for clarity

Co-authored-by: Lukas Klingsbo <[email protected]>

* Update docs/commands/bootstrap.mdx for clarity

Co-authored-by: Lukas Klingsbo <[email protected]>

* Update docs/commands/bootstrap.mdx formatting

Co-authored-by: Lukas Klingsbo <[email protected]>

* Update docs/configuration/overview.mdx for better clarity

Co-authored-by: Lukas Klingsbo <[email protected]>

* Update docs/configuration/overview.mdx for better clarity

Co-authored-by: Lukas Klingsbo <[email protected]>

---------

Co-authored-by: Lukas Klingsbo <[email protected]>
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.

request: Add option to enforce lockfile in bootstrap
4 participants