|
1 | 1 | { |
2 | | - "$schema": "http://json-schema.org/draft-07/schema#", |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
3 | 3 | "$id": "https://yarnspinner.dev/schemas/yarnproject.schema.json", |
4 | 4 | "title": "Yarn Spinner Project", |
5 | 5 | "description": "Configuration file for a Yarn Spinner project (.yarnproject)", |
6 | 6 | "type": "object", |
7 | | - "anyOf": [ |
8 | | - { "required": ["projectFileVersion"] }, |
9 | | - { "required": ["fileVersion"] } |
10 | | - ], |
| 7 | + "required": ["projectFileVersion"], |
11 | 8 | "properties": { |
12 | 9 | "projectFileVersion": { |
13 | 10 | "type": "integer", |
14 | 11 | "description": "The version of the project file format. Current version is 4. Versions 2 and 3 are also supported for legacy projects.", |
15 | 12 | "enum": [2, 3, 4], |
16 | 13 | "default": 4 |
17 | 14 | }, |
18 | | - "fileVersion": { |
19 | | - "type": "integer", |
20 | | - "description": "Legacy name for projectFileVersion. Use projectFileVersion for new projects.", |
21 | | - "enum": [2, 3], |
22 | | - "default": 2 |
23 | | - }, |
24 | 15 | "sourceFiles": { |
25 | 16 | "type": "array", |
26 | 17 | "description": "Array of glob patterns specifying which .yarn files to include in this project.", |
|
40 | 31 | "type": "string", |
41 | 32 | "description": "The base language code for the project (e.g., 'en', 'en-US', 'zh-Hans').", |
42 | 33 | "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})*$" |
44 | 35 | }, |
45 | 36 | "localisation": { |
46 | 37 | "type": "object", |
47 | 38 | "description": "Localization configuration mapping language codes to their string tables and asset directories.", |
48 | 39 | "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})*$": { |
50 | 41 | "type": "object", |
51 | 42 | "properties": { |
52 | 43 | "strings": { |
|
0 commit comments