Skip to content

Commit 6147872

Browse files
committed
Merge branch 'release/3.1.1'
2 parents 526de98 + bdf46b3 commit 6147872

12 files changed

+16819
-11243
lines changed

Diff for: .github/workflows/publish-npm.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414

1515
- name: Set tag
1616
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
@@ -25,7 +25,7 @@ jobs:
2525
shell: bash
2626
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
2727

28-
- uses: actions/cache@v3
28+
- uses: actions/cache@v4
2929
id: npm-cache
3030
with:
3131
path: ${{ steps.npm-cache-dir.outputs.dir }}

Diff for: Gruntfile.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
// @ts-ignore
12
module.exports = (grunt) => {
3+
24
grunt.initConfig({
35
vars: {
46
srcPath: './',
@@ -33,6 +35,7 @@ module.exports = (grunt) => {
3335
command: 'git log $(git describe --tags --abbrev=0)..HEAD --format="* %s (%h) by %aN;" --no-merges',
3436
options: {
3537
stdout: false,
38+
// @ts-ignore
3639
callback: function (err, stdout, stderr, cb) {
3740
grunt.option('history', stdout);
3841
cb();
@@ -67,6 +70,7 @@ module.exports = (grunt) => {
6770

6871
var changelog = grunt.file.read(changelogPath);
6972
if (changelog.match(regex)) {
73+
// @ts-ignore
7074
changelog = changelog.replace(regex, function(match, p1, p2, offset, string, groups) {
7175
return [
7276
groups.title,
@@ -88,6 +92,7 @@ module.exports = (grunt) => {
8892
var date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate();
8993
var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
9094
var dateTime = date + ' ' + time;
95+
// @ts-ignore
9196
grunt.log.ok(dateTime['green']);
9297
});
9398

Diff for: README.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,19 @@ JSON files can be read from the directory in which the package was downloaded.
4141
Node.js applications can use the provided helper functions to synchronously load the JSON as a JavaScript object.
4242

4343
```javascript
44-
const geoJson = require('world-geojson') // or `import geoJson from 'world-geojson'`
44+
const geoJson = require('world-geojson') // or `import * as geoJson from 'world-geojson'`
4545

46-
geoJson.forCountry('Antigua & Barbuda') // returns the contents of /countries/antigua_and_barbuda.json
47-
geoJson.forState('Australia', 'New South Wales') // returns the contents of /states/australia/new_south_wales.json
46+
geoJson.forCountry('Antigua & Barbuda'); // returns the contents of /countries/antigua_and_barbuda.json
47+
geoJson.forState('Australia', 'New South Wales'); // returns the contents of /states/australia/new_south_wales.json
4848
geoJson.forArea('U.S.A.', 'U.S. Virgin Islands'); // returns the contents of /areas/usa/us_virgin_islands.json
49-
geoJson.forCountry('abcd') // returns `null`
49+
50+
// Combine multiple GeoJSONs into one
51+
const combined = geoJson.combineGeoJson([
52+
{countryName: 'Antigua & Barbuda'},
53+
{countryName: 'Australia', stateName: 'New South Wales'},
54+
{countryName: 'U.S.A.', areaName: 'U.S. Virgin Islands'}
55+
]);
56+
5057
```
5158

5259
## Countries (release 1.0)

Diff for: babel.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export const presets = ["@babel/preset-flow"];
2+
export const plugins = ["@babel/plugin-syntax-flow"];

0 commit comments

Comments
 (0)