Skip to content

Commit

Permalink
Merge pull request #88 from evansiroky/2018i
Browse files Browse the repository at this point in the history
2018i update
  • Loading branch information
evansiroky authored Jan 6, 2019
2 parents fc6f1be + ac6cf28 commit a2be2a3
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 9 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ matrix:
include:
- node_js: "6"
env: COVERAGE=true
script: "npm run codeclimate"
script:
- "npm run cover"
- bash <(curl -s https://codecov.io/bash)
allow_failures:
- node_js: "6"
env: COVERAGE=true
script: "npm run codeclimate"
script:
- "npm run cover"
- bash <(curl -s https://codecov.io/bash)

before_script:
- npm prune
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# node-geo-tz
[![npm version](https://badge.fury.io/js/geo-tz.svg)](http://badge.fury.io/js/geo-tz) [![Build Status](https://travis-ci.org/evansiroky/node-geo-tz.svg?branch=master)](https://travis-ci.org/evansiroky/node-geo-tz) [![Dependency Status](https://david-dm.org/evansiroky/node-geo-tz.svg)](https://david-dm.org/evansiroky/node-geo-tz) [![Test Coverage](https://codeclimate.com/github/evansiroky/node-geo-tz/badges/coverage.svg)](https://codeclimate.com/github/evansiroky/node-geo-tz/coverage)
[![npm version](https://badge.fury.io/js/geo-tz.svg)](http://badge.fury.io/js/geo-tz) [![Build Status](https://travis-ci.org/evansiroky/node-geo-tz.svg?branch=master)](https://travis-ci.org/evansiroky/node-geo-tz) [![Dependency Status](https://david-dm.org/evansiroky/node-geo-tz.svg)](https://david-dm.org/evansiroky/node-geo-tz) [![Test Coverage](https://img.shields.io/codecov/c/github/evansiroky/node-geo-tz.svg)](https://codecov.io/github/evansiroky/node-geo-tz)

The most up-to-date and accurate node.js geographical timezone lookup package. It's fast too!

Expand Down Expand Up @@ -33,6 +33,10 @@ The data is indexed for fast analysis with automatic caching with time expiratio

Loads all geographic features into memory in an unexpiring cache. This has tradeoffs. More memory will be consumed and it will take a little longer before the program is ready to start looking up features, but future lookups will be a lot faster - especially for areas which haven't had a lookup in a while.

## Limitations

This library is not intended to be used in the browser due to the large amount of files that are included to perform exact geographic lookups.

## An Important Note About Maintenance

Due to the ever-changing nature of timezone data, it is critical that you always use the latest version of this package. If you use old versions, there will be a few edge cases where the calculated time is wrong. If you use greenkeeper, please be sure to specify an exact target version so you will always get PR's for even patch-level releases.
Binary file modified data.zip
Binary file not shown.
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,15 @@
},
"main": "index.js",
"scripts": {
"codeclimate": "npm run cover && npm run codeclimate-send",
"codeclimate-send": "./node_modules/.bin/codeclimate-test-reporter < coverage/lcov.info",
"cover": "./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha -- tests/**/*.js",
"cover": "./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha -- tests/**/*.js --max-old-space-size=8192",
"prepublish": "node scripts/unzip-data.js",
"semantic-release": "semantic-release",
"test": "mocha \"tests/**/*.js\"",
"test": "mocha --max-old-space-size=8192 \"tests/**/*.js\"",
"updateTzData": "node scripts/update-data.js"
},
"devDependencies": {
"async": "^2.1.5",
"chai": "^4.1.2",
"codeclimate-test-reporter": "^0.5.0",
"cz-conventional-changelog": "^2.0.0",
"follow-redirects": "^1.2.1",
"fs-extra": "^4.0.2",
Expand Down
5 changes: 4 additions & 1 deletion tests/find.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ describe('find tests', function () {

describe('issue cases', function () {
issueCoords.forEach(function (spot) {
it('should find ' + spot.zid + ' (' + spot.description + ')', function () {
const spotDescription = spot.zids
? spot.zids.join(' and ')
: spot.zid
it('should find ' + spotDescription + ' (' + spot.description + ')', function () {
assertTzResultContainsTzs(spot.lat, spot.lon, spot.zid || spot.zids)
})
})
Expand Down
10 changes: 10 additions & 0 deletions tests/fixtures/issues.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,15 @@
"lat": 43.839319,
"lon": 87.526148,
"description": "#83 - 2018g update - test for overlapping territories (supersedes test for #72: 2017c update - New Chinese timezone geometry)"
}, {
"zid": "Asia/Qostanay",
"lat": 53.214465,
"lon": 63.632184,
"description": "#87 - 2018i - test for new zone Asia/Qostanay"
}, {
"zid": "Asia/Qyzylorda",
"lat": 44.843868,
"lon": 65.490184,
"description": "#87 - 2018i - test for zone Asia/Qyzylorda"
}
]

0 comments on commit a2be2a3

Please sign in to comment.