@speleotica/frcsdata 3.0.1 → 4.0.1

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.
Files changed (45) hide show
  1. package/FrcsPlotFile.js +5 -1
  2. package/FrcsPlotShot.js +5 -1
  3. package/FrcsShot.d.ts +25 -4
  4. package/FrcsShot.js +4 -5
  5. package/FrcsSurveyFile.js +5 -1
  6. package/FrcsTrip.js +5 -1
  7. package/FrcsTripSummary.js +5 -1
  8. package/FrcsTripSummaryFile.js +5 -1
  9. package/es/FrcsPlotFile.js +5 -1
  10. package/es/FrcsPlotShot.js +5 -1
  11. package/es/FrcsShot.js +5 -6
  12. package/es/FrcsSurveyFile.js +5 -1
  13. package/es/FrcsTrip.js +5 -1
  14. package/es/FrcsTripSummary.js +5 -1
  15. package/es/FrcsTripSummaryFile.js +5 -1
  16. package/es/formatFrcsShot.js +75 -0
  17. package/es/formatFrcsShot.spec.js +141 -0
  18. package/es/index.js +24 -28
  19. package/es/node/index.js +2 -10
  20. package/es/node/parseFrcsPlotFile.spec.js +1 -5
  21. package/es/node/parseFrcsSurveyFile.spec.js +115 -69
  22. package/es/node/parseFrcsTripSummaryFile.spec.js +1 -5
  23. package/es/parseFrcsPlotFile.js +1 -26
  24. package/es/parseFrcsSurveyFile.js +75 -103
  25. package/es/parseFrcsTripSummaryFile.js +1 -12
  26. package/es/string/index.js +2 -9
  27. package/es/string/parseFrcsPlotFile.spec.js +1 -5
  28. package/es/string/parseFrcsSurveyFile.spec.js +205 -109
  29. package/formatFrcsShot.d.ts +3 -0
  30. package/formatFrcsShot.js +72 -0
  31. package/formatFrcsShot.spec.js +139 -0
  32. package/index.d.ts +2 -1
  33. package/index.js +24 -28
  34. package/node/index.js +1 -9
  35. package/node/parseFrcsPlotFile.spec.js +165 -180
  36. package/node/parseFrcsSurveyFile.spec.js +270 -235
  37. package/node/parseFrcsTripSummaryFile.spec.js +83 -106
  38. package/package.json +15 -15
  39. package/parseFrcsPlotFile.js +224 -318
  40. package/parseFrcsSurveyFile.js +422 -431
  41. package/parseFrcsTripSummaryFile.js +102 -142
  42. package/string/index.js +10 -27
  43. package/string/parseFrcsPlotFile.spec.js +165 -180
  44. package/string/parseFrcsSurveyFile.spec.js +545 -541
  45. package/yarn.lock +1285 -702
@@ -1,126 +1,103 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
6
-
7
5
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
8
-
9
6
  var _mocha = require("mocha");
10
-
11
7
  var _chai = require("chai");
12
-
13
8
  var _index = require("./index");
14
-
15
9
  var _unitized = require("@speleotica/unitized");
