@jdeighan/coffee-utils 11.0.30 → 11.0.31

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jdeighan/coffee-utils",
3
3
  "type": "module",
4
- "version": "11.0.30",
4
+ "version": "11.0.31",
5
5
  "description": "A set of utility functions for CoffeeScript",
6
6
  "main": "coffee_utils.js",
7
7
  "exports": {
package/src/fs.coffee CHANGED
@@ -5,7 +5,7 @@ import urllib from 'url'
5
5
  import fs from 'fs'
6
6
  import NReadLines from 'n-readlines'
7
7
 
8
- import {assert, croak, LOG, fromTAML} from '@jdeighan/exceptions'
8
+ import {assert, croak, debug, LOG, fromTAML} from '@jdeighan/exceptions'
9
9
  import {
10
10
  undef, pass, defined, rtrim, isEmpty, nonEmpty, getOptions,
11
11
  isString, isArray, isHash, isRegExp, isFunction, OL,
@@ -377,6 +377,7 @@ export parseSource = (source) ->
377
377
  # }
378
378
  # --- NOTE: source may be a file URL, e.g. import.meta.url
379
379
 
380
+ debug "enter parseSource(#{OL(source)})"
380
381
  assert isString(source),\
381
382
  "parseSource(): source not a string: #{OL(source)}"
382
383
  if source == 'unit test'
@@ -413,6 +414,7 @@ export parseSource = (source) ->
413
414
  ([A-Za-z_]+)
414
415
  $///)
415
416
  hSourceInfo.purpose = lMatches[1]
417
+ debug "return from parseSource()", hSourceInfo
416
418
  return hSourceInfo
417
419
 
418
420
  # ---------------------------------------------------------------------------
package/src/fs.js CHANGED
@@ -13,6 +13,7 @@ import NReadLines from 'n-readlines';
13
13
  import {
14
14
  assert,
15
15
  croak,
16
+ debug,
16
17
  LOG,
17
18
  fromTAML
18
19
  } from '@jdeighan/exceptions';
@@ -446,6 +447,7 @@ export var parseSource = function(source) {
446
447
  // purpose
447
448
  // }
448
449
  // --- NOTE: source may be a file URL, e.g. import.meta.url
450
+ debug(`enter parseSource(${OL(source)})`);
449
451
  assert(isString(source), `parseSource(): source not a string: ${OL(source)}`);
450
452
  if (source === 'unit test') {
451
453
  croak("A source of 'unit test' is deprecated");
@@ -481,6 +483,7 @@ export var parseSource = function(source) {
481
483
  hSourceInfo.purpose = lMatches[1];
482
484
  }
483
485
  }
486
+ debug("return from parseSource()", hSourceInfo);
484
487
  return hSourceInfo;
485
488
  };
486
489