pacc 6.8.0 → 6.8.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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/expand.mjs +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pacc",
3
- "version": "6.8.0",
3
+ "version": "6.8.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
package/src/expand.mjs CHANGED
@@ -41,7 +41,7 @@ export function expand(object, context = {}) {
41
41
 
42
42
  let value = parse(expression, context);
43
43
  if (value === undefined) {
44
- result += object.substring(start, end + leadOut.length);
44
+ result += object.substring(cur, end + leadOut.length);
45
45
  } else {
46
46
  if (typeof value === "string") {
47
47
  value = _expand(value, path);
@@ -60,7 +60,8 @@ export function expand(object, context = {}) {
60
60
  cur = end + leadOut.length;
61
61
  } else {
62
62
  throw new Error(
63
- `Unterminated expression between '${leadIn}' and '${leadOut}'`
63
+ `Unterminated expression between '${leadIn}' and '${leadOut}'`,
64
+ { cause: object }
64
65
  );
65
66
  }
66
67
  }