Skip to content

feat(config): add versioned JSONC configuration - #235

Closed
Waishnav wants to merge 3 commits into
refactor/v11-presentation-reviewfrom
feat/v11-jsonc-config
Closed

feat(config): add versioned JSONC configuration#235
Waishnav wants to merge 3 commits into
refactor/v11-presentation-reviewfrom
feat/v11-jsonc-config

Conversation

@Waishnav

@WaishnavWaishnav commented Aug 23, 2026

Copy link
Copy Markdown
Owner

DevSpace persistent configuration is still a flat JSON and environment-oriented interface. This layer introduces versioned ~/.devspace/config.jsonc as the canonical product configuration, publishes a v1 JSON Schema generated from the runtime codec, and keeps legacy config.json plus environment overrides compatible. Intentional CLI writes preserve comments and unknown fields, while startup never mutates legacy config automatically.

Stacked on #234.

Stack created with GitHub Stacks CLIGive Feedback 💬

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a3ccc135-0af1-4013-8ac7-3e65fc6a3630

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@WaishnavWaishnav changed the title feat/v11 jsonc configfeat(config): add versioned JSONC configurationAug 23, 2026
@greptile-apps

Copy link
Copy Markdown

Greptile Summary

This PR introduces a versioned JSONC configuration format, migrates legacy JSON configuration into nested sections, and adds a published JSON Schema.

  • Adds JSONC parsing and comment-preserving configuration updates.
  • Updates runtime and CLI configuration access to the v1 nested structure with environment-variable precedence.
  • Adds schema, migration, parsing, and rewrite coverage.
  • The generated schema reference should be coordinated with the actual release tag.

Confidence Score: 4/5

The PR appears safe to merge from a runtime perspective, with the non-blocking requirement that the generated schema URL be aligned with a release tag that actually contains the schema.

Legacy migration and JSONC rewrite behavior preserve supported configuration semantics, but generated files currently reference a v1.1.0 schema tag that is not present and may not match the release version.

Files Needing Attention: src/user-config.ts, schema/devspace-config.schema.json

Important Files Changed

FilenameOverview
src/user-config.tsImplements v1 schemas, legacy migration, JSONC loading, and comment-preserving writes; its generated schema URL depends on an unavailable future tag.
src/config.tsAdapts runtime configuration to nested persisted sections while retaining environment-variable precedence and prior defaults.
src/cli.tsUpdates initialization, diagnostics, and config mutation commands to read and write the structured v1 configuration.
schema/devspace-config.schema.jsonAdds the generated v1 JSON Schema, including the same release-tag-dependent identifier.
src/user-config.test.tsCovers legacy migration, JSONC precedence, preservation of comments and unknown fields, variant transitions, and malformed input.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
Legacy[Legacy config.json] --> Migrate[migrateLegacyConfig]
JSONC[config.jsonc] --> Parse[JSONC parse and v1 validation]
Migrate --> Effective[Structured user config]
Parse --> Effective
Env[Environment overrides] --> Runtime[Runtime ServerConfig]
Effective --> Runtime
CLI[init / config set] --> Writer[Comment-preserving JSONC writer]
Writer --> JSONC
Writer --> SchemaRef[Generated $schema URL]
Loading

Reviews (1): Last reviewed commit: "test(config): cover jsonc migration and ..." | Re-trigger Greptile

Comment threadsrc/user-config.ts
Comment on lines +28 to +29
export const DEVSPACE_CONFIG_SCHEMA_URL =
"https://raw.githubusercontent.com/Waishnav/devspace/refs/tags/v1.1.0/schema/devspace-config.schema.json";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2Schema URL targets absent tag

Generated configurations reference the hard-coded v1.1.0 schema tag, while the package remains at 1.0.7 and the repository has no corresponding tag. Until a release containing this schema exists at that exact tag, editors cannot fetch the schema for validation and completion; publishing the feature under another version would leave the reference stale.

@Waishnav

Copy link
Copy Markdown
OwnerAuthor

Closing this stacked PR because the v1.1 configuration/runtime refactor is being collapsed into one review PR. The commits are preserved in the combined branch.

@Waishnav

Copy link
Copy Markdown
OwnerAuthor

Superseded by the combined v1.1 refactor PR #238.

Sign up for freeto 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.

1 participant

@Waishnav