Skip to content

Commit 86f1d30

Browse files
committed
Update YarnProject.schema.json
1 parent f3e111b commit 86f1d30

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

YarnSpinner.Compiler/YarnProject.schema.json

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"$id": "https://yarnspinner.dev/schemas/yarnproject.schema.json",
44
"title": "Yarn Spinner Project",
55
"description": "Configuration file for a Yarn Spinner project (.yarnproject)",
66
"type": "object",
7-
"anyOf": [
8-
{ "required": ["projectFileVersion"] },
9-
{ "required": ["fileVersion"] }
10-
],
7+
"required": ["projectFileVersion"],
118
"properties": {
129
"projectFileVersion": {
1310
"type": "integer",
1411
"description": "The version of the project file format. Current version is 4. Versions 2 and 3 are also supported for legacy projects.",
1512
"enum": [2, 3, 4],
1613
"default": 4
1714
},
18-
"fileVersion": {
19-
"type": "integer",
20-
"description": "Legacy name for projectFileVersion. Use projectFileVersion for new projects.",
21-
"enum": [2, 3],
22-
"default": 2
23-
},
2415
"sourceFiles": {
2516
"type": "array",
2617
"description": "Array of glob patterns specifying which .yarn files to include in this project.",
@@ -40,13 +31,13 @@
4031
"type": "string",
4132
"description": "The base language code for the project (e.g., 'en', 'en-US', 'zh-Hans').",
4233
"default": "en",
43-
"pattern": "^[a-z]{2}(-[A-Za-z]{2,4})?(-[A-Z]{2})?$"
34+
"pattern": "^[a-zA-Z]{2,8}(-[a-zA-Z0-9]{1,8})*$"
4435
},
4536
"localisation": {
4637
"type": "object",
4738
"description": "Localization configuration mapping language codes to their string tables and asset directories.",
4839
"patternProperties": {
49-
"^[a-z]{2}(-[A-Za-z]{2,4})?(-[A-Z]{2})?$": {
40+
"^[a-zA-Z]{2,8}(-[a-zA-Z0-9]{1,8})*$": {
5041
"type": "object",
5142
"properties": {
5243
"strings": {

0 commit comments

Comments
 (0)