Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump version #61

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.env
.env.*
.idea
1 change: 1 addition & 0 deletions account/accountdomain/user/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func TestNewReearthAuth(t *testing.T) {
Sub: "reearth|xx|yy",
}, NewReearthAuth("xx|yy"))
}

func TestIsReearth(t *testing.T) {
a := Auth{
Provider: "reearth",
Expand Down
1 change: 0 additions & 1 deletion account/accountdomain/user/password_reset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ func Test_generateToken(t *testing.T) {
assert.NotEmpty(t, t1)
assert.NotEmpty(t, t2)
assert.NotEqual(t, t1, t2)

}

func TestPasswordResetFrom(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions account/accountdomain/workspace/member_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ func TestNewMembers(t *testing.T) {
fixed: false,
}, m)
}

func TestNewMembersWith(t *testing.T) {
uid := NewUserID()
m := NewMembersWith(map[UserID]Member{uid: {Role: RoleOwner}}, nil, true)
Expand Down
24 changes: 12 additions & 12 deletions account/accountusecase/accountinteractor/workspace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -953,21 +953,21 @@ func TestWorkspace_RemoveMultipleMembers(t *testing.T) {
id2 := accountdomain.NewWorkspaceID()
w2 := workspace.New().ID(id2).Name("W2").
Members(map[user.ID]workspace.Member{
userID: {Role: workspace.RoleOwner},
userID: {Role: workspace.RoleOwner},
userID2: {Role: workspace.RoleReader},
}).Personal(true).MustBuild()

id3 := accountdomain.NewWorkspaceID()
w3 := workspace.New().ID(id3).Name("W3").
Members(map[user.ID]workspace.Member{
userID: {Role: workspace.RoleOwner},
userID: {Role: workspace.RoleOwner},
userID2: {Role: workspace.RoleReader},
}).Personal(false).MustBuild()

id4 := accountdomain.NewWorkspaceID()
w4 := workspace.New().ID(id4).Name("W4").
Members(map[user.ID]workspace.Member{
userID: {Role: workspace.RoleOwner},
userID: {Role: workspace.RoleOwner},
userID2: {Role: workspace.RoleReader},
}).Personal(false).MustBuild()

Expand Down Expand Up @@ -1000,7 +1000,7 @@ func TestWorkspace_RemoveMultipleMembers(t *testing.T) {
operator *accountusecase.Operator
}{
wId: id1,
uIds: workspace.UserIDList{accountdomain.NewUserID()},
uIds: workspace.UserIDList{accountdomain.NewUserID()},
operator: op,
},
wantErr: workspace.ErrTargetUserNotInTheWorkspace,
Expand All @@ -1021,7 +1021,7 @@ func TestWorkspace_RemoveMultipleMembers(t *testing.T) {
},
wantErr: nil,
want: workspace.NewMembersWith(map[user.ID]workspace.Member{
userID: {Role: workspace.RoleOwner},
userID: {Role: workspace.RoleOwner},
userID4: {Role: workspace.RoleReader},
}, nil, false),
},
Expand All @@ -1040,7 +1040,7 @@ func TestWorkspace_RemoveMultipleMembers(t *testing.T) {
},
wantErr: accountinterfaces.ErrInvalidOperator,
want: workspace.NewMembersWith(map[user.ID]workspace.Member{
userID: {Role: workspace.RoleOwner},
userID: {Role: workspace.RoleOwner},
userID4: {Role: workspace.RoleReader},
}, nil, false),
},
Expand All @@ -1053,16 +1053,16 @@ func TestWorkspace_RemoveMultipleMembers(t *testing.T) {
uIds workspace.UserIDList
operator *accountusecase.Operator
}{
wId: id1,
uIds: workspace.UserIDList{userID2},
wId: id1,
uIds: workspace.UserIDList{userID2},
operator: &accountusecase.Operator{
User: &userID3,
ReadableWorkspaces: []workspace.ID{id1},
},
},
wantErr: accountinterfaces.ErrOperationDenied,
want: workspace.NewMembersWith(map[user.ID]workspace.Member{
userID: {Role: workspace.RoleOwner},
userID: {Role: workspace.RoleOwner},
userID3: {Role: workspace.RoleReader},
userID4: {Role: workspace.RoleReader},
}, nil, false),
Expand All @@ -1082,7 +1082,7 @@ func TestWorkspace_RemoveMultipleMembers(t *testing.T) {
},
wantErr: workspace.ErrCannotModifyPersonalWorkspace,
want: workspace.NewMembersWith(map[user.ID]workspace.Member{
userID: {Role: workspace.RoleOwner},
userID: {Role: workspace.RoleOwner},
userID2: {Role: workspace.RoleReader},
}, nil, false),
},
Expand All @@ -1101,7 +1101,7 @@ func TestWorkspace_RemoveMultipleMembers(t *testing.T) {
},
wantErr: accountinterfaces.ErrOwnerCannotLeaveTheWorkspace,
want: workspace.NewMembersWith(map[user.ID]workspace.Member{
userID: {Role: workspace.RoleOwner},
userID: {Role: workspace.RoleOwner},
userID2: {Role: workspace.RoleReader},
}, nil, false),
},
Expand All @@ -1120,7 +1120,7 @@ func TestWorkspace_RemoveMultipleMembers(t *testing.T) {
},
wantErr: workspace.ErrNoSpecifiedUsers,
want: workspace.NewMembersWith(map[user.ID]workspace.Member{
userID: {Role: workspace.RoleOwner},
userID: {Role: workspace.RoleOwner},
userID2: {Role: workspace.RoleReader},
}, nil, false),
},
Expand Down
6 changes: 4 additions & 2 deletions account/accountusecase/accountproxy/userconv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ func TestFragmentToUser(t *testing.T) {
},
want: us,
wantErr: false,
}}
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := FragmentToUser(tt.args.me)
Expand Down Expand Up @@ -398,7 +399,8 @@ func TestSimpleUserByIDsNodesUserTo(t *testing.T) {
Email: "email",
},
wantErr: false,
}}
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := SimpleUserByIDsNodesUserTo(tt.args.r)
Expand Down
6 changes: 4 additions & 2 deletions account/accountusecase/accountproxy/workspaceconv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
},
Typename: "Workspace",
}
owner := workspace.Member{

Check failure on line 39 in account/accountusecase/accountproxy/workspaceconv_test.go

View workflow job for this annotation

GitHub Actions / CI

owner declared and not used (typecheck)
Role: workspace.RoleOwner,
}
reader := workspace.Member{

Check failure on line 42 in account/accountusecase/accountproxy/workspaceconv_test.go

View workflow job for this annotation

GitHub Actions / CI

reader declared and not used (typecheck)
Role: workspace.RoleReader,
InvitedBy: uid,
}
Expand Down Expand Up @@ -130,10 +130,10 @@
},
Typename: "Workspace",
}
owner := workspace.Member{

Check failure on line 133 in account/accountusecase/accountproxy/workspaceconv_test.go

View workflow job for this annotation

GitHub Actions / CI

owner declared and not used (typecheck)
Role: workspace.RoleOwner,
}
reader := workspace.Member{

Check failure on line 136 in account/accountusecase/accountproxy/workspaceconv_test.go

View workflow job for this annotation

GitHub Actions / CI

reader declared and not used (typecheck)
Role: workspace.RoleReader,
InvitedBy: uid,
}
Expand Down Expand Up @@ -200,10 +200,10 @@
um, im,
},
}
owner := workspace.Member{

Check failure on line 203 in account/accountusecase/accountproxy/workspaceconv_test.go

View workflow job for this annotation

GitHub Actions / CI

owner declared and not used (typecheck)
Role: workspace.RoleOwner,
}
reader := workspace.Member{

Check failure on line 206 in account/accountusecase/accountproxy/workspaceconv_test.go

View workflow job for this annotation

GitHub Actions / CI

reader declared and not used (typecheck)
Role: workspace.RoleReader,
InvitedBy: uid,
}
Expand All @@ -230,7 +230,8 @@
},
want: []*workspace.Workspace{ws},
wantErr: false,
}}
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := ToWorkspaces(tt.args.r)
Expand Down Expand Up @@ -299,7 +300,8 @@
},
want: ws,
wantErr: false,
}}
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := ToWorkspace(tt.args.r)
Expand Down
167 changes: 83 additions & 84 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,132 +1,131 @@
module github.com/reearth/reearthx

