mapshaper 0.6.16 → 0.6.17

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/mapshaper.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function () {
2
2
 
3
- var VERSION = "0.6.16";
3
+ var VERSION = "0.6.17";
4
4
 
5
5
 
6
6
  var utils = /*#__PURE__*/Object.freeze({
@@ -21715,10 +21715,12 @@ ${svg}
21715
21715
  }
21716
21716
 
21717
21717
  if (!optDef) {
21718
+ // REMOVING quote trimming -- it prevents the use of quoted commands in -run (for example)
21718
21719
  // token is not a defined option; add it to _ array for later processing
21719
21720
  // Stripping surrounding quotes here, although this may not be necessary since
21720
21721
  // (some, most, all?) shells seem to remove quotes.
21721
- cmd._.push(utils.trimQuotes(token));
21722
+ // cmd._.push(utils.trimQuotes(token));
21723
+ cmd._.push(token);
21722
21724
  return;
21723
21725
  }
21724
21726
 
@@ -42437,7 +42439,7 @@ ${svg}
42437
42439
  var ctx = getBaseContext();
42438
42440
  var output, targetData;
42439
42441
  // TODO: throw an informative error if target is used when there are multiple targets
42440
- if (targets.length == 1) {
42442
+ if (targets && targets.length == 1) {
42441
42443
  targetData = getRunCommandData(targets[0]);
42442
42444
  Object.defineProperty(ctx, 'target', {value: targetData});
42443
42445
  }
@@ -44635,6 +44637,7 @@ ${svg}
44635
44637
  function commandAcceptsEmptyTarget(name) {
44636
44638
  return name == 'graticule' || name == 'i' || name == 'help' ||
44637
44639
  name == 'point-grid' || name == 'shape' || name == 'rectangle' ||
44640
+ name == 'require' || name == 'run' || name == 'define' ||
44638
44641
  name == 'include' || name == 'print' || name == 'comment' || name == 'if' || name == 'elif' ||
44639
44642
  name == 'else' || name == 'endif' || name == 'stop';
44640
44643
  }
package/package.json CHANGED
@@ -1,89 +1,96 @@
1
1
  {
2
- "name": "mapshaper",
3
- "version": "0.6.16",
4
- "description": "A tool for editing vector datasets for mapping and GIS.",
5
- "keywords": [
6
- "shapefile",
7
- "topojson",
8
- "geojson",
9
- "cartography",
10
- "simplification",
11
- "topology",
12
- "csv",
13
- "gis"
14
- ],
15
- "author": "Matthew Bloch <masiyou@gmail.com>",
16
- "contributors": [],
17
- "license": "MPL-2.0",
18
- "repository": {
19
- "type": "git",
20
- "url": "https://github.com/mbloch/mapshaper"
21
- },
22
- "engines": {
23
- "node": ">=12.0.0"
24
- },
25
- "scripts": {
26
- "test": "mocha test",
27
- "build": "rollup --config",
28
- "lint": "eslint --ext mjs src/",
29
- "prepublishOnly": "npm lint; npm test; ./pre-publish",
30
- "postpublish": "./release_web_ui; ./release_github_version",
31
- "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 -r @placemarkio/tokml -r bson -o www/modules.js",
32
- "dev": "rollup --config --watch"
33
- },
34
- "main": "./mapshaper.js",
35
- "files": [
36
- "/bin/**",
37
- "/www/**",
38
- "!/www/nacis/**",
39
- "/mapshaper.js",
40
- "!.DS_Store"
41
- ],
42
- "dependencies": {
43
- "@placemarkio/tokml": "^0.3.3",
44
- "@tmcw/togeojson": "^5.5.0",
45
- "@xmldom/xmldom": "^0.8.6",
46
- "adm-zip": "^0.5.9",
47
- "bson": "^4.7.0",
48
- "commander": "7.0.0",
49
- "cookies": "^0.8.0",
50
- "d3-color": "3.1.0",
51
- "d3-interpolate": "^3.0.1",
52
- "d3-scale-chromatic": "3.0.0",
53
- "delaunator": "^5.0.0",
54
- "fflate": "^0.7.4",
55
- "flatbush": "^3.2.1",
56
- "geokdbush": "^1.1.0",
57
- "iconv-lite": "^0.6.3",
58
- "kdbush": "^3.0.0",
59
- "mproj": "0.0.35",
60
- "opn": "^5.3.0",
61
- "rw": "~1.3.3",
62
- "sync-request": "5.0.0",
63
- "tinyqueue": "^2.0.3"
64
- },
65
- "devDependencies": {
66
- "@rollup/plugin-node-resolve": "^13.3.0",
67
- "browserify": "^17.0.0",
68
- "csv-spectrum": "^1.0.0",
69
- "eslint": "^8.16.0",
70
- "mocha": "^10.0.0",
71
- "rollup": "^2.73.0",
72
- "shell-quote": "^1.7.4",
73
- "underscore": "^1.13.1"
74
- },
75
- "mocha": {
76
- "reporter": "dot",
77
- "node-option": [
78
- "experimental-specifier-resolution=node"
79
- ],
80
- "check-leaks": true,
81
- "parallel": true,
82
- "jobs": 4
83
- },
84
- "bin": {
85
- "mapshaper": "./bin/mapshaper",
86
- "mapshaper-gui": "./bin/mapshaper-gui",
87
- "mapshaper-xl": "./bin/mapshaper-xl"
88
- }
2
+ "name": "mapshaper",
3
+ "version": "0.6.17",
4
+ "description": "A tool for editing vector datasets for mapping and GIS.",
5
+ "keywords": [
6
+ "shapefile",
7
+ "topojson",
8
+ "geojson",
9
+ "cartography",
10
+ "simplification",
11
+ "topology",
12
+ "csv",
13
+ "gis"
14
+ ],
15
+ "author": "Matthew Bloch <masiyou@gmail.com>",
16
+ "contributors": [],
17
+ "license": "MPL-2.0",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/mbloch/mapshaper.git"
21
+ },
22
+ "engines": {
23
+ "node": ">=12.0.0"
24
+ },
25
+ "scripts": {
26
+ "test": "mocha test",
27
+ "build": "rollup --config",
28
+ "lint": "eslint --ext mjs src/",
29
+ "prepublishOnly": "npm lint; npm test; ./pre-publish",
30
+ "postpublish": "./release_web_ui; ./release_github_version",
31
+ "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 -r @placemarkio/tokml -r bson -o www/modules.js",
32
+ "dev": "rollup --config --watch"
33
+ },
34
+ "main": "./mapshaper.js",
35
+ "files": [
36
+ "/bin/**",
37
+ "/www/**",
38
+ "!/www/nacis/**",
39
+ "/mapshaper.js",
40
+ "!.DS_Store"
41
+ ],
42
+ "dependencies": {
43
+ "@placemarkio/tokml": "^0.3.3",
44
+ "@tmcw/togeojson": "^5.6.0",
45
+ "@xmldom/xmldom": "^0.8.6",
46
+ "adm-zip": "^0.5.9",
47
+ "bson": "^4.7.0",
48
+ "commander": "7.0.0",
49
+ "cookies": "^0.8.0",
50
+ "d3-color": "3.1.0",
51
+ "d3-interpolate": "^3.0.1",
52
+ "d3-scale-chromatic": "3.0.0",
53
+ "delaunator": "^5.0.0",
54
+ "fflate": "^0.7.4",
55
+ "flatbush": "^3.2.1",
56
+ "geokdbush": "^1.1.0",
57
+ "iconv-lite": "^0.6.3",
58
+ "kdbush": "^3.0.0",
59
+ "mproj": "0.0.35",
60
+ "opn": "^5.3.0",
61
+ "rw": "~1.3.3",
62
+ "sync-request": "5.0.0",
63
+ "tinyqueue": "^2.0.3"
64
+ },
65
+ "devDependencies": {
66
+ "@rollup/plugin-node-resolve": "^13.3.0",
67
+ "browserify": "^17.0.0",
68
+ "csv-spectrum": "^1.0.0",
69
+ "eslint": "^8.16.0",
70
+ "mocha": "^10.0.0",
71
+ "rollup": "^2.73.0",
72
+ "shell-quote": "^1.7.4",
73
+ "underscore": "^1.13.1"
74
+ },
75
+ "mocha": {
76
+ "reporter": "dot",
77
+ "node-option": [
78
+ "experimental-specifier-resolution=node"
79
+ ],
80
+ "check-leaks": true,
81
+ "parallel": true,
82
+ "jobs": 4
83
+ },
84
+ "bin": {
85
+ "mapshaper": "bin/mapshaper",
86
+ "mapshaper-gui": "bin/mapshaper-gui",
87
+ "mapshaper-xl": "bin/mapshaper-xl"
88
+ },
89
+ "bugs": {
90
+ "url": "https://github.com/mbloch/mapshaper/issues"
91
+ },
92
+ "homepage": "https://github.com/mbloch/mapshaper#readme",
93
+ "directories": {
94
+ "test": "test"
95
+ }
89
96
  }
@@ -1552,7 +1552,9 @@
1552
1552
  }
1553
1553
 
1554
1554
  async function readZipFile(file) {
1555
- var index = internal.unzipSync(file.content);
1555
+ // Async is up to twice as fast unzipping large files
1556
+ // var index = internal.unzipSync(file.content);
1557
+ var index = await runAsync(internal.unzipAsync, file.content);
1556
1558
  return Object.keys(index).reduce(function(memo, filename) {
1557
1559
  if (!/\.txt$/i.test(filename)) {
1558
1560
  memo.push({
package/www/mapshaper.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function () {
2
2
 
3
- var VERSION = "0.6.16";
3
+ var VERSION = "0.6.17";
4
4
 
5
5
 
6
6
  var utils = /*#__PURE__*/Object.freeze({
@@ -21715,10 +21715,12 @@ ${svg}
21715
21715
  }
21716
21716
 
21717
21717
  if (!optDef) {
21718
+ // REMOVING quote trimming -- it prevents the use of quoted commands in -run (for example)
21718
21719
  // token is not a defined option; add it to _ array for later processing
21719
21720
  // Stripping surrounding quotes here, although this may not be necessary since
21720
21721
  // (some, most, all?) shells seem to remove quotes.
21721
- cmd._.push(utils.trimQuotes(token));
21722
+ // cmd._.push(utils.trimQuotes(token));
21723
+ cmd._.push(token);
21722
21724
  return;
21723
21725
  }
21724
21726
 
@@ -42437,7 +42439,7 @@ ${svg}
42437
42439
  var ctx = getBaseContext();
42438
42440
  var output, targetData;
42439
42441
  // TODO: throw an informative error if target is used when there are multiple targets
42440
- if (targets.length == 1) {
42442
+ if (targets && targets.length == 1) {
42441
42443
  targetData = getRunCommandData(targets[0]);
42442
42444
  Object.defineProperty(ctx, 'target', {value: targetData});
42443
42445
  }
@@ -44635,6 +44637,7 @@ ${svg}
44635
44637
  function commandAcceptsEmptyTarget(name) {
44636
44638
  return name == 'graticule' || name == 'i' || name == 'help' ||
44637
44639
  name == 'point-grid' || name == 'shape' || name == 'rectangle' ||
44640
+ name == 'require' || name == 'run' || name == 'define' ||
44638
44641
  name == 'include' || name == 'print' || name == 'comment' || name == 'if' || name == 'elif' ||
44639
44642
  name == 'else' || name == 'endif' || name == 'stop';
44640
44643
  }