16
-
17
10
  (0, _mocha.describe)('parseFrcsTripSummaryFile', function () {
18
- (0, _mocha.it)('basic test',
19
- /*#__PURE__*/
20
- (0, _asyncToGenerator2["default"])(
21
- /*#__PURE__*/
22
- _regenerator["default"].mark(function _callee() {
11
+ (0, _mocha.it)('basic test', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
23
12
  var parsed;
24
13
  return _regenerator["default"].wrap(function _callee$(_context) {
25
- while (1) {
26
- switch (_context.prev = _context.next) {
27
- case 0:
28
- _context.next = 2;
29
- return (0, _index.parseFrcsTripSummaryFile)(require.resolve('./STAT_sum.txt'));
30
-
31
- case 2:
32
- parsed = _context.sent;
33
- (0, _chai.expect)(parsed).to.deep.equal({
34
- errors: [],
35
- tripSummaries: [{
36
- tripNumber: 1,
37
- tripIndex: 0,
38
- date: new Date(81, 1, 15),
39
- totalLength: _unitized.Unitize.feet(258.6),
40
- numShots: 17,
41
- name: 'ENTRANCE DROPS, JOE\'S "I LOVE MY WIFE TRAVERSE", TRICKY TRAVERSE',
42
- excludedLength: _unitized.Unitize.feet(0),
43
- numExcludedShots: 0,
44
- team: ['Peter Quick', 'Keith Ortiz'],
45
- shots: ['A1', 'AD1-AD3', 'AE1', 'AE1 SIDE', 'AE9 SIDE', 'AE10-AE9', 'AE13 SIDE', 'AE15 SIDE', 'AE20-AE11']
46
- }, {
47
- tripNumber: 2,
48
- tripIndex: 1,
49
- date: new Date(81, 1, 14),
50
- totalLength: _unitized.Unitize.feet(1133.75),
51
- numShots: 55,
52
- name: 'TRICKY TRAVERSE AND THEN FIRST SURVEY IN UPPER CROWLWAY',
53
- excludedLength: _unitized.Unitize.feet(0),
54
- numExcludedShots: 0,
55
- team: ['Dan Crowl', 'Keith Ortiz', 'Chip Hopper', 'Peter Quick', 'Larry Bean'],
56
- shots: ['A1-A56']
57
- }, {
58
- tripNumber: 3,
59
- tripIndex: 2,
60
- date: new Date(81, 2, 6),
61
- totalLength: _unitized.Unitize.feet(2371.2),
62
- numShots: 61,
63
- name: "DOUG'S DEMISE (50 FT DROP), CHRIS CROSS, CRAWL ABOVE DROP",
64
- excludedLength: _unitized.Unitize.feet(0),
65
- numExcludedShots: 0,
66
- team: ['Peter Quick', 'Chris Gerace', 'Phil Oden', 'Chip Hopper'],
67
- shots: ['A13 SIDE', 'B1-B5', 'B2 SIDE', 'B3 SIDE', 'B6-B18', 'B17 SIDE', 'B19-B38', 'B32 SIDE', 'BS1-BS5', 'C1-C18']
68
- }]
69
- });
70
-
71
- case 4:
72
- case "end":
73
- return _context.stop();
74
- }
14
+ while (1) switch (_context.prev = _context.next) {
15
+ case 0:
16
+ _context.next = 2;
17
+ return (0, _index.parseFrcsTripSummaryFile)(require.resolve('./STAT_sum.txt'));
18
+ case 2:
19
+ parsed = _context.sent;
20
+ (0, _chai.expect)(parsed).to.deep.equal({
21
+ errors: [],
22
+ tripSummaries: [{
23
+ tripNumber: 1,
24
+ tripIndex: 0,
25
+ date: new Date(81, 1, 15),
26
+ totalLength: _unitized.Unitize.feet(258.6),
27
+ numShots: 17,
28
+ name: 'ENTRANCE DROPS, JOE\'S "I LOVE MY WIFE TRAVERSE", TRICKY TRAVERSE',
29
+ excludedLength: _unitized.Unitize.feet(0),
30
+ numExcludedShots: 0,
31
+ team: ['Peter Quick', 'Keith Ortiz'],
32
+ shots: ['A1', 'AD1-AD3', 'AE1', 'AE1 SIDE', 'AE9 SIDE', 'AE10-AE9', 'AE13 SIDE', 'AE15 SIDE', 'AE20-AE11']
33
+ }, {
34
+ tripNumber: 2,
35
+ tripIndex: 1,
36
+ date: new Date(81, 1, 14),
37
+ totalLength: _unitized.Unitize.feet(1133.75),
38
+ numShots: 55,
39
+ name: 'TRICKY TRAVERSE AND THEN FIRST SURVEY IN UPPER CROWLWAY',
40
+ excludedLength: _unitized.Unitize.feet(0),
41
+ numExcludedShots: 0,
42
+ team: ['Dan Crowl', 'Keith Ortiz', 'Chip Hopper', 'Peter Quick', 'Larry Bean'],
43
+ shots: ['A1-A56']
44
+ }, {
45
+ tripNumber: 3,
46
+ tripIndex: 2,
47
+ date: new Date(81, 2, 6),
48
+ totalLength: _unitized.Unitize.feet(2371.2),
49
+ numShots: 61,
50
+ name: "DOUG'S DEMISE (50 FT DROP), CHRIS CROSS, CRAWL ABOVE DROP",
51
+ excludedLength: _unitized.Unitize.feet(0),
52
+ numExcludedShots: 0,
53
+ team: ['Peter Quick', 'Chris Gerace', 'Phil Oden', 'Chip Hopper'],
54
+ shots: ['A13 SIDE', 'B1-B5', 'B2 SIDE', 'B3 SIDE', 'B6-B18', 'B17 SIDE', 'B19-B38', 'B32 SIDE', 'BS1-BS5', 'C1-C18']
55
+ }]
56
+ });
57
+ case 4:
58
+ case "end":
59
+ return _context.stop();
75
60
  }
76
61
  }, _callee);
77
62
  })));
78
- (0, _mocha.it)('old format',
79
- /*#__PURE__*/
80
- (0, _asyncToGenerator2["default"])(
81
- /*#__PURE__*/
82
- _regenerator["default"].mark(function _callee2() {
63
+ (0, _mocha.it)('old format', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
83
64
  var parsed;
84
65
  return _regenerator["default"].wrap(function _callee2$(_context2) {
85
- while (1) {
86
- switch (_context2.prev = _context2.next) {
87
- case 0:
88
- _context2.next = 2;
89
- return (0, _index.parseFrcsTripSummaryFile)(require.resolve('./STAT_sum_old.txt'));
90
-
91
- case 2:
92
- parsed = _context2.sent;
93
- (0, _chai.expect)(parsed).to.deep.equal({
94
- errors: [],
95
- tripSummaries: [{
96
- tripNumber: 1,
97
- tripIndex: 0,
98
- date: new Date(81, 1, 15),
99
- totalLength: _unitized.Unitize.feet(258.6),
100
- numShots: 17,
101
- name: 'ENTRANCE DROPS, JOE\'S "I LOVE MY WIFE TRAVERSE", TRICKY TRAVERSE',
102
- excludedLength: _unitized.Unitize.feet(0),
103
- numExcludedShots: 0,
104
- team: ['Peter Quick', 'Keith Ortiz'],
105
- shots: ['A1', 'AD1-AD3', 'AE1', 'AE1 SIDE', 'AE9 SIDE', 'AE10-AE9', 'AE13 SIDE', 'AE15 SIDE', 'AE20-AE11']
106
- }, undefined, {
107
- tripNumber: 3,
108
- tripIndex: 2,
109
- date: new Date(81, 2, 6),
110
- totalLength: _unitized.Unitize.feet(2371.2),
111
- numShots: 61,
112
- name: "DOUG'S DEMISE (50 FT DROP), CHRIS CROSS, CRAWL ABOVE DROP",
113
- excludedLength: _unitized.Unitize.feet(0),
114
- numExcludedShots: 0,
115
- team: ['Peter Quick', 'Chris Gerace', 'Phil Oden', 'Chip Hopper'],
116
- shots: ['A13 SIDE', 'B1-B5', 'B2 SIDE', 'B3 SIDE', 'B6-B18', 'B17 SIDE', 'B19-B38', 'B32 SIDE', 'BS1-BS5', 'C1-C18']
117
- }]
118
- });
119
-
120
- case 4:
121
- case "end":
122
- return _context2.stop();
123
- }
66
+ while (1) switch (_context2.prev = _context2.next) {
67
+ case 0:
68
+ _context2.next = 2;
69
+ return (0, _index.parseFrcsTripSummaryFile)(require.resolve('./STAT_sum_old.txt'));
70
+ case 2:
71
+ parsed = _context2.sent;
72
+ (0, _chai.expect)(parsed).to.deep.equal({
73
+ errors: [],
74
+ tripSummaries: [{
75
+ tripNumber: 1,
76
+ tripIndex: 0,
77
+ date: new Date(81, 1, 15),
78
+ totalLength: _unitized.Unitize.feet(258.6),
79
+ numShots: 17,
80
+ name: 'ENTRANCE DROPS, JOE\'S "I LOVE MY WIFE TRAVERSE", TRICKY TRAVERSE',
81
+ excludedLength: _unitized.Unitize.feet(0),
82
+ numExcludedShots: 0,
83
+ team: ['Peter Quick', 'Keith Ortiz'],
84
+ shots: ['A1', 'AD1-AD3', 'AE1', 'AE1 SIDE', 'AE9 SIDE', 'AE10-AE9', 'AE13 SIDE', 'AE15 SIDE', 'AE20-AE11']
85
+ }, undefined, {
86
+ tripNumber: 3,
87
+ tripIndex: 2,
88
+ date: new Date(81, 2, 6),
89
+ totalLength: _unitized.Unitize.feet(2371.2),
90
+ numShots: 61,
91
+ name: "DOUG'S DEMISE (50 FT DROP), CHRIS CROSS, CRAWL ABOVE DROP",
92
+ excludedLength: _unitized.Unitize.feet(0),
93
+ numExcludedShots: 0,
94
+ team: ['Peter Quick', 'Chris Gerace', 'Phil Oden', 'Chip Hopper'],
95
+ shots: ['A13 SIDE', 'B1-B5', 'B2 SIDE', 'B3 SIDE', 'B6-B18', 'B17 SIDE', 'B19-B38', 'B32 SIDE', 'BS1-BS5', 'C1-C18']
96
+ }]
97
+ });
98
+ case 4:
99
+ case "end":
100
+ return _context2.stop();
124
101
  }
125
102
  }, _callee2);
126
103
  })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speleotica/frcsdata",
3
- "version": "3.0.1",
3
+ "version": "4.0.1",
4
4
  "description": "parser for Chip Hopper's survey data format used in Fisher Ridge Cave System",
5
5
  "main": "index.js",
6
6
  "sideEffects": false,
@@ -84,19 +84,19 @@
84
84
  },
85
85
  "homepage": "https://github.com/speleotica/frcsdata#readme",
86
86
  "devDependencies": {
87
- "@babel/cli": "^7.1.5",
88
- "@babel/core": "^7.1.6",
89
- "@babel/plugin-proposal-class-properties": "^7.1.0",
90
- "@babel/plugin-proposal-export-default-from": "^7.0.0",
91
- "@babel/plugin-proposal-export-namespace-from": "^7.0.0",
92
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
93
- "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
94
- "@babel/plugin-proposal-optional-chaining": "^7.6.0",
87
+ "@babel/cli": "^7.22.5",
88
+ "@babel/core": "^7.22.5",
89
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
90
+ "@babel/plugin-proposal-export-default-from": "^7.22.5",
91
+ "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
92
+ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
93
+ "@babel/plugin-proposal-object-rest-spread": "^7.20.7",
94
+ "@babel/plugin-proposal-optional-chaining": "^7.21.0",
95
95
  "@babel/plugin-syntax-dynamic-import": "^7.0.0",
96
- "@babel/plugin-transform-runtime": "^7.1.0",
97
- "@babel/preset-env": "^7.1.6",
98
- "@babel/preset-typescript": "^7.7.2",
99
- "@babel/register": "^7.0.0",
96
+ "@babel/plugin-transform-runtime": "^7.22.5",
97
+ "@babel/preset-env": "^7.22.5",
98
+ "@babel/preset-typescript": "^7.22.5",
99
+ "@babel/register": "^7.22.5",
100
100
  "@commitlint/cli": "^6.0.2",
101
101
  "@commitlint/config-conventional": "^6.0.2",
102
102
  "@jedwards1211/commitlint-config": "^1.0.0",
@@ -104,8 +104,8 @@
104
104
  "@types/chai": "^4.2.0",
105
105
  "@types/mocha": "^5.2.7",
106
106
  "@types/node": "^12.12.12",
107
- "babel-eslint": "^10.0.1",
108
- "babel-plugin-istanbul": "^5.1.0",
107
+ "babel-eslint": "^10.1.0",
108
+ "babel-plugin-istanbul": "^6.1.1",
109
109
  "chai": "^4.2.0",
110
110
  "codecov": "^3.1.0",
111
111
  "copy": "^0.3.2",