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

upgrade to schema-builder v5 #598

Merged
merged 6 commits into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from 5 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
1 change: 0 additions & 1 deletion data/fields/address.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"addr:suburb",
"addr:unit"
],
"icon": "address",
"label": "Address",
"strings": {
"placeholders": {
Expand Down
4 changes: 2 additions & 2 deletions data/fields/building/levels_building.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"key": "building:levels",
"type": "number",
"minValue": 0,
"label": "Building Levels",
"placeholder": "2, 4, 6...",
"label": "{building/levels}",
"placeholder": "{building/levels}",
"prerequisiteTag": {
"key": "building",
"valueNot": "no"
Expand Down
2 changes: 1 addition & 1 deletion data/fields/colour.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"key": "colour",
"type": "text",
"type": "colour",
"label": "Color"
}
1 change: 0 additions & 1 deletion data/fields/contact/webcam.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"key": "contact:webcam",
"type": "url",
"icon": "website",
"label": "Webcam URL",
"placeholder": "http://example.com/"
}
1 change: 0 additions & 1 deletion data/fields/ele.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"key": "ele",
"type": "number",
"icon": "elevation",
"label": "Elevation (Meters)",
"geometry": [
"line",
Expand Down
1 change: 0 additions & 1 deletion data/fields/ele_node.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"key": "ele",
"type": "number",
"icon": "elevation",
"label": "Elevation (Meters)",
"universal": true,
"geometry": [
Expand Down
1 change: 0 additions & 1 deletion data/fields/note.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"key": "note",
"type": "textarea",
"universal": true,
"icon": "note",
"label": "Note",
"terms": [
"comment"
Expand Down
2 changes: 1 addition & 1 deletion data/fields/payment_multi_fee.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"key": "payment:",
"type": "multiCombo",
"label": "Payment Types",
"label": "{payment_multi}",
"prerequisiteTag": {
"key": "fee",
"valueNot": "no"
Expand Down
1 change: 0 additions & 1 deletion data/fields/phone.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"key": "phone",
"type": "tel",
"icon": "maki-telephone",
"label": "Telephone",
"placeholder": "+31 42 123 4567",
"terms": [
Expand Down
1 change: 0 additions & 1 deletion data/fields/restrictions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"geometry": [
"vertex"
],
"icon": "iD-restrictions",
"usage": "manual",
"reference": {
"rtype": "restriction"
Expand Down
1 change: 0 additions & 1 deletion data/fields/source.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"key": "source",
"type": "semiCombo",
"icon": "source",
"universal": true,
"label": "Sources",
"snake_case": false,
Expand Down
1 change: 0 additions & 1 deletion data/fields/website.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"key": "website",
"type": "url",
"icon": "website",
"placeholder": "https://example.com",
"label": "Website",
"terms": [
Expand Down
1 change: 0 additions & 1 deletion data/fields/wheelchair.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"no": "No"
}
},
"icon": "maki-wheelchair",
"label": "Wheelchair Access",
"terms": [
"handicap access"
Expand Down
1 change: 0 additions & 1 deletion data/fields/wikidata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"wikipedia"
],
"type": "wikidata",
"icon": "wikipedia",
"universal": true,
"label": "Wikidata"
}
1 change: 0 additions & 1 deletion data/fields/wikipedia.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"wikidata"
],
"type": "wikipedia",
"icon": "wikipedia",
"universal": true,
"label": "Wikipedia"
}
10 changes: 1 addition & 9 deletions data/presets/highway/motorway_link-US-CA.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Motorway Link",
"name": "{motorway_link}",
"icon": "iD-highway-motorway-link",
"fields": [
"destination_oneway",
Expand Down Expand Up @@ -34,14 +34,6 @@
"tags": {
"highway": "motorway_link"
},
"terms": [
"exit",
"ramp",
"road",
"street",
"on ramp",
"off ramp"
],
"locationSet": {
"include": [
"ca",
Expand Down
9 changes: 1 addition & 8 deletions data/presets/highway/primary_link-US-CA.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Primary Link",
"name": "{primary_link}",
"icon": "iD-highway-primary-link",
"fields": [
"destination_oneway",
Expand Down Expand Up @@ -38,13 +38,6 @@
"tags": {
"highway": "primary_link"
},
"terms": [
"on ramp",
"off ramp",
"ramp",
"road",
"street"
],
"locationSet": {
"include": [
"ca",
Expand Down
9 changes: 1 addition & 8 deletions data/presets/highway/trunk_link-US-CA.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Trunk Link",
"name": "{trunk_link}",
"icon": "iD-highway-trunk-link",
"fields": [
"{highway/motorway_link-US-CA}"
Expand All @@ -13,13 +13,6 @@
"tags": {
"highway": "trunk_link"
},
"terms": [
"on ramp",
"off ramp",
"ramp",
"road",
"street"
],
"locationSet": {
"include": [
"ca",
Expand Down
15 changes: 0 additions & 15 deletions interim/source_strings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -431,10 +431,6 @@ en:
terms: '[translate with synonyms or related terms for ''Underground Levels'', separated by commas]'
building/levels_building:
# building:levels=*
label: Building Levels
# building/levels_building field placeholder
placeholder: 2, 4, 6...
terms: '[translate with synonyms or related terms for ''Building Levels'', separated by commas]'
building/material:
# building:material=*
label: Material
Expand Down Expand Up @@ -2165,8 +2161,6 @@ en:
terms: '[translate with synonyms or related terms for ''Payment Types'', separated by commas]'
payment_multi_fee:
# payment:=*
label: Payment Types
terms: '[translate with synonyms or related terms for ''Payment Types'', separated by commas]'
phases:
# phases=*
label: Phases
Expand Down Expand Up @@ -6358,9 +6352,6 @@ en:
terms: <translate with synonyms or related terms for 'Motorway Link', separated by commas>
highway/motorway_link-US-CA:
# highway=motorway_link | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key).
name: Motorway Link
# 'terms: exit,ramp,road,street,on ramp,off ramp'
terms: <translate with synonyms or related terms for 'Motorway Link', separated by commas>
highway/passing_place:
# highway=passing_place | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key).
name: Passing Place
Expand Down Expand Up @@ -6403,9 +6394,6 @@ en:
terms: <translate with synonyms or related terms for 'Primary Link', separated by commas>
highway/primary_link-US-CA:
# highway=primary_link | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key).
name: Primary Link
# 'terms: on ramp,off ramp,ramp,road,street'
terms: <translate with synonyms or related terms for 'Primary Link', separated by commas>
highway/raceway:
# highway=raceway | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key).
name: Motorsport Racetrack
Expand Down Expand Up @@ -6557,9 +6545,6 @@ en:
terms: <translate with synonyms or related terms for 'Trunk Link', separated by commas>
highway/trunk_link-US-CA:
# highway=trunk_link | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key).
name: Trunk Link
# 'terms: on ramp,off ramp,ramp,road,street'
terms: <translate with synonyms or related terms for 'Trunk Link', separated by commas>
highway/turning_circle:
# highway=turning_circle | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key).
name: Turning Circle
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"type": "module",
"name": "@openstreetmap/id-tagging-schema",
"version": "3.5.1",
"version": "5.0.0-dev",
"description": "The OpenStreetMap tagging model used by the iD editor",
"homepage": "https://github.com/openstreetmap/id-tagging-schema#readme",
"bugs": "https://github.com/openstreetmap/id-tagging-schema/issues",
Expand All @@ -19,7 +20,7 @@
"translations": "node scripts/translations.js"
},
"devDependencies": {
"@ideditor/schema-builder": "~4.0.6",
"@ideditor/schema-builder": "~5.1.1",
"prettier": "~2.7.1"
}
}
3 changes: 1 addition & 2 deletions scripts/build.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

const schemaBuilder = require('@ideditor/schema-builder');
import schemaBuilder from '@ideditor/schema-builder';

schemaBuilder.buildDev();
2 changes: 1 addition & 1 deletion scripts/dist.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const schemaBuilder = require('@ideditor/schema-builder');
import schemaBuilder from '@ideditor/schema-builder';

schemaBuilder.buildDist({
taginfoProjectInfo: {
Expand Down
3 changes: 2 additions & 1 deletion scripts/test.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
const schemaBuilder = require('@ideditor/schema-builder');
import schemaBuilder from '@ideditor/schema-builder';

schemaBuilder.validate();