From 578879a5925f91d34e20da78eb18768bf64469bc Mon Sep 17 00:00:00 2001 From: Matthew Bloch Date: Fri, 8 Dec 2023 10:09:37 -0500 Subject: [PATCH] v0.6.58 --- CHANGELOG.md | 3 +++ REFERENCE.md | 3 --- package-lock.json | 4 ++-- package.json | 2 +- src/commands/mapshaper-dashlines.mjs | 2 +- src/commands/mapshaper-require.mjs | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f225bd37..22e1175a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +v0.6.58 +* Fix for -require error on Windows. + v0.6.57 * Added io.ifile() method for creating dynamic input files in the run command diff --git a/REFERENCE.md b/REFERENCE.md index 06d8f505..4b1683b4 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1062,14 +1062,11 @@ Create mapshaper commands on-the-fly and run them. `` or `expression=` A JS expression or template containing embedded expressions, for generating one or more mapshaper commands. -Common options: `target=` - * Embedded expressions are enclosed in curly braces (see below). * Expressions can access `target` and `io` objects. * Expressions can also access functions and data loaded with the `-require` command. * Functions can be async. - Expression context: `target` object provides data and information about the command's target layer diff --git a/package-lock.json b/package-lock.json index 9f9983bd..5fbdaeed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mapshaper", - "version": "0.6.57", + "version": "0.6.58", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mapshaper", - "version": "0.6.57", + "version": "0.6.58", "license": "MPL-2.0", "dependencies": { "@placemarkio/tokml": "^0.3.3", diff --git a/package.json b/package.json index 09bfbf96..f8b1b78d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapshaper", - "version": "0.6.57", + "version": "0.6.58", "description": "A tool for editing vector datasets for mapping and GIS.", "keywords": [ "shapefile", diff --git a/src/commands/mapshaper-dashlines.mjs b/src/commands/mapshaper-dashlines.mjs index f93e3209..e7d0c29c 100644 --- a/src/commands/mapshaper-dashlines.mjs +++ b/src/commands/mapshaper-dashlines.mjs @@ -5,7 +5,7 @@ import { convertDistanceParam } from '../geom/mapshaper-units'; import { isLatLngCRS , getDatasetCRS } from '../crs/mapshaper-projections'; import { requirePolylineLayer, getFeatureCount } from '../dataset/mapshaper-layer-utils'; import { getFeatureEditor } from '../expressions/mapshaper-each-geojson'; -import { compileFeatureExpression, compileValueExpression } from '../expressions/mapshaper-feature-expressions'; +import { compileValueExpression } from '../expressions/mapshaper-feature-expressions'; import { replaceLayerContents } from '../dataset/mapshaper-dataset-utils'; import { greatCircleDistance, distance2D } from '../geom/mapshaper-basic-geom'; import { getInterpolationFunction } from '../geom/mapshaper-geodesic'; diff --git a/src/commands/mapshaper-require.mjs b/src/commands/mapshaper-require.mjs index 98bedf7c..c2a92189 100644 --- a/src/commands/mapshaper-require.mjs +++ b/src/commands/mapshaper-require.mjs @@ -25,7 +25,7 @@ cmd.require = async function(opts) { } try { // import CJS and ES modules - mod = await import(moduleFile || moduleName); + mod = await import(moduleFile ? require('url').pathToFileURL(moduleFile) : moduleName); if (mod.default) { mod = mod.default; }