Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions qiita-markdown.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ Gem::Specification.new do |spec|
spec.add_dependency "qiita_marker", "~> 0.23.9"
spec.add_dependency "rouge", "~> 4.2"
spec.add_dependency "sanitize"
spec.add_dependency "uri", ">= 1.0.4"

Choose a reason for hiding this comment

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

medium

For better dependency management and to prevent potential future breakages, it's recommended to use a pessimistic version constraint.

While >= 1.0.4 correctly resolves the security vulnerability, it allows any future version of the uri gem, including major versions with breaking changes (e.g., 2.0.0).

Using ~> 1.0.4 (which is equivalent to >= 1.0.4 and < 1.1.0) will ensure you get security patches within the 1.0.x series while protecting against breaking changes in future minor or major releases. This is also consistent with other versioned dependencies in this file like qiita_marker and rouge.

This approach enhances the stability for consumers of this gem.

  spec.add_dependency "uri", "~> 1.0.4"

Copy link
Member Author

Choose a reason for hiding this comment

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

Since it's a library, I don't think there's a strong need to pessimistic version.

spec.metadata["rubygems_mfa_required"] = "true"
end