Skip to content

Commit

Permalink
release(v0.2.20): initial beta support for Modular Models (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-jeffery authored Mar 28, 2024
1 parent 319616e commit 0e21f8d
Show file tree
Hide file tree
Showing 16 changed files with 812 additions and 465 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v0.2.20

### [0.2.20](https://github.com/openfga/vscode-ext/compare/v0.2.19...v0.2.20) (2024-03-28)

- feat: initial beta support for [Modular Models](https://github.com/openfga/rfcs/blob/main/20231212-modular-models.md)

## v0.2.19

### [0.2.19](https://github.com/openfga/vscode-ext/compare/v0.2.18...v0.2.19) (2024-02-27)
Expand Down
28 changes: 20 additions & 8 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"vscode": "^1.75.0"
},
"dependencies": {
"@openfga/syntax-transformer": "^0.2.0-beta.11",
"@openfga/syntax-transformer": "^0.2.0-beta.14",
"vscode-languageclient": "^9.0.1"
},
"devDependencies": {
Expand Down
6 changes: 4 additions & 2 deletions client/src/extension.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ let client: LanguageClient;
// this method is called when vs code is activated
export function activate(context: ExtensionContext) {
// Register the server for all document types
const documentSelector = [{ language: "openfga" }, { language: "yaml-store-openfga" }];
const documentSelector = [{ language: "openfga" }, { language: "yaml-store-openfga" }, { language: "mod-openfga" }];

// Options to control the language client
const clientOptions: LanguageClientOptions = {
documentSelector,
synchronize: {
fileEvents: workspace.createFileSystemWatcher("**/*.{fga.yaml,fga,openfga,openfga.yaml,yaml,json,csv}"),
fileEvents: workspace.createFileSystemWatcher(
"**/?(fga.mod|*.{fga.yaml,fga,openfga,openfga.yaml,yaml,json,csv})",
),
},
initializationOptions: {},
};
Expand Down
10 changes: 8 additions & 2 deletions client/src/extension.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@ export function activate(context: ExtensionContext) {
// Options to control the language client
const clientOptions: LanguageClientOptions = {
// Register the server for all document types
documentSelector: [{ language: "openfga" }, { language: "yaml-store-openfga" }],

diagnosticPullOptions: {
onChange: true,
},
documentSelector: [{ language: "openfga" }, { language: "yaml-store-openfga" }, { language: "mod-openfga" }],
synchronize: {
fileEvents: workspace.createFileSystemWatcher("**/*.{fga.yaml,fga,openfga,openfga.yaml,yaml,json,csv}"),
fileEvents: workspace.createFileSystemWatcher(
"**/?(fga.mod|*.{fga.yaml,fga,openfga,openfga.yaml,yaml,json,csv})",
),
},
};

Expand Down
Loading

0 comments on commit 0e21f8d

Please sign in to comment.