I wanted to upgrade dependencies in this repo and started shaving a yak :sweat_smile:. I ended up having to upgrade from CommonJS to ESM to upgrade JSTS.
General upgrade of all dependencies
Upgraded code to ESM modules, replacing the require statements by import.
For JSTS, this upgrade meant that the isSimple, isValid, and buffer methods needed to be imported separately and used as class instances that received the geometry and applied that operation.
Upgraded eslint: removing old style configuration files in favor of a flat eslint.config.js file.
Upgrading lodash to lodash-es and getting the required functions as individual imports instead of the global underscore.
mapshaper does not provide a rf7946 output option anymore, using the precision parameter, yielding the exact same outputs.
[!note]
I've left a few comments in the files to try to give more details on the changes.
I wanted to upgrade dependencies in this repo and started shaving a yak :sweat_smile:. I ended up having to upgrade from CommonJS to ESM to upgrade JSTS.
require
statements byimport
.isSimple
,isValid
, andbuffer
methods needed to be imported separately and used as class instances that received the geometry and applied that operation.eslint
: removing old style configuration files in favor of a flateslint.config.js
file.lodash
tolodash-es
and getting the required functions as individual imports instead of the global underscore.mapshaper
does not provide arf7946
output option anymore, using theprecision
parameter, yielding the exact same outputs.