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: atomic package add #234

Merged
merged 1 commit into from
Apr 15, 2024
Merged

feat: atomic package add #234

merged 1 commit into from
Apr 15, 2024

Conversation

ComradeVanti
Copy link
Collaborator

@ComradeVanti ComradeVanti commented Apr 15, 2024

Currently, when adding multiple packages using the add command, each will be added separately. That means, that if packages A, B and C are added and B fails for any reason, A and C will still be added to the manifest.

With this change add operations are now atomic. In the same scenario as before, the manifest would not be modified, since one of the packages could not be added.

A side-effect of this change is that add now only returns one error, instead of an array of them, since the first encountered error cancels the operation.

See #233

Currently, when adding multiple packages using the `add` command, each will be added separately. That means, that if packages A, B and C are added and B fails for any reason, A and C will still be added to the manifest.

With this change add operations are now atomic. In the same scenario as before, the manifest would not be modified, since one of the packages could not be added.

A side-effect of this change is that `add` now only returns one error, instead of an array of them, since the first encountered error cancels the operation.

See #223
@ComradeVanti
Copy link
Collaborator Author

@favoyang I would publish a new version for this, since it changes app behavior. Thoughts?

@ComradeVanti ComradeVanti merged commit 4b2fffc into master Apr 15, 2024
4 checks passed
@ComradeVanti ComradeVanti deleted the atomic-add branch April 15, 2024 14:14
github-actions bot pushed a commit that referenced this pull request Apr 15, 2024
# [1.21.0](1.20.0...1.21.0) (2024-04-15)

### Features

* atomic package add ([#234](#234)) ([4b2fffc](4b2fffc)), closes [#223](#223)
ComradeVanti added a commit that referenced this pull request Apr 15, 2024
Makes removing multiple packages an atomic operation, as was recently implemented for the add command. See #234 for a longer explanation.
ComradeVanti added a commit that referenced this pull request Apr 15, 2024
Makes removing multiple packages an atomic operation, as was recently implemented for the add command. See #234 for a longer explanation.
github-actions bot pushed a commit that referenced this pull request Apr 15, 2024
# [1.22.0](1.21.0...1.22.0) (2024-04-15)

### Features

* atomic package remove ([#236](#236)) ([4cd146c](4cd146c)), closes [#234](#234)
@favoyang
Copy link
Member

@favoyang I would publish a new version for this, since it changes app behavior. Thoughts?

Looks good.

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