go 1.21
go 1.22.7

toolchain go1.23.4
Comment on lines +3 to +5
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Update Go version to 1.22.10

The current Go version 1.22.7 is outdated. Go 1.22.10 is now available and includes important security fixes and improvements.

🔗 Analysis chain

Consider using the latest Go 1.22.x version

The specified Go version 1.22.7 is not the latest patch version in the 1.22.x series. Consider using Go 1.22.1 which is the latest stable version.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check latest Go versions
curl -s https://go.dev/dl/?mode=json | jq '.[].version' | grep '"go1.22'

Length of output: 88

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove invalid toolchain directive

The toolchain directive specifies Go 1.23.4, but Go 1.23 has not been released yet. This could cause build issues.

-toolchain go1.23.4


require (
github.com/99designs/gqlgen v0.17.43
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.21.0
github.com/Khan/genqlient v0.6.0
github.com/99designs/gqlgen v0.17.60
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.25.0
github.com/Khan/genqlient v0.7.0
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
github.com/auth0/go-jwt-middleware/v2 v2.2.1
github.com/aws/aws-sdk-go-v2 v1.24.1
github.com/aws/aws-sdk-go-v2/config v1.26.6
github.com/aws/aws-sdk-go-v2/service/ses v1.19.6
github.com/goccy/go-yaml v1.11.3
github.com/auth0/go-jwt-middleware/v2 v2.2.2
github.com/aws/aws-sdk-go-v2 v1.32.7
github.com/aws/aws-sdk-go-v2/config v1.28.7
github.com/aws/aws-sdk-go-v2/service/ses v1.29.2
github.com/goccy/go-yaml v1.15.11
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang/gddo v0.0.0-20210115222349-20d68f94ee1f
github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.1
github.com/iancoleman/strcase v0.3.0
github.com/jarcoal/httpmock v1.3.1
github.com/jpillora/opts v1.2.3
github.com/labstack/echo/v4 v4.11.4
github.com/labstack/echo/v4 v4.13.3
github.com/labstack/gommon v0.4.2
github.com/maruel/panicparse/v2 v2.3.1
github.com/nicksnyder/go-i18n/v2 v2.4.0
github.com/maruel/panicparse/v2 v2.4.0
github.com/nicksnyder/go-i18n/v2 v2.4.1
github.com/oklog/ulid v1.3.1
github.com/pkg/errors v0.9.1
github.com/ravilushqa/otelgqlgen v0.15.0
github.com/samber/lo v1.39.0
github.com/sendgrid/sendgrid-go v3.14.0+incompatible
github.com/ravilushqa/otelgqlgen v0.17.0
github.com/samber/lo v1.47.0
github.com/sendgrid/sendgrid-go v3.16.0+incompatible
github.com/spf13/afero v1.11.0
github.com/stretchr/testify v1.8.4
github.com/stretchr/testify v1.10.0
github.com/uber/jaeger-client-go v2.30.0+incompatible
github.com/uber/jaeger-lib v2.4.1+incompatible
github.com/vektah/gqlparser/v2 v2.5.11
github.com/vektah/gqlparser/v2 v2.5.20
github.com/zitadel/oidc v1.13.5
go.mongodb.org/mongo-driver v1.13.1
go.opentelemetry.io/otel v1.22.0
go.opentelemetry.io/otel/sdk v1.22.0
go.mongodb.org/mongo-driver v1.17.1
go.opentelemetry.io/otel v1.33.0
go.opentelemetry.io/otel/sdk v1.33.0
go.uber.org/atomic v1.11.0
go.uber.org/zap v1.26.0
golang.org/x/crypto v0.18.0
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a
golang.org/x/text v0.14.0
gopkg.in/go-jose/go-jose.v2 v2.6.2
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.31.0
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67
golang.org/x/text v0.21.0
gopkg.in/go-jose/go-jose.v2 v2.6.3
gopkg.in/square/go-jose.v2 v2.6.0
gopkg.in/yaml.v2 v2.4.0
)

