Skip to content

Conversation

@petruki
Copy link
Member

@petruki petruki commented Oct 7, 2025

This pull request refactors how snapshot data is structured and accessed throughout the codebase, simplifying the snapshot format by removing the unnecessary data wrapper. It updates all relevant code, tests, and fixtures to directly reference domain at the root level, improving consistency and clarity. Additionally, it updates dependencies and bumps the project version.

Snapshot Data Structure Refactor

  • Changed all snapshot JSON files and related code to remove the data wrapper, so domain is now at the root level. All code references to snapshot.data.domain are updated to snapshot.domain for consistency. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]
  • Updated all test fixtures and test logic to match the new snapshot format, ensuring tests reference domain directly. [1] [2] [3] [4] [5] [6] [7] [8] [9]

API and Logic Adjustments

  • Refactored resolver logic and related functions to work with the new snapshot format, including updates to parameter names and internal references from data.domain to domain. [1] [2] [3] [4]
  • Updated remote snapshot resolution to return only the domain portion of the response.

Version and Dependency Updates

  • Bumped project version to 4.5.0 in package.json and sonar-project.properties. [1] [2]
  • Updated @typescript-eslint/eslint-plugin and @typescript-eslint/parser dev dependencies to 8.46.0.

These changes streamline the snapshot format, making the codebase easier to maintain and reducing the risk of errors due to inconsistent data structures.

Breaking change

Snapshot content before:

{
   "data": {
        "domain": {
            "name": "switcher-domain",
            "activated": true,
            "group": [...]
        }
    }
}

Snapshot content now:

{
    "domain": {
        "name": "switcher-domain",
        "activated": true,
        "group": [...]
    }
}

@petruki petruki added this to the v4.5.0 milestone Oct 7, 2025
@petruki petruki self-assigned this Oct 7, 2025
@petruki petruki added the enhancement New feature or request label Oct 7, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 7, 2025

@petruki petruki merged commit def41ff into master Oct 7, 2025
13 checks passed
@petruki petruki deleted the staging branch October 7, 2025 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants