Skip to content

Commit a3d4718

Browse files
authored
feat: update to Cedar SDK 4.9.0 (#44)
Signed-off-by: Kevin Hakanson <kevhak@amazon.com>
1 parent dbce03d commit a3d4718

File tree

11 files changed

+721
-512
lines changed

11 files changed

+721
-512
lines changed

.github/workflows/build_and_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ jobs:
3232
uses: actions/cache@v4
3333
with:
3434
path: ~/.cargo/bin/wasm-pack
35-
key: wasm-pack-${{ runner.os }}-v0.13.1
35+
key: wasm-pack-${{ runner.os }}-v0.14.0
3636

3737
- name: Update rust and install wasm-pack
3838
run: |
3939
rustup update stable && rustup default stable
40-
which wasm-pack || cargo install wasm-pack --version 0.13.1
40+
which wasm-pack || cargo install wasm-pack --version 0.14.0
4141
4242
- name: Cache cargo build artifacts
4343
# https://doc.rust-lang.org/cargo/guide/build-cache.html

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v0.10.2 (Preview) 2026-02-26
2+
3+
- Update to Cedar SDK 4.9.0
4+
- Cedar Schema JSON export resolves types
5+
16
## v0.10.1 (Preview) 2025-12-12
27

38
- Update to Cedar SDK 4.8.2

package-lock.json

Lines changed: 379 additions & 298 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"url": "https://github.com/cedar-policy/vscode-cedar/issues"
1313
},
1414
"qna": "https://github.com/cedar-policy/vscode-cedar/issues",
15-
"version": "0.10.1",
15+
"version": "0.10.2",
1616
"preview": true,
1717
"icon": "icons/cedar-policy.png",
1818
"engines": {
@@ -303,12 +303,12 @@
303303
"@types/mocha": "^10.0.10",
304304
"@types/node": "=18.15.0",
305305
"@types/vscode": "=1.83.0",
306-
"@typescript-eslint/eslint-plugin": "^8.49.0",
307-
"@typescript-eslint/parser": "^8.49.0",
306+
"@typescript-eslint/eslint-plugin": "^8.56.1",
307+
"@typescript-eslint/parser": "^8.56.1",
308308
"@vscode/test-cli": "^0.0.12",
309309
"@vscode/test-electron": "^2.5.2",
310310
"@vscode/vsce": "^3.7.1",
311-
"eslint": "^9.39.1",
311+
"eslint": "^9.39.3",
312312
"js-yaml": "^4.1.1",
313313
"mocha": "^11.7.5",
314314
"typescript": "^5.9.3"

schemas/cedarschema.schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@
238238
}
239239
]
240240
},
241-
"required": { "$ref": "#/$defs/requiredDef" }
241+
"required": { "$ref": "#/$defs/requiredDef" },
242+
"annotations": { "$ref": "#/$defs/annotationsDef" }
242243
},
243244
"required": ["type"],
244245
"additionalProperties": false

testdata/RFC48/cedarschema.json