require (
cloud.google.com/go/compute v1.23.4 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/trace v1.10.5 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.45.0 // indirect
cloud.google.com/go/auth v0.13.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.6 // indirect
cloud.google.com/go/compute/metadata v0.6.0 // indirect
cloud.google.com/go/longrunning v0.6.3 // indirect
cloud.google.com/go/monitoring v1.22.0 // indirect
cloud.google.com/go/trace v1.11.2 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.49.0 // indirect
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
github.com/agnivade/levenshtein v1.1.1 // indirect
github.com/alexflint/go-arg v1.4.3 // indirect
github.com/agnivade/levenshtein v1.2.0 // indirect
github.com/alexflint/go-arg v1.5.1 // indirect
github.com/alexflint/go-scalar v1.2.0 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.16.16 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.18.7 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.7 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 // indirect
github.com/aws/smithy-go v1.19.0 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.48 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.22 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.8 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.7 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.3 // indirect
github.com/aws/smithy-go v1.22.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/trifles v0.0.0-20200705224438-cafc02a1ee2b // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.3 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/gorilla/schema v1.2.0 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/s2a-go v0.1.8 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
github.com/googleapis/gax-go/v2 v2.14.0 // indirect
github.com/gorilla/schema v1.4.1 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.3 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
github.com/montanaflynn/stats v0.7.1 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/rs/cors v1.10.1 // indirect
github.com/rs/cors v1.11.1 // indirect
github.com/sendgrid/rest v2.6.9+incompatible // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sosodev/duration v1.2.0 // indirect
github.com/stretchr/objx v0.5.1 // indirect
github.com/sosodev/duration v1.3.1 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.2 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
github.com/zitadel/logging v0.3.4 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib v1.22.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
go.opentelemetry.io/otel/metric v1.22.0 // indirect
go.opentelemetry.io/otel/trace v1.22.0 // indirect
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
github.com/zitadel/logging v0.6.1 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib v1.33.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect
go.opentelemetry.io/otel/metric v1.33.0 // indirect
go.opentelemetry.io/otel/trace v1.33.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.16.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.17.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/api v0.161.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/grpc v1.61.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/time v0.8.0 // indirect
golang.org/x/tools v0.28.0 // indirect
google.golang.org/api v0.213.0 // indirect
google.golang.org/genproto v0.0.0-20241219192143-6b3ec007d9bb // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241219192143-6b3ec007d9bb // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb // indirect
google.golang.org/grpc v1.69.2 // indirect
google.golang.org/protobuf v1.36.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading
Loading