Skip to content

Commit

Permalink
chore: update to VL 5.2 and rebuild schemas (#1037)
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Nov 28, 2021
1 parent f70e8ba commit fb2d238
Show file tree
Hide file tree
Showing 15 changed files with 1,034 additions and 659 deletions.
36 changes: 18 additions & 18 deletions package.json
Expand Up @@ -45,37 +45,37 @@
},
"dependencies": {
"@types/json-schema": "^7.0.9",
"commander": "^8.2.0",
"commander": "^8.3.0",
"glob": "^7.2.0",
"safe-stable-stringify": "^2.2.0",
"json5": "^2.2.0",
"typescript": "~4.5.2"
},
"devDependencies": {
"@auto-it/conventional-commits": "^10.32.1",
"@auto-it/first-time-contributor": "^10.32.1",
"@babel/core": "^7.15.8",
"@babel/preset-env": "^7.15.8",
"@babel/preset-typescript": "^7.15.0",
"@types/glob": "^7.1.4",
"@types/jest": "^27.0.2",
"@types/node": "^16.10.3",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"ajv": "^8.6.3",
"@auto-it/conventional-commits": "^10.32.3",
"@auto-it/first-time-contributor": "^10.32.3",
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.4",
"@babel/preset-typescript": "^7.16.0",
"@types/glob": "^7.2.0",
"@types/jest": "^27.0.3",
"@types/node": "^16.11.10",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"ajv": "^8.8.2",
"ajv-formats": "^2.1.1",
"auto": "^10.32.1",
"auto": "^10.32.3",
"chai": "^4.3.4",
"cross-env": "^7.0.3",
"eslint": "^7.32.0",
"eslint": "^8.3.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.2.4",
"jest": "^27.3.1",
"jest-junit": "^13.0.0",
"prettier": "^2.4.1",
"ts-node": "^10.2.1",
"prettier": "^2.5.0",
"ts-node": "^10.4.0",
"vega": "^5.21.0",
"vega-lite": "^5.1.1"
"vega-lite": "^5.2.0"
},
"scripts": {
"prepublishOnly": "yarn build",
Expand Down
6 changes: 2 additions & 4 deletions src/NodeParser.ts
Expand Up @@ -40,10 +40,8 @@ export class Context {

public getArgument(parameterName: string): BaseType | undefined {
const index: number = this.parameters.indexOf(parameterName);
if (index < 0 || !this.arguments[index]) {
if (this.defaultArgument.has(parameterName)) {
return this.defaultArgument.get(parameterName)!;
}
if ((index < 0 || !this.arguments[index]) && this.defaultArgument.has(parameterName)) {
return this.defaultArgument.get(parameterName)!;
}

return this.arguments[index];
Expand Down
2 changes: 1 addition & 1 deletion test/valid-data/annotation-deprecated-empty/schema.json
Expand Up @@ -3,8 +3,8 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"MyObject": {
"deprecated": "",
"additionalProperties": false,
"deprecated": "",
"type": "object"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/valid-data/annotation-empty/schema.json
Expand Up @@ -3,8 +3,8 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"MyObject": {
"customEmptyAnnotation": "",
"additionalProperties": false,
"customEmptyAnnotation": "",
"type": "object"
}
}
Expand Down
6 changes: 2 additions & 4 deletions test/valid-data/any-unknown/schema.json
Expand Up @@ -5,10 +5,8 @@
"MyObject": {
"additionalProperties": false,
"properties": {
"value1": {
},
"value2": {
}
"value1": {},
"value2": {}
},
"required": [
"value1",
Expand Down
8 changes: 4 additions & 4 deletions test/valid-data/ignore-export/schema.json
Expand Up @@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"A": {
"type": "object",
"additionalProperties": false,
"properties": {
"a": {
"type": "string"
Expand All @@ -11,10 +11,10 @@
"required": [
"a"
],
"additionalProperties": false
"type": "object"
},
"B": {
"type": "object",
"additionalProperties": false,
"properties": {
"b": {
"type": "string"
Expand All @@ -23,7 +23,7 @@
"required": [
"b"
],
"additionalProperties": false
"type": "object"
}
}
}
3 changes: 1 addition & 2 deletions test/valid-data/symbol/schema.json
Expand Up @@ -5,8 +5,7 @@
"MyObject": {
"additionalProperties": false,
"properties": {
"foo": {
}
"foo": {}
},
"required": [
"foo"
Expand Down
3 changes: 1 addition & 2 deletions test/valid-data/type-aliases-local-namespace/schema.json
Expand Up @@ -5,8 +5,7 @@
"B.B": {
"additionalProperties": false,
"properties": {
"b": {
}
"b": {}
},
"required": [
"b"
Expand Down
3 changes: 1 addition & 2 deletions test/valid-data/type-indexed-access-object-2/schema.json
Expand Up @@ -9,8 +9,7 @@
"type": "string"
},
{
"not": {
}
"not": {}
}
]
}
Expand Down
3 changes: 1 addition & 2 deletions test/valid-data/undefined-alias/schema.json
Expand Up @@ -3,8 +3,7 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"MyType": {
"not": {
}
"not": {}
}
}
}
3 changes: 1 addition & 2 deletions test/valid-data/undefined-property/schema.json
Expand Up @@ -6,8 +6,7 @@
"additionalProperties": false,
"properties": {
"a": {
"not": {
}
"not": {}
},
"b": {
"type": "null"
Expand Down
3 changes: 1 addition & 2 deletions test/valid-data/undefined-union/schema.json
Expand Up @@ -5,8 +5,7 @@
"MyType": {
"anyOf": [
{
"not": {
}
"not": {}
},
{
"type": "string"
Expand Down
6 changes: 2 additions & 4 deletions test/valid-data/unique-symbol/schema.json
Expand Up @@ -5,10 +5,8 @@
"MyObject": {
"additionalProperties": false,
"properties": {
"bar": {
},
"foo": {
}
"bar": {},
"foo": {}
},
"required": [
"foo",
Expand Down
776 changes: 669 additions & 107 deletions test/vega-lite/schema.json

Large diffs are not rendered by default.

0 comments on commit fb2d238

Please sign in to comment.