forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeatures.js
More file actions
20 lines (15 loc) · 623 Bytes
/
features.js
File metadata and controls
20 lines (15 loc) · 623 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { schema } from '#src/frame/lib/frontmatter.js'
// Copy the properties from the frontmatter schema.
const featureVersions = {
properties: {
versions: Object.assign({}, schema.properties.versions),
},
}
// Remove the feature versions properties.
// We don't want to allow features within features! We just want pure versioning.
delete featureVersions.properties.versions.properties.feature
// Call it invalid if any properties other than version properties are found.
featureVersions.additionalProperties = false
// avoid ajv strict warning
featureVersions.type = 'object'
export default featureVersions