Lines changed: 64 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,63 @@
55
"type": "Record",
66
"attributes": {
77
"id": {
8-
"type": "EntityOrCommon",
9-
"name": "Long",
10-
"annotations": { "doc": "task id" }
8+
"type": "Long",
9+
"annotations": {
10+
"doc": "task id"
11+
}
1112
},
12-
"name": { "type": "EntityOrCommon", "name": "String" },
13-
"state": { "type": "EntityOrCommon", "name": "String" }
13+
"name": {
14+
"type": "String"
15+
},
16+
"state": {
17+
"type": "String"
18+
}
1419
},
15-
"annotations": { "doc": "a common type representing a task" }
20+
"annotations": {
21+
"doc": "a common type representing a task"
22+
}
1623
},
1724
"Tasks": {
1825
"type": "Set",
19-
"element": { "type": "EntityOrCommon", "name": "Task" },
20-
"annotations": { "doc": "a common type representing a set of tasks" }
26+
"element": {
27+
"type": "TinyTodo::Task"
28+
},
29+
"annotations": {
30+
"doc": "a common type representing a set of tasks"
31+
}
2132
}
2233
},
2334
"entityTypes": {
2435
"Application": {},
2536
"List": {
26-
"memberOfTypes": ["Application"],
37+
"memberOfTypes": ["TinyTodo::Application"],
2738
"shape": {
2839
"type": "Record",
2940
"attributes": {
3041
"editors": {
31-
"type": "EntityOrCommon",
32-
"name": "Team",
33-
"annotations": { "doc": "editors of a list" }
42+
"type": "Entity",
43+
"name": "TinyTodo::Team",
44+
"annotations": {
45+
"doc": "editors of a list"
46+
}
47+
},
48+
"name": {
49+
"type": "String"
50+
},
51+
"owner": {
52+
"type": "Entity",
53+
"name": "TinyTodo::User"
3454
},
35-
"name": { "type": "EntityOrCommon", "name": "String" },
36-
"owner": { "type": "EntityOrCommon", "name": "User" },
3755
"readers": {
38-
"type": "EntityOrCommon",
39-
"name": "Team",
40-
"annotations": { "doc": "readers of a list" }
56+
"type": "Entity",
57+
"name": "TinyTodo::Team",
58+
"annotations": {
59+
"doc": "readers of a list"
60+
}
4161
},
42-
"tasks": { "type": "EntityOrCommon", "name": "Tasks" }
62+
"tasks": {
63+
"type": "TinyTodo::Tasks"
64+
}
4365
}
4466
},
4567
"annotations": {
@@ -52,18 +74,35 @@
5274
},
5375
"actions": {
5476
"DeleteList": {
55-
"appliesTo": { "resourceTypes": ["List"], "principalTypes": ["User"] },
56-
"annotations": { "doc": "actions that a user can operate on a list" }
77+
"appliesTo": {
78+
"resourceTypes": ["TinyTodo::List"],
79+
"principalTypes": ["TinyTodo::User"]
80+
},
81+
"annotations": {
82+
"doc": "actions that a user can operate on a list"
83+
}
5784
},
5885
"GetList": {
59-
"appliesTo": { "resourceTypes": ["List"], "principalTypes": ["User"] },
60-
"annotations": { "doc": "actions that a user can operate on a list" }
86+
"appliesTo": {
87+
"resourceTypes": ["TinyTodo::List"],
88+
"principalTypes": ["TinyTodo::User"]
89+
},
90+
"annotations": {
91+
"doc": "actions that a user can operate on a list"
92+
}
6193
},
6294
"UpdateList": {
63-
"appliesTo": { "resourceTypes": ["List"], "principalTypes": ["User"] },
64-
"annotations": { "doc": "actions that a user can operate on a list" }
95+
"appliesTo": {
96+
"resourceTypes": ["TinyTodo::List"],
97+
"principalTypes": ["TinyTodo::User"]
98+
},
99+
"annotations": {
100+
"doc": "actions that a user can operate on a list"
101+
}
65102
}
66103
},
67-
"annotations": { "doc": "this is the namespace" }
104+
"annotations": {
105+
"doc": "this is the namespace"
106+
}
68107
}
69108
}

testdata/RFC53/cedarschema.json

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,39 @@
11
{
22
"RFC53": {
33
"entityTypes": {
4-
"Color": { "enum": ["Red", "Blue", "Green"] },
4+
"Color": {
5+
"enum": ["Red", "Blue", "Green"]
6+
},
57
"Task": {
68
"shape": {
79
"type": "Record",
810
"attributes": {
9-
"enum": { "type": "EntityOrCommon", "name": "Color" },
10-
"name": { "type": "EntityOrCommon", "name": "String" },
11-
"owner": { "type": "EntityOrCommon", "name": "User" },
12-
"status": { "type": "EntityOrCommon", "name": "Color" }
11+
"enum": {
12+
"type": "Entity",
13+
"name": "RFC53::Color"
14+
},
15+
"name": {
16+
"type": "String"
17+
},
18+
"owner": {
19+
"type": "Entity",
20+
"name": "RFC53::User"
21+
},
22+
"status": {
23+
"type": "Entity",
24+
"name": "RFC53::Color"
25+
}
1326
}
1427
}
1528
},
1629
"User": {}
1730
},
1831
"actions": {
1932
"UpdateTask": {
20-
"appliesTo": { "resourceTypes": ["Task"], "principalTypes": ["User"] }
33+
"appliesTo": {
34+
"resourceTypes": ["RFC53::Task"],
35+
"principalTypes": ["RFC53::User"]
36+
}
2137
}
2238
}
2339
}

testdata/RFC82/cedarschema.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,33 @@
55
"shape": {
66
"type": "Record",
77
"attributes": {
8-
"owner": { "type": "EntityOrCommon", "name": "User" }
8+
"owner": {
9+
"type": "Entity",
10+
"name": "User"
11+
}
912
}
1013
},
1114
"tags": {
1215
"type": "Set",
13-
"element": { "type": "EntityOrCommon", "name": "String" }
16+
"element": {
17+
"type": "String"
18+
}
1419
}
1520
},
1621
"User": {
1722
"shape": {
1823
"type": "Record",
1924
"attributes": {
20-
"jobLevel": { "type": "EntityOrCommon", "name": "Long" }
25+
"jobLevel": {
26+
"type": "Long"
27+
}
2128
}
2229
},
2330
"tags": {
2431
"type": "Set",
25-
"element": { "type": "EntityOrCommon", "name": "String" }
32+
"element": {
33+
"type": "String"
34+
}
2635
}
2736
}
2837
},

0 commit comments

Comments
 (0)