Skip to content

Commit

Permalink
v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bhousel committed Sep 18, 2023
1 parent 23b2e72 commit f1fd5db
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 17 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ _Breaking changes, which may affect downstream projects, are marked with a_ ⚠
[#xxx]: https://github.com/rapideditor/location-conflation/issues/xxx
-->

# 1.3.0
##### 2023-Sep-18
* ⚠️ Use a named export for ESM, 'default' export for CJS/IIFE ([#68])
* ⚠️ Change `.strict()` to a normal class property. Also remove `.cache()` accessor
* Replace mfogel/polygon-clipping with luizbarboza/polyclip-ts ([#67])
* Fix map on https://location-conflation.org ([#66])
* Bump dependency versions
* Supported engines now `"node": ">=18"`

[#68]: https://github.com/rapideditor/location-conflation/issues/68
[#67]: https://github.com/rapideditor/location-conflation/issues/67
[#66]: https://github.com/rapideditor/location-conflation/issues/66


# 1.2.1
##### 2023-Jul-12
Expand Down
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The "locations" can be any of the following:
```js
const LocationConflation = require('@rapideditor/location-conflation').default; // require CJS
// or
import LocationConflation from '@rapideditor/location-conflation'; // import ESM
import { LocationConflation } from '@rapideditor/location-conflation'; // import ESM
```


Expand All @@ -65,7 +65,7 @@ You can also use **location-conflation** directly in a web browser. A good way
When you load this file in a `<script>` tag, you'll get a `LocationConflation` global to use elsewhere in your scripts:
```html
<head>
<script src="https://cdn.jsdelivr.net/npm/@rapideditor/location-conflation@1.2/dist/location-conflation.iife.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@rapideditor/location-conflation@1.3/dist/location-conflation.iife.min.js"></script>
</head>
<script>
Expand All @@ -80,8 +80,8 @@ When you load this file in a `<script>` tag, you'll get a `LocationConflation` g

## Examples
```js
const LocationConflation = require('@rapideditor/location-conflation').default;
const myFeatures = require('./path/to/FeatureCollection.json'); // optional
import { LocationConflation } from '@rapideditor/location-conflation';
import myFeatures from './fixtures/features.json' assert {type: 'json'}; // optional
const loco = new LocationConflation(myFeatures);
```

Expand Down Expand Up @@ -127,7 +127,6 @@ const result = loco.resolveLocationSet({ include: ['alps.geojson'], exclude: ['l
* [resolveLocationSet](#resolveLocationSet)
* [strict](#strict)
* [stringify](#stringify)
* [cache](#cache)

&nbsp;

Expand Down Expand Up @@ -257,14 +256,14 @@ If the locationSet is invalid or contains any invalid locations,

<a name="strict" href="#strict">#</a> <i>loco</i>.<b>strict</b>(<i>val</i>)

Get/set "strict mode". New instances of LocationConflation start out in strict mode by default.
Getter/setter for "strict mode". Current versions of LocationConflation start out in strict mode by default.

* In strict mode, any invalid location or locationSet throws an error.
* In non strict mode, invalid locations are ignored, and locationSets that include nothing are assumed to include the entire world.

```js
loco.strict(false); // pass a true/false value to set the strict mode
const isStrict = loco.strict(); // pass no value to return the current value
loco.strict = false; // setter: pass a true/false value to set the strict mode
const isStrict = loco.strict; // getter: return the current value
```

&nbsp;
Expand All @@ -277,18 +276,14 @@ Convenience method that wraps [json-stringify-pretty-compact](https://www.npmjs.
loco.stringify(someGeoJson, { maxLength: 100 }); // Make it pretty!
```

<a name="cache" href="#cache">#</a> <i>loco</i>.<b>cache</b>()

Convenience method to access the internal feature `_cache`. You probably shouldn't use it except for debugging.

&nbsp;


## Contributing

### Prerequisites

* [Node.js](https://nodejs.org/) version 16 or newer
* [Node.js](https://nodejs.org/) version 18 or newer
* [`git`](https://www.atlassian.com/git/tutorials/install-git/) for your platform


Expand Down
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ curl 'https://purge.jsdelivr.net/npm/@rapideditor/location-conflation/dist/locat
curl 'https://purge.jsdelivr.net/npm/@rapideditor/location-conflation/dist/location-conflation.iife.min.js'
curl 'https://purge.jsdelivr.net/npm/@rapideditor/location-conflation@1/dist/location-conflation.iife.js'
curl 'https://purge.jsdelivr.net/npm/@rapideditor/location-conflation@1/dist/location-conflation.iife.min.js'
curl 'https://purge.jsdelivr.net/npm/@rapideditor/location-conflation@1.2/dist/location-conflation.iife.js'
curl 'https://purge.jsdelivr.net/npm/@rapideditor/location-conflation@1.2/dist/location-conflation.iife.min.js'
curl 'https://purge.jsdelivr.net/npm/@rapideditor/location-conflation@1.3/dist/location-conflation.iife.js'
curl 'https://purge.jsdelivr.net/npm/@rapideditor/location-conflation@1.3/dist/location-conflation.iife.min.js'
```
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/mapbox-gl.min.js'></script>
<script defer src='https://kit.fontawesome.com/c772610440.js' crossorigin='anonymous'></script>
<script defer src='https://cdn.jsdelivr.net/npm/[email protected]/dist/index.min.js'></script>
<script defer src='https://cdn.jsdelivr.net/npm/@rapideditor/location-conflation@1.2/dist/location-conflation.iife.min.js'></script>
<script defer src='https://cdn.jsdelivr.net/npm/@rapideditor/location-conflation@1.3/dist/location-conflation.iife.min.js'></script>
<!-- <script defer src='../dist/location-conflation.iife.js'></script> -->
<link href='https://cdn.jsdelivr.net/npm/[email protected]/dist/mapbox-gl.min.css' rel='stylesheet'/>
<link href='style.css' rel='stylesheet' type='text/css'/>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rapideditor/location-conflation",
"version": "1.2.1",
"version": "1.3.0",
"license": "ISC",
"repository": "github:rapideditor/location-conflation",
"contributors": [
Expand Down

0 comments on commit f1fd5db

Please sign in to comment.