Skip to content

Conversation

ashphy
Copy link
Owner

@ashphy ashphy commented Jun 10, 2025

Summary

  • Updated Peggy parser generator from v3 to v5
  • Restructured grammar compilation process and file organization
  • Improved build configuration and project structure

Test plan

  • Verify all existing tests pass
  • Ensure generated parser files compile correctly
  • Validate JSONPath functionality remains intact

🤖 Generated with Claude Code

@ashphy ashphy requested a review from Copilot June 10, 2025 00:35
Copilot

This comment was marked as outdated.

ashphy and others added 5 commits June 10, 2025 21:02
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ashphy ashphy requested a review from Copilot June 17, 2025 11:21
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Upgraded Peggy parser to v5, restructured grammar compilation, and improved build configuration and project structure.

  • Switched imports from the old JSONPath module to the new grammar AST module.
  • Added Peggy configuration and removed the custom builder and legacy footer.
  • Updated build scripts, package exports, and CI workflow to support Peggy v5.

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tsup.config.ts Added explicit entry for bundler
src/parsers/root.ts Updated AST import and adjusted segment type
src/parsers/function_extentions.ts Updated AST import path
src/parsers/filter_selector.ts Updated AST import path
src/parsers/array_slice_selector.ts Updated AST import path
src/parser.ts Updated AST import path
src/jsonpath_js.ts Switched parsing import to generated grammar output
src/grammer/jsonpath.pegjs Revised grammar to remove TS type assertions
src/grammer/config.js Added Peggy configuration
package.json Adjusted exports, scripts, and dependencies
grammer/jsonpath.footer.ts Removed legacy type definitions
grammer/builder.ts Removed custom build script
biome.json Updated formatter and ignore rules
.node-version Specified Node.js version
.github/workflows/lint.yml Updated parser sync check paths
Comments suppressed due to low confidence (1)

src/parsers/root.ts:64

  • The variable segementResult is undefined (typo) and should likely be selectorResults or a properly named segmentResult. Fix the return variable to match the computed value.
return segementResult;

- Move all parser-related files from src/grammer/ to src/grammar/
- Update build configuration to use correct grammar directory
- Update documentation and workflow files to reference correct path
- Clean up old misspelled directory

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ashphy ashphy force-pushed the upgrade-peggy-v5 branch from 5564454 to 84b95fd Compare June 17, 2025 11:41
@ashphy ashphy merged commit 512942f into main Jun 17, 2025
10 checks passed
@ashphy ashphy deleted the upgrade-peggy-v5 branch June 17, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant