Skip to content

Commit fb7a151

Browse files
committed
Fork as github.com/sourcegraph/jsonpath
Sourcegraph's jsonpath: search filter needs bug fixes and extensions that upstream does not have yet. The fork is based on v0.8.2 because v0.8.4 moved to pb33f/go-yaml while Sourcegraph and libopenapi use go.yaml.in/yaml/v4. It uses its own module path so libopenapi can keep depending on upstream without a replace directive swapping in our changes. CI also runs for the sourcegraph branch. Amp-Thread-ID: https://ampcode.com/threads/T-456d5736-9543-4352-9425-6bbfef933256
1 parent dbbb19d commit fb7a151

19 files changed

Lines changed: 32 additions & 27 deletions

‎.github/workflows/build.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
push:
55
branches:
66
- main
7+
- sourcegraph
78
pull_request:
89
branches:
910
- main
11+
- sourcegraph
1012

1113
jobs:
1214
build-linux:

‎.github/workflows/test.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
branches:
66
- main
7+
- sourcegraph
78
types:
89
- opened
910
- edited

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# pb33f jsonpath
22

3+
> **Sourcegraph fork.** The `sourcegraph` branch is based on pb33f/jsonpath v0.8.2 (the last release on `go.yaml.in/yaml/v4`) and is published as the module `github.com/sourcegraph/jsonpath`, so it can sit alongside upstream (which libopenapi depends on). It carries bug fixes and extensions for Sourcegraph's experimental `jsonpath:` search filter. `main` tracks upstream.
4+
35
[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg?style=for-the-badge)](https://pkg.go.dev/github.com/pb33f/jsonpath?tab=doc)
46

57
A full implementation of [RFC 9535 JSONPath](https://datatracker.ietf.org/doc/rfc9535/) with **JSONPath Plus** extensions for enhanced querying capabilities.

‎cmd/wasm/functions.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ package main
55
import (
66
"encoding/json"
77
"fmt"
8-
"github.com/pb33f/jsonpath/pkg/jsonpath"
9-
"github.com/pb33f/jsonpath/pkg/jsonpath/config"
10-
"github.com/pb33f/jsonpath/pkg/jsonpath/token"
11-
"github.com/pb33f/jsonpath/pkg/overlay"
8+
"github.com/sourcegraph/jsonpath/pkg/jsonpath"
9+
"github.com/sourcegraph/jsonpath/pkg/jsonpath/config"
10+
"github.com/sourcegraph/jsonpath/pkg/jsonpath/token"
11+
"github.com/sourcegraph/jsonpath/pkg/overlay"
1212
"go.yaml.in/yaml/v4"
1313
"reflect"
1414
"syscall/js"

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/pb33f/jsonpath
1+
module github.com/sourcegraph/jsonpath
22

33
go 1.24
44

‎integration_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"testing"
99

1010
"github.com/pmezard/go-difflib/difflib"
11-
"github.com/pb33f/jsonpath/pkg/jsonpath"
11+
"github.com/sourcegraph/jsonpath/pkg/jsonpath"
1212
"github.com/stretchr/testify/require"
1313
"go.yaml.in/yaml/v4"
1414
)

‎pkg/jsonpath/jsonpath.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package jsonpath
22

33
import (
44
"fmt"
5-
"github.com/pb33f/jsonpath/pkg/jsonpath/config"
6-
"github.com/pb33f/jsonpath/pkg/jsonpath/token"
5+
"github.com/sourcegraph/jsonpath/pkg/jsonpath/config"
6+
"github.com/sourcegraph/jsonpath/pkg/jsonpath/token"
77
"go.yaml.in/yaml/v4"
88
)
99

‎pkg/jsonpath/jsonpath_plus_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package jsonpath
33
import (
44
"testing"
55

6-
"github.com/pb33f/jsonpath/pkg/jsonpath/config"
6+
"github.com/sourcegraph/jsonpath/pkg/jsonpath/config"
77
"github.com/stretchr/testify/assert"
88
"go.yaml.in/yaml/v4"
99
)

‎pkg/jsonpath/lazy_context_tracking_stress_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"os"
88
"testing"
99

10-
"github.com/pb33f/jsonpath/pkg/jsonpath/config"
11-
"github.com/pb33f/jsonpath/pkg/jsonpath/token"
10+
"github.com/sourcegraph/jsonpath/pkg/jsonpath/config"
11+
"github.com/sourcegraph/jsonpath/pkg/jsonpath/token"
1212
"go.yaml.in/yaml/v4"
1313
)
1414

‎pkg/jsonpath/lazy_context_tracking_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
package jsonpath
44

55
import (
6-
"github.com/pb33f/jsonpath/pkg/jsonpath/config"
7-
"github.com/pb33f/jsonpath/pkg/jsonpath/token"
6+
"github.com/sourcegraph/jsonpath/pkg/jsonpath/config"
7+
"github.com/sourcegraph/jsonpath/pkg/jsonpath/token"
88
"go.yaml.in/yaml/v4"
99
"testing"
1010
)

0 commit comments

Comments
 (0)