Skip to content

Make Rule.conditions readonly (fixes #419)#420

Merged
chris-pardy merged 3 commits intoCacheControl:masterfrom
emilefokkemanavara:issue/419/rule-conditions-readonly
Feb 16, 2026
Merged

Make Rule.conditions readonly (fixes #419)#420
chris-pardy merged 3 commits intoCacheControl:masterfrom
emilefokkemanavara:issue/419/rule-conditions-readonly

Conversation

@emilefokkemanavara
Copy link
Contributor

@emilefokkemanavara emilefokkemanavara commented May 29, 2025

This

  • changes a test to use the correct setter method to change a Rule's conditions
  • adds a test that shows that Rule.conditions is not the right setter
  • marks Rule.conditions as readonly in the types

Fixes #419

@emilefokkemanavara emilefokkemanavara changed the title Make Rule.conditions readonly Make Rule.conditions readonly (fixes #419) May 29, 2025
@chris-pardy chris-pardy merged commit 7740f33 into CacheControl:master Feb 16, 2026
3 checks passed
Copy link
Collaborator

@chris-pardy chris-pardy left a comment

Choose a reason for hiding this comment

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

Looks good — clean fix with tests. Thanks @emilefokkemanavara!

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.

Typings incorrectly suggest that Rule.conditions is a setter

3 participants