This is Sourcegraph's long-term fork of pb33f/jsonpath, published as github.com/sourcegraph/jsonpath. main is the fork's only branch; upstream is https://github.com/pb33f/jsonpath, which you can add as a remote.
Every change that makes main differ from upstream must update SOURCEGRAPH.md in the same commit. This covers new syntax or behaviour, bug fixes, removed features, and build or CI changes. Say what changed, why, which functions it touches, and which tests cover it. Update or delete the entry when the change is reworked, reverted, or merged upstream.
- New syntax is a JSONPath Plus extension: gate it on
config.JSONPathPlusEnabled()soconfig.WithStrictRFC9535()rejects it. Document user-facing syntax, with examples, in its SOURCEGRAPH.md entry. Keep all Sourcegraph documentation in SOURCEGRAPH.md: README.md stays upstream's apart from the fork note at the top, so it doesn't conflict with upstream changes. - Keep RFC 9535 behaviour compliant. The compliance suite is a git submodule: run
git submodule update --init, thengo test ./...; the root package runsjsonpath-compliance-test-suite/cts.json. - Sourcegraph's
jsonpath:search filter compiles paths withconfig.WithPropertyNameExtension()andconfig.WithLazyContextTracking(). Test new behaviour under those options as well as the defaults. - Keep the diff against upstream small so merges stay easy. Add to existing functions rather than restructuring them, and match each file's existing indentation: many files are not gofmt-formatted, and reformatting them would conflict with every upstream change.