mapshaper 0.5.67 → 0.5.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapshaper",
3
- "version": "0.5.67",
3
+ "version": "0.5.71",
4
4
  "description": "A tool for editing vector datasets for mapping and GIS.",
5
5
  "keywords": [
6
6
  "shapefile",
@@ -42,7 +42,8 @@
42
42
  "dependencies": {
43
43
  "commander": "^5.1.0",
44
44
  "cookies": "^0.8.0",
45
- "d3-scale-chromatic": "^2.0.0",
45
+ "d3-color": "2.0.0",
46
+ "d3-scale-chromatic": "2.0.0",
46
47
  "delaunator": "^5.0.0",
47
48
  "flatbush": "^3.2.1",
48
49
  "geokdbush": "^1.1.0",
@@ -3976,6 +3976,10 @@
3976
3976
  throw new UserError$1(formatLogArgs(arguments));
3977
3977
  };
3978
3978
 
3979
+ var _interrupt = function() {
3980
+ throw new NonFatalError(formatLogArgs(arguments));
3981
+ };
3982
+
3979
3983
  var _message = function() {
3980
3984
  logArgs(arguments);
3981
3985
  };
@@ -3994,10 +3998,14 @@
3994
3998
  }
3995
3999
 
3996
4000
  // Handle an error caused by invalid input or misuse of API
3997
- function stop$1 () {
4001
+ function stop$1() {
3998
4002
  _stop.apply(null, utils$1.toArray(arguments));
3999
4003
  }
4000
4004
 
4005
+ function interrupt() {
4006
+ _interrupt.apply(null, utils$1.toArray(arguments));
4007
+ }
4008
+
4001
4009
  // Print a status message
4002
4010
  function message$1() {
4003
4011
  _message.apply(null, messageArgs(arguments));
@@ -4037,7 +4045,9 @@
4037
4045
  if (utils$1.isString(err)) {
4038
4046
  err = new UserError$1(err);
4039
4047
  }
4040
- if (err.name == 'UserError') {
4048
+ if (err.name == 'NonFatalError') {
4049
+ console.error(messageArgs([err.message]).join(' '));
4050
+ } else if (err.name == 'UserError') {
4041
4051
  msg = err.message;
4042
4052
  if (!/Error/.test(msg)) {
4043
4053
  msg = "Error: " + msg;
@@ -4057,6 +4067,12 @@
4057
4067
  return err;
4058
4068
  }
4059
4069
 
4070
+ function NonFatalError(msg) {
4071
+ var err = new Error(msg);
4072
+ err.name = 'NonFatalError';
4073
+ return err;
4074
+ }
4075
+
4060
4076
  function formatColumns(arr, alignments) {
4061
4077
  var widths = arr.reduce(function(memo, line) {
4062
4078
  return line.map(function(str, i) {