mapshaper 0.5.118 → 0.6.0

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.118",
3
+ "version": "0.6.0",
4
4
  "description": "A tool for editing vector datasets for mapping and GIS.",
5
5
  "keywords": [
6
6
  "shapefile",
@@ -9,6 +9,7 @@
9
9
  "cartography",
10
10
  "simplification",
11
11
  "topology",
12
+ "csv",
12
13
  "gis"
13
14
  ],
14
15
  "author": "Matthew Bloch <masiyou@gmail.com>",
@@ -19,16 +20,14 @@
19
20
  "url": "https://github.com/mbloch/mapshaper"
20
21
  },
21
22
  "engines": {
22
- "node": ">=6.0.0"
23
+ "node": ">=12.0.0"
23
24
  },
24
25
  "scripts": {
25
- "test": "mocha -r esm --parallel --jobs 4 --check-leaks -R dot",
26
+ "test": "mocha test",
26
27
  "build": "rollup --config",
27
28
  "prepublishOnly": "npm test; ./pre-publish",
28
29
  "postpublish": "./release_web_ui; ./release_github_version",
29
- "browserify_old": "browserify -r sync-request -r mproj -r buffer -r iconv-lite -r fs -r flatbush -r rw -r path -r d3-scale-chromatic -r d3-color -r d3-interpolate -o www/modules.js",
30
- "browserify": "browserify -r sync-request -r mproj -r buffer -r iconv-lite -r fs -r flatbush -r rw -r path -r d3-scale-chromatic -r d3-color -r d3-interpolate -r kdbush -r @tmcw/togeojson -o www/modules.js",
31
- "watch": "rollup --config --watch",
30
+ "browserify": "browserify -r sync-request -r mproj -r buffer -r iconv-lite -r fs -r flatbush -r rw -r path -r kdbush -r @tmcw/togeojson -o www/modules.js",
32
31
  "dev": "rollup --config --watch"
33
32
  },
34
33
  "main": "./mapshaper.js",
@@ -50,7 +49,7 @@
50
49
  "delaunator": "^5.0.0",
51
50
  "flatbush": "^3.2.1",
52
51
  "geokdbush": "^1.1.0",
53
- "iconv-lite": "0.4.24",
52
+ "iconv-lite": "^0.6.3",
54
53
  "kdbush": "^3.0.0",
55
54
  "mproj": "0.0.35",
56
55
  "opn": "^5.3.0",
@@ -59,16 +58,22 @@
59
58
  "tinyqueue": "^2.0.3"
60
59
  },
61
60
  "devDependencies": {
62
- "@rollup/plugin-node-resolve": "^13.0.6",
61
+ "@rollup/plugin-node-resolve": "^13.3.0",
63
62
  "browserify": "^17.0.0",
64
63
  "csv-spectrum": "^1.0.0",
65
- "deep-eql": ">=0.1.3",
66
- "esm": "^3.2.25",
67
- "mocha": "^8.4.0",
68
- "rollup": "^2.60.0",
64
+ "mocha": "^10.0.0",
65
+ "rollup": "^2.73.0",
69
66
  "shell-quote": "^1.6.1",
70
67
  "underscore": "^1.13.1"
71
68
  },
69
+ "mocha": {
70
+ "reporter": "dot",
71
+ "node-option": [
72
+ "experimental-specifier-resolution=node"
73
+ ],
74
+ "parallel": true,
75
+ "jobs": 4
76
+ },
72
77
  "bin": {
73
78
  "mapshaper": "./bin/mapshaper",
74
79
  "mapshaper-gui": "./bin/mapshaper-gui",
@@ -2261,7 +2261,7 @@
2261
2261
  menu.hide();
2262
2262
  setTimeout(function() {
2263
2263
  var opts = getSimplifyOptions();
2264
- mapshaper.simplify(dataset, opts);
2264
+ mapshaper.cmd.simplify(dataset, opts);
2265
2265
  gui.session.simplificationApplied(getSimplifyOptionsAsString());
2266
2266
  updateZ(gui.map.getActiveLayer()); // question: does this update all display layers?
2267
2267
  model.updated({
@@ -4412,7 +4412,8 @@
4412
4412
  return self;
4413
4413
  }
4414
4414
 
4415
- var Buffer = require('buffer').Buffer; // works with browserify
4415
+ // Fall back to browserify's Buffer polyfill
4416
+ var B = typeof Buffer != 'undefined' ? Buffer : require('buffer').Buffer;
4416
4417
 
4417
4418
  // This module provides a way for multiple jobs to run together asynchronously
4418
4419
  // while keeping job-level context variables (like "defs") separate.
@@ -5487,10 +5488,10 @@
5487
5488
 
5488
5489
  function createBuffer(arg, arg2) {
5489
5490
  if (isInteger(arg)) {
5490
- return Buffer.allocUnsafe ? Buffer.allocUnsafe(arg) : new Buffer(arg);
5491
+ return B.allocUnsafe ? B.allocUnsafe(arg) : new B(arg);
5491
5492
  } else {
5492
5493
  // check allocUnsafe to make sure Buffer.from() will accept strings (it didn't before Node v5.10)
5493
- return Buffer.from && Buffer.allocUnsafe ? Buffer.from(arg, arg2) : new Buffer(arg, arg2);
5494
+ return B.from && B.allocUnsafe ? B.from(arg, arg2) : new B(arg, arg2);
5494
5495
  }
5495
5496
  }
5496
5497