Skip to content

Commit

Permalink
chore: spellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
vineyardbovines committed Dec 9, 2024
1 parent ee1adbe commit 328fa86
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 11 deletions.
1 change: 1 addition & 0 deletions .cspellcache

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,16 @@ jobs:

- uses: ./.github/actions/setup

- run: bun run format
shell: bash

- run: bun run typecheck
shell: bash

- run: bun run spellcheck

- run: bun run test
shell: bash

- run: bun run build
shell: bash
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 0.1.0 (2024-12-09)

* feat: publih ([df6d1b0](https://github.com/vineyardbovines/openstreetmap-api/commit/df6d1b0))
* feat: publish ([df6d1b0](https://github.com/vineyardbovines/openstreetmap-api/commit/df6d1b0))

## <small>0.0.3 (2024-12-09)</small>

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ The service supports multiple output formats through the `OverpassOutput` enum:

```typescript
enum OverpassOutput {
Raw = 'raw', // Raw Overpass JSON response
GeoJSON = 'geojson', // Converted to GeoJSON format
Parsed = 'parsed', // Parsed element tags
ParsedGeoJSON = 'parsedgeojson' // Parsed tags in GeoJSON format
Raw = 'raw', // Raw Overpass JSON response
GeoJSON = 'geojson', // Converted to GeoJSON format
Parsed = 'parsed', // Parsed element tags
ParsedGeoJSON = 'parsedgeojson' // Parsed tags in GeoJSON format
}
```

Expand Down
8 changes: 8 additions & 0 deletions assets/cspell-dictionary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
parsedgeojson
kumi
skel
updown
bbox
rels
pois
groyne
8 changes: 8 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dictionaries": [
"project-words",
"en_US",
"en-gb",
"softwareTerms",
"misc",
"lorem-ipsum",
Expand All @@ -14,6 +15,13 @@
"bash",
"npm"
],
"dictionaryDefinitions": [
{
"name": "project-words",
"path": "./assets/cspell-dictionary.txt",
"addWords": true
}
],
"ignorePaths": [
"**/.git/**",
"**/.turbo/**",
Expand Down
2 changes: 1 addition & 1 deletion lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ commit-msg:
commands:
commitlint:
run: |
bunx --no -- commitlint --edit {1}
bun x --no -- commitlint --edit {1}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@release-it/conventional-changelog": "^9.0.3",
"@types/bun": "latest",
"@types/geojson": "^7946.0.15",
"@types/osmtogeojson": "^2.2.34",
"commitizen": "^4.3.1",
"commitlint": "^19.6.0",
"cz-conventional-changelog": "^3.3.0",
Expand Down
8 changes: 4 additions & 4 deletions src/services/geojson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function buildMetaInformation(object: OverpassOSMElement): Record<string, string
return meta;
}

function dedup<T extends OverpassOSMElement>(objectA: T, objectB: T): T {
function dedupe<T extends OverpassOSMElement>(objectA: T, objectB: T): T {
if ((objectA.version || objectB.version) && objectA.version !== objectB.version) {
return +(objectA.version || 0) > +(objectB.version || 0) ? objectA : objectB;
}
Expand Down Expand Up @@ -62,7 +62,7 @@ export function osm2geojson(

for (let node of nodes) {
if (nodeIds[node.id]) {
node = dedup<OverpassNode>(node, nodeIds[node.id] as OverpassNode);
node = dedupe<OverpassNode>(node, nodeIds[node.id] as OverpassNode);
}
nodeIds[node.id] = node;
}
Expand All @@ -72,7 +72,7 @@ export function osm2geojson(

for (let way of ways) {
if (wayIds[way.id] !== undefined) {
way = dedup<OverpassWay>(way, wayIds[way.id] as OverpassWay);
way = dedupe<OverpassWay>(way, wayIds[way.id] as OverpassWay);
}
wayIds[way.id] = way;

Expand All @@ -93,7 +93,7 @@ export function osm2geojson(
const relationIds: Record<string, OverpassRelation> = {};
for (let rel of rels) {
if (relationIds[rel.id]) {
rel = dedup<OverpassRelation>(rel, relationIds[rel.id] as OverpassRelation);
rel = dedupe<OverpassRelation>(rel, relationIds[rel.id] as OverpassRelation);
}
relationIds[rel.id] = rel;
}
Expand Down

0 comments on commit 328fa86

Please sign in to comment.