Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 5: cross-referencable strings, refactor to ESM #42

Merged
merged 7 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"d3": false
},
"parserOptions": {
"ecmaVersion": 6,
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ The primary name of the feature type.

Upon merging into the `main` branch, this is sent to Transifex for translating to other localizations. Changing the name of an existing preset will require it to be re-translated to all localizations.

A preset can optionally reference the label of another by using that preset's name contained in brackets, like `{preset}`. In which case the presets's _terms_ and _aliases_ are also automatically sourced from that other field. This is for example useful for regional presets which should get the same labels as the preset they are based on.

This property is required. There is no default.

##### `aliases`
Expand Down Expand Up @@ -423,6 +425,9 @@ The complete JSON schema for fields can be found in [`schemas/field.json`](schem

A sort desciption or caption of the field.

A field can optionally reference the label of another by using that field's name contained in
brackets, like `{field}`. In which case the field's _terms_ are also automatically sourced from that other field. This is for example useful when there are multiple variants of fields for the same tag, which should all have the same labels.

##### `type`

A string specifying the UI and behavior of the field. Must be one of the following values.
Expand Down Expand Up @@ -558,6 +563,10 @@ in the dropdown suggestions.
}
```

##### `stringsCrossReference`

An optional property to reference to the strings of another field, indicated by using that field's name contained in brackets, like `{field}`. This is for example useful when there are multiple variants of fields for the same tag, which should all use the same strings.

##### `autoSuggestions`

For combo fields, the most common tag values will be fetched from TagInfo and shown
Expand Down
9 changes: 7 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
module.exports = {
export default {
collectCoverage: true,
collectCoverageFrom: ['lib/*.js'],
coverageDirectory: '<rootDir>/.coverage',
verbose: true
verbose: true,
transform: {},
moduleNameMapper: {
"#ansi-styles": "<rootDir>/node_modules/chalk/source/vendor/ansi-styles/index.js",
"#supports-color": "<rootDir>/node_modules/chalk/source/vendor/supports-color/index.js"
},
};
Loading