@ptolemy2002/rgx 7.6.0 → 7.7.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.
@@ -138,7 +138,11 @@ class RGXWalker {
138
138
  }
139
139
  }
140
140
  }
141
- const captureResult = { raw, value, start, end, branch, ownerId: isPart && token.hasId() ? token.id : null };
141
+ const captureResult = {
142
+ raw, value, start, end, branch,
143
+ ownerId: isPart && token.hasId() ? token.id : null,
144
+ groups: isPart ? capture.groups ?? null : null
145
+ };
142
146
  // Validate the part. If validation fails, it will throw an error, so nothing below will run.
143
147
  if (isPart) {
144
148
  token.validate(captureResult, this);
@@ -9,6 +9,7 @@ export type RGXCapture<T = unknown> = {
9
9
  end: number;
10
10
  ownerId: string | null;
11
11
  branch: number;
12
+ groups: Record<string, string> | null;
12
13
  };
13
14
  export type RGXPartOptions<R, T = string> = {
14
15
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ptolemy2002/rgx",
3
- "version": "7.6.0",
3
+ "version": "7.7.0",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",