simple-graph-query 2.0.1 → 2.0.2

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.
@@ -50025,12 +50025,12 @@ class ForgeExprEvaluator extends AbstractParseTreeVisitor_1.AbstractParseTreeVis
50025
50025
  if (exports.SUPPORTED_BUILTINS.includes(identifier)) {
50026
50026
  return identifier;
50027
50027
  }
50028
- // Check if this looks like a simple label identifier (for label comparison)
50029
- // Heuristic: simple lowercase words that look like color/state names
50030
- const labelLikePattern = /^[a-z]{3,10}$/; // 3-10 lowercase letters only
50028
+ // Check if this looks like a label identifier (for label comparison).
50029
+ // Labels can be any alphanumeric string with underscores.
50030
+ // This allows identifiers like "Black", "red", "my_label", "Color_123", etc.
50031
+ // to be treated as string literals in label comparisons (e.g., @:y = Black).
50032
+ const labelLikePattern = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
50031
50033
  if (labelLikePattern.test(identifier)) {
50032
- // This looks like a simple label (e.g., "black", "red", "blue", etc.)
50033
- // Return it as a string literal to enable label comparison syntax
50034
50034
  return identifier;
50035
50035
  }
50036
50036
  throw new NameNotFoundError(`bad name ${identifier} referenced!`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simple-graph-query",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "TypeScript evaluator for Forge expressions with browser-compatible UMD bundle",
5
5
  "main": "dist/simple-graph-query.bundle.js",
6
6
  "types": "dist/index.d.ts",