@ptolemy2002/rgx 13.2.0 → 13.3.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.
@@ -41,7 +41,7 @@ class RGXExclusionToken extends base_1.RGXClassToken {
41
41
  const source = `(?=(?<${this.exclusionId}>${resolvedToken}${resolvedTerminal}))(?!${resolvedExclusions}${resolvedTerminal})\\k<${this.exclusionId}>`;
42
42
  // Because the terminal should be consuming no actual characters, it shuld be able to be repeated without issue, but we cannot actually validate
43
43
  // that the terminal is not consuming characters, so we will just document that the user not consume characters in the terminal.
44
- return new RegExp(source);
44
+ return (0, utils_1.createRegex)(source);
45
45
  }
46
46
  clone(depth = "max") {
47
47
  if (depth === 0)
@@ -140,6 +140,11 @@ export declare const RGX_PREDEFINED_CONSTANTS: {
140
140
  readonly rgxIsRepeatable: false;
141
141
  readonly toRgx: () => RegExp;
142
142
  };
143
+ readonly never: {
144
+ readonly rgxGroupWrap: false;
145
+ readonly rgxIsRepeatable: false;
146
+ readonly toRgx: () => RegExp;
147
+ };
143
148
  };
144
149
  export type RGXPredefinedConstant = keyof typeof RGX_PREDEFINED_CONSTANTS;
145
150
  export type RGXConstantName = RGXPredefinedConstant | (string & {});
package/dist/constants.js CHANGED
@@ -169,6 +169,14 @@ exports.RGX_PREDEFINED_CONSTANTS = {
169
169
  return /(?<=(?<!\\)(?:\\\\)*)/;
170
170
  }
171
171
  },
172
+ "never": {
173
+ rgxGroupWrap: false,
174
+ rgxIsRepeatable: false,
175
+ toRgx() {
176
+ // Never succeed
177
+ return /(?!)/;
178
+ }
179
+ }
172
180
  };
173
181
  function listRGXConstants() {
174
182
  return Object.keys(rgxConstants);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ptolemy2002/rgx",
3
- "version": "13.2.0",
3
+ "version": "13.3.0",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",