Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
fbd54a0
Use TypeScript
alanpoulain Jun 30, 2020
70dec6b
Universal Geocoder
alanpoulain Jul 4, 2020
07cd805
Better Nominatim and GeoJSON support (#1)
alanpoulain Jul 14, 2020
972e054
0.2.0
alanpoulain Jul 14, 2020
ae90f6c
Missing types folder when publishing
alanpoulain Jul 14, 2020
85281e6
0.2.1
alanpoulain Jul 14, 2020
8b79f4f
Revert "Universal Geocoder"
alanpoulain Jul 14, 2020
1d9d5ee
Use relative paths for build files (#2)
alanpoulain Jul 15, 2020
234ee52
0.2.2
alanpoulain Jul 15, 2020
3658661
Fix TypeScript types to be usable in a TS project (#3)
alanpoulain Jul 16, 2020
adecd8e
0.2.3
alanpoulain Jul 16, 2020
8dff61c
[Nominatim] Fix error when no result is received (#4)
alanpoulain Jul 17, 2020
966c8a4
0.2.4
alanpoulain Jul 17, 2020
181b469
Couscous website (#5)
alanpoulain Jul 23, 2020
892639d
Automatically deploy website when pushing on main (#6)
alanpoulain Jul 23, 2020
5e15983
Deploy website without Couscous action
alanpoulain Jul 23, 2020
d46adb9
Add logo (#7)
alanpoulain Jul 24, 2020
1f3d2b3
Remove border and background for images
alanpoulain Jul 24, 2020
0f66209
Use organization instead of personal account
alanpoulain Jul 24, 2020
ada4aa3
Use GitHub Actions instead of Travis for CI
alanpoulain Jul 24, 2020
fb82b78
Fix baseUrl in Couscous
alanpoulain Jul 24, 2020
925b279
OpenCage provider (#1)
alanpoulain Jul 28, 2020
2afffd8
0.3.0
alanpoulain Jul 28, 2020
2d2fa10
Fix publish to GitHub registry
alanpoulain Jul 28, 2020
1847d9b
Merge branch 'main' into ts
alanpoulain Jul 28, 2020
baf7325
Fix typo in CHANGELOG.md
alanpoulain Jul 28, 2020
2da5279
Better Google Maps provider (#2)
alanpoulain Aug 9, 2020
691b946
0.4.0
alanpoulain Aug 9, 2020
fc49d81
Fix release workflow
alanpoulain Aug 9, 2020
78c3cd1
0.4.1
alanpoulain Aug 9, 2020
d5b2d23
Fix bad replacement in release workflow
alanpoulain Aug 9, 2020
57db339
0.4.2
alanpoulain Aug 9, 2020
dcb95ae
Merge branch 'main' into ts
alanpoulain Aug 9, 2020
2b0063b
Add a chain provider (#3)
alanpoulain Aug 10, 2020
19cca4a
Replace stub tests with record tests (#4)
alanpoulain Aug 14, 2020
c28cc47
Add GeoPlugin provider (#5)
alanpoulain Aug 15, 2020
7c99559
0.5.0
alanpoulain Aug 15, 2020
38365ae
Remove build step from release workflow
alanpoulain Aug 15, 2020
a387ad0
chore: add hooks for files and commits lint
alanpoulain Aug 20, 2020
2f87942
ci: check commit messages in ci workflow
alanpoulain Aug 20, 2020
e7afc77
Merge pull request #6 from universal-geocoder/chore/lint
alanpoulain Aug 20, 2020
109237b
website: add changelog item (#7)
alanpoulain Aug 20, 2020
3fc1039
fix: missing config file in ci workflow
alanpoulain Aug 22, 2020
a48de98
chore: bump typescript and ts-node
alanpoulain Aug 22, 2020
c360af9
feat: better MapQuest provider (#8)
alanpoulain Sep 4, 2020
977923a
chore: exclude MapQuestLocation from coverage
alanpoulain Sep 4, 2020
5827f55
0.6.0
alanpoulain Sep 4, 2020
fd3a03e
Merge branch 'main' into ts
alanpoulain Sep 4, 2020
b904a7a
chore: use Shields.io badges in README
alanpoulain Sep 7, 2020
93e34ff
chore: add missing links for badges in README
alanpoulain Sep 7, 2020
3971752
feat: better Yandex provider (#9)
alanpoulain Sep 25, 2020
59d7f2c
chore: use npm for website dependencies
alanpoulain Oct 10, 2020
1fa3463
chore: list providers parameters
alanpoulain Oct 10, 2020
4042b3c
feat: use a coordinates and a new bounds objects
alanpoulain Oct 10, 2020
e400099
chore: bump dev dependencies
alanpoulain Oct 10, 2020
2fac41a
0.7.0
alanpoulain Oct 10, 2020
2ff49f2
feat: fuzzyMatch parameter for Mapbox geocode
alanpoulain Oct 29, 2020
eed7e29
chore: bump dev dependencies
alanpoulain Oct 29, 2020
37517a6
feat: better Bing provider (#12)
alanpoulain Nov 2, 2020
a4ec453
0.8.0
alanpoulain Nov 2, 2020
57ef834
Merge branch 'main' into ts
alanpoulain Nov 2, 2020
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
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

23 changes: 23 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"type-enum": [
2,
"always",
[
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test",
"website"
]
]
}
}
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{ts,json}]
indent_style = space
indent_size = 2
42 changes: 42 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"airbnb-base",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint"
],
"env": {
"browser": true
},
"plugins": ["prettier"],
"ignorePatterns": ["/types/**/*.ts", "/website/vendor/**/*"],
"rules": {
"prettier/prettier": ["error"],
"@typescript-eslint/no-unused-vars": ["error", { "ignoreRestSiblings": true }],
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"mjs": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
]
},
"overrides": [
{
"files": ["spec/**/*.ts"],
"rules": {
"import/no-unresolved": "off"
}
}
],
"settings": {
"import/resolver": {
"typescript": {}
}
}
}
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Continuous Integration

on:
- pull_request
- push

jobs:
ci:
name: Continuous integration
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v2-beta
with:
node-version: "14"
- name: Install dependencies
run: npm install
- name: Check build
run: npm run build
- name: Check commit messages
uses: wagoid/commitlint-github-action@v2
with:
configFile: .commitlintrc.json
- name: Check coding standards
run: npm run lint
- name: Run tests
run: npm test
26 changes: 26 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Coverage

on:
push:
branches:
- main

jobs:
coverage:
name: Measure coverage and upload it
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2-beta
with:
node-version: "14"
- name: Install dependencies
run: npm install
- name: Run tests with coverage
run: npm run coverage-lcov
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
directory: ./coverage
32 changes: 32 additions & 0 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy website

on:
push:
branches:
- main

jobs:
couscous:
name: Deploy website with Couscous
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
tools: composer
- name: Setup Node
uses: actions/setup-node@v2-beta
with:
node-version: "14"
- name: Setup Couscous
run: composer global require couscous/couscous:dev-master
- name: Couscous
run: couscous generate
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./.couscous/generated
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
name: Create and publish a release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node (npm registry)
uses: actions/setup-node@v2-beta
with:
node-version: "14"
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
- name: Create a GitHub release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Setup Node (GitHub registry)
uses: actions/setup-node@v2-beta
with:
node-version: "14"
registry-url: https://npm.pkg.github.com
- name: Change package name
uses: datamonsters/replace-action@v2
with:
files: package.json
replacements: '"geocoder-js"="@geocoder-php/geocoder-js"'
- name: Publish to GitHub
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 9 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
.idea
lib
node_modules
.grunt
.DS_Store
/.couscous
/.nyc_output
/coverage
/dist
/types
/website/vendor
/website/webfonts
/website/package-lock.json
/website/yarn.lock
4 changes: 4 additions & 0 deletions .nycrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"cache": false,
"exclude": ["spec/**", "**/index.ts", "**/AdminLevel.ts", "**/*Geocoded.ts", "**/*GeocodeQuery.ts", "**/*ReverseQuery.ts", "**/ResponseError.ts", "src/provider/mapquest/MapQuestLocation.ts"]
}
5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

78 changes: 78 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Changelog

## 0.8.0

* [Bing] Better Bing provider
* [Mapbox] Add `fuzzyMatch` geocode parameter
* [OpenCage] Add `precision` to `OpenCageGeocoded`
* [OpenCage] Replace `minConfidence` with `minPrecision` for geocode and geodecode

## 0.7.0

* [Yandex] Better Yandex provider
* [Nominatim] Remove `viewBox` parameter in `GeocodeQuery` to use `bounds` instead
* [GeoJsonDumper] Use `bbox` member for `bounds`
* The `bounds` parameter in `GeocodeQuery` is now an object with `latitudeSW`, `longitudeSW`, `latitudeNE`, `longitudeNE` keys
* The `latitude` and `longitude` parameters in `GeocodeQuery` are replaced by a `coordinates` parameter (an object with `latitude` and `longitude` keys)
* `Geocoded` returns an object with `latitudeSW`, `longitudeSW`, `latitudeNE`, `longitudeNE` keys for the `bounds`
* The `latitude` and `longitude` parameters in `Geocoded` are replaced by a `coordinates` parameter (an object with `latitude` and `longitude` keys)

## 0.6.0

* [MapQuest] Better MapQuest provider

## 0.5.0

* Add special chain provider
* Add GeoPlugin provider
* Add `errorCallback` parameter to `geocode` and `geodecode`
* Add `body` parameter to `executeRequest`
* [MapQuest] Fix geocode request (bad encoded query)

## 0.4.0

* [Google] Better Google Maps provider
* [Nominatim] Better handling of geodecode errors
* [ExternalLoader] Add `getOptions` method to interface
* [ExternalLoader] Rename `JSONPCallback` in params to `jsonpCallback`
* Rename `GoogleAPIProvider` to `GoogleMapsProvider`
* Add Node examples

## 0.3.0

* Add OpenCage Provider
* Add time zone to `Geocoded`
* [Mapbox] Add `countryCodes`, `proximity` and `reverseMode` to geo(de)code parameters
* [Mapbox] Add `resultType` to `Geocoded`
* [Mapbox] Add admin levels to `Geocoded`
* Rename `ExternalURILoader` to `ExternalLoader`

## 0.2.4

* [Nominatim] Fix error when no result is received

## 0.2.3

* Fix TypeScript types for the library to be usable in a TS project

## 0.2.2

* Use relative paths for build files

## 0.2.1

* Missing types folder when publishing

## 0.2.0

* Better Nominatim support
* Better GeoJSON support

## 0.1.0

* Library rewritten in TypeScript
* Library can be used as a module as well
* Add Mapbox provider
* Formatted address, bounds and country support
* Better handling of provider options (JSONP, SSL)
* The methods `geocode` and `geodecode` can take an object or a `Query`
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Pull requests will **not** be accepted without:

1) All unit/functional tests working.
2) Any potentially affected example files still functional.
3) Any additional functionality covered by unit/functional tests.
4) Code should be linted without errors (`npm run lint`).
Loading