Skip to content

Model editor: write JSON format by default - #4583

Merged
nickrolfe merged 3 commits into
mainfrom
nickrolfe/model-editor-json-default
Nov 20, 2026
Merged

nickrolfe merged 3 commits into
mainfrom
nickrolfe/model-editor-json-default

Conversation

@nickrolfe

Copy link
Copy Markdown
Contributor

Stacked on top of #4576. This one is blocked on CLI support for JSON data extensions being released.

As well as switching to JSON as the default, it also updates a CLI integration test to cover JSON.

@nickrolfe nickrolfe changed the title Model editor: write JSON format default Model editor: write JSON format by default Oct 5, 2026
@nickrolfe
nickrolfe added this pull request to stack #4584 October 7, 2026 09:46
Base automatically changed from nickrolfe/model-editor-json to main October 8, 2026 14:07
@nickrolfe
nickrolfe force-pushed the nickrolfe/model-editor-json-default branch from 5762442 to 96fcad5 Compare October 8, 2026 14:07
@nickrolfe
nickrolfe force-pushed the nickrolfe/model-editor-json-default branch from 96fcad5 to 5bad6be Compare November 12, 2026 15:55
@nickrolfe
nickrolfe marked this pull request as ready for review November 12, 2026 15:58
@nickrolfe
nickrolfe requested a review from a team as a code owner November 12, 2026 15:58
Copilot AI adaptive review requested due to automatic review settings November 12, 2026 15:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Existing model-pack manifests may still match only YAML files, causing newly saved JSON models to be ignored by the CLI and omitted on reload and from analysis.

1 open issue
What changed in this PR

Switches the model editor’s default format for new data extension files to JSON, building on the existing JSON loading and format-preserving save support.

Changes:

  • Sets JSON as the default for newly created model files.
  • Extends CLI integration tests to discover and load both JSON and YAML models.
  • Documents the default-format change in the changelog.
File Description
extensions/​ql-vscode/​test/​vscode-tests/​cli-integration/​model-editor/​modeled-method-fs.test.ts Adds JSON fixtures and mixed-format discovery and loading coverage.
extensions/​ql-vscode/​src/​model-editor/​modeled-method-fs.ts Changes the new-file default from YAML to JSON.
extensions/​ql-vscode/​CHANGELOG.md Announces the JSON default for new data extensions.

Review effort: Balanced (auto)

import type { QueryLanguage } from "../common/query-language";

export const DEFAULT_EXTENSION_FORMAT_FOR_NEW_FILES = ExtensionFormat.Yaml;
export const DEFAULT_EXTENSION_FORMAT_FOR_NEW_FILES = ExtensionFormat.Json;
@nickrolfe
nickrolfe merged commit db381f8 into main Nov 20, 2026
22 of 23 checks passed
@nickrolfe
nickrolfe deleted the nickrolfe/model-editor-json-default branch November 20, 2026 13:12
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.

3 participants