diff --git a/.github/workflows/tc39.yml b/.github/workflows/tc39.yml index bd223f97a8f..e824211109e 100644 --- a/.github/workflows/tc39.yml +++ b/.github/workflows/tc39.yml @@ -27,6 +27,6 @@ jobs: - name: Run tests run: | set -x - cd js/tc39 + cd internal/js/tc39 sh checkout.sh go test -timeout 1h diff --git a/.github/workflows/wpt.yml b/.github/workflows/wpt.yml index 984fc926451..52d26cb0ba2 100644 --- a/.github/workflows/wpt.yml +++ b/.github/workflows/wpt.yml @@ -22,12 +22,12 @@ jobs: - name: Run Streams Tests run: | set -x - cd js/modules/k6/experimental/streams/tests + cd internal/js/modules/k6/experimental/streams/tests sh checkout.sh go test ../... -tags=wpt - name: Run Webcrypto Tests run: | set -x - cd js/modules/k6/webcrypto/tests + cd internal/js/modules/k6/webcrypto/tests sh checkout.sh go test ./... -tags=wpt diff --git a/.gitignore b/.gitignore index 345168d4ddb..3f181c1b56e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,8 @@ /k6.exe /dist /pkg-build -/js/tc39/TestTC39 -/js/modules/k6/experimental/streams/tests/wpt +/internal/js/tc39/TestTC39 +/internal/js/modules/k6/experimental/streams/tests/wpt .vscode *.sublime-workspace @@ -36,4 +36,4 @@ script.js /packaging/*.gpg # web platform tests -js/modules/k6/webcrypto/tests/wpt/ +/internal/js/modules/k6/webcrypto/tests/wpt/ diff --git a/api/v1/control_surface.go b/api/v1/control_surface.go index 12689cd1e3c..f4cb30d0c8a 100644 --- a/api/v1/control_surface.go +++ b/api/v1/control_surface.go @@ -3,10 +3,10 @@ package v1 import ( "context" - "go.k6.io/k6/execution" + "go.k6.io/k6/internal/execution" + "go.k6.io/k6/internal/metrics/engine" "go.k6.io/k6/lib" "go.k6.io/k6/metrics" - "go.k6.io/k6/metrics/engine" ) // ControlSurface includes the methods the REST API can use to control and diff --git a/api/v1/group_routes_test.go b/api/v1/group_routes_test.go index e4fa47039d0..9c4c5c9c117 100644 --- a/api/v1/group_routes_test.go +++ b/api/v1/group_routes_test.go @@ -10,14 +10,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/execution" - "go.k6.io/k6/execution/local" + "go.k6.io/k6/internal/execution" + "go.k6.io/k6/internal/execution/local" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/lib/testutils/minirunner" + "go.k6.io/k6/internal/metrics/engine" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/lib/testutils/minirunner" "go.k6.io/k6/metrics" - "go.k6.io/k6/metrics/engine" - "go.k6.io/k6/usage" ) func getTestPreInitState(tb testing.TB) *lib.TestPreInitState { diff --git a/api/v1/metric_routes_test.go b/api/v1/metric_routes_test.go index 253dd3094b4..4408528afa0 100644 --- a/api/v1/metric_routes_test.go +++ b/api/v1/metric_routes_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v3" + "go.k6.io/k6/internal/lib/testutils/minirunner" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils/minirunner" "go.k6.io/k6/metrics" ) diff --git a/api/v1/setup_teardown_routes_test.go b/api/v1/setup_teardown_routes_test.go index 390e4ccba2a..d65c233a259 100644 --- a/api/v1/setup_teardown_routes_test.go +++ b/api/v1/setup_teardown_routes_test.go @@ -15,14 +15,14 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v3" - "go.k6.io/k6/execution" - "go.k6.io/k6/execution/local" - "go.k6.io/k6/js" + "go.k6.io/k6/internal/execution" + "go.k6.io/k6/internal/execution/local" + "go.k6.io/k6/internal/js" + "go.k6.io/k6/internal/loader" + "go.k6.io/k6/internal/metrics/engine" "go.k6.io/k6/lib" "go.k6.io/k6/lib/types" - "go.k6.io/k6/loader" "go.k6.io/k6/metrics" - "go.k6.io/k6/metrics/engine" "go.k6.io/k6/output" ) diff --git a/api/v1/status_routes.go b/api/v1/status_routes.go index ad1208c6a66..d0e45c46664 100644 --- a/api/v1/status_routes.go +++ b/api/v1/status_routes.go @@ -9,7 +9,7 @@ import ( "go.k6.io/k6/errext" "go.k6.io/k6/errext/exitcodes" - "go.k6.io/k6/execution" + "go.k6.io/k6/internal/execution" "go.k6.io/k6/lib/executor" ) diff --git a/api/v1/status_routes_test.go b/api/v1/status_routes_test.go index 71fc3616bc9..13da79c25cb 100644 --- a/api/v1/status_routes_test.go +++ b/api/v1/status_routes_test.go @@ -15,12 +15,12 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v3" - "go.k6.io/k6/execution" - "go.k6.io/k6/execution/local" + "go.k6.io/k6/internal/execution" + "go.k6.io/k6/internal/execution/local" + "go.k6.io/k6/internal/lib/testutils/minirunner" + "go.k6.io/k6/internal/metrics/engine" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils/minirunner" "go.k6.io/k6/metrics" - "go.k6.io/k6/metrics/engine" "go.k6.io/k6/output" ) diff --git a/cloudapi/api_test.go b/cloudapi/api_test.go index a637122ca9d..39a67dd6a06 100644 --- a/cloudapi/api_test.go +++ b/cloudapi/api_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/lib/testutils" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib/types" ) diff --git a/cloudapi/logs_test.go b/cloudapi/logs_test.go index 7be90e0ffab..f4f8fcdce0f 100644 --- a/cloudapi/logs_test.go +++ b/cloudapi/logs_test.go @@ -20,8 +20,8 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v3" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/lib/testutils/httpmultibin" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/lib/testutils/httpmultibin" ) func TestMsgParsing(t *testing.T) { diff --git a/cmd/execute.go b/cmd/execute.go new file mode 100644 index 00000000000..e84f839baba --- /dev/null +++ b/cmd/execute.go @@ -0,0 +1,10 @@ +// Package cmd is here to provide a way for xk6 to build a binary with added extensions +package cmd + +import "go.k6.io/k6/internal/cmd" + +// Execute exectues the k6 command +// It only is exported here for backwards compatibility and the ability to use xk6 to build extended k6 +func Execute() { + cmd.Execute() +} diff --git a/cmd/state/state.go b/cmd/state/state.go index cbfb2534dc3..4d375ff50f4 100644 --- a/cmd/state/state.go +++ b/cmd/state/state.go @@ -12,9 +12,9 @@ import ( "github.com/mattn/go-isatty" "github.com/sirupsen/logrus" - "go.k6.io/k6/event" + "go.k6.io/k6/internal/event" + "go.k6.io/k6/internal/ui/console" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/ui/console" ) const defaultConfigFileName = "config.json" diff --git a/cmd/tests/global_state.go b/cmd/tests/global_state.go new file mode 100644 index 00000000000..2b06bbf11d6 --- /dev/null +++ b/cmd/tests/global_state.go @@ -0,0 +1,17 @@ +// Package tests contains types needed for running integration tests that run k6 commands. +package tests + +import ( + "testing" + + "go.k6.io/k6/internal/cmd/tests" +) + +// GlobalTestState is a wrapper around GlobalState for use in tests. +type GlobalTestState = tests.GlobalTestState + +// NewGlobalTestState returns an initialized GlobalTestState, mocking all +// GlobalState fields for use in tests. +func NewGlobalTestState(tb testing.TB) *GlobalTestState { + return tests.NewGlobalTestState(tb) +} diff --git a/api/server.go b/internal/api/server.go similarity index 97% rename from api/server.go rename to internal/api/server.go index c9198068c31..14bd785052e 100644 --- a/api/server.go +++ b/internal/api/server.go @@ -13,10 +13,10 @@ import ( "github.com/sirupsen/logrus" v1 "go.k6.io/k6/api/v1" - "go.k6.io/k6/execution" + "go.k6.io/k6/internal/execution" + "go.k6.io/k6/internal/metrics/engine" "go.k6.io/k6/lib" "go.k6.io/k6/metrics" - "go.k6.io/k6/metrics/engine" ) func newHandler(cs *v1.ControlSurface, profilingEnabled bool) http.Handler { diff --git a/api/server_test.go b/internal/api/server_test.go similarity index 98% rename from api/server_test.go rename to internal/api/server_test.go index 8735a32e6a3..596eed1b823 100644 --- a/api/server_test.go +++ b/internal/api/server_test.go @@ -10,7 +10,7 @@ import ( logtest "github.com/sirupsen/logrus/hooks/test" "github.com/stretchr/testify/assert" - "go.k6.io/k6/lib/testutils" + "go.k6.io/k6/internal/lib/testutils" ) func testHTTPHandler(rw http.ResponseWriter, _ *http.Request) { diff --git a/cloudapi/insights/client.go b/internal/cloudapi/insights/client.go similarity index 99% rename from cloudapi/insights/client.go rename to internal/cloudapi/insights/client.go index c30792551bc..3617f6b59b5 100644 --- a/cloudapi/insights/client.go +++ b/internal/cloudapi/insights/client.go @@ -17,7 +17,7 @@ import ( "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/status" - "go.k6.io/k6/cloudapi/insights/proto/v1/ingester" + "go.k6.io/k6/internal/cloudapi/insights/proto/v1/ingester" ) const ( diff --git a/cloudapi/insights/client_test.go b/internal/cloudapi/insights/client_test.go similarity index 99% rename from cloudapi/insights/client_test.go rename to internal/cloudapi/insights/client_test.go index 5b39829cc07..0b3aec0473a 100644 --- a/cloudapi/insights/client_test.go +++ b/internal/cloudapi/insights/client_test.go @@ -13,7 +13,7 @@ import ( "google.golang.org/grpc/status" "google.golang.org/grpc/test/bufconn" - "go.k6.io/k6/cloudapi/insights/proto/v1/ingester" + "go.k6.io/k6/internal/cloudapi/insights/proto/v1/ingester" ) func newMockListener(t *testing.T, ingesterServer ingester.IngesterServiceServer) *bufconn.Listener { diff --git a/cloudapi/insights/doc.go b/internal/cloudapi/insights/doc.go similarity index 100% rename from cloudapi/insights/doc.go rename to internal/cloudapi/insights/doc.go diff --git a/cloudapi/insights/domain.go b/internal/cloudapi/insights/domain.go similarity index 100% rename from cloudapi/insights/domain.go rename to internal/cloudapi/insights/domain.go diff --git a/cloudapi/insights/mappers.go b/internal/cloudapi/insights/mappers.go similarity index 93% rename from cloudapi/insights/mappers.go rename to internal/cloudapi/insights/mappers.go index f83329407cd..b164c7f7542 100644 --- a/cloudapi/insights/mappers.go +++ b/internal/cloudapi/insights/mappers.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" - "go.k6.io/k6/cloudapi/insights/proto/v1/ingester" - "go.k6.io/k6/cloudapi/insights/proto/v1/k6" + "go.k6.io/k6/internal/cloudapi/insights/proto/v1/ingester" + "go.k6.io/k6/internal/cloudapi/insights/proto/v1/k6" ) func newBatchCreateRequestMetadatasRequest( diff --git a/cloudapi/insights/mappers_test.go b/internal/cloudapi/insights/mappers_test.go similarity index 94% rename from cloudapi/insights/mappers_test.go rename to internal/cloudapi/insights/mappers_test.go index d7f08c259ed..2c7c4bac4a6 100644 --- a/cloudapi/insights/mappers_test.go +++ b/internal/cloudapi/insights/mappers_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/require" - "go.k6.io/k6/cloudapi/insights/proto/v1/ingester" - "go.k6.io/k6/cloudapi/insights/proto/v1/k6" + "go.k6.io/k6/internal/cloudapi/insights/proto/v1/ingester" + "go.k6.io/k6/internal/cloudapi/insights/proto/v1/k6" ) func Test_newBatchCreateRequestMetadatasRequest_CorrectlyMapsDomainTypeToProtoDefinition(t *testing.T) { diff --git a/cloudapi/insights/proto/gen.go b/internal/cloudapi/insights/proto/gen.go similarity index 100% rename from cloudapi/insights/proto/gen.go rename to internal/cloudapi/insights/proto/gen.go diff --git a/cloudapi/insights/proto/v1/common/common.pb.go b/internal/cloudapi/insights/proto/v1/common/common.pb.go similarity index 100% rename from cloudapi/insights/proto/v1/common/common.pb.go rename to internal/cloudapi/insights/proto/v1/common/common.pb.go diff --git a/cloudapi/insights/proto/v1/common/common.proto b/internal/cloudapi/insights/proto/v1/common/common.proto similarity index 100% rename from cloudapi/insights/proto/v1/common/common.proto rename to internal/cloudapi/insights/proto/v1/common/common.proto diff --git a/cloudapi/insights/proto/v1/ingester/ingester.pb.go b/internal/cloudapi/insights/proto/v1/ingester/ingester.pb.go similarity index 99% rename from cloudapi/insights/proto/v1/ingester/ingester.pb.go rename to internal/cloudapi/insights/proto/v1/ingester/ingester.pb.go index 0c5a5e6cb4e..76df2bf33c8 100644 --- a/cloudapi/insights/proto/v1/ingester/ingester.pb.go +++ b/internal/cloudapi/insights/proto/v1/ingester/ingester.pb.go @@ -7,8 +7,8 @@ package ingester import ( - k6 "go.k6.io/k6/cloudapi/insights/proto/v1/k6" - trace "go.k6.io/k6/cloudapi/insights/proto/v1/trace" + k6 "go.k6.io/k6/internal/cloudapi/insights/proto/v1/k6" + trace "go.k6.io/k6/internal/cloudapi/insights/proto/v1/trace" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" diff --git a/cloudapi/insights/proto/v1/ingester/ingester.proto b/internal/cloudapi/insights/proto/v1/ingester/ingester.proto similarity index 100% rename from cloudapi/insights/proto/v1/ingester/ingester.proto rename to internal/cloudapi/insights/proto/v1/ingester/ingester.proto diff --git a/cloudapi/insights/proto/v1/ingester/ingester_grpc.pb.go b/internal/cloudapi/insights/proto/v1/ingester/ingester_grpc.pb.go similarity index 100% rename from cloudapi/insights/proto/v1/ingester/ingester_grpc.pb.go rename to internal/cloudapi/insights/proto/v1/ingester/ingester_grpc.pb.go diff --git a/cloudapi/insights/proto/v1/k6/labels.pb.go b/internal/cloudapi/insights/proto/v1/k6/labels.pb.go similarity index 100% rename from cloudapi/insights/proto/v1/k6/labels.pb.go rename to internal/cloudapi/insights/proto/v1/k6/labels.pb.go diff --git a/cloudapi/insights/proto/v1/k6/labels.proto b/internal/cloudapi/insights/proto/v1/k6/labels.proto similarity index 100% rename from cloudapi/insights/proto/v1/k6/labels.proto rename to internal/cloudapi/insights/proto/v1/k6/labels.proto diff --git a/cloudapi/insights/proto/v1/k6/request_metadata.pb.go b/internal/cloudapi/insights/proto/v1/k6/request_metadata.pb.go similarity index 100% rename from cloudapi/insights/proto/v1/k6/request_metadata.pb.go rename to internal/cloudapi/insights/proto/v1/k6/request_metadata.pb.go diff --git a/cloudapi/insights/proto/v1/k6/request_metadata.proto b/internal/cloudapi/insights/proto/v1/k6/request_metadata.proto similarity index 100% rename from cloudapi/insights/proto/v1/k6/request_metadata.proto rename to internal/cloudapi/insights/proto/v1/k6/request_metadata.proto diff --git a/cloudapi/insights/proto/v1/trace/labels.pb.go b/internal/cloudapi/insights/proto/v1/trace/labels.pb.go similarity index 100% rename from cloudapi/insights/proto/v1/trace/labels.pb.go rename to internal/cloudapi/insights/proto/v1/trace/labels.pb.go diff --git a/cloudapi/insights/proto/v1/trace/labels.proto b/internal/cloudapi/insights/proto/v1/trace/labels.proto similarity index 100% rename from cloudapi/insights/proto/v1/trace/labels.proto rename to internal/cloudapi/insights/proto/v1/trace/labels.proto diff --git a/cloudapi/insights/proto/v1/trace/span.pb.go b/internal/cloudapi/insights/proto/v1/trace/span.pb.go similarity index 99% rename from cloudapi/insights/proto/v1/trace/span.pb.go rename to internal/cloudapi/insights/proto/v1/trace/span.pb.go index aad4db74bf1..83ce6b0b3d5 100644 --- a/cloudapi/insights/proto/v1/trace/span.pb.go +++ b/internal/cloudapi/insights/proto/v1/trace/span.pb.go @@ -7,7 +7,7 @@ package trace import ( - common "go.k6.io/k6/cloudapi/insights/proto/v1/common" + common "go.k6.io/k6/internal/cloudapi/insights/proto/v1/common" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" diff --git a/cloudapi/insights/proto/v1/trace/span.proto b/internal/cloudapi/insights/proto/v1/trace/span.proto similarity index 100% rename from cloudapi/insights/proto/v1/trace/span.proto rename to internal/cloudapi/insights/proto/v1/trace/span.proto diff --git a/cmd/archive.go b/internal/cmd/archive.go similarity index 100% rename from cmd/archive.go rename to internal/cmd/archive.go diff --git a/cmd/archive_test.go b/internal/cmd/archive_test.go similarity index 99% rename from cmd/archive_test.go rename to internal/cmd/archive_test.go index 35dbc684783..df821702945 100644 --- a/cmd/archive_test.go +++ b/internal/cmd/archive_test.go @@ -8,10 +8,10 @@ import ( "testing" "github.com/stretchr/testify/require" - "go.k6.io/k6/cmd/tests" "go.k6.io/k6/errext/exitcodes" + "go.k6.io/k6/internal/cmd/tests" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" ) func TestArchiveThresholds(t *testing.T) { diff --git a/cmd/builtin_output_gen.go b/internal/cmd/builtin_output_gen.go similarity index 100% rename from cmd/builtin_output_gen.go rename to internal/cmd/builtin_output_gen.go diff --git a/cmd/cloud.go b/internal/cmd/cloud.go similarity index 99% rename from cmd/cloud.go rename to internal/cmd/cloud.go index 9c189606c04..ac48a07b92b 100644 --- a/cmd/cloud.go +++ b/internal/cmd/cloud.go @@ -16,9 +16,9 @@ import ( "go.k6.io/k6/cmd/state" "go.k6.io/k6/errext" "go.k6.io/k6/errext/exitcodes" + "go.k6.io/k6/internal/ui/pb" "go.k6.io/k6/lib" "go.k6.io/k6/lib/consts" - "go.k6.io/k6/ui/pb" "github.com/fatih/color" "github.com/spf13/cobra" diff --git a/cmd/cloud_login.go b/internal/cmd/cloud_login.go similarity index 99% rename from cmd/cloud_login.go rename to internal/cmd/cloud_login.go index 0213fcf57b4..e220315a285 100644 --- a/cmd/cloud_login.go +++ b/internal/cmd/cloud_login.go @@ -13,8 +13,8 @@ import ( "go.k6.io/k6/cloudapi" "go.k6.io/k6/cmd/state" + "go.k6.io/k6/internal/ui" "go.k6.io/k6/lib/consts" - "go.k6.io/k6/ui" ) const cloudLoginCommandName = "login" diff --git a/cmd/cloud_run.go b/internal/cmd/cloud_run.go similarity index 98% rename from cmd/cloud_run.go rename to internal/cmd/cloud_run.go index 6824bbe1100..53a4b8e7a1f 100644 --- a/cmd/cloud_run.go +++ b/internal/cmd/cloud_run.go @@ -9,8 +9,8 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "go.k6.io/k6/execution" - "go.k6.io/k6/execution/local" + "go.k6.io/k6/internal/execution" + "go.k6.io/k6/internal/execution/local" ) const cloudRunCommandName string = "run" diff --git a/cmd/cloud_upload.go b/internal/cmd/cloud_upload.go similarity index 100% rename from cmd/cloud_upload.go rename to internal/cmd/cloud_upload.go diff --git a/cmd/common.go b/internal/cmd/common.go similarity index 100% rename from cmd/common.go rename to internal/cmd/common.go diff --git a/cmd/config.go b/internal/cmd/config.go similarity index 100% rename from cmd/config.go rename to internal/cmd/config.go diff --git a/cmd/config_consolidation_test.go b/internal/cmd/config_consolidation_test.go similarity index 99% rename from cmd/config_consolidation_test.go rename to internal/cmd/config_consolidation_test.go index e8bad7d4a78..89c9968134d 100644 --- a/cmd/config_consolidation_test.go +++ b/internal/cmd/config_consolidation_test.go @@ -10,7 +10,7 @@ import ( "gopkg.in/guregu/null.v3" "go.k6.io/k6/cmd/state" - "go.k6.io/k6/cmd/tests" + "go.k6.io/k6/internal/cmd/tests" "go.k6.io/k6/lib" "go.k6.io/k6/lib/executor" "go.k6.io/k6/lib/fsext" diff --git a/cmd/config_test.go b/internal/cmd/config_test.go similarity index 100% rename from cmd/config_test.go rename to internal/cmd/config_test.go diff --git a/cmd/doc.go b/internal/cmd/doc.go similarity index 100% rename from cmd/doc.go rename to internal/cmd/doc.go diff --git a/cmd/inspect.go b/internal/cmd/inspect.go similarity index 100% rename from cmd/inspect.go rename to internal/cmd/inspect.go diff --git a/cmd/login.go b/internal/cmd/login.go similarity index 100% rename from cmd/login.go rename to internal/cmd/login.go diff --git a/cmd/login_cloud.go b/internal/cmd/login_cloud.go similarity index 99% rename from cmd/login_cloud.go rename to internal/cmd/login_cloud.go index 0aadf7fb749..95d1376f98c 100644 --- a/cmd/login_cloud.go +++ b/internal/cmd/login_cloud.go @@ -13,8 +13,8 @@ import ( "go.k6.io/k6/cloudapi" "go.k6.io/k6/cmd/state" + "go.k6.io/k6/internal/ui" "go.k6.io/k6/lib/consts" - "go.k6.io/k6/ui" ) //nolint:funlen,gocognit diff --git a/cmd/login_influxdb.go b/internal/cmd/login_influxdb.go similarity index 97% rename from cmd/login_influxdb.go rename to internal/cmd/login_influxdb.go index 3e8a9ae0a03..ca5e3bfb00a 100644 --- a/cmd/login_influxdb.go +++ b/internal/cmd/login_influxdb.go @@ -10,8 +10,8 @@ import ( "gopkg.in/guregu/null.v3" "go.k6.io/k6/cmd/state" - "go.k6.io/k6/output/influxdb" - "go.k6.io/k6/ui" + "go.k6.io/k6/internal/output/influxdb" + "go.k6.io/k6/internal/ui" ) //nolint:funlen diff --git a/cmd/new.go b/internal/cmd/new.go similarity index 100% rename from cmd/new.go rename to internal/cmd/new.go diff --git a/cmd/new_test.go b/internal/cmd/new_test.go similarity index 98% rename from cmd/new_test.go rename to internal/cmd/new_test.go index 1b97cf38718..c3a6035991e 100644 --- a/cmd/new_test.go +++ b/internal/cmd/new_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/cmd/tests" + "go.k6.io/k6/internal/cmd/tests" "go.k6.io/k6/lib/fsext" ) diff --git a/cmd/options.go b/internal/cmd/options.go similarity index 100% rename from cmd/options.go rename to internal/cmd/options.go diff --git a/cmd/options_test.go b/internal/cmd/options_test.go similarity index 100% rename from cmd/options_test.go rename to internal/cmd/options_test.go diff --git a/cmd/outputs.go b/internal/cmd/outputs.go similarity index 98% rename from cmd/outputs.go rename to internal/cmd/outputs.go index fa50cd1530f..aa3dd02ed0c 100644 --- a/cmd/outputs.go +++ b/internal/cmd/outputs.go @@ -8,12 +8,12 @@ import ( "go.k6.io/k6/cmd/state" "go.k6.io/k6/ext" + "go.k6.io/k6/internal/output/cloud" + "go.k6.io/k6/internal/output/influxdb" + "go.k6.io/k6/internal/output/json" "go.k6.io/k6/lib" "go.k6.io/k6/output" - "go.k6.io/k6/output/cloud" "go.k6.io/k6/output/csv" - "go.k6.io/k6/output/influxdb" - "go.k6.io/k6/output/json" "github.com/grafana/xk6-dashboard/dashboard" "github.com/grafana/xk6-output-opentelemetry/pkg/opentelemetry" diff --git a/cmd/outputs_cloud.go b/internal/cmd/outputs_cloud.go similarity index 100% rename from cmd/outputs_cloud.go rename to internal/cmd/outputs_cloud.go diff --git a/cmd/outputs_test.go b/internal/cmd/outputs_test.go similarity index 100% rename from cmd/outputs_test.go rename to internal/cmd/outputs_test.go diff --git a/cmd/pause.go b/internal/cmd/pause.go similarity index 100% rename from cmd/pause.go rename to internal/cmd/pause.go diff --git a/cmd/report.go b/internal/cmd/report.go similarity index 97% rename from cmd/report.go rename to internal/cmd/report.go index dbe92e8efda..7dc2a767269 100644 --- a/cmd/report.go +++ b/internal/cmd/report.go @@ -8,9 +8,9 @@ import ( "runtime" "strconv" - "go.k6.io/k6/execution" + "go.k6.io/k6/internal/execution" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/lib/consts" - "go.k6.io/k6/usage" ) func createReport(u *usage.Usage, execScheduler *execution.Scheduler) map[string]any { diff --git a/cmd/report_test.go b/internal/cmd/report_test.go similarity index 95% rename from cmd/report_test.go rename to internal/cmd/report_test.go index a1ee1e16b67..0b4ef1ea8dd 100644 --- a/cmd/report_test.go +++ b/internal/cmd/report_test.go @@ -6,13 +6,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/execution" - "go.k6.io/k6/execution/local" + "go.k6.io/k6/internal/execution" + "go.k6.io/k6/internal/execution/local" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/lib" "go.k6.io/k6/lib/consts" "go.k6.io/k6/lib/executor" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/usage" "gopkg.in/guregu/null.v3" ) diff --git a/cmd/resume.go b/internal/cmd/resume.go similarity index 100% rename from cmd/resume.go rename to internal/cmd/resume.go diff --git a/cmd/root.go b/internal/cmd/root.go similarity index 99% rename from cmd/root.go rename to internal/cmd/root.go index 44e0a13b34d..88da45acb26 100644 --- a/cmd/root.go +++ b/internal/cmd/root.go @@ -19,7 +19,7 @@ import ( "go.k6.io/k6/cmd/state" "go.k6.io/k6/errext" "go.k6.io/k6/errext/exitcodes" - "go.k6.io/k6/log" + "go.k6.io/k6/internal/log" ) const waitLoggerCloseTimeout = time.Second * 5 diff --git a/cmd/root_test.go b/internal/cmd/root_test.go similarity index 98% rename from cmd/root_test.go rename to internal/cmd/root_test.go index 44e52790d41..248d9ad8a3b 100644 --- a/cmd/root_test.go +++ b/internal/cmd/root_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.k6.io/k6/cmd/tests" "go.k6.io/k6/errext/exitcodes" + "go.k6.io/k6/internal/cmd/tests" ) func TestRootCommandHelpDisplayCommands(t *testing.T) { diff --git a/cmd/run.go b/internal/cmd/run.go similarity index 98% rename from cmd/run.go rename to internal/cmd/run.go index 1a0e04c8ffc..3b8905d44c2 100644 --- a/cmd/run.go +++ b/internal/cmd/run.go @@ -16,21 +16,21 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "go.k6.io/k6/api" "go.k6.io/k6/cmd/state" "go.k6.io/k6/errext" "go.k6.io/k6/errext/exitcodes" - "go.k6.io/k6/event" - "go.k6.io/k6/execution" - "go.k6.io/k6/execution/local" + "go.k6.io/k6/internal/api" + "go.k6.io/k6/internal/event" + "go.k6.io/k6/internal/execution" + "go.k6.io/k6/internal/execution/local" + "go.k6.io/k6/internal/lib/trace" + "go.k6.io/k6/internal/metrics/engine" + "go.k6.io/k6/internal/ui/pb" "go.k6.io/k6/js/common" "go.k6.io/k6/lib" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/trace" "go.k6.io/k6/metrics" - "go.k6.io/k6/metrics/engine" "go.k6.io/k6/output" - "go.k6.io/k6/ui/pb" ) // cmdRun handles the `k6 run` sub-command diff --git a/cmd/run_test.go b/internal/cmd/run_test.go similarity index 99% rename from cmd/run_test.go rename to internal/cmd/run_test.go index 4b562359ccf..93e7a902ed2 100644 --- a/cmd/run_test.go +++ b/internal/cmd/run_test.go @@ -16,11 +16,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/cmd/tests" "go.k6.io/k6/errext" "go.k6.io/k6/errext/exitcodes" + "go.k6.io/k6/internal/cmd/tests" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" ) type mockWriter struct { diff --git a/cmd/runtime_options.go b/internal/cmd/runtime_options.go similarity index 100% rename from cmd/runtime_options.go rename to internal/cmd/runtime_options.go diff --git a/cmd/runtime_options_test.go b/internal/cmd/runtime_options_test.go similarity index 99% rename from cmd/runtime_options_test.go rename to internal/cmd/runtime_options_test.go index de484839de7..fe9b21eb416 100644 --- a/cmd/runtime_options_test.go +++ b/internal/cmd/runtime_options_test.go @@ -10,12 +10,12 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v3" - "go.k6.io/k6/cmd/tests" + "go.k6.io/k6/internal/cmd/tests" + "go.k6.io/k6/internal/loader" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/lib" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/loader" "go.k6.io/k6/metrics" - "go.k6.io/k6/usage" ) type runtimeOptionsTestCase struct { diff --git a/cmd/scale.go b/internal/cmd/scale.go similarity index 100% rename from cmd/scale.go rename to internal/cmd/scale.go diff --git a/cmd/stats.go b/internal/cmd/stats.go similarity index 100% rename from cmd/stats.go rename to internal/cmd/stats.go diff --git a/cmd/status.go b/internal/cmd/status.go similarity index 100% rename from cmd/status.go rename to internal/cmd/status.go diff --git a/cmd/stdlog_integration_test.go b/internal/cmd/stdlog_integration_test.go similarity index 92% rename from cmd/stdlog_integration_test.go rename to internal/cmd/stdlog_integration_test.go index c47e771d8f6..99556ee1bd1 100644 --- a/cmd/stdlog_integration_test.go +++ b/internal/cmd/stdlog_integration_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/cmd/tests" - "go.k6.io/k6/lib/testutils/httpmultibin" + "go.k6.io/k6/internal/cmd/tests" + "go.k6.io/k6/internal/lib/testutils/httpmultibin" ) // SetOutput sets the global log so it is racy with other tests diff --git a/cmd/test_load.go b/internal/cmd/test_load.go similarity index 99% rename from cmd/test_load.go rename to internal/cmd/test_load.go index f57516acb28..1b85817c33c 100644 --- a/cmd/test_load.go +++ b/internal/cmd/test_load.go @@ -16,13 +16,13 @@ import ( "go.k6.io/k6/cmd/state" "go.k6.io/k6/errext" "go.k6.io/k6/errext/exitcodes" - "go.k6.io/k6/js" + "go.k6.io/k6/internal/js" + "go.k6.io/k6/internal/loader" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/js/modules" "go.k6.io/k6/lib" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/loader" "go.k6.io/k6/metrics" - "go.k6.io/k6/usage" ) const ( diff --git a/cmd/testdata/abort.js b/internal/cmd/testdata/abort.js similarity index 100% rename from cmd/testdata/abort.js rename to internal/cmd/testdata/abort.js diff --git a/cmd/testdata/abort_initerr.js b/internal/cmd/testdata/abort_initerr.js similarity index 100% rename from cmd/testdata/abort_initerr.js rename to internal/cmd/testdata/abort_initerr.js diff --git a/cmd/testdata/abort_initvu.js b/internal/cmd/testdata/abort_initvu.js similarity index 100% rename from cmd/testdata/abort_initvu.js rename to internal/cmd/testdata/abort_initvu.js diff --git a/cmd/testdata/abort_teardown.js b/internal/cmd/testdata/abort_teardown.js similarity index 100% rename from cmd/testdata/abort_teardown.js rename to internal/cmd/testdata/abort_teardown.js diff --git a/cmd/testdata/example.har b/internal/cmd/testdata/example.har similarity index 100% rename from cmd/testdata/example.har rename to internal/cmd/testdata/example.har diff --git a/cmd/testdata/example.js b/internal/cmd/testdata/example.js similarity index 100% rename from cmd/testdata/example.js rename to internal/cmd/testdata/example.js diff --git a/cmd/testdata/initerr.js b/internal/cmd/testdata/initerr.js similarity index 100% rename from cmd/testdata/initerr.js rename to internal/cmd/testdata/initerr.js diff --git a/cmd/testdata/invalidconfig/invalid.json b/internal/cmd/testdata/invalidconfig/invalid.json similarity index 100% rename from cmd/testdata/invalidconfig/invalid.json rename to internal/cmd/testdata/invalidconfig/invalid.json diff --git a/cmd/testdata/invalidconfig/invalid_option.js b/internal/cmd/testdata/invalidconfig/invalid_option.js similarity index 100% rename from cmd/testdata/invalidconfig/invalid_option.js rename to internal/cmd/testdata/invalidconfig/invalid_option.js diff --git a/cmd/testdata/invalidconfig/invalid_scenario.js b/internal/cmd/testdata/invalidconfig/invalid_scenario.js similarity index 100% rename from cmd/testdata/invalidconfig/invalid_scenario.js rename to internal/cmd/testdata/invalidconfig/invalid_scenario.js diff --git a/cmd/testdata/invalidconfig/option_env.js b/internal/cmd/testdata/invalidconfig/option_env.js similarity index 100% rename from cmd/testdata/invalidconfig/option_env.js rename to internal/cmd/testdata/invalidconfig/option_env.js diff --git a/cmd/testdata/thresholds/empty_sink_no_nan.js b/internal/cmd/testdata/thresholds/empty_sink_no_nan.js similarity index 100% rename from cmd/testdata/thresholds/empty_sink_no_nan.js rename to internal/cmd/testdata/thresholds/empty_sink_no_nan.js diff --git a/cmd/testdata/thresholds/malformed_expression.js b/internal/cmd/testdata/thresholds/malformed_expression.js similarity index 100% rename from cmd/testdata/thresholds/malformed_expression.js rename to internal/cmd/testdata/thresholds/malformed_expression.js diff --git a/cmd/testdata/thresholds/name_contains_tokens.js b/internal/cmd/testdata/thresholds/name_contains_tokens.js similarity index 100% rename from cmd/testdata/thresholds/name_contains_tokens.js rename to internal/cmd/testdata/thresholds/name_contains_tokens.js diff --git a/cmd/testdata/thresholds/non_existing_metric.js b/internal/cmd/testdata/thresholds/non_existing_metric.js similarity index 100% rename from cmd/testdata/thresholds/non_existing_metric.js rename to internal/cmd/testdata/thresholds/non_existing_metric.js diff --git a/cmd/testdata/thresholds/thresholds_on_submetric_without_samples.js b/internal/cmd/testdata/thresholds/thresholds_on_submetric_without_samples.js similarity index 100% rename from cmd/testdata/thresholds/thresholds_on_submetric_without_samples.js rename to internal/cmd/testdata/thresholds/thresholds_on_submetric_without_samples.js diff --git a/cmd/testdata/thresholds/unsupported_aggregation_method.js b/internal/cmd/testdata/thresholds/unsupported_aggregation_method.js similarity index 100% rename from cmd/testdata/thresholds/unsupported_aggregation_method.js rename to internal/cmd/testdata/thresholds/unsupported_aggregation_method.js diff --git a/cmd/tests/cmd_cloud_run_test.go b/internal/cmd/tests/cmd_cloud_run_test.go similarity index 99% rename from cmd/tests/cmd_cloud_run_test.go rename to internal/cmd/tests/cmd_cloud_run_test.go index c6706a93b92..ae346b578d7 100644 --- a/cmd/tests/cmd_cloud_run_test.go +++ b/internal/cmd/tests/cmd_cloud_run_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" "go.k6.io/k6/cloudapi" - "go.k6.io/k6/cmd" "go.k6.io/k6/errext/exitcodes" + "go.k6.io/k6/internal/cmd" "go.k6.io/k6/lib/fsext" ) diff --git a/cmd/tests/cmd_cloud_test.go b/internal/cmd/tests/cmd_cloud_test.go similarity index 99% rename from cmd/tests/cmd_cloud_test.go rename to internal/cmd/tests/cmd_cloud_test.go index 69fff4284f6..dabb701af5c 100644 --- a/cmd/tests/cmd_cloud_test.go +++ b/internal/cmd/tests/cmd_cloud_test.go @@ -11,10 +11,10 @@ import ( "testing" "go.k6.io/k6/cloudapi" - "go.k6.io/k6/cmd" "go.k6.io/k6/errext/exitcodes" + "go.k6.io/k6/internal/cmd" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/cmd/tests/cmd_cloud_upload_test.go b/internal/cmd/tests/cmd_cloud_upload_test.go similarity index 98% rename from cmd/tests/cmd_cloud_upload_test.go rename to internal/cmd/tests/cmd_cloud_upload_test.go index 29c748867b5..2c6b9c34e7b 100644 --- a/cmd/tests/cmd_cloud_upload_test.go +++ b/internal/cmd/tests/cmd_cloud_upload_test.go @@ -10,9 +10,9 @@ import ( "testing" "go.k6.io/k6/cloudapi" - "go.k6.io/k6/cmd" + "go.k6.io/k6/internal/cmd" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/cmd/tests/cmd_run_grpc_test.go b/internal/cmd/tests/cmd_run_grpc_test.go similarity index 94% rename from cmd/tests/cmd_run_grpc_test.go rename to internal/cmd/tests/cmd_run_grpc_test.go index 684782549f5..a7399db4428 100644 --- a/cmd/tests/cmd_run_grpc_test.go +++ b/internal/cmd/tests/cmd_run_grpc_test.go @@ -5,14 +5,14 @@ import ( "path/filepath" "testing" - "go.k6.io/k6/cmd" + "go.k6.io/k6/internal/cmd" "go.k6.io/k6/lib/fsext" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) -const projectRootPath = "../../" +const projectRootPath = "../../../" // TestGRPCInputOutput runs same k6's scripts that we have in example folder // it check that output contains/not contains cetane things @@ -90,7 +90,7 @@ func TestGRPCInputOutput(t *testing.T) { // Read the proto file from the testutils package // it's same that we use in the examples - proto, err := os.ReadFile(projectRootPath + "lib/testutils/grpcservice/route_guide.proto") //nolint:forbidigo + proto, err := os.ReadFile(projectRootPath + "internal/lib/testutils/grpcservice/route_guide.proto") //nolint:forbidigo require.NoError(t, err) for name, test := range tc { diff --git a/cmd/tests/cmd_run_test.go b/internal/cmd/tests/cmd_run_test.go similarity index 99% rename from cmd/tests/cmd_run_test.go rename to internal/cmd/tests/cmd_run_test.go index 0ad0304372a..b306a98e594 100644 --- a/cmd/tests/cmd_run_test.go +++ b/internal/cmd/tests/cmd_run_test.go @@ -24,15 +24,15 @@ import ( "github.com/stretchr/testify/require" "github.com/tidwall/gjson" "go.k6.io/k6/cloudapi" - "go.k6.io/k6/cmd" - "go.k6.io/k6/cmd/tests/events" "go.k6.io/k6/errext/exitcodes" - "go.k6.io/k6/event" + "go.k6.io/k6/internal/cmd" + "go.k6.io/k6/internal/cmd/tests/events" + "go.k6.io/k6/internal/event" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/lib/testutils/httpmultibin" "go.k6.io/k6/js/modules" "go.k6.io/k6/lib/consts" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/lib/testutils/httpmultibin" ) func TestVersion(t *testing.T) { diff --git a/cmd/tests/doc.go b/internal/cmd/tests/doc.go similarity index 100% rename from cmd/tests/doc.go rename to internal/cmd/tests/doc.go diff --git a/cmd/tests/eventloop_test.go b/internal/cmd/tests/eventloop_test.go similarity index 99% rename from cmd/tests/eventloop_test.go rename to internal/cmd/tests/eventloop_test.go index 1bf7579dea3..7167fb6032e 100644 --- a/cmd/tests/eventloop_test.go +++ b/internal/cmd/tests/eventloop_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "go.k6.io/k6/cmd" + "go.k6.io/k6/internal/cmd" ) func TestEventLoop(t *testing.T) { diff --git a/cmd/tests/events/events.go b/internal/cmd/tests/events/events.go similarity index 98% rename from cmd/tests/events/events.go rename to internal/cmd/tests/events/events.go index 8db59e1ca8f..2a384a449fa 100644 --- a/cmd/tests/events/events.go +++ b/internal/cmd/tests/events/events.go @@ -4,7 +4,7 @@ package events import ( "sync" - "go.k6.io/k6/event" + "go.k6.io/k6/internal/event" "go.k6.io/k6/js/modules" ) diff --git a/cmd/tests/grpc.go b/internal/cmd/tests/grpc.go similarity index 94% rename from cmd/tests/grpc.go rename to internal/cmd/tests/grpc.go index c0c812abc1b..d9cc8088572 100644 --- a/cmd/tests/grpc.go +++ b/internal/cmd/tests/grpc.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "go.k6.io/k6/lib/testutils/grpcservice" + "go.k6.io/k6/internal/lib/testutils/grpcservice" "google.golang.org/grpc" "google.golang.org/grpc/reflection" diff --git a/cmd/tests/test_state.go b/internal/cmd/tests/test_state.go similarity index 96% rename from cmd/tests/test_state.go rename to internal/cmd/tests/test_state.go index 1459ed97b7a..b2d5dd55759 100644 --- a/cmd/tests/test_state.go +++ b/internal/cmd/tests/test_state.go @@ -15,10 +15,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.k6.io/k6/cmd/state" - "go.k6.io/k6/event" + "go.k6.io/k6/internal/event" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/ui/console" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/ui/console" ) // GlobalTestState is a wrapper around GlobalState for use in tests. diff --git a/cmd/tests/testdata/archives/archive_v0.42.0_linux.tar b/internal/cmd/tests/testdata/archives/archive_v0.42.0_linux.tar similarity index 100% rename from cmd/tests/testdata/archives/archive_v0.42.0_linux.tar rename to internal/cmd/tests/testdata/archives/archive_v0.42.0_linux.tar diff --git a/cmd/tests/testdata/archives/archive_v0.42.0_windows.tar b/internal/cmd/tests/testdata/archives/archive_v0.42.0_windows.tar similarity index 100% rename from cmd/tests/testdata/archives/archive_v0.42.0_windows.tar rename to internal/cmd/tests/testdata/archives/archive_v0.42.0_windows.tar diff --git a/cmd/tests/testdata/archives/archive_v0.46.0_with_loadimpact_option.tar b/internal/cmd/tests/testdata/archives/archive_v0.46.0_with_loadimpact_option.tar similarity index 100% rename from cmd/tests/testdata/archives/archive_v0.46.0_with_loadimpact_option.tar rename to internal/cmd/tests/testdata/archives/archive_v0.46.0_with_loadimpact_option.tar diff --git a/cmd/tests/tests.go b/internal/cmd/tests/tests.go similarity index 100% rename from cmd/tests/tests.go rename to internal/cmd/tests/tests.go diff --git a/cmd/tests/tests_test.go b/internal/cmd/tests/tests_test.go similarity index 96% rename from cmd/tests/tests_test.go rename to internal/cmd/tests/tests_test.go index c52ec80cd28..c4aba9d2d44 100644 --- a/cmd/tests/tests_test.go +++ b/internal/cmd/tests/tests_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.k6.io/k6/cmd" + "go.k6.io/k6/internal/cmd" ) func TestMain(m *testing.M) { diff --git a/cmd/ui.go b/internal/cmd/ui.go similarity index 99% rename from cmd/ui.go rename to internal/cmd/ui.go index d0228148b37..1beaece013f 100644 --- a/cmd/ui.go +++ b/internal/cmd/ui.go @@ -18,11 +18,11 @@ import ( "gopkg.in/yaml.v3" "go.k6.io/k6/cmd/state" + "go.k6.io/k6/internal/metrics/engine" + "go.k6.io/k6/internal/ui/pb" "go.k6.io/k6/lib" "go.k6.io/k6/lib/consts" - "go.k6.io/k6/metrics/engine" "go.k6.io/k6/output" - "go.k6.io/k6/ui/pb" ) const ( diff --git a/cmd/ui_test.go b/internal/cmd/ui_test.go similarity index 98% rename from cmd/ui_test.go rename to internal/cmd/ui_test.go index de221db9dd3..10e4d680c52 100644 --- a/cmd/ui_test.go +++ b/internal/cmd/ui_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" - "go.k6.io/k6/ui/pb" + "go.k6.io/k6/internal/ui/pb" ) // Return progressbars with different content lengths, to test for diff --git a/cmd/ui_unix.go b/internal/cmd/ui_unix.go similarity index 100% rename from cmd/ui_unix.go rename to internal/cmd/ui_unix.go diff --git a/cmd/ui_windows.go b/internal/cmd/ui_windows.go similarity index 100% rename from cmd/ui_windows.go rename to internal/cmd/ui_windows.go diff --git a/cmd/version.go b/internal/cmd/version.go similarity index 100% rename from cmd/version.go rename to internal/cmd/version.go diff --git a/cmd/version_test.go b/internal/cmd/version_test.go similarity index 98% rename from cmd/version_test.go rename to internal/cmd/version_test.go index 7f8c0674372..a42b5b09eb2 100644 --- a/cmd/version_test.go +++ b/internal/cmd/version_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.k6.io/k6/cmd/tests" + "go.k6.io/k6/internal/cmd/tests" "go.k6.io/k6/lib/consts" ) diff --git a/event/doc.go b/internal/event/doc.go similarity index 100% rename from event/doc.go rename to internal/event/doc.go diff --git a/event/event.go b/internal/event/event.go similarity index 100% rename from event/event.go rename to internal/event/event.go diff --git a/event/system.go b/internal/event/system.go similarity index 100% rename from event/system.go rename to internal/event/system.go diff --git a/event/system_test.go b/internal/event/system_test.go similarity index 100% rename from event/system_test.go rename to internal/event/system_test.go diff --git a/event/type.go b/internal/event/type.go similarity index 100% rename from event/type.go rename to internal/event/type.go diff --git a/event/type_gen.go b/internal/event/type_gen.go similarity index 100% rename from event/type_gen.go rename to internal/event/type_gen.go diff --git a/execution/abort.go b/internal/execution/abort.go similarity index 100% rename from execution/abort.go rename to internal/execution/abort.go diff --git a/execution/controller.go b/internal/execution/controller.go similarity index 100% rename from execution/controller.go rename to internal/execution/controller.go diff --git a/execution/local/controller.go b/internal/execution/local/controller.go similarity index 100% rename from execution/local/controller.go rename to internal/execution/local/controller.go diff --git a/execution/pkg.go b/internal/execution/pkg.go similarity index 100% rename from execution/pkg.go rename to internal/execution/pkg.go diff --git a/execution/scheduler.go b/internal/execution/scheduler.go similarity index 99% rename from execution/scheduler.go rename to internal/execution/scheduler.go index 11832b7a81c..a865919df54 100644 --- a/execution/scheduler.go +++ b/internal/execution/scheduler.go @@ -11,9 +11,9 @@ import ( "github.com/sirupsen/logrus" "go.k6.io/k6/errext" + "go.k6.io/k6/internal/ui/pb" "go.k6.io/k6/lib" "go.k6.io/k6/metrics" - "go.k6.io/k6/ui/pb" ) // A Scheduler is in charge of most of the test execution - initializing VUs and diff --git a/execution/scheduler_ext_exec_test.go b/internal/execution/scheduler_ext_exec_test.go similarity index 98% rename from execution/scheduler_ext_exec_test.go rename to internal/execution/scheduler_ext_exec_test.go index aa111bf851c..057470d1d52 100644 --- a/execution/scheduler_ext_exec_test.go +++ b/internal/execution/scheduler_ext_exec_test.go @@ -11,12 +11,12 @@ import ( "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js" + "go.k6.io/k6/internal/js" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/loader" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/loader" "go.k6.io/k6/metrics" - "go.k6.io/k6/usage" ) // TODO: rewrite and/or move these as integration tests to reduce boilerplate diff --git a/execution/scheduler_ext_test.go b/internal/execution/scheduler_ext_test.go similarity index 99% rename from execution/scheduler_ext_test.go rename to internal/execution/scheduler_ext_test.go index b512245ff83..e7458bac37a 100644 --- a/execution/scheduler_ext_test.go +++ b/internal/execution/scheduler_ext_test.go @@ -18,21 +18,21 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v3" - "go.k6.io/k6/execution" - "go.k6.io/k6/execution/local" - "go.k6.io/k6/js" + "go.k6.io/k6/internal/execution" + "go.k6.io/k6/internal/execution/local" + "go.k6.io/k6/internal/js" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/lib/testutils/httpmultibin" + "go.k6.io/k6/internal/lib/testutils/minirunner" + "go.k6.io/k6/internal/lib/testutils/mockresolver" + "go.k6.io/k6/internal/loader" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/lib" "go.k6.io/k6/lib/executor" "go.k6.io/k6/lib/netext" "go.k6.io/k6/lib/netext/httpext" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/lib/testutils/httpmultibin" - "go.k6.io/k6/lib/testutils/minirunner" - "go.k6.io/k6/lib/testutils/mockresolver" "go.k6.io/k6/lib/types" - "go.k6.io/k6/loader" "go.k6.io/k6/metrics" - "go.k6.io/k6/usage" ) func getTestPreInitState(tb testing.TB) *lib.TestPreInitState { diff --git a/execution/scheduler_int_test.go b/internal/execution/scheduler_int_test.go similarity index 95% rename from execution/scheduler_int_test.go rename to internal/execution/scheduler_int_test.go index 455e4f198e2..689cb65e344 100644 --- a/execution/scheduler_int_test.go +++ b/internal/execution/scheduler_int_test.go @@ -5,10 +5,10 @@ import ( "testing" "github.com/stretchr/testify/require" - "go.k6.io/k6/execution/local" + "go.k6.io/k6/internal/execution/local" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/lib/testutils/minirunner" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/lib/testutils/minirunner" "go.k6.io/k6/metrics" ) diff --git a/js/bundle.go b/internal/js/bundle.go similarity index 99% rename from js/bundle.go rename to internal/js/bundle.go index 4894b3a0bc7..f64202a6817 100644 --- a/js/bundle.go +++ b/internal/js/bundle.go @@ -17,15 +17,15 @@ import ( "go.k6.io/k6/errext" "go.k6.io/k6/errext/exitcodes" - "go.k6.io/k6/event" + "go.k6.io/k6/internal/event" + "go.k6.io/k6/internal/js/compiler" + "go.k6.io/k6/internal/js/eventloop" + "go.k6.io/k6/internal/loader" "go.k6.io/k6/js/common" - "go.k6.io/k6/js/compiler" - "go.k6.io/k6/js/eventloop" "go.k6.io/k6/js/modules" "go.k6.io/k6/lib" "go.k6.io/k6/lib/consts" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/loader" ) // A Bundle is a self-contained bundle of scripts and resources. diff --git a/js/bundle_test.go b/internal/js/bundle_test.go similarity index 99% rename from js/bundle_test.go rename to internal/js/bundle_test.go index 0264ca31002..bc3f564b8bc 100644 --- a/js/bundle_test.go +++ b/internal/js/bundle_test.go @@ -19,14 +19,14 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v3" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/loader" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/lib" "go.k6.io/k6/lib/consts" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" "go.k6.io/k6/lib/types" - "go.k6.io/k6/loader" "go.k6.io/k6/metrics" - "go.k6.io/k6/usage" ) const isWindows = runtime.GOOS == "windows" diff --git a/js/compiler/compiler.go b/internal/js/compiler/compiler.go similarity index 99% rename from js/compiler/compiler.go rename to internal/js/compiler/compiler.go index 35140c36fae..265872df2f8 100644 --- a/js/compiler/compiler.go +++ b/internal/js/compiler/compiler.go @@ -15,8 +15,8 @@ import ( "github.com/grafana/sobek/parser" "github.com/sirupsen/logrus" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/lib" - "go.k6.io/k6/usage" ) // A Compiler compiles JavaScript or TypeScript source code into a sobek.Program diff --git a/js/compiler/compiler_test.go b/internal/js/compiler/compiler_test.go similarity index 99% rename from js/compiler/compiler_test.go rename to internal/js/compiler/compiler_test.go index fc8739d79d9..3702c7f5969 100644 --- a/js/compiler/compiler_test.go +++ b/internal/js/compiler/compiler_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" ) func TestCompile(t *testing.T) { diff --git a/js/compiler/enhanced.go b/internal/js/compiler/enhanced.go similarity index 100% rename from js/compiler/enhanced.go rename to internal/js/compiler/enhanced.go diff --git a/js/compiler/enhanced_test.go b/internal/js/compiler/enhanced_test.go similarity index 98% rename from js/compiler/enhanced_test.go rename to internal/js/compiler/enhanced_test.go index a249fb8cdde..9fd53e3fa03 100644 --- a/js/compiler/enhanced_test.go +++ b/internal/js/compiler/enhanced_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" ) func Test_esbuildTransform_js(t *testing.T) { diff --git a/js/console.go b/internal/js/console.go similarity index 100% rename from js/console.go rename to internal/js/console.go diff --git a/js/console_test.go b/internal/js/console_test.go similarity index 99% rename from js/console_test.go rename to internal/js/console_test.go index a99cdcb23b8..93726b2e23c 100644 --- a/js/console_test.go +++ b/internal/js/console_test.go @@ -15,13 +15,13 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v3" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/loader" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/js/common" "go.k6.io/k6/lib" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/loader" "go.k6.io/k6/metrics" - "go.k6.io/k6/usage" ) func TestConsoleContext(t *testing.T) { diff --git a/js/doc.go b/internal/js/doc.go similarity index 100% rename from js/doc.go rename to internal/js/doc.go diff --git a/js/empty_iterations_bench_test.go b/internal/js/empty_iterations_bench_test.go similarity index 100% rename from js/empty_iterations_bench_test.go rename to internal/js/empty_iterations_bench_test.go diff --git a/js/esm_vs_commonjs_test.go b/internal/js/esm_vs_commonjs_test.go similarity index 100% rename from js/esm_vs_commonjs_test.go rename to internal/js/esm_vs_commonjs_test.go diff --git a/js/eventloop/eventloop.go b/internal/js/eventloop/eventloop.go similarity index 100% rename from js/eventloop/eventloop.go rename to internal/js/eventloop/eventloop.go diff --git a/js/eventloop/eventloop_test.go b/internal/js/eventloop/eventloop_test.go similarity index 95% rename from js/eventloop/eventloop_test.go rename to internal/js/eventloop/eventloop_test.go index 085c1cfcd13..ed4f87877d1 100644 --- a/js/eventloop/eventloop_test.go +++ b/internal/js/eventloop/eventloop_test.go @@ -9,8 +9,8 @@ import ( "github.com/grafana/sobek" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/js/eventloop" "go.k6.io/k6/js/common" - "go.k6.io/k6/js/eventloop" "go.k6.io/k6/js/modulestest" ) @@ -199,7 +199,7 @@ func TestEventLoopRejectGoError(t *testing.T) { return err }) loop.WaitOnRegistered() - require.EqualError(t, err, "Uncaught (in promise) GoError: some error\n\tat go.k6.io/k6/js/eventloop_test.TestEventLoopRejectGoError.func1 (native)\n\tat :1:31(2)\n") + require.EqualError(t, err, "Uncaught (in promise) GoError: some error\n\tat go.k6.io/k6/internal/js/eventloop_test.TestEventLoopRejectGoError.func1 (native)\n\tat :1:31(2)\n") } func TestEventLoopRejectThrow(t *testing.T) { @@ -216,7 +216,7 @@ func TestEventLoopRejectThrow(t *testing.T) { return err }) loop.WaitOnRegistered() - require.EqualError(t, err, "Uncaught (in promise) GoError: throw error\n\tat go.k6.io/k6/js/eventloop_test.TestEventLoopRejectThrow.func1 (native)\n\tat :1:31(2)\n") + require.EqualError(t, err, "Uncaught (in promise) GoError: throw error\n\tat go.k6.io/k6/internal/js/eventloop_test.TestEventLoopRejectThrow.func1 (native)\n\tat :1:31(2)\n") } func TestEventLoopAsyncAwait(t *testing.T) { diff --git a/js/http_bench_test.go b/internal/js/http_bench_test.go similarity index 97% rename from js/http_bench_test.go rename to internal/js/http_bench_test.go index f97f4f22bec..2bf7f335a09 100644 --- a/js/http_bench_test.go +++ b/internal/js/http_bench_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v3" + "go.k6.io/k6/internal/lib/testutils/httpmultibin" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils/httpmultibin" "go.k6.io/k6/metrics" ) diff --git a/js/init_and_modules_test.go b/internal/js/init_and_modules_test.go similarity index 96% rename from js/init_and_modules_test.go rename to internal/js/init_and_modules_test.go index 257644aae23..1ca01920d30 100644 --- a/js/init_and_modules_test.go +++ b/internal/js/init_and_modules_test.go @@ -12,14 +12,14 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v3" - "go.k6.io/k6/js" + "go.k6.io/k6/internal/js" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/loader" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/js/modules" "go.k6.io/k6/lib" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/loader" "go.k6.io/k6/metrics" - "go.k6.io/k6/usage" ) type CheckModule struct { diff --git a/js/initcontext.go b/internal/js/initcontext.go similarity index 98% rename from js/initcontext.go rename to internal/js/initcontext.go index 80cd7903c06..b4997b3d972 100644 --- a/js/initcontext.go +++ b/internal/js/initcontext.go @@ -8,8 +8,8 @@ import ( "github.com/grafana/sobek" "github.com/sirupsen/logrus" + "go.k6.io/k6/internal/loader" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/loader" ) const cantBeUsedOutsideInitContextMsg = `the "%s" function is only available in the init stage ` + diff --git a/js/initcontext_test.go b/internal/js/initcontext_test.go similarity index 100% rename from js/initcontext_test.go rename to internal/js/initcontext_test.go diff --git a/js/jsmodules.go b/internal/js/jsmodules.go similarity index 81% rename from js/jsmodules.go rename to internal/js/jsmodules.go index fb8446bc90b..ad48ce4cacc 100644 --- a/js/jsmodules.go +++ b/internal/js/jsmodules.go @@ -5,26 +5,26 @@ import ( "sync" "go.k6.io/k6/ext" + "go.k6.io/k6/internal/js/modules/k6/browser/browser" + "go.k6.io/k6/internal/js/modules/k6/crypto" + "go.k6.io/k6/internal/js/modules/k6/crypto/x509" + "go.k6.io/k6/internal/js/modules/k6/data" + "go.k6.io/k6/internal/js/modules/k6/encoding" + "go.k6.io/k6/internal/js/modules/k6/execution" + "go.k6.io/k6/internal/js/modules/k6/experimental/csv" + "go.k6.io/k6/internal/js/modules/k6/experimental/fs" + "go.k6.io/k6/internal/js/modules/k6/experimental/streams" + expws "go.k6.io/k6/internal/js/modules/k6/experimental/websockets" + "go.k6.io/k6/internal/js/modules/k6/grpc" + "go.k6.io/k6/internal/js/modules/k6/metrics" + "go.k6.io/k6/internal/js/modules/k6/timers" + "go.k6.io/k6/internal/js/modules/k6/webcrypto" + "go.k6.io/k6/internal/js/modules/k6/ws" "go.k6.io/k6/js/common" "go.k6.io/k6/js/modules" "go.k6.io/k6/js/modules/k6" - "go.k6.io/k6/js/modules/k6/browser/browser" - "go.k6.io/k6/js/modules/k6/crypto" - "go.k6.io/k6/js/modules/k6/crypto/x509" - "go.k6.io/k6/js/modules/k6/data" - "go.k6.io/k6/js/modules/k6/encoding" - "go.k6.io/k6/js/modules/k6/execution" - "go.k6.io/k6/js/modules/k6/experimental/csv" - "go.k6.io/k6/js/modules/k6/experimental/fs" - "go.k6.io/k6/js/modules/k6/experimental/streams" - expws "go.k6.io/k6/js/modules/k6/experimental/websockets" - "go.k6.io/k6/js/modules/k6/grpc" "go.k6.io/k6/js/modules/k6/html" "go.k6.io/k6/js/modules/k6/http" - "go.k6.io/k6/js/modules/k6/metrics" - "go.k6.io/k6/js/modules/k6/timers" - "go.k6.io/k6/js/modules/k6/webcrypto" - "go.k6.io/k6/js/modules/k6/ws" "github.com/grafana/xk6-redis/redis" ) diff --git a/js/module_loading_test.go b/internal/js/module_loading_test.go similarity index 99% rename from js/module_loading_test.go rename to internal/js/module_loading_test.go index 060eb4c4e50..0211c52023e 100644 --- a/js/module_loading_test.go +++ b/internal/js/module_loading_test.go @@ -13,8 +13,8 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v3" + "go.k6.io/k6/internal/lib/testutils/httpmultibin" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils/httpmultibin" "go.k6.io/k6/metrics" ) diff --git a/js/modules/k6/browser/browser/browser_context_mapping.go b/internal/js/modules/k6/browser/browser/browser_context_mapping.go similarity index 97% rename from js/modules/k6/browser/browser/browser_context_mapping.go rename to internal/js/modules/k6/browser/browser/browser_context_mapping.go index 68161a74df5..41de74a884b 100644 --- a/js/modules/k6/browser/browser/browser_context_mapping.go +++ b/internal/js/modules/k6/browser/browser/browser_context_mapping.go @@ -8,9 +8,9 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/k6error" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/k6error" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) // mapBrowserContext to the JS module. diff --git a/js/modules/k6/browser/browser/browser_context_options_test.go b/internal/js/modules/k6/browser/browser/browser_context_options_test.go similarity index 97% rename from js/modules/k6/browser/browser/browser_context_options_test.go rename to internal/js/modules/k6/browser/browser/browser_context_options_test.go index 5b33ee4686b..ef486a16abf 100644 --- a/js/modules/k6/browser/browser/browser_context_options_test.go +++ b/internal/js/modules/k6/browser/browser/browser_context_options_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" ) func TestBrowserContextOptionsPermissions(t *testing.T) { diff --git a/js/modules/k6/browser/browser/browser_mapping.go b/internal/js/modules/k6/browser/browser/browser_mapping.go similarity index 96% rename from js/modules/k6/browser/browser/browser_mapping.go rename to internal/js/modules/k6/browser/browser/browser_mapping.go index d615faed9c2..42ccf187981 100644 --- a/js/modules/k6/browser/browser/browser_mapping.go +++ b/internal/js/modules/k6/browser/browser/browser_mapping.go @@ -5,8 +5,8 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) // mapBrowser to the JS module. diff --git a/js/modules/k6/browser/browser/console_message_mapping.go b/internal/js/modules/k6/browser/browser/console_message_mapping.go similarity index 92% rename from js/modules/k6/browser/browser/console_message_mapping.go rename to internal/js/modules/k6/browser/browser/console_message_mapping.go index 93bf21189c7..75663c9e69a 100644 --- a/js/modules/k6/browser/browser/console_message_mapping.go +++ b/internal/js/modules/k6/browser/browser/console_message_mapping.go @@ -1,7 +1,7 @@ package browser import ( - "go.k6.io/k6/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/common" ) // mapConsoleMessage to the JS module. diff --git a/js/modules/k6/browser/browser/element_handle_mapping.go b/internal/js/modules/k6/browser/browser/element_handle_mapping.go similarity index 98% rename from js/modules/k6/browser/browser/element_handle_mapping.go rename to internal/js/modules/k6/browser/browser/element_handle_mapping.go index 856834f70ba..be8095615e2 100644 --- a/js/modules/k6/browser/browser/element_handle_mapping.go +++ b/internal/js/modules/k6/browser/browser/element_handle_mapping.go @@ -5,8 +5,8 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) // mapElementHandle to the JS module. diff --git a/js/modules/k6/browser/browser/file_persister.go b/internal/js/modules/k6/browser/browser/file_persister.go similarity index 96% rename from js/modules/k6/browser/browser/file_persister.go rename to internal/js/modules/k6/browser/browser/file_persister.go index 92a1fad824f..510830f91a7 100644 --- a/js/modules/k6/browser/browser/file_persister.go +++ b/internal/js/modules/k6/browser/browser/file_persister.go @@ -6,8 +6,8 @@ import ( "net/url" "strings" - "go.k6.io/k6/js/modules/k6/browser/env" - "go.k6.io/k6/js/modules/k6/browser/storage" + "go.k6.io/k6/internal/js/modules/k6/browser/env" + "go.k6.io/k6/internal/js/modules/k6/browser/storage" ) type presignedURLConfig struct { diff --git a/js/modules/k6/browser/browser/file_persister_test.go b/internal/js/modules/k6/browser/browser/file_persister_test.go similarity index 97% rename from js/modules/k6/browser/browser/file_persister_test.go rename to internal/js/modules/k6/browser/browser/file_persister_test.go index 1fe40ad6111..54f38f92c80 100644 --- a/js/modules/k6/browser/browser/file_persister_test.go +++ b/internal/js/modules/k6/browser/browser/file_persister_test.go @@ -5,8 +5,8 @@ import ( "github.com/stretchr/testify/assert" - "go.k6.io/k6/js/modules/k6/browser/env" - "go.k6.io/k6/js/modules/k6/browser/storage" + "go.k6.io/k6/internal/js/modules/k6/browser/env" + "go.k6.io/k6/internal/js/modules/k6/browser/storage" ) func Test_newScreenshotPersister(t *testing.T) { diff --git a/js/modules/k6/browser/browser/frame_mapping.go b/internal/js/modules/k6/browser/browser/frame_mapping.go similarity index 99% rename from js/modules/k6/browser/browser/frame_mapping.go rename to internal/js/modules/k6/browser/browser/frame_mapping.go index c67051358ac..8547388d624 100644 --- a/js/modules/k6/browser/browser/frame_mapping.go +++ b/internal/js/modules/k6/browser/browser/frame_mapping.go @@ -5,8 +5,8 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) // mapFrame to the JS module. diff --git a/js/modules/k6/browser/browser/helpers.go b/internal/js/modules/k6/browser/browser/helpers.go similarity index 94% rename from js/modules/k6/browser/browser/helpers.go rename to internal/js/modules/k6/browser/browser/helpers.go index 3d2056735ff..3559457f6dd 100644 --- a/js/modules/k6/browser/browser/helpers.go +++ b/internal/js/modules/k6/browser/browser/helpers.go @@ -7,8 +7,8 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/k6error" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/k6error" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) func panicIfFatalError(ctx context.Context, err error) { diff --git a/js/modules/k6/browser/browser/helpers_test.go b/internal/js/modules/k6/browser/browser/helpers_test.go similarity index 100% rename from js/modules/k6/browser/browser/helpers_test.go rename to internal/js/modules/k6/browser/browser/helpers_test.go diff --git a/js/modules/k6/browser/browser/js_handle_mapping.go b/internal/js/modules/k6/browser/browser/js_handle_mapping.go similarity index 94% rename from js/modules/k6/browser/browser/js_handle_mapping.go rename to internal/js/modules/k6/browser/browser/js_handle_mapping.go index e66864a57de..cc805a971d6 100644 --- a/js/modules/k6/browser/browser/js_handle_mapping.go +++ b/internal/js/modules/k6/browser/browser/js_handle_mapping.go @@ -5,8 +5,8 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) // mapJSHandle to the JS module. diff --git a/js/modules/k6/browser/browser/keyboard_mapping.go b/internal/js/modules/k6/browser/browser/keyboard_mapping.go similarity index 92% rename from js/modules/k6/browser/browser/keyboard_mapping.go rename to internal/js/modules/k6/browser/browser/keyboard_mapping.go index dbbc8176413..dab345509a7 100644 --- a/js/modules/k6/browser/browser/keyboard_mapping.go +++ b/internal/js/modules/k6/browser/browser/keyboard_mapping.go @@ -5,8 +5,8 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) func mapKeyboard(vu moduleVU, kb *common.Keyboard) mapping { diff --git a/js/modules/k6/browser/browser/locator_mapping.go b/internal/js/modules/k6/browser/browser/locator_mapping.go similarity index 98% rename from js/modules/k6/browser/browser/locator_mapping.go rename to internal/js/modules/k6/browser/browser/locator_mapping.go index 6204c044344..a822a832033 100644 --- a/js/modules/k6/browser/browser/locator_mapping.go +++ b/internal/js/modules/k6/browser/browser/locator_mapping.go @@ -5,8 +5,8 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) // mapLocator API to the JS module. diff --git a/js/modules/k6/browser/browser/mapping.go b/internal/js/modules/k6/browser/browser/mapping.go similarity index 95% rename from js/modules/k6/browser/browser/mapping.go rename to internal/js/modules/k6/browser/browser/mapping.go index 166f51380c3..50aabd58ea5 100644 --- a/js/modules/k6/browser/browser/mapping.go +++ b/internal/js/modules/k6/browser/browser/mapping.go @@ -7,7 +7,7 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/common" k6common "go.k6.io/k6/js/common" ) diff --git a/js/modules/k6/browser/browser/mapping_test.go b/internal/js/modules/k6/browser/browser/mapping_test.go similarity index 99% rename from js/modules/k6/browser/browser/mapping_test.go rename to internal/js/modules/k6/browser/browser/mapping_test.go index 46f4ffa3f81..b5c9f35b6be 100644 --- a/js/modules/k6/browser/browser/mapping_test.go +++ b/internal/js/modules/k6/browser/browser/mapping_test.go @@ -9,7 +9,7 @@ import ( "github.com/grafana/sobek" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/common" k6common "go.k6.io/k6/js/common" k6modulestest "go.k6.io/k6/js/modulestest" diff --git a/js/modules/k6/browser/browser/metric_event_mapping.go b/internal/js/modules/k6/browser/browser/metric_event_mapping.go similarity index 91% rename from js/modules/k6/browser/browser/metric_event_mapping.go rename to internal/js/modules/k6/browser/browser/metric_event_mapping.go index b8c66ea5ff4..851ed06b2cc 100644 --- a/js/modules/k6/browser/browser/metric_event_mapping.go +++ b/internal/js/modules/k6/browser/browser/metric_event_mapping.go @@ -3,7 +3,7 @@ package browser import ( "fmt" - "go.k6.io/k6/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/common" ) // mapMetricEvent to the JS module. diff --git a/js/modules/k6/browser/browser/module.go b/internal/js/modules/k6/browser/browser/module.go similarity index 96% rename from js/modules/k6/browser/browser/module.go rename to internal/js/modules/k6/browser/browser/module.go index 20c6f92915a..3bec7e085d9 100644 --- a/js/modules/k6/browser/browser/module.go +++ b/internal/js/modules/k6/browser/browser/module.go @@ -16,9 +16,9 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/env" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/env" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" k6modules "go.k6.io/k6/js/modules" ) diff --git a/js/modules/k6/browser/browser/module_test.go b/internal/js/modules/k6/browser/browser/module_test.go similarity index 92% rename from js/modules/k6/browser/browser/module_test.go rename to internal/js/modules/k6/browser/browser/module_test.go index 2eec055aead..25d3b26a7b2 100644 --- a/js/modules/k6/browser/browser/module_test.go +++ b/internal/js/modules/k6/browser/browser/module_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" ) // TestModuleNew tests registering the module. diff --git a/js/modules/k6/browser/browser/modulevu.go b/internal/js/modules/k6/browser/browser/modulevu.go similarity index 89% rename from js/modules/k6/browser/browser/modulevu.go rename to internal/js/modules/k6/browser/browser/modulevu.go index 4ec2b6d3912..d06c61d6c8c 100644 --- a/js/modules/k6/browser/browser/modulevu.go +++ b/internal/js/modules/k6/browser/browser/modulevu.go @@ -3,8 +3,8 @@ package browser import ( "context" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" k6modules "go.k6.io/k6/js/modules" ) diff --git a/js/modules/k6/browser/browser/mouse_mapping.go b/internal/js/modules/k6/browser/browser/mouse_mapping.go similarity index 91% rename from js/modules/k6/browser/browser/mouse_mapping.go rename to internal/js/modules/k6/browser/browser/mouse_mapping.go index 5fd24b22851..16514ed576b 100644 --- a/js/modules/k6/browser/browser/mouse_mapping.go +++ b/internal/js/modules/k6/browser/browser/mouse_mapping.go @@ -3,8 +3,8 @@ package browser import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) func mapMouse(vu moduleVU, m *common.Mouse) mapping { diff --git a/js/modules/k6/browser/browser/page_mapping.go b/internal/js/modules/k6/browser/browser/page_mapping.go similarity index 99% rename from js/modules/k6/browser/browser/page_mapping.go rename to internal/js/modules/k6/browser/browser/page_mapping.go index 0d2e70f3dba..3ec6652a63a 100644 --- a/js/modules/k6/browser/browser/page_mapping.go +++ b/internal/js/modules/k6/browser/browser/page_mapping.go @@ -8,8 +8,8 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) // mapPage to the JS module. diff --git a/js/modules/k6/browser/browser/registry.go b/internal/js/modules/k6/browser/browser/registry.go similarity index 97% rename from js/modules/k6/browser/browser/registry.go rename to internal/js/modules/k6/browser/browser/registry.go index 255a22a0c22..e459ffab311 100644 --- a/js/modules/k6/browser/browser/registry.go +++ b/internal/js/modules/k6/browser/browser/registry.go @@ -16,13 +16,13 @@ import ( "go.opentelemetry.io/otel/attribute" oteltrace "go.opentelemetry.io/otel/trace" - "go.k6.io/k6/js/modules/k6/browser/chromium" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/env" - "go.k6.io/k6/js/modules/k6/browser/k6ext" - browsertrace "go.k6.io/k6/js/modules/k6/browser/trace" + "go.k6.io/k6/internal/js/modules/k6/browser/chromium" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/env" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" + browsertrace "go.k6.io/k6/internal/js/modules/k6/browser/trace" - k6event "go.k6.io/k6/event" + k6event "go.k6.io/k6/internal/event" k6modules "go.k6.io/k6/js/modules" ) diff --git a/js/modules/k6/browser/browser/registry_test.go b/internal/js/modules/k6/browser/browser/registry_test.go similarity index 98% rename from js/modules/k6/browser/browser/registry_test.go rename to internal/js/modules/k6/browser/browser/registry_test.go index 16afd4d8e56..99f5be946d1 100644 --- a/js/modules/k6/browser/browser/registry_test.go +++ b/internal/js/modules/k6/browser/browser/registry_test.go @@ -10,10 +10,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/env" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/env" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" - k6event "go.k6.io/k6/event" + k6event "go.k6.io/k6/internal/event" ) func TestPidRegistry(t *testing.T) { diff --git a/js/modules/k6/browser/browser/request_mapping.go b/internal/js/modules/k6/browser/browser/request_mapping.go similarity index 93% rename from js/modules/k6/browser/browser/request_mapping.go rename to internal/js/modules/k6/browser/browser/request_mapping.go index e4f50ddb629..3a1c3dd8a0b 100644 --- a/js/modules/k6/browser/browser/request_mapping.go +++ b/internal/js/modules/k6/browser/browser/request_mapping.go @@ -3,8 +3,8 @@ package browser import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) // mapRequest to the JS module. diff --git a/js/modules/k6/browser/browser/response_mapping.go b/internal/js/modules/k6/browser/browser/response_mapping.go similarity index 95% rename from js/modules/k6/browser/browser/response_mapping.go rename to internal/js/modules/k6/browser/browser/response_mapping.go index 68aa48136cb..0c9373910ae 100644 --- a/js/modules/k6/browser/browser/response_mapping.go +++ b/internal/js/modules/k6/browser/browser/response_mapping.go @@ -3,8 +3,8 @@ package browser import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) // mapResponse to the JS module. diff --git a/js/modules/k6/browser/browser/touchscreen_mapping.go b/internal/js/modules/k6/browser/browser/touchscreen_mapping.go similarity index 77% rename from js/modules/k6/browser/browser/touchscreen_mapping.go rename to internal/js/modules/k6/browser/browser/touchscreen_mapping.go index f4804c88a73..b34644a09e4 100644 --- a/js/modules/k6/browser/browser/touchscreen_mapping.go +++ b/internal/js/modules/k6/browser/browser/touchscreen_mapping.go @@ -3,8 +3,8 @@ package browser import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) // mapTouchscreen to the JS module. diff --git a/js/modules/k6/browser/browser/worker_mapping.go b/internal/js/modules/k6/browser/browser/worker_mapping.go similarity index 74% rename from js/modules/k6/browser/browser/worker_mapping.go rename to internal/js/modules/k6/browser/browser/worker_mapping.go index 2c6c06ed1a8..587ce6b6192 100644 --- a/js/modules/k6/browser/browser/worker_mapping.go +++ b/internal/js/modules/k6/browser/browser/worker_mapping.go @@ -1,7 +1,7 @@ package browser import ( - "go.k6.io/k6/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/common" ) // mapWorker to the JS module. diff --git a/js/modules/k6/browser/chromium/browser.go b/internal/js/modules/k6/browser/chromium/browser.go similarity index 85% rename from js/modules/k6/browser/chromium/browser.go rename to internal/js/modules/k6/browser/chromium/browser.go index b4a0e466cba..9b95b3f2af9 100644 --- a/js/modules/k6/browser/chromium/browser.go +++ b/internal/js/modules/k6/browser/chromium/browser.go @@ -2,7 +2,7 @@ package chromium import ( - "go.k6.io/k6/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/common" ) // Browser is the public interface of a CDP browser. diff --git a/js/modules/k6/browser/chromium/browser_type.go b/internal/js/modules/k6/browser/chromium/browser_type.go similarity index 98% rename from js/modules/k6/browser/chromium/browser_type.go rename to internal/js/modules/k6/browser/chromium/browser_type.go index df6e5b67de5..f8788fc9772 100644 --- a/js/modules/k6/browser/chromium/browser_type.go +++ b/internal/js/modules/k6/browser/chromium/browser_type.go @@ -12,11 +12,11 @@ import ( "strings" "time" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/env" - "go.k6.io/k6/js/modules/k6/browser/k6ext" - "go.k6.io/k6/js/modules/k6/browser/log" - "go.k6.io/k6/js/modules/k6/browser/storage" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/env" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/storage" k6modules "go.k6.io/k6/js/modules" k6lib "go.k6.io/k6/lib" diff --git a/js/modules/k6/browser/chromium/browser_type_test.go b/internal/js/modules/k6/browser/chromium/browser_type_test.go similarity index 98% rename from js/modules/k6/browser/chromium/browser_type_test.go rename to internal/js/modules/k6/browser/chromium/browser_type_test.go index dca92b307d4..dd8947c93d2 100644 --- a/js/modules/k6/browser/chromium/browser_type_test.go +++ b/internal/js/modules/k6/browser/chromium/browser_type_test.go @@ -7,8 +7,8 @@ import ( "sort" "testing" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/env" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/env" k6lib "go.k6.io/k6/lib" k6types "go.k6.io/k6/lib/types" diff --git a/js/modules/k6/browser/common/barrier.go b/internal/js/modules/k6/browser/common/barrier.go similarity index 100% rename from js/modules/k6/browser/common/barrier.go rename to internal/js/modules/k6/browser/common/barrier.go diff --git a/js/modules/k6/browser/common/barrier_test.go b/internal/js/modules/k6/browser/common/barrier_test.go similarity index 92% rename from js/modules/k6/browser/common/barrier_test.go rename to internal/js/modules/k6/browser/common/barrier_test.go index 41291056320..1a8e647e99b 100644 --- a/js/modules/k6/browser/common/barrier_test.go +++ b/internal/js/modules/k6/browser/common/barrier_test.go @@ -7,7 +7,7 @@ import ( "github.com/chromedp/cdproto/cdp" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/log" ) func TestBarrier(t *testing.T) { diff --git a/js/modules/k6/browser/common/browser.go b/internal/js/modules/k6/browser/common/browser.go similarity index 99% rename from js/modules/k6/browser/common/browser.go rename to internal/js/modules/k6/browser/common/browser.go index c0f167a2b95..b08e6b65396 100644 --- a/js/modules/k6/browser/common/browser.go +++ b/internal/js/modules/k6/browser/common/browser.go @@ -15,8 +15,8 @@ import ( "github.com/chromedp/cdproto/target" "github.com/gorilla/websocket" - "go.k6.io/k6/js/modules/k6/browser/k6ext" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/log" ) const ( diff --git a/js/modules/k6/browser/common/browser_context.go b/internal/js/modules/k6/browser/common/browser_context.go similarity index 99% rename from js/modules/k6/browser/common/browser_context.go rename to internal/js/modules/k6/browser/common/browser_context.go index c051cb86951..e8588cfcd58 100644 --- a/js/modules/k6/browser/common/browser_context.go +++ b/internal/js/modules/k6/browser/common/browser_context.go @@ -14,10 +14,10 @@ import ( "github.com/chromedp/cdproto/storage" "github.com/chromedp/cdproto/target" - "go.k6.io/k6/js/modules/k6/browser/common/js" - "go.k6.io/k6/js/modules/k6/browser/k6error" - "go.k6.io/k6/js/modules/k6/browser/k6ext" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/common/js" + "go.k6.io/k6/internal/js/modules/k6/browser/k6error" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/log" k6modules "go.k6.io/k6/js/modules" ) diff --git a/js/modules/k6/browser/common/browser_context_options.go b/internal/js/modules/k6/browser/common/browser_context_options.go similarity index 100% rename from js/modules/k6/browser/common/browser_context_options.go rename to internal/js/modules/k6/browser/common/browser_context_options.go diff --git a/js/modules/k6/browser/common/browser_context_test.go b/internal/js/modules/k6/browser/common/browser_context_test.go similarity index 96% rename from js/modules/k6/browser/common/browser_context_test.go rename to internal/js/modules/k6/browser/common/browser_context_test.go index a78ce2a78a7..2589f2f6efb 100644 --- a/js/modules/k6/browser/common/browser_context_test.go +++ b/internal/js/modules/k6/browser/common/browser_context_test.go @@ -7,10 +7,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/common/js" - "go.k6.io/k6/js/modules/k6/browser/k6ext" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/common/js" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/log" ) func TestNewBrowserContext(t *testing.T) { diff --git a/js/modules/k6/browser/common/browser_options.go b/internal/js/modules/k6/browser/common/browser_options.go similarity index 97% rename from js/modules/k6/browser/common/browser_options.go rename to internal/js/modules/k6/browser/common/browser_options.go index 805f231096c..567e3aad39f 100644 --- a/js/modules/k6/browser/common/browser_options.go +++ b/internal/js/modules/k6/browser/common/browser_options.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "go.k6.io/k6/js/modules/k6/browser/env" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/env" + "go.k6.io/k6/internal/js/modules/k6/browser/log" "go.k6.io/k6/lib/types" ) diff --git a/js/modules/k6/browser/common/browser_options_test.go b/internal/js/modules/k6/browser/common/browser_options_test.go similarity index 97% rename from js/modules/k6/browser/common/browser_options_test.go rename to internal/js/modules/k6/browser/common/browser_options_test.go index 99ee249f783..02ebbe1595c 100644 --- a/js/modules/k6/browser/common/browser_options_test.go +++ b/internal/js/modules/k6/browser/common/browser_options_test.go @@ -7,9 +7,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/env" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/env" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/log" ) func TestBrowserOptionsParse(t *testing.T) { diff --git a/js/modules/k6/browser/common/browser_process.go b/internal/js/modules/k6/browser/common/browser_process.go similarity index 98% rename from js/modules/k6/browser/common/browser_process.go rename to internal/js/modules/k6/browser/common/browser_process.go index 433f40b0543..33c7ef10327 100644 --- a/js/modules/k6/browser/common/browser_process.go +++ b/internal/js/modules/k6/browser/common/browser_process.go @@ -11,8 +11,8 @@ import ( "os/exec" "strings" - "go.k6.io/k6/js/modules/k6/browser/log" - "go.k6.io/k6/js/modules/k6/browser/storage" + "go.k6.io/k6/internal/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/storage" ) type BrowserProcess struct { diff --git a/js/modules/k6/browser/common/browser_process_meta.go b/internal/js/modules/k6/browser/common/browser_process_meta.go similarity index 97% rename from js/modules/k6/browser/common/browser_process_meta.go rename to internal/js/modules/k6/browser/common/browser_process_meta.go index 8c74b7b3e1c..6af609d295a 100644 --- a/js/modules/k6/browser/common/browser_process_meta.go +++ b/internal/js/modules/k6/browser/common/browser_process_meta.go @@ -3,7 +3,7 @@ package common import ( "os" - "go.k6.io/k6/js/modules/k6/browser/storage" + "go.k6.io/k6/internal/js/modules/k6/browser/storage" ) const ( diff --git a/js/modules/k6/browser/common/browser_process_test.go b/internal/js/modules/k6/browser/common/browser_process_test.go similarity index 100% rename from js/modules/k6/browser/common/browser_process_test.go rename to internal/js/modules/k6/browser/common/browser_process_test.go diff --git a/js/modules/k6/browser/common/browser_test.go b/internal/js/modules/k6/browser/common/browser_test.go similarity index 97% rename from js/modules/k6/browser/common/browser_test.go rename to internal/js/modules/k6/browser/common/browser_test.go index 44042766061..2b103d50085 100644 --- a/js/modules/k6/browser/common/browser_test.go +++ b/internal/js/modules/k6/browser/common/browser_test.go @@ -11,9 +11,9 @@ import ( "github.com/mailru/easyjson" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/k6ext" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/log" ) func TestBrowserNewPageInContext(t *testing.T) { diff --git a/js/modules/k6/browser/common/connection.go b/internal/js/modules/k6/browser/common/connection.go similarity index 99% rename from js/modules/k6/browser/common/connection.go rename to internal/js/modules/k6/browser/common/connection.go index 94e5271e7a8..7af08fb4900 100644 --- a/js/modules/k6/browser/common/connection.go +++ b/internal/js/modules/k6/browser/common/connection.go @@ -10,7 +10,7 @@ import ( "sync/atomic" "time" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/log" "github.com/chromedp/cdproto" "github.com/chromedp/cdproto/cdp" diff --git a/js/modules/k6/browser/common/connection_test.go b/internal/js/modules/k6/browser/common/connection_test.go similarity index 97% rename from js/modules/k6/browser/common/connection_test.go rename to internal/js/modules/k6/browser/common/connection_test.go index 1601612cb38..dddd4293e98 100644 --- a/js/modules/k6/browser/common/connection_test.go +++ b/internal/js/modules/k6/browser/common/connection_test.go @@ -6,8 +6,8 @@ import ( "net/url" "testing" - "go.k6.io/k6/js/modules/k6/browser/log" - "go.k6.io/k6/js/modules/k6/browser/tests/ws" + "go.k6.io/k6/internal/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/tests/ws" "github.com/chromedp/cdproto" "github.com/chromedp/cdproto/cdp" diff --git a/js/modules/k6/browser/common/consts.go b/internal/js/modules/k6/browser/common/consts.go similarity index 100% rename from js/modules/k6/browser/common/consts.go rename to internal/js/modules/k6/browser/common/consts.go diff --git a/js/modules/k6/browser/common/context.go b/internal/js/modules/k6/browser/common/context.go similarity index 100% rename from js/modules/k6/browser/common/context.go rename to internal/js/modules/k6/browser/common/context.go diff --git a/js/modules/k6/browser/common/context_test.go b/internal/js/modules/k6/browser/common/context_test.go similarity index 100% rename from js/modules/k6/browser/common/context_test.go rename to internal/js/modules/k6/browser/common/context_test.go diff --git a/js/modules/k6/browser/common/device.go b/internal/js/modules/k6/browser/common/device.go similarity index 100% rename from js/modules/k6/browser/common/device.go rename to internal/js/modules/k6/browser/common/device.go diff --git a/js/modules/k6/browser/common/doc.go b/internal/js/modules/k6/browser/common/doc.go similarity index 100% rename from js/modules/k6/browser/common/doc.go rename to internal/js/modules/k6/browser/common/doc.go diff --git a/js/modules/k6/browser/common/element_handle.go b/internal/js/modules/k6/browser/common/element_handle.go similarity index 99% rename from js/modules/k6/browser/common/element_handle.go rename to internal/js/modules/k6/browser/common/element_handle.go index 0a0469d11d3..6c19619747b 100644 --- a/js/modules/k6/browser/common/element_handle.go +++ b/internal/js/modules/k6/browser/common/element_handle.go @@ -15,8 +15,8 @@ import ( "github.com/grafana/sobek" "go.opentelemetry.io/otel/attribute" - "go.k6.io/k6/js/modules/k6/browser/common/js" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/common/js" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" k6common "go.k6.io/k6/js/common" ) diff --git a/js/modules/k6/browser/common/element_handle_options.go b/internal/js/modules/k6/browser/common/element_handle_options.go similarity index 99% rename from js/modules/k6/browser/common/element_handle_options.go rename to internal/js/modules/k6/browser/common/element_handle_options.go index cd803e3ba08..5fa0a752ab3 100644 --- a/js/modules/k6/browser/common/element_handle_options.go +++ b/internal/js/modules/k6/browser/common/element_handle_options.go @@ -9,7 +9,7 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) type ElementHandleBaseOptions struct { diff --git a/js/modules/k6/browser/common/element_handle_test.go b/internal/js/modules/k6/browser/common/element_handle_test.go similarity index 98% rename from js/modules/k6/browser/common/element_handle_test.go rename to internal/js/modules/k6/browser/common/element_handle_test.go index a0bb379600d..1ad59c6e1ce 100644 --- a/js/modules/k6/browser/common/element_handle_test.go +++ b/internal/js/modules/k6/browser/common/element_handle_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - "go.k6.io/k6/js/modules/k6/browser/common/js" + "go.k6.io/k6/internal/js/modules/k6/browser/common/js" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/js/modules/k6/browser/common/errors.go b/internal/js/modules/k6/browser/common/errors.go similarity index 100% rename from js/modules/k6/browser/common/errors.go rename to internal/js/modules/k6/browser/common/errors.go diff --git a/js/modules/k6/browser/common/event_emitter.go b/internal/js/modules/k6/browser/common/event_emitter.go similarity index 100% rename from js/modules/k6/browser/common/event_emitter.go rename to internal/js/modules/k6/browser/common/event_emitter.go diff --git a/js/modules/k6/browser/common/event_emitter_test.go b/internal/js/modules/k6/browser/common/event_emitter_test.go similarity index 100% rename from js/modules/k6/browser/common/event_emitter_test.go rename to internal/js/modules/k6/browser/common/event_emitter_test.go diff --git a/js/modules/k6/browser/common/execution_context.go b/internal/js/modules/k6/browser/common/execution_context.go similarity index 98% rename from js/modules/k6/browser/common/execution_context.go rename to internal/js/modules/k6/browser/common/execution_context.go index 3dba28f0ed6..ece32a4cd2a 100644 --- a/js/modules/k6/browser/common/execution_context.go +++ b/internal/js/modules/k6/browser/common/execution_context.go @@ -8,8 +8,8 @@ import ( "regexp" "sync" - "go.k6.io/k6/js/modules/k6/browser/k6ext" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/log" k6modules "go.k6.io/k6/js/modules" diff --git a/js/modules/k6/browser/common/frame.go b/internal/js/modules/k6/browser/common/frame.go similarity index 99% rename from js/modules/k6/browser/common/frame.go rename to internal/js/modules/k6/browser/common/frame.go index b84a3454a14..87a43d542b6 100644 --- a/js/modules/k6/browser/common/frame.go +++ b/internal/js/modules/k6/browser/common/frame.go @@ -15,8 +15,8 @@ import ( "github.com/chromedp/cdproto/runtime" "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/k6ext" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/log" k6modules "go.k6.io/k6/js/modules" ) diff --git a/js/modules/k6/browser/common/frame_manager.go b/internal/js/modules/k6/browser/common/frame_manager.go similarity index 99% rename from js/modules/k6/browser/common/frame_manager.go rename to internal/js/modules/k6/browser/common/frame_manager.go index e605aa5eae3..d8bbdcf2e8c 100644 --- a/js/modules/k6/browser/common/frame_manager.go +++ b/internal/js/modules/k6/browser/common/frame_manager.go @@ -7,8 +7,8 @@ import ( "sync" "sync/atomic" - "go.k6.io/k6/js/modules/k6/browser/k6ext" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/log" k6modules "go.k6.io/k6/js/modules" diff --git a/js/modules/k6/browser/common/frame_options.go b/internal/js/modules/k6/browser/common/frame_options.go similarity index 99% rename from js/modules/k6/browser/common/frame_options.go rename to internal/js/modules/k6/browser/common/frame_options.go index f01278fef0f..aba1fd51333 100644 --- a/js/modules/k6/browser/common/frame_options.go +++ b/internal/js/modules/k6/browser/common/frame_options.go @@ -10,7 +10,7 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) type FrameBaseOptions struct { diff --git a/js/modules/k6/browser/common/frame_options_test.go b/internal/js/modules/k6/browser/common/frame_options_test.go similarity index 98% rename from js/modules/k6/browser/common/frame_options_test.go rename to internal/js/modules/k6/browser/common/frame_options_test.go index 5497cc04964..8b7ece0acfd 100644 --- a/js/modules/k6/browser/common/frame_options_test.go +++ b/internal/js/modules/k6/browser/common/frame_options_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/js/modules/k6/browser/common/frame_session.go b/internal/js/modules/k6/browser/common/frame_session.go similarity index 99% rename from js/modules/k6/browser/common/frame_session.go rename to internal/js/modules/k6/browser/common/frame_session.go index 9a15af6068a..e6c0cd58867 100644 --- a/js/modules/k6/browser/common/frame_session.go +++ b/internal/js/modules/k6/browser/common/frame_session.go @@ -14,8 +14,8 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" - "go.k6.io/k6/js/modules/k6/browser/k6ext" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/log" k6modules "go.k6.io/k6/js/modules" k6metrics "go.k6.io/k6/metrics" diff --git a/js/modules/k6/browser/common/frame_test.go b/internal/js/modules/k6/browser/common/frame_test.go similarity index 96% rename from js/modules/k6/browser/common/frame_test.go rename to internal/js/modules/k6/browser/common/frame_test.go index 7c8d75a5367..9a112bdd8c2 100644 --- a/js/modules/k6/browser/common/frame_test.go +++ b/internal/js/modules/k6/browser/common/frame_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/log" "github.com/chromedp/cdproto/cdp" "github.com/stretchr/testify/require" diff --git a/js/modules/k6/browser/common/helpers.go b/internal/js/modules/k6/browser/common/helpers.go similarity index 99% rename from js/modules/k6/browser/common/helpers.go rename to internal/js/modules/k6/browser/common/helpers.go index 2a6f8175f18..fde4d145395 100644 --- a/js/modules/k6/browser/common/helpers.go +++ b/internal/js/modules/k6/browser/common/helpers.go @@ -11,7 +11,7 @@ import ( cdpruntime "github.com/chromedp/cdproto/runtime" "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) func convertBaseJSHandleTypes( diff --git a/js/modules/k6/browser/common/helpers_test.go b/internal/js/modules/k6/browser/common/helpers_test.go similarity index 99% rename from js/modules/k6/browser/common/helpers_test.go rename to internal/js/modules/k6/browser/common/helpers_test.go index 25f78e1cc5d..45f0cd85212 100644 --- a/js/modules/k6/browser/common/helpers_test.go +++ b/internal/js/modules/k6/browser/common/helpers_test.go @@ -11,7 +11,7 @@ import ( "github.com/chromedp/cdproto/runtime" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/log" ) func newExecCtx() (*ExecutionContext, context.Context) { diff --git a/js/modules/k6/browser/common/hooks.go b/internal/js/modules/k6/browser/common/hooks.go similarity index 100% rename from js/modules/k6/browser/common/hooks.go rename to internal/js/modules/k6/browser/common/hooks.go diff --git a/js/modules/k6/browser/common/http.go b/internal/js/modules/k6/browser/common/http.go similarity index 99% rename from js/modules/k6/browser/common/http.go rename to internal/js/modules/k6/browser/common/http.go index f83f245a66d..77b1a3e91bf 100644 --- a/js/modules/k6/browser/common/http.go +++ b/internal/js/modules/k6/browser/common/http.go @@ -14,8 +14,8 @@ import ( "github.com/chromedp/cdproto/cdp" "github.com/chromedp/cdproto/network" - "go.k6.io/k6/js/modules/k6/browser/k6ext" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/log" k6modules "go.k6.io/k6/js/modules" ) diff --git a/js/modules/k6/browser/common/http_test.go b/internal/js/modules/k6/browser/common/http_test.go similarity index 98% rename from js/modules/k6/browser/common/http_test.go rename to internal/js/modules/k6/browser/common/http_test.go index 8869a699c14..75ac03a8746 100644 --- a/js/modules/k6/browser/common/http_test.go +++ b/internal/js/modules/k6/browser/common/http_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/log" ) func TestRequest(t *testing.T) { diff --git a/js/modules/k6/browser/common/js/actions.go b/internal/js/modules/k6/browser/common/js/actions.go similarity index 100% rename from js/modules/k6/browser/common/js/actions.go rename to internal/js/modules/k6/browser/common/js/actions.go diff --git a/js/modules/k6/browser/common/js/doc.go b/internal/js/modules/k6/browser/common/js/doc.go similarity index 100% rename from js/modules/k6/browser/common/js/doc.go rename to internal/js/modules/k6/browser/common/js/doc.go diff --git a/js/modules/k6/browser/common/js/embedded_scripts.go b/internal/js/modules/k6/browser/common/js/embedded_scripts.go similarity index 100% rename from js/modules/k6/browser/common/js/embedded_scripts.go rename to internal/js/modules/k6/browser/common/js/embedded_scripts.go diff --git a/js/modules/k6/browser/common/js/injected_script.js b/internal/js/modules/k6/browser/common/js/injected_script.js similarity index 100% rename from js/modules/k6/browser/common/js/injected_script.js rename to internal/js/modules/k6/browser/common/js/injected_script.js diff --git a/js/modules/k6/browser/common/js/query_all.js b/internal/js/modules/k6/browser/common/js/query_all.js similarity index 100% rename from js/modules/k6/browser/common/js/query_all.js rename to internal/js/modules/k6/browser/common/js/query_all.js diff --git a/js/modules/k6/browser/common/js/scroll_into_view.js b/internal/js/modules/k6/browser/common/js/scroll_into_view.js similarity index 100% rename from js/modules/k6/browser/common/js/scroll_into_view.js rename to internal/js/modules/k6/browser/common/js/scroll_into_view.js diff --git a/js/modules/k6/browser/common/js/selectors.go b/internal/js/modules/k6/browser/common/js/selectors.go similarity index 100% rename from js/modules/k6/browser/common/js/selectors.go rename to internal/js/modules/k6/browser/common/js/selectors.go diff --git a/js/modules/k6/browser/common/js/web_vital_iife.js b/internal/js/modules/k6/browser/common/js/web_vital_iife.js similarity index 100% rename from js/modules/k6/browser/common/js/web_vital_iife.js rename to internal/js/modules/k6/browser/common/js/web_vital_iife.js diff --git a/js/modules/k6/browser/common/js/web_vital_init.js b/internal/js/modules/k6/browser/common/js/web_vital_init.js similarity index 100% rename from js/modules/k6/browser/common/js/web_vital_init.js rename to internal/js/modules/k6/browser/common/js/web_vital_init.js diff --git a/js/modules/k6/browser/common/js_handle.go b/internal/js/modules/k6/browser/common/js_handle.go similarity index 99% rename from js/modules/k6/browser/common/js_handle.go rename to internal/js/modules/k6/browser/common/js_handle.go index 81dd913d631..1b672babd74 100644 --- a/js/modules/k6/browser/common/js_handle.go +++ b/internal/js/modules/k6/browser/common/js_handle.go @@ -6,7 +6,7 @@ import ( "fmt" "strings" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/log" "github.com/chromedp/cdproto/cdp" "github.com/chromedp/cdproto/runtime" diff --git a/js/modules/k6/browser/common/keyboard.go b/internal/js/modules/k6/browser/common/keyboard.go similarity index 99% rename from js/modules/k6/browser/common/keyboard.go rename to internal/js/modules/k6/browser/common/keyboard.go index 46aece9602c..607dec403bf 100644 --- a/js/modules/k6/browser/common/keyboard.go +++ b/internal/js/modules/k6/browser/common/keyboard.go @@ -10,7 +10,7 @@ import ( "github.com/chromedp/cdproto/cdp" "github.com/chromedp/cdproto/input" - "go.k6.io/k6/js/modules/k6/browser/keyboardlayout" + "go.k6.io/k6/internal/js/modules/k6/browser/keyboardlayout" ) const ( diff --git a/js/modules/k6/browser/common/keyboard_test.go b/internal/js/modules/k6/browser/common/keyboard_test.go similarity index 98% rename from js/modules/k6/browser/common/keyboard_test.go rename to internal/js/modules/k6/browser/common/keyboard_test.go index 3fbccfb8459..5f388cafbb5 100644 --- a/js/modules/k6/browser/common/keyboard_test.go +++ b/internal/js/modules/k6/browser/common/keyboard_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" - "go.k6.io/k6/js/modules/k6/browser/keyboardlayout" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/keyboardlayout" ) func TestSplit(t *testing.T) { diff --git a/js/modules/k6/browser/common/kill_linux.go b/internal/js/modules/k6/browser/common/kill_linux.go similarity index 100% rename from js/modules/k6/browser/common/kill_linux.go rename to internal/js/modules/k6/browser/common/kill_linux.go diff --git a/js/modules/k6/browser/common/kill_other.go b/internal/js/modules/k6/browser/common/kill_other.go similarity index 100% rename from js/modules/k6/browser/common/kill_other.go rename to internal/js/modules/k6/browser/common/kill_other.go diff --git a/js/modules/k6/browser/common/layout.go b/internal/js/modules/k6/browser/common/layout.go similarity index 98% rename from js/modules/k6/browser/common/layout.go rename to internal/js/modules/k6/browser/common/layout.go index 80abe45b04b..a1f69e4941e 100644 --- a/js/modules/k6/browser/common/layout.go +++ b/internal/js/modules/k6/browser/common/layout.go @@ -7,7 +7,7 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) // Position represents a position. diff --git a/js/modules/k6/browser/common/layout_test.go b/internal/js/modules/k6/browser/common/layout_test.go similarity index 100% rename from js/modules/k6/browser/common/layout_test.go rename to internal/js/modules/k6/browser/common/layout_test.go diff --git a/js/modules/k6/browser/common/lifecycle.go b/internal/js/modules/k6/browser/common/lifecycle.go similarity index 100% rename from js/modules/k6/browser/common/lifecycle.go rename to internal/js/modules/k6/browser/common/lifecycle.go diff --git a/js/modules/k6/browser/common/lifecycle_test.go b/internal/js/modules/k6/browser/common/lifecycle_test.go similarity index 100% rename from js/modules/k6/browser/common/lifecycle_test.go rename to internal/js/modules/k6/browser/common/lifecycle_test.go diff --git a/js/modules/k6/browser/common/locator.go b/internal/js/modules/k6/browser/common/locator.go similarity index 99% rename from js/modules/k6/browser/common/locator.go rename to internal/js/modules/k6/browser/common/locator.go index 09c70968cff..4a7b7c5fcab 100644 --- a/js/modules/k6/browser/common/locator.go +++ b/internal/js/modules/k6/browser/common/locator.go @@ -7,7 +7,7 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/log" ) // Strict mode: diff --git a/js/modules/k6/browser/common/mouse.go b/internal/js/modules/k6/browser/common/mouse.go similarity index 100% rename from js/modules/k6/browser/common/mouse.go rename to internal/js/modules/k6/browser/common/mouse.go diff --git a/js/modules/k6/browser/common/mouse_options.go b/internal/js/modules/k6/browser/common/mouse_options.go similarity index 98% rename from js/modules/k6/browser/common/mouse_options.go rename to internal/js/modules/k6/browser/common/mouse_options.go index bf99d4ca866..470bc920379 100644 --- a/js/modules/k6/browser/common/mouse_options.go +++ b/internal/js/modules/k6/browser/common/mouse_options.go @@ -5,7 +5,7 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) type MouseClickOptions struct { diff --git a/js/modules/k6/browser/common/network_manager.go b/internal/js/modules/k6/browser/common/network_manager.go similarity index 99% rename from js/modules/k6/browser/common/network_manager.go rename to internal/js/modules/k6/browser/common/network_manager.go index 266e380b5af..d31cac902f9 100644 --- a/js/modules/k6/browser/common/network_manager.go +++ b/internal/js/modules/k6/browser/common/network_manager.go @@ -11,9 +11,9 @@ import ( "sync" "time" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/log" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" k6modules "go.k6.io/k6/js/modules" k6lib "go.k6.io/k6/lib" diff --git a/js/modules/k6/browser/common/network_manager_test.go b/internal/js/modules/k6/browser/common/network_manager_test.go similarity index 97% rename from js/modules/k6/browser/common/network_manager_test.go rename to internal/js/modules/k6/browser/common/network_manager_test.go index ca3f8bfee7a..bf91603519f 100644 --- a/js/modules/k6/browser/common/network_manager_test.go +++ b/internal/js/modules/k6/browser/common/network_manager_test.go @@ -7,12 +7,12 @@ import ( "testing" "time" - "go.k6.io/k6/js/modules/k6/browser/k6ext" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/log" + k6mockresolver "go.k6.io/k6/internal/lib/testutils/mockresolver" k6lib "go.k6.io/k6/lib" - k6mockresolver "go.k6.io/k6/lib/testutils/mockresolver" k6types "go.k6.io/k6/lib/types" k6metrics "go.k6.io/k6/metrics" diff --git a/js/modules/k6/browser/common/network_profile.go b/internal/js/modules/k6/browser/common/network_profile.go similarity index 100% rename from js/modules/k6/browser/common/network_profile.go rename to internal/js/modules/k6/browser/common/network_profile.go diff --git a/js/modules/k6/browser/common/page.go b/internal/js/modules/k6/browser/common/page.go similarity index 99% rename from js/modules/k6/browser/common/page.go rename to internal/js/modules/k6/browser/common/page.go index 308d3015eb6..b2b2bfe7ae1 100644 --- a/js/modules/k6/browser/common/page.go +++ b/internal/js/modules/k6/browser/common/page.go @@ -22,8 +22,8 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" - "go.k6.io/k6/js/modules/k6/browser/k6ext" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/log" k6modules "go.k6.io/k6/js/modules" ) diff --git a/js/modules/k6/browser/common/page_options.go b/internal/js/modules/k6/browser/common/page_options.go similarity index 98% rename from js/modules/k6/browser/common/page_options.go rename to internal/js/modules/k6/browser/common/page_options.go index 585c9389f3d..dcc696f5dce 100644 --- a/js/modules/k6/browser/common/page_options.go +++ b/internal/js/modules/k6/browser/common/page_options.go @@ -9,7 +9,7 @@ import ( "github.com/chromedp/cdproto/page" "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" ) type PageEmulateMediaOptions struct { diff --git a/js/modules/k6/browser/common/page_test.go b/internal/js/modules/k6/browser/common/page_test.go similarity index 100% rename from js/modules/k6/browser/common/page_test.go rename to internal/js/modules/k6/browser/common/page_test.go diff --git a/js/modules/k6/browser/common/remote_object.go b/internal/js/modules/k6/browser/common/remote_object.go similarity index 99% rename from js/modules/k6/browser/common/remote_object.go rename to internal/js/modules/k6/browser/common/remote_object.go index d86daf8a691..a91e76872d2 100644 --- a/js/modules/k6/browser/common/remote_object.go +++ b/internal/js/modules/k6/browser/common/remote_object.go @@ -10,7 +10,7 @@ import ( "strconv" "strings" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/log" "github.com/chromedp/cdproto/runtime" ) diff --git a/js/modules/k6/browser/common/remote_object_test.go b/internal/js/modules/k6/browser/common/remote_object_test.go similarity index 99% rename from js/modules/k6/browser/common/remote_object_test.go rename to internal/js/modules/k6/browser/common/remote_object_test.go index 089aa675a9f..5852f9f6153 100644 --- a/js/modules/k6/browser/common/remote_object_test.go +++ b/internal/js/modules/k6/browser/common/remote_object_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" ) func TestValueFromRemoteObject(t *testing.T) { diff --git a/js/modules/k6/browser/common/screenshotter.go b/internal/js/modules/k6/browser/common/screenshotter.go similarity index 99% rename from js/modules/k6/browser/common/screenshotter.go rename to internal/js/modules/k6/browser/common/screenshotter.go index 609fe97dc05..15cbfeaa9ab 100644 --- a/js/modules/k6/browser/common/screenshotter.go +++ b/internal/js/modules/k6/browser/common/screenshotter.go @@ -13,7 +13,7 @@ import ( "github.com/chromedp/cdproto/cdp" "github.com/chromedp/cdproto/emulation" cdppage "github.com/chromedp/cdproto/page" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/log" ) // ScreenshotPersister is the type that all file persisters must implement. It's job is diff --git a/js/modules/k6/browser/common/selectors.go b/internal/js/modules/k6/browser/common/selectors.go similarity index 100% rename from js/modules/k6/browser/common/selectors.go rename to internal/js/modules/k6/browser/common/selectors.go diff --git a/js/modules/k6/browser/common/session.go b/internal/js/modules/k6/browser/common/session.go similarity index 99% rename from js/modules/k6/browser/common/session.go rename to internal/js/modules/k6/browser/common/session.go index 2d544b5d3c1..88f5eb7a4ce 100644 --- a/js/modules/k6/browser/common/session.go +++ b/internal/js/modules/k6/browser/common/session.go @@ -9,7 +9,7 @@ import ( "github.com/chromedp/cdproto/target" "github.com/mailru/easyjson" - "go.k6.io/k6/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/log" ) // Session represents a CDP session to a target. diff --git a/js/modules/k6/browser/common/session_test.go b/internal/js/modules/k6/browser/common/session_test.go similarity index 96% rename from js/modules/k6/browser/common/session_test.go rename to internal/js/modules/k6/browser/common/session_test.go index 963f68de4fc..1ce4e84800b 100644 --- a/js/modules/k6/browser/common/session_test.go +++ b/internal/js/modules/k6/browser/common/session_test.go @@ -6,8 +6,8 @@ import ( "net/url" "testing" - "go.k6.io/k6/js/modules/k6/browser/log" - "go.k6.io/k6/js/modules/k6/browser/tests/ws" + "go.k6.io/k6/internal/js/modules/k6/browser/log" + "go.k6.io/k6/internal/js/modules/k6/browser/tests/ws" "github.com/chromedp/cdproto" "github.com/chromedp/cdproto/cdp" diff --git a/js/modules/k6/browser/common/timeout.go b/internal/js/modules/k6/browser/common/timeout.go similarity index 100% rename from js/modules/k6/browser/common/timeout.go rename to internal/js/modules/k6/browser/common/timeout.go diff --git a/js/modules/k6/browser/common/timeout_test.go b/internal/js/modules/k6/browser/common/timeout_test.go similarity index 100% rename from js/modules/k6/browser/common/timeout_test.go rename to internal/js/modules/k6/browser/common/timeout_test.go diff --git a/js/modules/k6/browser/common/touchscreen.go b/internal/js/modules/k6/browser/common/touchscreen.go similarity index 100% rename from js/modules/k6/browser/common/touchscreen.go rename to internal/js/modules/k6/browser/common/touchscreen.go diff --git a/js/modules/k6/browser/common/trace.go b/internal/js/modules/k6/browser/common/trace.go similarity index 97% rename from js/modules/k6/browser/common/trace.go rename to internal/js/modules/k6/browser/common/trace.go index 1ce5ed10cce..2ce59633a2d 100644 --- a/js/modules/k6/browser/common/trace.go +++ b/internal/js/modules/k6/browser/common/trace.go @@ -6,7 +6,7 @@ import ( "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/trace" - browsertrace "go.k6.io/k6/js/modules/k6/browser/trace" + browsertrace "go.k6.io/k6/internal/js/modules/k6/browser/trace" ) // Tracer defines the interface with the tracing methods used in the common package. diff --git a/js/modules/k6/browser/common/worker.go b/internal/js/modules/k6/browser/common/worker.go similarity index 100% rename from js/modules/k6/browser/common/worker.go rename to internal/js/modules/k6/browser/common/worker.go diff --git a/js/modules/k6/browser/env/env.go b/internal/js/modules/k6/browser/env/env.go similarity index 100% rename from js/modules/k6/browser/env/env.go rename to internal/js/modules/k6/browser/env/env.go diff --git a/js/modules/k6/browser/k6error/internal.go b/internal/js/modules/k6/browser/k6error/internal.go similarity index 100% rename from js/modules/k6/browser/k6error/internal.go rename to internal/js/modules/k6/browser/k6error/internal.go diff --git a/js/modules/k6/browser/k6ext/context.go b/internal/js/modules/k6/browser/k6ext/context.go similarity index 100% rename from js/modules/k6/browser/k6ext/context.go rename to internal/js/modules/k6/browser/k6ext/context.go diff --git a/js/modules/k6/browser/k6ext/doc.go b/internal/js/modules/k6/browser/k6ext/doc.go similarity index 100% rename from js/modules/k6/browser/k6ext/doc.go rename to internal/js/modules/k6/browser/k6ext/doc.go diff --git a/js/modules/k6/browser/k6ext/k6test/doc.go b/internal/js/modules/k6/browser/k6ext/k6test/doc.go similarity index 100% rename from js/modules/k6/browser/k6ext/k6test/doc.go rename to internal/js/modules/k6/browser/k6ext/k6test/doc.go diff --git a/js/modules/k6/browser/k6ext/k6test/executor.go b/internal/js/modules/k6/browser/k6ext/k6test/executor.go similarity index 100% rename from js/modules/k6/browser/k6ext/k6test/executor.go rename to internal/js/modules/k6/browser/k6ext/k6test/executor.go diff --git a/js/modules/k6/browser/k6ext/k6test/vu.go b/internal/js/modules/k6/browser/k6ext/k6test/vu.go similarity index 96% rename from js/modules/k6/browser/k6ext/k6test/vu.go rename to internal/js/modules/k6/browser/k6ext/k6test/vu.go index 83518adf708..0a0c71273bf 100644 --- a/js/modules/k6/browser/k6ext/k6test/vu.go +++ b/internal/js/modules/k6/browser/k6ext/k6test/vu.go @@ -9,17 +9,17 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v3" - "go.k6.io/k6/js/modules/k6/browser/env" - "go.k6.io/k6/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/env" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" - "go.k6.io/k6/event" + "go.k6.io/k6/internal/event" + "go.k6.io/k6/internal/js/eventloop" + k6testutils "go.k6.io/k6/internal/lib/testutils" + k6trace "go.k6.io/k6/internal/lib/trace" k6common "go.k6.io/k6/js/common" - "go.k6.io/k6/js/eventloop" k6modulestest "go.k6.io/k6/js/modulestest" "go.k6.io/k6/lib" k6executor "go.k6.io/k6/lib/executor" - k6testutils "go.k6.io/k6/lib/testutils" - k6trace "go.k6.io/k6/lib/trace" k6metrics "go.k6.io/k6/metrics" ) diff --git a/js/modules/k6/browser/k6ext/metrics.go b/internal/js/modules/k6/browser/k6ext/metrics.go similarity index 100% rename from js/modules/k6/browser/k6ext/metrics.go rename to internal/js/modules/k6/browser/k6ext/metrics.go diff --git a/js/modules/k6/browser/k6ext/panic.go b/internal/js/modules/k6/browser/k6ext/panic.go similarity index 100% rename from js/modules/k6/browser/k6ext/panic.go rename to internal/js/modules/k6/browser/k6ext/panic.go diff --git a/js/modules/k6/browser/k6ext/promise.go b/internal/js/modules/k6/browser/k6ext/promise.go similarity index 100% rename from js/modules/k6/browser/k6ext/promise.go rename to internal/js/modules/k6/browser/k6ext/promise.go diff --git a/js/modules/k6/browser/keyboardlayout/layout.go b/internal/js/modules/k6/browser/keyboardlayout/layout.go similarity index 100% rename from js/modules/k6/browser/keyboardlayout/layout.go rename to internal/js/modules/k6/browser/keyboardlayout/layout.go diff --git a/js/modules/k6/browser/keyboardlayout/us.go b/internal/js/modules/k6/browser/keyboardlayout/us.go similarity index 100% rename from js/modules/k6/browser/keyboardlayout/us.go rename to internal/js/modules/k6/browser/keyboardlayout/us.go diff --git a/js/modules/k6/browser/log/logger.go b/internal/js/modules/k6/browser/log/logger.go similarity index 100% rename from js/modules/k6/browser/log/logger.go rename to internal/js/modules/k6/browser/log/logger.go diff --git a/js/modules/k6/browser/storage/file_persister.go b/internal/js/modules/k6/browser/storage/file_persister.go similarity index 100% rename from js/modules/k6/browser/storage/file_persister.go rename to internal/js/modules/k6/browser/storage/file_persister.go diff --git a/js/modules/k6/browser/storage/file_persister_test.go b/internal/js/modules/k6/browser/storage/file_persister_test.go similarity index 100% rename from js/modules/k6/browser/storage/file_persister_test.go rename to internal/js/modules/k6/browser/storage/file_persister_test.go diff --git a/js/modules/k6/browser/storage/storage.go b/internal/js/modules/k6/browser/storage/storage.go similarity index 100% rename from js/modules/k6/browser/storage/storage.go rename to internal/js/modules/k6/browser/storage/storage.go diff --git a/js/modules/k6/browser/storage/storage_test.go b/internal/js/modules/k6/browser/storage/storage_test.go similarity index 100% rename from js/modules/k6/browser/storage/storage_test.go rename to internal/js/modules/k6/browser/storage/storage_test.go diff --git a/js/modules/k6/browser/tests/browser_context_options_test.go b/internal/js/modules/k6/browser/tests/browser_context_options_test.go similarity index 98% rename from js/modules/k6/browser/tests/browser_context_options_test.go rename to internal/js/modules/k6/browser/tests/browser_context_options_test.go index 5b8814f80dc..6a741183413 100644 --- a/js/modules/k6/browser/tests/browser_context_options_test.go +++ b/internal/js/modules/k6/browser/tests/browser_context_options_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/common" ) func TestBrowserContextOptionsDefaultValues(t *testing.T) { diff --git a/js/modules/k6/browser/tests/browser_context_test.go b/internal/js/modules/k6/browser/tests/browser_context_test.go similarity index 99% rename from js/modules/k6/browser/tests/browser_context_test.go rename to internal/js/modules/k6/browser/tests/browser_context_test.go index 274e4bcba9b..95cee378fb6 100644 --- a/js/modules/k6/browser/tests/browser_context_test.go +++ b/internal/js/modules/k6/browser/tests/browser_context_test.go @@ -11,8 +11,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/env" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/env" ) func TestBrowserContextAddCookies(t *testing.T) { diff --git a/js/modules/k6/browser/tests/browser_test.go b/internal/js/modules/k6/browser/tests/browser_test.go similarity index 97% rename from js/modules/k6/browser/tests/browser_test.go rename to internal/js/modules/k6/browser/tests/browser_test.go index 8503e10ecca..52e13f6d2c0 100644 --- a/js/modules/k6/browser/tests/browser_test.go +++ b/internal/js/modules/k6/browser/tests/browser_test.go @@ -15,11 +15,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/browser" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/env" - "go.k6.io/k6/js/modules/k6/browser/k6ext" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/browser" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/env" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" ) func TestBrowserNewPage(t *testing.T) { diff --git a/js/modules/k6/browser/tests/browser_type_test.go b/internal/js/modules/k6/browser/tests/browser_type_test.go similarity index 87% rename from js/modules/k6/browser/tests/browser_type_test.go rename to internal/js/modules/k6/browser/tests/browser_type_test.go index 67907e1b10b..052c1b227c1 100644 --- a/js/modules/k6/browser/tests/browser_type_test.go +++ b/internal/js/modules/k6/browser/tests/browser_type_test.go @@ -6,10 +6,10 @@ import ( "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/browser" - "go.k6.io/k6/js/modules/k6/browser/chromium" - "go.k6.io/k6/js/modules/k6/browser/env" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/browser" + "go.k6.io/k6/internal/js/modules/k6/browser/chromium" + "go.k6.io/k6/internal/js/modules/k6/browser/env" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" ) func TestBrowserTypeConnect(t *testing.T) { diff --git a/js/modules/k6/browser/tests/doc.go b/internal/js/modules/k6/browser/tests/doc.go similarity index 100% rename from js/modules/k6/browser/tests/doc.go rename to internal/js/modules/k6/browser/tests/doc.go diff --git a/js/modules/k6/browser/tests/element_handle_test.go b/internal/js/modules/k6/browser/tests/element_handle_test.go similarity index 99% rename from js/modules/k6/browser/tests/element_handle_test.go rename to internal/js/modules/k6/browser/tests/element_handle_test.go index 277ee175c32..65e9b36d517 100644 --- a/js/modules/k6/browser/tests/element_handle_test.go +++ b/internal/js/modules/k6/browser/tests/element_handle_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/common" ) //go:embed static/mouse_helper.js diff --git a/js/modules/k6/browser/tests/frame_manager_test.go b/internal/js/modules/k6/browser/tests/frame_manager_test.go similarity index 98% rename from js/modules/k6/browser/tests/frame_manager_test.go rename to internal/js/modules/k6/browser/tests/frame_manager_test.go index d3746588058..0f6ffb5ddab 100644 --- a/js/modules/k6/browser/tests/frame_manager_test.go +++ b/internal/js/modules/k6/browser/tests/frame_manager_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/common" ) func TestWaitForFrameNavigationWithinDocument(t *testing.T) { diff --git a/js/modules/k6/browser/tests/frame_test.go b/internal/js/modules/k6/browser/tests/frame_test.go similarity index 98% rename from js/modules/k6/browser/tests/frame_test.go rename to internal/js/modules/k6/browser/tests/frame_test.go index d5ffa06e5c5..9629b7190bc 100644 --- a/js/modules/k6/browser/tests/frame_test.go +++ b/internal/js/modules/k6/browser/tests/frame_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/env" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/env" ) func TestFramePress(t *testing.T) { diff --git a/js/modules/k6/browser/tests/helpers.go b/internal/js/modules/k6/browser/tests/helpers.go similarity index 91% rename from js/modules/k6/browser/tests/helpers.go rename to internal/js/modules/k6/browser/tests/helpers.go index 5e73a2451d7..c5c53bacf4b 100644 --- a/js/modules/k6/browser/tests/helpers.go +++ b/internal/js/modules/k6/browser/tests/helpers.go @@ -6,8 +6,8 @@ import ( "github.com/grafana/sobek" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/browser" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/browser" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" ) // startIteration will work with the event system to start chrome and diff --git a/js/modules/k6/browser/tests/js_handle_get_properties_test.go b/internal/js/modules/k6/browser/tests/js_handle_get_properties_test.go similarity index 100% rename from js/modules/k6/browser/tests/js_handle_get_properties_test.go rename to internal/js/modules/k6/browser/tests/js_handle_get_properties_test.go diff --git a/js/modules/k6/browser/tests/js_handle_test.go b/internal/js/modules/k6/browser/tests/js_handle_test.go similarity index 100% rename from js/modules/k6/browser/tests/js_handle_test.go rename to internal/js/modules/k6/browser/tests/js_handle_test.go diff --git a/js/modules/k6/browser/tests/keyboard_test.go b/internal/js/modules/k6/browser/tests/keyboard_test.go similarity index 98% rename from js/modules/k6/browser/tests/keyboard_test.go rename to internal/js/modules/k6/browser/tests/keyboard_test.go index 89c15f7e048..223e87d0734 100644 --- a/js/modules/k6/browser/tests/keyboard_test.go +++ b/internal/js/modules/k6/browser/tests/keyboard_test.go @@ -13,8 +13,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/keyboardlayout" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/keyboardlayout" ) func TestKeyboardPress(t *testing.T) { diff --git a/js/modules/k6/browser/tests/launch_options_slowmo_test.go b/internal/js/modules/k6/browser/tests/launch_options_slowmo_test.go similarity index 99% rename from js/modules/k6/browser/tests/launch_options_slowmo_test.go rename to internal/js/modules/k6/browser/tests/launch_options_slowmo_test.go index 190763b6c4c..8a6a07efcc7 100644 --- a/js/modules/k6/browser/tests/launch_options_slowmo_test.go +++ b/internal/js/modules/k6/browser/tests/launch_options_slowmo_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/common" ) func TestBrowserOptionsSlowMo(t *testing.T) { diff --git a/js/modules/k6/browser/tests/lifecycle_wait_test.go b/internal/js/modules/k6/browser/tests/lifecycle_wait_test.go similarity index 99% rename from js/modules/k6/browser/tests/lifecycle_wait_test.go rename to internal/js/modules/k6/browser/tests/lifecycle_wait_test.go index fee3a53b9fa..206d76f3b64 100644 --- a/js/modules/k6/browser/tests/lifecycle_wait_test.go +++ b/internal/js/modules/k6/browser/tests/lifecycle_wait_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/common" ) // TODO diff --git a/js/modules/k6/browser/tests/locator_test.go b/internal/js/modules/k6/browser/tests/locator_test.go similarity index 99% rename from js/modules/k6/browser/tests/locator_test.go rename to internal/js/modules/k6/browser/tests/locator_test.go index 16e6bccc001..9f4135fadcc 100644 --- a/js/modules/k6/browser/tests/locator_test.go +++ b/internal/js/modules/k6/browser/tests/locator_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/common" ) // Strict mode: diff --git a/js/modules/k6/browser/tests/logrus_hook.go b/internal/js/modules/k6/browser/tests/logrus_hook.go similarity index 100% rename from js/modules/k6/browser/tests/logrus_hook.go rename to internal/js/modules/k6/browser/tests/logrus_hook.go diff --git a/js/modules/k6/browser/tests/mouse_test.go b/internal/js/modules/k6/browser/tests/mouse_test.go similarity index 100% rename from js/modules/k6/browser/tests/mouse_test.go rename to internal/js/modules/k6/browser/tests/mouse_test.go diff --git a/js/modules/k6/browser/tests/network_manager_test.go b/internal/js/modules/k6/browser/tests/network_manager_test.go similarity index 99% rename from js/modules/k6/browser/tests/network_manager_test.go rename to internal/js/modules/k6/browser/tests/network_manager_test.go index 44463e9ecbb..a5898f472c9 100644 --- a/js/modules/k6/browser/tests/network_manager_test.go +++ b/internal/js/modules/k6/browser/tests/network_manager_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/common" k6lib "go.k6.io/k6/lib" k6types "go.k6.io/k6/lib/types" diff --git a/js/modules/k6/browser/tests/page_test.go b/internal/js/modules/k6/browser/tests/page_test.go similarity index 99% rename from js/modules/k6/browser/tests/page_test.go rename to internal/js/modules/k6/browser/tests/page_test.go index a4ac5f9c2c0..93cce1bbec2 100644 --- a/js/modules/k6/browser/tests/page_test.go +++ b/internal/js/modules/k6/browser/tests/page_test.go @@ -19,8 +19,8 @@ import ( "github.com/stretchr/testify/require" k6metrics "go.k6.io/k6/metrics" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" ) type emulateMediaOpts struct { diff --git a/js/modules/k6/browser/tests/remote_obj_test.go b/internal/js/modules/k6/browser/tests/remote_obj_test.go similarity index 98% rename from js/modules/k6/browser/tests/remote_obj_test.go rename to internal/js/modules/k6/browser/tests/remote_obj_test.go index 4f28e7e7790..cf2ef246fc3 100644 --- a/js/modules/k6/browser/tests/remote_obj_test.go +++ b/internal/js/modules/k6/browser/tests/remote_obj_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/common" ) func TestConsoleLogParse(t *testing.T) { diff --git a/js/modules/k6/browser/tests/setinputfiles_test.go b/internal/js/modules/k6/browser/tests/setinputfiles_test.go similarity index 99% rename from js/modules/k6/browser/tests/setinputfiles_test.go rename to internal/js/modules/k6/browser/tests/setinputfiles_test.go index 2691cab92c8..21eb5e28658 100644 --- a/js/modules/k6/browser/tests/setinputfiles_test.go +++ b/internal/js/modules/k6/browser/tests/setinputfiles_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/common" ) // TestSetInputFiles tests the SetInputFiles function. diff --git a/js/modules/k6/browser/tests/static/concealed_link.html b/internal/js/modules/k6/browser/tests/static/concealed_link.html similarity index 100% rename from js/modules/k6/browser/tests/static/concealed_link.html rename to internal/js/modules/k6/browser/tests/static/concealed_link.html diff --git a/js/modules/k6/browser/tests/static/dialog.html b/internal/js/modules/k6/browser/tests/static/dialog.html similarity index 100% rename from js/modules/k6/browser/tests/static/dialog.html rename to internal/js/modules/k6/browser/tests/static/dialog.html diff --git a/js/modules/k6/browser/tests/static/embedded_iframe.html b/internal/js/modules/k6/browser/tests/static/embedded_iframe.html similarity index 100% rename from js/modules/k6/browser/tests/static/embedded_iframe.html rename to internal/js/modules/k6/browser/tests/static/embedded_iframe.html diff --git a/js/modules/k6/browser/tests/static/iframe_home.html b/internal/js/modules/k6/browser/tests/static/iframe_home.html similarity index 100% rename from js/modules/k6/browser/tests/static/iframe_home.html rename to internal/js/modules/k6/browser/tests/static/iframe_home.html diff --git a/js/modules/k6/browser/tests/static/iframe_signin.html b/internal/js/modules/k6/browser/tests/static/iframe_signin.html similarity index 100% rename from js/modules/k6/browser/tests/static/iframe_signin.html rename to internal/js/modules/k6/browser/tests/static/iframe_signin.html diff --git a/js/modules/k6/browser/tests/static/iframe_test_main.html b/internal/js/modules/k6/browser/tests/static/iframe_test_main.html similarity index 100% rename from js/modules/k6/browser/tests/static/iframe_test_main.html rename to internal/js/modules/k6/browser/tests/static/iframe_test_main.html diff --git a/js/modules/k6/browser/tests/static/iframe_test_nested1.html b/internal/js/modules/k6/browser/tests/static/iframe_test_nested1.html similarity index 100% rename from js/modules/k6/browser/tests/static/iframe_test_nested1.html rename to internal/js/modules/k6/browser/tests/static/iframe_test_nested1.html diff --git a/js/modules/k6/browser/tests/static/iframe_test_nested2.html b/internal/js/modules/k6/browser/tests/static/iframe_test_nested2.html similarity index 100% rename from js/modules/k6/browser/tests/static/iframe_test_nested2.html rename to internal/js/modules/k6/browser/tests/static/iframe_test_nested2.html diff --git a/js/modules/k6/browser/tests/static/lifecycle.html b/internal/js/modules/k6/browser/tests/static/lifecycle.html similarity index 100% rename from js/modules/k6/browser/tests/static/lifecycle.html rename to internal/js/modules/k6/browser/tests/static/lifecycle.html diff --git a/js/modules/k6/browser/tests/static/lifecycle_main_frame.html b/internal/js/modules/k6/browser/tests/static/lifecycle_main_frame.html similarity index 100% rename from js/modules/k6/browser/tests/static/lifecycle_main_frame.html rename to internal/js/modules/k6/browser/tests/static/lifecycle_main_frame.html diff --git a/js/modules/k6/browser/tests/static/lifecycle_no_ping_js.html b/internal/js/modules/k6/browser/tests/static/lifecycle_no_ping_js.html similarity index 100% rename from js/modules/k6/browser/tests/static/lifecycle_no_ping_js.html rename to internal/js/modules/k6/browser/tests/static/lifecycle_no_ping_js.html diff --git a/js/modules/k6/browser/tests/static/locators.html b/internal/js/modules/k6/browser/tests/static/locators.html similarity index 100% rename from js/modules/k6/browser/tests/static/locators.html rename to internal/js/modules/k6/browser/tests/static/locators.html diff --git a/js/modules/k6/browser/tests/static/mouse_helper.js b/internal/js/modules/k6/browser/tests/static/mouse_helper.js similarity index 100% rename from js/modules/k6/browser/tests/static/mouse_helper.js rename to internal/js/modules/k6/browser/tests/static/mouse_helper.js diff --git a/js/modules/k6/browser/tests/static/nav_in_doc.html b/internal/js/modules/k6/browser/tests/static/nav_in_doc.html similarity index 100% rename from js/modules/k6/browser/tests/static/nav_in_doc.html rename to internal/js/modules/k6/browser/tests/static/nav_in_doc.html diff --git a/js/modules/k6/browser/tests/static/non_clickable.html b/internal/js/modules/k6/browser/tests/static/non_clickable.html similarity index 100% rename from js/modules/k6/browser/tests/static/non_clickable.html rename to internal/js/modules/k6/browser/tests/static/non_clickable.html diff --git a/js/modules/k6/browser/tests/static/page1.html b/internal/js/modules/k6/browser/tests/static/page1.html similarity index 100% rename from js/modules/k6/browser/tests/static/page1.html rename to internal/js/modules/k6/browser/tests/static/page1.html diff --git a/js/modules/k6/browser/tests/static/page2.html b/internal/js/modules/k6/browser/tests/static/page2.html similarity index 100% rename from js/modules/k6/browser/tests/static/page2.html rename to internal/js/modules/k6/browser/tests/static/page2.html diff --git a/js/modules/k6/browser/tests/static/ping.html b/internal/js/modules/k6/browser/tests/static/ping.html similarity index 100% rename from js/modules/k6/browser/tests/static/ping.html rename to internal/js/modules/k6/browser/tests/static/ping.html diff --git a/js/modules/k6/browser/tests/static/select_options.html b/internal/js/modules/k6/browser/tests/static/select_options.html similarity index 100% rename from js/modules/k6/browser/tests/static/select_options.html rename to internal/js/modules/k6/browser/tests/static/select_options.html diff --git a/js/modules/k6/browser/tests/static/shadow_and_doc_frag.html b/internal/js/modules/k6/browser/tests/static/shadow_and_doc_frag.html similarity index 100% rename from js/modules/k6/browser/tests/static/shadow_and_doc_frag.html rename to internal/js/modules/k6/browser/tests/static/shadow_and_doc_frag.html diff --git a/js/modules/k6/browser/tests/static/shadow_dom_link.html b/internal/js/modules/k6/browser/tests/static/shadow_dom_link.html similarity index 100% rename from js/modules/k6/browser/tests/static/shadow_dom_link.html rename to internal/js/modules/k6/browser/tests/static/shadow_dom_link.html diff --git a/js/modules/k6/browser/tests/static/usual.html b/internal/js/modules/k6/browser/tests/static/usual.html similarity index 100% rename from js/modules/k6/browser/tests/static/usual.html rename to internal/js/modules/k6/browser/tests/static/usual.html diff --git a/js/modules/k6/browser/tests/static/visible.html b/internal/js/modules/k6/browser/tests/static/visible.html similarity index 100% rename from js/modules/k6/browser/tests/static/visible.html rename to internal/js/modules/k6/browser/tests/static/visible.html diff --git a/js/modules/k6/browser/tests/static/wait_for.html b/internal/js/modules/k6/browser/tests/static/wait_for.html similarity index 100% rename from js/modules/k6/browser/tests/static/wait_for.html rename to internal/js/modules/k6/browser/tests/static/wait_for.html diff --git a/js/modules/k6/browser/tests/static/wait_until.html b/internal/js/modules/k6/browser/tests/static/wait_until.html similarity index 100% rename from js/modules/k6/browser/tests/static/wait_until.html rename to internal/js/modules/k6/browser/tests/static/wait_until.html diff --git a/js/modules/k6/browser/tests/static/web_vitals.html b/internal/js/modules/k6/browser/tests/static/web_vitals.html similarity index 100% rename from js/modules/k6/browser/tests/static/web_vitals.html rename to internal/js/modules/k6/browser/tests/static/web_vitals.html diff --git a/js/modules/k6/browser/tests/test_browser.go b/internal/js/modules/k6/browser/tests/test_browser.go similarity index 96% rename from js/modules/k6/browser/tests/test_browser.go rename to internal/js/modules/k6/browser/tests/test_browser.go index d9464cd1b05..5a6cbd27199 100644 --- a/js/modules/k6/browser/tests/test_browser.go +++ b/internal/js/modules/k6/browser/tests/test_browser.go @@ -13,14 +13,14 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" - "go.k6.io/k6/js/modules/k6/browser/chromium" - "go.k6.io/k6/js/modules/k6/browser/common" - "go.k6.io/k6/js/modules/k6/browser/env" - "go.k6.io/k6/js/modules/k6/browser/k6ext" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" + "go.k6.io/k6/internal/js/modules/k6/browser/chromium" + "go.k6.io/k6/internal/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/env" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" + k6httpmultibin "go.k6.io/k6/internal/lib/testutils/httpmultibin" k6http "go.k6.io/k6/js/modules/k6/http" - k6httpmultibin "go.k6.io/k6/lib/testutils/httpmultibin" k6metrics "go.k6.io/k6/metrics" ) diff --git a/js/modules/k6/browser/tests/test_browser_proxy.go b/internal/js/modules/k6/browser/tests/test_browser_proxy.go similarity index 100% rename from js/modules/k6/browser/tests/test_browser_proxy.go rename to internal/js/modules/k6/browser/tests/test_browser_proxy.go diff --git a/js/modules/k6/browser/tests/test_browser_test.go b/internal/js/modules/k6/browser/tests/test_browser_test.go similarity index 96% rename from js/modules/k6/browser/tests/test_browser_test.go rename to internal/js/modules/k6/browser/tests/test_browser_test.go index 53cfabd749d..4cfe2511c6b 100644 --- a/js/modules/k6/browser/tests/test_browser_test.go +++ b/internal/js/modules/k6/browser/tests/test_browser_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/env" + "go.k6.io/k6/internal/js/modules/k6/browser/env" ) func TestTestBrowserAwaitWithTimeoutShortCircuit(t *testing.T) { diff --git a/js/modules/k6/browser/tests/tracing_test.go b/internal/js/modules/k6/browser/tests/tracing_test.go similarity index 98% rename from js/modules/k6/browser/tests/tracing_test.go rename to internal/js/modules/k6/browser/tests/tracing_test.go index eccbbab6fef..8daaec5a896 100644 --- a/js/modules/k6/browser/tests/tracing_test.go +++ b/internal/js/modules/k6/browser/tests/tracing_test.go @@ -15,9 +15,9 @@ import ( "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/otel/trace/embedded" - "go.k6.io/k6/js/modules/k6/browser/browser" - "go.k6.io/k6/js/modules/k6/browser/k6ext/k6test" - browsertrace "go.k6.io/k6/js/modules/k6/browser/trace" + "go.k6.io/k6/internal/js/modules/k6/browser/browser" + "go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test" + browsertrace "go.k6.io/k6/internal/js/modules/k6/browser/trace" k6lib "go.k6.io/k6/lib" ) diff --git a/js/modules/k6/browser/tests/webvital_test.go b/internal/js/modules/k6/browser/tests/webvital_test.go similarity index 98% rename from js/modules/k6/browser/tests/webvital_test.go rename to internal/js/modules/k6/browser/tests/webvital_test.go index 319751642e3..a9abf82fb09 100644 --- a/js/modules/k6/browser/tests/webvital_test.go +++ b/internal/js/modules/k6/browser/tests/webvital_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/browser/common" + "go.k6.io/k6/internal/js/modules/k6/browser/common" k6metrics "go.k6.io/k6/metrics" ) diff --git a/js/modules/k6/browser/tests/ws/server.go b/internal/js/modules/k6/browser/tests/ws/server.go similarity index 100% rename from js/modules/k6/browser/tests/ws/server.go rename to internal/js/modules/k6/browser/tests/ws/server.go diff --git a/js/modules/k6/browser/trace/trace.go b/internal/js/modules/k6/browser/trace/trace.go similarity index 100% rename from js/modules/k6/browser/trace/trace.go rename to internal/js/modules/k6/browser/trace/trace.go diff --git a/js/modules/k6/crypto/crypto.go b/internal/js/modules/k6/crypto/crypto.go similarity index 100% rename from js/modules/k6/crypto/crypto.go rename to internal/js/modules/k6/crypto/crypto.go diff --git a/js/modules/k6/crypto/crypto_test.go b/internal/js/modules/k6/crypto/crypto_test.go similarity index 100% rename from js/modules/k6/crypto/crypto_test.go rename to internal/js/modules/k6/crypto/crypto_test.go diff --git a/js/modules/k6/crypto/x509/x509.go b/internal/js/modules/k6/crypto/x509/x509.go similarity index 100% rename from js/modules/k6/crypto/x509/x509.go rename to internal/js/modules/k6/crypto/x509/x509.go diff --git a/js/modules/k6/crypto/x509/x509_test.go b/internal/js/modules/k6/crypto/x509/x509_test.go similarity index 100% rename from js/modules/k6/crypto/x509/x509_test.go rename to internal/js/modules/k6/crypto/x509/x509_test.go diff --git a/js/modules/k6/data/data.go b/internal/js/modules/k6/data/data.go similarity index 100% rename from js/modules/k6/data/data.go rename to internal/js/modules/k6/data/data.go diff --git a/js/modules/k6/data/share.go b/internal/js/modules/k6/data/share.go similarity index 100% rename from js/modules/k6/data/share.go rename to internal/js/modules/k6/data/share.go diff --git a/js/modules/k6/data/share_test.go b/internal/js/modules/k6/data/share_test.go similarity index 99% rename from js/modules/k6/data/share_test.go rename to internal/js/modules/k6/data/share_test.go index d25559a7679..c05ebc6fa69 100644 --- a/js/modules/k6/data/share_test.go +++ b/internal/js/modules/k6/data/share_test.go @@ -10,8 +10,8 @@ import ( "github.com/grafana/sobek" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/js/compiler" "go.k6.io/k6/js/common" - "go.k6.io/k6/js/compiler" "go.k6.io/k6/js/modulestest" ) diff --git a/js/modules/k6/encoding/encoding.go b/internal/js/modules/k6/encoding/encoding.go similarity index 100% rename from js/modules/k6/encoding/encoding.go rename to internal/js/modules/k6/encoding/encoding.go diff --git a/js/modules/k6/encoding/encoding_test.go b/internal/js/modules/k6/encoding/encoding_test.go similarity index 100% rename from js/modules/k6/encoding/encoding_test.go rename to internal/js/modules/k6/encoding/encoding_test.go diff --git a/js/modules/k6/execution/execution.go b/internal/js/modules/k6/execution/execution.go similarity index 100% rename from js/modules/k6/execution/execution.go rename to internal/js/modules/k6/execution/execution.go diff --git a/js/modules/k6/execution/execution_test.go b/internal/js/modules/k6/execution/execution_test.go similarity index 99% rename from js/modules/k6/execution/execution_test.go rename to internal/js/modules/k6/execution/execution_test.go index 114047de3f9..82e248d8b1a 100644 --- a/js/modules/k6/execution/execution_test.go +++ b/internal/js/modules/k6/execution/execution_test.go @@ -15,11 +15,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.k6.io/k6/errext" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/js/common" "go.k6.io/k6/js/modulestest" "go.k6.io/k6/lib" "go.k6.io/k6/lib/executor" - "go.k6.io/k6/lib/testutils" "go.k6.io/k6/lib/types" "go.k6.io/k6/metrics" "gopkg.in/guregu/null.v3" diff --git a/js/modules/k6/experimental/README.md b/internal/js/modules/k6/experimental/README.md similarity index 100% rename from js/modules/k6/experimental/README.md rename to internal/js/modules/k6/experimental/README.md diff --git a/js/modules/k6/experimental/csv/module.go b/internal/js/modules/k6/experimental/csv/module.go similarity index 98% rename from js/modules/k6/experimental/csv/module.go rename to internal/js/modules/k6/experimental/csv/module.go index 722dccbdb0b..a3bfbda80d9 100644 --- a/js/modules/k6/experimental/csv/module.go +++ b/internal/js/modules/k6/experimental/csv/module.go @@ -9,7 +9,7 @@ import ( "sync/atomic" "time" - "go.k6.io/k6/js/modules/k6/data" + "go.k6.io/k6/internal/js/modules/k6/data" "github.com/grafana/sobek" @@ -17,7 +17,7 @@ import ( "go.k6.io/k6/js/promises" - "go.k6.io/k6/js/modules/k6/experimental/fs" + "go.k6.io/k6/internal/js/modules/k6/experimental/fs" "go.k6.io/k6/js/common" "go.k6.io/k6/js/modules" diff --git a/js/modules/k6/experimental/csv/module_test.go b/internal/js/modules/k6/experimental/csv/module_test.go similarity index 99% rename from js/modules/k6/experimental/csv/module_test.go rename to internal/js/modules/k6/experimental/csv/module_test.go index d121610e4b5..3f1d8951d86 100644 --- a/js/modules/k6/experimental/csv/module_test.go +++ b/internal/js/modules/k6/experimental/csv/module_test.go @@ -10,10 +10,10 @@ import ( "go.k6.io/k6/lib" - "go.k6.io/k6/js/modules/k6/experimental/fs" + "go.k6.io/k6/internal/js/modules/k6/experimental/fs" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/js/compiler" + "go.k6.io/k6/internal/js/compiler" "github.com/stretchr/testify/require" diff --git a/js/modules/k6/experimental/csv/reader.go b/internal/js/modules/k6/experimental/csv/reader.go similarity index 100% rename from js/modules/k6/experimental/csv/reader.go rename to internal/js/modules/k6/experimental/csv/reader.go diff --git a/js/modules/k6/experimental/csv/reader_test.go b/internal/js/modules/k6/experimental/csv/reader_test.go similarity index 100% rename from js/modules/k6/experimental/csv/reader_test.go rename to internal/js/modules/k6/experimental/csv/reader_test.go diff --git a/js/modules/k6/experimental/experimental.go b/internal/js/modules/k6/experimental/experimental.go similarity index 100% rename from js/modules/k6/experimental/experimental.go rename to internal/js/modules/k6/experimental/experimental.go diff --git a/js/modules/k6/experimental/fs/cache.go b/internal/js/modules/k6/experimental/fs/cache.go similarity index 100% rename from js/modules/k6/experimental/fs/cache.go rename to internal/js/modules/k6/experimental/fs/cache.go diff --git a/js/modules/k6/experimental/fs/cache_test.go b/internal/js/modules/k6/experimental/fs/cache_test.go similarity index 100% rename from js/modules/k6/experimental/fs/cache_test.go rename to internal/js/modules/k6/experimental/fs/cache_test.go diff --git a/js/modules/k6/experimental/fs/errors.go b/internal/js/modules/k6/experimental/fs/errors.go similarity index 100% rename from js/modules/k6/experimental/fs/errors.go rename to internal/js/modules/k6/experimental/fs/errors.go diff --git a/js/modules/k6/experimental/fs/errors_gen.go b/internal/js/modules/k6/experimental/fs/errors_gen.go similarity index 100% rename from js/modules/k6/experimental/fs/errors_gen.go rename to internal/js/modules/k6/experimental/fs/errors_gen.go diff --git a/js/modules/k6/experimental/fs/file.go b/internal/js/modules/k6/experimental/fs/file.go similarity index 100% rename from js/modules/k6/experimental/fs/file.go rename to internal/js/modules/k6/experimental/fs/file.go diff --git a/js/modules/k6/experimental/fs/file_test.go b/internal/js/modules/k6/experimental/fs/file_test.go similarity index 100% rename from js/modules/k6/experimental/fs/file_test.go rename to internal/js/modules/k6/experimental/fs/file_test.go diff --git a/js/modules/k6/experimental/fs/module.go b/internal/js/modules/k6/experimental/fs/module.go similarity index 100% rename from js/modules/k6/experimental/fs/module.go rename to internal/js/modules/k6/experimental/fs/module.go diff --git a/js/modules/k6/experimental/fs/module_test.go b/internal/js/modules/k6/experimental/fs/module_test.go similarity index 99% rename from js/modules/k6/experimental/fs/module_test.go rename to internal/js/modules/k6/experimental/fs/module_test.go index 397e3512640..fddd59c649f 100644 --- a/js/modules/k6/experimental/fs/module_test.go +++ b/internal/js/modules/k6/experimental/fs/module_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/compiler" + "go.k6.io/k6/internal/js/compiler" "go.k6.io/k6/js/modulestest" "go.k6.io/k6/lib" "go.k6.io/k6/lib/fsext" diff --git a/js/modules/k6/experimental/streams/errors.go b/internal/js/modules/k6/experimental/streams/errors.go similarity index 100% rename from js/modules/k6/experimental/streams/errors.go rename to internal/js/modules/k6/experimental/streams/errors.go diff --git a/js/modules/k6/experimental/streams/errors_gen.go b/internal/js/modules/k6/experimental/streams/errors_gen.go similarity index 100% rename from js/modules/k6/experimental/streams/errors_gen.go rename to internal/js/modules/k6/experimental/streams/errors_gen.go diff --git a/js/modules/k6/experimental/streams/goja.go b/internal/js/modules/k6/experimental/streams/goja.go similarity index 100% rename from js/modules/k6/experimental/streams/goja.go rename to internal/js/modules/k6/experimental/streams/goja.go diff --git a/js/modules/k6/experimental/streams/module.go b/internal/js/modules/k6/experimental/streams/module.go similarity index 100% rename from js/modules/k6/experimental/streams/module.go rename to internal/js/modules/k6/experimental/streams/module.go diff --git a/js/modules/k6/experimental/streams/module_test.go b/internal/js/modules/k6/experimental/streams/module_test.go similarity index 100% rename from js/modules/k6/experimental/streams/module_test.go rename to internal/js/modules/k6/experimental/streams/module_test.go diff --git a/js/modules/k6/experimental/streams/queue.go b/internal/js/modules/k6/experimental/streams/queue.go similarity index 100% rename from js/modules/k6/experimental/streams/queue.go rename to internal/js/modules/k6/experimental/streams/queue.go diff --git a/js/modules/k6/experimental/streams/readable_stream_controller.go b/internal/js/modules/k6/experimental/streams/readable_stream_controller.go similarity index 100% rename from js/modules/k6/experimental/streams/readable_stream_controller.go rename to internal/js/modules/k6/experimental/streams/readable_stream_controller.go diff --git a/js/modules/k6/experimental/streams/readable_stream_default_controller.go b/internal/js/modules/k6/experimental/streams/readable_stream_default_controller.go similarity index 100% rename from js/modules/k6/experimental/streams/readable_stream_default_controller.go rename to internal/js/modules/k6/experimental/streams/readable_stream_default_controller.go diff --git a/js/modules/k6/experimental/streams/readable_stream_default_reader.go b/internal/js/modules/k6/experimental/streams/readable_stream_default_reader.go similarity index 100% rename from js/modules/k6/experimental/streams/readable_stream_default_reader.go rename to internal/js/modules/k6/experimental/streams/readable_stream_default_reader.go diff --git a/js/modules/k6/experimental/streams/readable_stream_reader.go b/internal/js/modules/k6/experimental/streams/readable_stream_reader.go similarity index 100% rename from js/modules/k6/experimental/streams/readable_stream_reader.go rename to internal/js/modules/k6/experimental/streams/readable_stream_reader.go diff --git a/js/modules/k6/experimental/streams/readable_streams.go b/internal/js/modules/k6/experimental/streams/readable_streams.go similarity index 100% rename from js/modules/k6/experimental/streams/readable_streams.go rename to internal/js/modules/k6/experimental/streams/readable_streams.go diff --git a/js/modules/k6/experimental/streams/readable_streams_test.go b/internal/js/modules/k6/experimental/streams/readable_streams_test.go similarity index 100% rename from js/modules/k6/experimental/streams/readable_streams_test.go rename to internal/js/modules/k6/experimental/streams/readable_streams_test.go diff --git a/js/modules/k6/experimental/streams/tests/README.md b/internal/js/modules/k6/experimental/streams/tests/README.md similarity index 100% rename from js/modules/k6/experimental/streams/tests/README.md rename to internal/js/modules/k6/experimental/streams/tests/README.md diff --git a/js/modules/k6/experimental/streams/tests/checkout.sh b/internal/js/modules/k6/experimental/streams/tests/checkout.sh similarity index 100% rename from js/modules/k6/experimental/streams/tests/checkout.sh rename to internal/js/modules/k6/experimental/streams/tests/checkout.sh diff --git a/js/modules/k6/experimental/streams/tests/reentrant-strategies.any.js.patch b/internal/js/modules/k6/experimental/streams/tests/reentrant-strategies.any.js.patch similarity index 100% rename from js/modules/k6/experimental/streams/tests/reentrant-strategies.any.js.patch rename to internal/js/modules/k6/experimental/streams/tests/reentrant-strategies.any.js.patch diff --git a/js/modules/k6/experimental/streams/tests/rs-test-templates.js.patch b/internal/js/modules/k6/experimental/streams/tests/rs-test-templates.js.patch similarity index 100% rename from js/modules/k6/experimental/streams/tests/rs-test-templates.js.patch rename to internal/js/modules/k6/experimental/streams/tests/rs-test-templates.js.patch diff --git a/js/modules/k6/experimental/streams/tests/testharness.js.patch b/internal/js/modules/k6/experimental/streams/tests/testharness.js.patch similarity index 100% rename from js/modules/k6/experimental/streams/tests/testharness.js.patch rename to internal/js/modules/k6/experimental/streams/tests/testharness.js.patch diff --git a/js/modules/k6/experimental/streams/underlying_source.go b/internal/js/modules/k6/experimental/streams/underlying_source.go similarity index 100% rename from js/modules/k6/experimental/streams/underlying_source.go rename to internal/js/modules/k6/experimental/streams/underlying_source.go diff --git a/js/modules/k6/experimental/websockets/autobahn_tests/README.md b/internal/js/modules/k6/experimental/websockets/autobahn_tests/README.md similarity index 100% rename from js/modules/k6/experimental/websockets/autobahn_tests/README.md rename to internal/js/modules/k6/experimental/websockets/autobahn_tests/README.md diff --git a/js/modules/k6/experimental/websockets/autobahn_tests/config/fuzzingserver.json b/internal/js/modules/k6/experimental/websockets/autobahn_tests/config/fuzzingserver.json similarity index 100% rename from js/modules/k6/experimental/websockets/autobahn_tests/config/fuzzingserver.json rename to internal/js/modules/k6/experimental/websockets/autobahn_tests/config/fuzzingserver.json diff --git a/js/modules/k6/experimental/websockets/autobahn_tests/reports/.gitkeep b/internal/js/modules/k6/experimental/websockets/autobahn_tests/reports/.gitkeep similarity index 100% rename from js/modules/k6/experimental/websockets/autobahn_tests/reports/.gitkeep rename to internal/js/modules/k6/experimental/websockets/autobahn_tests/reports/.gitkeep diff --git a/js/modules/k6/experimental/websockets/autobahn_tests/script.js b/internal/js/modules/k6/experimental/websockets/autobahn_tests/script.js similarity index 100% rename from js/modules/k6/experimental/websockets/autobahn_tests/script.js rename to internal/js/modules/k6/experimental/websockets/autobahn_tests/script.js diff --git a/js/modules/k6/experimental/websockets/blob.go b/internal/js/modules/k6/experimental/websockets/blob.go similarity index 98% rename from js/modules/k6/experimental/websockets/blob.go rename to internal/js/modules/k6/experimental/websockets/blob.go index ad34d92df51..b9a2fc2f76c 100644 --- a/js/modules/k6/experimental/websockets/blob.go +++ b/internal/js/modules/k6/experimental/websockets/blob.go @@ -9,8 +9,8 @@ import ( "github.com/grafana/sobek" + "go.k6.io/k6/internal/js/modules/k6/experimental/streams" "go.k6.io/k6/js/common" - "go.k6.io/k6/js/modules/k6/experimental/streams" ) type blob struct { diff --git a/js/modules/k6/experimental/websockets/blob_test.go b/internal/js/modules/k6/experimental/websockets/blob_test.go similarity index 100% rename from js/modules/k6/experimental/websockets/blob_test.go rename to internal/js/modules/k6/experimental/websockets/blob_test.go diff --git a/js/modules/k6/experimental/websockets/events/events.go b/internal/js/modules/k6/experimental/websockets/events/events.go similarity index 100% rename from js/modules/k6/experimental/websockets/events/events.go rename to internal/js/modules/k6/experimental/websockets/events/events.go diff --git a/js/modules/k6/experimental/websockets/helpers.go b/internal/js/modules/k6/experimental/websockets/helpers.go similarity index 100% rename from js/modules/k6/experimental/websockets/helpers.go rename to internal/js/modules/k6/experimental/websockets/helpers.go diff --git a/js/modules/k6/experimental/websockets/listeners.go b/internal/js/modules/k6/experimental/websockets/listeners.go similarity index 97% rename from js/modules/k6/experimental/websockets/listeners.go rename to internal/js/modules/k6/experimental/websockets/listeners.go index 79e85a76d55..42b24a1510f 100644 --- a/js/modules/k6/experimental/websockets/listeners.go +++ b/internal/js/modules/k6/experimental/websockets/listeners.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/grafana/sobek" - "go.k6.io/k6/js/modules/k6/experimental/websockets/events" + "go.k6.io/k6/internal/js/modules/k6/experimental/websockets/events" ) // eventListeners keeps track of the eventListeners for each event type diff --git a/js/modules/k6/experimental/websockets/main_test.go b/internal/js/modules/k6/experimental/websockets/main_test.go similarity index 100% rename from js/modules/k6/experimental/websockets/main_test.go rename to internal/js/modules/k6/experimental/websockets/main_test.go diff --git a/js/modules/k6/experimental/websockets/params.go b/internal/js/modules/k6/experimental/websockets/params.go similarity index 100% rename from js/modules/k6/experimental/websockets/params.go rename to internal/js/modules/k6/experimental/websockets/params.go diff --git a/js/modules/k6/experimental/websockets/websockets.go b/internal/js/modules/k6/experimental/websockets/websockets.go similarity index 99% rename from js/modules/k6/experimental/websockets/websockets.go rename to internal/js/modules/k6/experimental/websockets/websockets.go index e682cbbc4ce..31aebeb1972 100644 --- a/js/modules/k6/experimental/websockets/websockets.go +++ b/internal/js/modules/k6/experimental/websockets/websockets.go @@ -16,7 +16,7 @@ import ( "github.com/gorilla/websocket" "github.com/grafana/sobek" "github.com/mstoykov/k6-taskqueue-lib/taskqueue" - "go.k6.io/k6/js/modules/k6/experimental/websockets/events" + "go.k6.io/k6/internal/js/modules/k6/experimental/websockets/events" "go.k6.io/k6/js/common" "go.k6.io/k6/js/modules" diff --git a/js/modules/k6/experimental/websockets/websockets_test.go b/internal/js/modules/k6/experimental/websockets/websockets_test.go similarity index 99% rename from js/modules/k6/experimental/websockets/websockets_test.go rename to internal/js/modules/k6/experimental/websockets/websockets_test.go index bac0e8dc28a..2326835ea90 100644 --- a/js/modules/k6/experimental/websockets/websockets_test.go +++ b/internal/js/modules/k6/experimental/websockets/websockets_test.go @@ -16,11 +16,11 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v3" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/lib/testutils/httpmultibin" httpModule "go.k6.io/k6/js/modules/k6/http" "go.k6.io/k6/js/modulestest" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/lib/testutils/httpmultibin" "go.k6.io/k6/metrics" ) diff --git a/js/modules/k6/grpc/client.go b/internal/js/modules/k6/grpc/client.go similarity index 99% rename from js/modules/k6/grpc/client.go rename to internal/js/modules/k6/grpc/client.go index f58ae394e78..20b507829ff 100644 --- a/js/modules/k6/grpc/client.go +++ b/internal/js/modules/k6/grpc/client.go @@ -11,9 +11,9 @@ import ( "strings" "time" + "go.k6.io/k6/internal/lib/netext/grpcext" "go.k6.io/k6/js/common" "go.k6.io/k6/js/modules" - "go.k6.io/k6/lib/netext/grpcext" "github.com/grafana/sobek" "github.com/jhump/protoreflect/desc" //nolint:staticcheck // FIXME: #4035 diff --git a/js/modules/k6/grpc/client_test.go b/internal/js/modules/k6/grpc/client_test.go similarity index 99% rename from js/modules/k6/grpc/client_test.go rename to internal/js/modules/k6/grpc/client_test.go index 26effd7a2fd..e9dd8c864dc 100644 --- a/js/modules/k6/grpc/client_test.go +++ b/internal/js/modules/k6/grpc/client_test.go @@ -10,12 +10,12 @@ import ( "strings" "testing" - k6grpc "go.k6.io/k6/js/modules/k6/grpc" - "go.k6.io/k6/lib/netext/grpcext" - "go.k6.io/k6/lib/testutils/httpmultibin" - grpcanytesting "go.k6.io/k6/lib/testutils/httpmultibin/grpc_any_testing" - "go.k6.io/k6/lib/testutils/httpmultibin/grpc_testing" - "go.k6.io/k6/lib/testutils/httpmultibin/grpc_wrappers_testing" + k6grpc "go.k6.io/k6/internal/js/modules/k6/grpc" + "go.k6.io/k6/internal/lib/netext/grpcext" + "go.k6.io/k6/internal/lib/testutils/httpmultibin" + grpcanytesting "go.k6.io/k6/internal/lib/testutils/httpmultibin/grpc_any_testing" + "go.k6.io/k6/internal/lib/testutils/httpmultibin/grpc_testing" + "go.k6.io/k6/internal/lib/testutils/httpmultibin/grpc_wrappers_testing" "go.k6.io/k6/metrics" "google.golang.org/grpc" diff --git a/js/modules/k6/grpc/grpc.go b/internal/js/modules/k6/grpc/grpc.go similarity index 100% rename from js/modules/k6/grpc/grpc.go rename to internal/js/modules/k6/grpc/grpc.go diff --git a/js/modules/k6/grpc/helpers_test.go b/internal/js/modules/k6/grpc/helpers_test.go similarity index 100% rename from js/modules/k6/grpc/helpers_test.go rename to internal/js/modules/k6/grpc/helpers_test.go diff --git a/js/modules/k6/grpc/listeners.go b/internal/js/modules/k6/grpc/listeners.go similarity index 100% rename from js/modules/k6/grpc/listeners.go rename to internal/js/modules/k6/grpc/listeners.go diff --git a/js/modules/k6/grpc/metrics.go b/internal/js/modules/k6/grpc/metrics.go similarity index 100% rename from js/modules/k6/grpc/metrics.go rename to internal/js/modules/k6/grpc/metrics.go diff --git a/js/modules/k6/grpc/params.go b/internal/js/modules/k6/grpc/params.go similarity index 100% rename from js/modules/k6/grpc/params.go rename to internal/js/modules/k6/grpc/params.go diff --git a/js/modules/k6/grpc/params_test.go b/internal/js/modules/k6/grpc/params_test.go similarity index 100% rename from js/modules/k6/grpc/params_test.go rename to internal/js/modules/k6/grpc/params_test.go diff --git a/js/modules/k6/grpc/stream.go b/internal/js/modules/k6/grpc/stream.go similarity index 99% rename from js/modules/k6/grpc/stream.go rename to internal/js/modules/k6/grpc/stream.go index 029588b5df9..12f0217d0fb 100644 --- a/js/modules/k6/grpc/stream.go +++ b/internal/js/modules/k6/grpc/stream.go @@ -9,9 +9,9 @@ import ( "sync" "time" + "go.k6.io/k6/internal/lib/netext/grpcext" "go.k6.io/k6/js/common" "go.k6.io/k6/js/modules" - "go.k6.io/k6/lib/netext/grpcext" "go.k6.io/k6/metrics" "github.com/grafana/sobek" diff --git a/js/modules/k6/grpc/stream_test.go b/internal/js/modules/k6/grpc/stream_test.go similarity index 99% rename from js/modules/k6/grpc/stream_test.go rename to internal/js/modules/k6/grpc/stream_test.go index 715aa850ab4..825c722d36d 100644 --- a/js/modules/k6/grpc/stream_test.go +++ b/internal/js/modules/k6/grpc/stream_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - "go.k6.io/k6/lib/testutils/grpcservice" - "go.k6.io/k6/lib/testutils/httpmultibin/grpc_wrappers_testing" + "go.k6.io/k6/internal/lib/testutils/grpcservice" + "go.k6.io/k6/internal/lib/testutils/httpmultibin/grpc_wrappers_testing" "go.k6.io/k6/metrics" "github.com/golang/protobuf/ptypes/wrappers" diff --git a/js/modules/k6/grpc/teststate_test.go b/internal/js/modules/k6/grpc/teststate_test.go similarity index 96% rename from js/modules/k6/grpc/teststate_test.go rename to internal/js/modules/k6/grpc/teststate_test.go index e14de530926..830eef515a4 100644 --- a/js/modules/k6/grpc/teststate_test.go +++ b/internal/js/modules/k6/grpc/teststate_test.go @@ -11,15 +11,15 @@ import ( "github.com/grafana/sobek" "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/lib/testutils/httpmultibin" "go.k6.io/k6/js/modulestest" "go.k6.io/k6/lib" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/lib/testutils/httpmultibin" "go.k6.io/k6/metrics" "gopkg.in/guregu/null.v3" - xk6grpc "go.k6.io/k6/js/modules/k6/grpc" + xk6grpc "go.k6.io/k6/internal/js/modules/k6/grpc" ) const isWindows = runtime.GOOS == "windows" diff --git a/js/modules/k6/html/gen/gen_elements.go b/internal/js/modules/k6/html/gen/gen_elements.go similarity index 100% rename from js/modules/k6/html/gen/gen_elements.go rename to internal/js/modules/k6/html/gen/gen_elements.go diff --git a/js/modules/k6/metrics/metrics.go b/internal/js/modules/k6/metrics/metrics.go similarity index 100% rename from js/modules/k6/metrics/metrics.go rename to internal/js/modules/k6/metrics/metrics.go diff --git a/js/modules/k6/metrics/metrics_test.go b/internal/js/modules/k6/metrics/metrics_test.go similarity index 99% rename from js/modules/k6/metrics/metrics_test.go rename to internal/js/modules/k6/metrics/metrics_test.go index 4ec6b2cef20..a47efab47a9 100644 --- a/js/modules/k6/metrics/metrics_test.go +++ b/internal/js/modules/k6/metrics/metrics_test.go @@ -11,10 +11,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/js/common" "go.k6.io/k6/js/modulestest" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" "go.k6.io/k6/metrics" ) diff --git a/js/modules/k6/timers/timers.go b/internal/js/modules/k6/timers/timers.go similarity index 100% rename from js/modules/k6/timers/timers.go rename to internal/js/modules/k6/timers/timers.go diff --git a/js/modules/k6/timers/timers_test.go b/internal/js/modules/k6/timers/timers_test.go similarity index 99% rename from js/modules/k6/timers/timers_test.go rename to internal/js/modules/k6/timers/timers_test.go index 3cd1ad1c334..98c3b11483a 100644 --- a/js/modules/k6/timers/timers_test.go +++ b/internal/js/modules/k6/timers/timers_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/stretchr/testify/require" - "go.k6.io/k6/js/modules/k6/timers" + "go.k6.io/k6/internal/js/modules/k6/timers" "go.k6.io/k6/js/modulestest" ) diff --git a/js/modules/k6/webcrypto/aes.go b/internal/js/modules/k6/webcrypto/aes.go similarity index 100% rename from js/modules/k6/webcrypto/aes.go rename to internal/js/modules/k6/webcrypto/aes.go diff --git a/js/modules/k6/webcrypto/algorithm.go b/internal/js/modules/k6/webcrypto/algorithm.go similarity index 100% rename from js/modules/k6/webcrypto/algorithm.go rename to internal/js/modules/k6/webcrypto/algorithm.go diff --git a/js/modules/k6/webcrypto/base64.go b/internal/js/modules/k6/webcrypto/base64.go similarity index 100% rename from js/modules/k6/webcrypto/base64.go rename to internal/js/modules/k6/webcrypto/base64.go diff --git a/js/modules/k6/webcrypto/bits.go b/internal/js/modules/k6/webcrypto/bits.go similarity index 100% rename from js/modules/k6/webcrypto/bits.go rename to internal/js/modules/k6/webcrypto/bits.go diff --git a/js/modules/k6/webcrypto/cmd_run_test.go b/internal/js/modules/k6/webcrypto/cmd_run_test.go similarity index 96% rename from js/modules/k6/webcrypto/cmd_run_test.go rename to internal/js/modules/k6/webcrypto/cmd_run_test.go index 76e1a2f15de..3ee0692fd2f 100644 --- a/js/modules/k6/webcrypto/cmd_run_test.go +++ b/internal/js/modules/k6/webcrypto/cmd_run_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/cmd" - k6Tests "go.k6.io/k6/cmd/tests" "go.k6.io/k6/errext/exitcodes" + "go.k6.io/k6/internal/cmd" + k6Tests "go.k6.io/k6/internal/cmd/tests" "go.k6.io/k6/lib/fsext" ) @@ -51,7 +51,7 @@ func TestExamplesInputOutput(t *testing.T) { "level=error", // no error messages } - const examplesDir = "../../../../examples/webcrypto" + const examplesDir = "../../../../../examples/webcrypto" // List of the directories containing the examples // that we should run and check that they produce the expected output diff --git a/js/modules/k6/webcrypto/crypto.go b/internal/js/modules/k6/webcrypto/crypto.go similarity index 100% rename from js/modules/k6/webcrypto/crypto.go rename to internal/js/modules/k6/webcrypto/crypto.go diff --git a/js/modules/k6/webcrypto/elliptic_curve.go b/internal/js/modules/k6/webcrypto/elliptic_curve.go similarity index 100% rename from js/modules/k6/webcrypto/elliptic_curve.go rename to internal/js/modules/k6/webcrypto/elliptic_curve.go diff --git a/js/modules/k6/webcrypto/encryption.go b/internal/js/modules/k6/webcrypto/encryption.go similarity index 100% rename from js/modules/k6/webcrypto/encryption.go rename to internal/js/modules/k6/webcrypto/encryption.go diff --git a/js/modules/k6/webcrypto/errors.go b/internal/js/modules/k6/webcrypto/errors.go similarity index 100% rename from js/modules/k6/webcrypto/errors.go rename to internal/js/modules/k6/webcrypto/errors.go diff --git a/js/modules/k6/webcrypto/hash.go b/internal/js/modules/k6/webcrypto/hash.go similarity index 100% rename from js/modules/k6/webcrypto/hash.go rename to internal/js/modules/k6/webcrypto/hash.go diff --git a/js/modules/k6/webcrypto/hmac.go b/internal/js/modules/k6/webcrypto/hmac.go similarity index 100% rename from js/modules/k6/webcrypto/hmac.go rename to internal/js/modules/k6/webcrypto/hmac.go diff --git a/js/modules/k6/webcrypto/jwk.go b/internal/js/modules/k6/webcrypto/jwk.go similarity index 100% rename from js/modules/k6/webcrypto/jwk.go rename to internal/js/modules/k6/webcrypto/jwk.go diff --git a/js/modules/k6/webcrypto/key.go b/internal/js/modules/k6/webcrypto/key.go similarity index 100% rename from js/modules/k6/webcrypto/key.go rename to internal/js/modules/k6/webcrypto/key.go diff --git a/js/modules/k6/webcrypto/module.go b/internal/js/modules/k6/webcrypto/module.go similarity index 100% rename from js/modules/k6/webcrypto/module.go rename to internal/js/modules/k6/webcrypto/module.go diff --git a/js/modules/k6/webcrypto/params.go b/internal/js/modules/k6/webcrypto/params.go similarity index 100% rename from js/modules/k6/webcrypto/params.go rename to internal/js/modules/k6/webcrypto/params.go diff --git a/js/modules/k6/webcrypto/rsa.go b/internal/js/modules/k6/webcrypto/rsa.go similarity index 100% rename from js/modules/k6/webcrypto/rsa.go rename to internal/js/modules/k6/webcrypto/rsa.go diff --git a/js/modules/k6/webcrypto/signer.go b/internal/js/modules/k6/webcrypto/signer.go similarity index 100% rename from js/modules/k6/webcrypto/signer.go rename to internal/js/modules/k6/webcrypto/signer.go diff --git a/js/modules/k6/webcrypto/sobek.go b/internal/js/modules/k6/webcrypto/sobek.go similarity index 100% rename from js/modules/k6/webcrypto/sobek.go rename to internal/js/modules/k6/webcrypto/sobek.go diff --git a/js/modules/k6/webcrypto/sobek_test.go b/internal/js/modules/k6/webcrypto/sobek_test.go similarity index 100% rename from js/modules/k6/webcrypto/sobek_test.go rename to internal/js/modules/k6/webcrypto/sobek_test.go diff --git a/js/modules/k6/webcrypto/subtle_crypto.go b/internal/js/modules/k6/webcrypto/subtle_crypto.go similarity index 100% rename from js/modules/k6/webcrypto/subtle_crypto.go rename to internal/js/modules/k6/webcrypto/subtle_crypto.go diff --git a/js/modules/k6/webcrypto/types.go b/internal/js/modules/k6/webcrypto/types.go similarity index 100% rename from js/modules/k6/webcrypto/types.go rename to internal/js/modules/k6/webcrypto/types.go diff --git a/js/modules/k6/ws/ws.go b/internal/js/modules/k6/ws/ws.go similarity index 100% rename from js/modules/k6/ws/ws.go rename to internal/js/modules/k6/ws/ws.go diff --git a/js/modules/k6/ws/ws_test.go b/internal/js/modules/k6/ws/ws_test.go similarity index 99% rename from js/modules/k6/ws/ws_test.go rename to internal/js/modules/k6/ws/ws_test.go index c81425be758..412b1244dd0 100644 --- a/js/modules/k6/ws/ws_test.go +++ b/internal/js/modules/k6/ws/ws_test.go @@ -18,11 +18,11 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v3" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/lib/testutils/httpmultibin" httpModule "go.k6.io/k6/js/modules/k6/http" "go.k6.io/k6/js/modulestest" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/lib/testutils/httpmultibin" "go.k6.io/k6/metrics" ) diff --git a/js/modules_vu.go b/internal/js/modules_vu.go similarity index 92% rename from js/modules_vu.go rename to internal/js/modules_vu.go index 8db0da82d45..6c35f6f2c7e 100644 --- a/js/modules_vu.go +++ b/internal/js/modules_vu.go @@ -4,9 +4,9 @@ import ( "context" "github.com/grafana/sobek" - "go.k6.io/k6/event" + "go.k6.io/k6/internal/event" + "go.k6.io/k6/internal/js/eventloop" "go.k6.io/k6/js/common" - "go.k6.io/k6/js/eventloop" "go.k6.io/k6/lib" ) diff --git a/js/path_resolution_test.go b/internal/js/path_resolution_test.go similarity index 99% rename from js/path_resolution_test.go rename to internal/js/path_resolution_test.go index 257e35e2c13..f9bd96203ea 100644 --- a/js/path_resolution_test.go +++ b/internal/js/path_resolution_test.go @@ -8,8 +8,8 @@ import ( "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" ) // This whole file is about tests around https://github.com/grafana/k6/issues/2674 diff --git a/js/runner.go b/internal/js/runner.go similarity index 99% rename from js/runner.go rename to internal/js/runner.go index c7187cb3e78..c5b28ae9548 100644 --- a/js/runner.go +++ b/internal/js/runner.go @@ -23,15 +23,15 @@ import ( "go.k6.io/k6/errext" "go.k6.io/k6/errext/exitcodes" - "go.k6.io/k6/event" + "go.k6.io/k6/internal/event" + "go.k6.io/k6/internal/js/eventloop" + "go.k6.io/k6/internal/loader" "go.k6.io/k6/js/common" - "go.k6.io/k6/js/eventloop" "go.k6.io/k6/lib" "go.k6.io/k6/lib/consts" "go.k6.io/k6/lib/fsext" "go.k6.io/k6/lib/netext" "go.k6.io/k6/lib/types" - "go.k6.io/k6/loader" "go.k6.io/k6/metrics" ) diff --git a/js/runner_test.go b/internal/js/runner_test.go similarity index 99% rename from js/runner_test.go rename to internal/js/runner_test.go index d82bbd57333..898382607d8 100644 --- a/js/runner_test.go +++ b/internal/js/runner_test.go @@ -33,19 +33,19 @@ import ( "gopkg.in/guregu/null.v3" "go.k6.io/k6/errext" - "go.k6.io/k6/execution" - "go.k6.io/k6/execution/local" + "go.k6.io/k6/internal/execution" + "go.k6.io/k6/internal/execution/local" + k6metrics "go.k6.io/k6/internal/js/modules/k6/metrics" + "go.k6.io/k6/internal/js/modules/k6/ws" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/lib/testutils/httpmultibin" + "go.k6.io/k6/internal/lib/testutils/httpmultibin/grpc_testing" + "go.k6.io/k6/internal/lib/testutils/mockoutput" "go.k6.io/k6/js/modules/k6" k6http "go.k6.io/k6/js/modules/k6/http" - k6metrics "go.k6.io/k6/js/modules/k6/metrics" - "go.k6.io/k6/js/modules/k6/ws" "go.k6.io/k6/lib" _ "go.k6.io/k6/lib/executor" // TODO: figure out something better "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/lib/testutils/httpmultibin" - "go.k6.io/k6/lib/testutils/httpmultibin/grpc_testing" - "go.k6.io/k6/lib/testutils/mockoutput" "go.k6.io/k6/lib/types" "go.k6.io/k6/metrics" "go.k6.io/k6/output" diff --git a/js/share_test.go b/internal/js/share_test.go similarity index 98% rename from js/share_test.go rename to internal/js/share_test.go index 2ecbb6f5532..8df9316762e 100644 --- a/js/share_test.go +++ b/internal/js/share_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" "go.k6.io/k6/metrics" ) diff --git a/js/summary-wrapper.js b/internal/js/summary-wrapper.js similarity index 100% rename from js/summary-wrapper.js rename to internal/js/summary-wrapper.js diff --git a/js/summary.go b/internal/js/summary.go similarity index 100% rename from js/summary.go rename to internal/js/summary.go diff --git a/js/summary.js b/internal/js/summary.js similarity index 100% rename from js/summary.js rename to internal/js/summary.js diff --git a/js/summary_test.go b/internal/js/summary_test.go similarity index 99% rename from js/summary_test.go rename to internal/js/summary_test.go index 091028c73cd..2a2da6c508f 100644 --- a/js/summary_test.go +++ b/internal/js/summary_test.go @@ -13,8 +13,8 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v3" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" "go.k6.io/k6/metrics" ) diff --git a/js/tc39/README.md b/internal/js/tc39/README.md similarity index 100% rename from js/tc39/README.md rename to internal/js/tc39/README.md diff --git a/js/tc39/breaking_test_errors-experimental_enhanced.json b/internal/js/tc39/breaking_test_errors-experimental_enhanced.json similarity index 100% rename from js/tc39/breaking_test_errors-experimental_enhanced.json rename to internal/js/tc39/breaking_test_errors-experimental_enhanced.json diff --git a/js/tc39/breaking_test_errors-extended.json b/internal/js/tc39/breaking_test_errors-extended.json similarity index 100% rename from js/tc39/breaking_test_errors-extended.json rename to internal/js/tc39/breaking_test_errors-extended.json diff --git a/js/tc39/checkout.sh b/internal/js/tc39/checkout.sh similarity index 100% rename from js/tc39/checkout.sh rename to internal/js/tc39/checkout.sh diff --git a/js/tc39/tc39_norace_test.go b/internal/js/tc39/tc39_norace_test.go similarity index 100% rename from js/tc39/tc39_norace_test.go rename to internal/js/tc39/tc39_norace_test.go diff --git a/js/tc39/tc39_race_test.go b/internal/js/tc39/tc39_race_test.go similarity index 100% rename from js/tc39/tc39_race_test.go rename to internal/js/tc39/tc39_race_test.go diff --git a/js/tc39/tc39_test.go b/internal/js/tc39/tc39_test.go similarity index 99% rename from js/tc39/tc39_test.go rename to internal/js/tc39/tc39_test.go index 9098de9d3cc..314298b198f 100644 --- a/js/tc39/tc39_test.go +++ b/internal/js/tc39/tc39_test.go @@ -26,13 +26,13 @@ import ( "github.com/stretchr/testify/assert" "gopkg.in/yaml.v3" - "go.k6.io/k6/js/compiler" + "go.k6.io/k6/internal/js/compiler" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/loader" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/js/modules" "go.k6.io/k6/js/modulestest" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/loader" - "go.k6.io/k6/usage" ) const ( diff --git a/js/timeout_error.go b/internal/js/timeout_error.go similarity index 100% rename from js/timeout_error.go rename to internal/js/timeout_error.go diff --git a/js/timeout_error_test.go b/internal/js/timeout_error_test.go similarity index 100% rename from js/timeout_error_test.go rename to internal/js/timeout_error_test.go diff --git a/lib/netext/grpcext/conn.go b/internal/lib/netext/grpcext/conn.go similarity index 100% rename from lib/netext/grpcext/conn.go rename to internal/lib/netext/grpcext/conn.go diff --git a/lib/netext/grpcext/conn_test.go b/internal/lib/netext/grpcext/conn_test.go similarity index 100% rename from lib/netext/grpcext/conn_test.go rename to internal/lib/netext/grpcext/conn_test.go diff --git a/lib/netext/grpcext/reflect.go b/internal/lib/netext/grpcext/reflect.go similarity index 100% rename from lib/netext/grpcext/reflect.go rename to internal/lib/netext/grpcext/reflect.go diff --git a/lib/netext/grpcext/stream.go b/internal/lib/netext/grpcext/stream.go similarity index 100% rename from lib/netext/grpcext/stream.go rename to internal/lib/netext/grpcext/stream.go diff --git a/lib/strvals/doc.go b/internal/lib/strvals/doc.go similarity index 100% rename from lib/strvals/doc.go rename to internal/lib/strvals/doc.go diff --git a/lib/strvals/parser.go b/internal/lib/strvals/parser.go similarity index 100% rename from lib/strvals/parser.go rename to internal/lib/strvals/parser.go diff --git a/lib/strvals/parser_test.go b/internal/lib/strvals/parser_test.go similarity index 100% rename from lib/strvals/parser_test.go rename to internal/lib/strvals/parser_test.go diff --git a/lib/testutils/fs.go b/internal/lib/testutils/fs.go similarity index 100% rename from lib/testutils/fs.go rename to internal/lib/testutils/fs.go diff --git a/lib/testutils/grpcservice/route_guide.pb.go b/internal/lib/testutils/grpcservice/route_guide.pb.go similarity index 100% rename from lib/testutils/grpcservice/route_guide.pb.go rename to internal/lib/testutils/grpcservice/route_guide.pb.go diff --git a/lib/testutils/grpcservice/route_guide.proto b/internal/lib/testutils/grpcservice/route_guide.proto similarity index 100% rename from lib/testutils/grpcservice/route_guide.proto rename to internal/lib/testutils/grpcservice/route_guide.proto diff --git a/lib/testutils/grpcservice/route_guide_grpc.pb.go b/internal/lib/testutils/grpcservice/route_guide_grpc.pb.go similarity index 100% rename from lib/testutils/grpcservice/route_guide_grpc.pb.go rename to internal/lib/testutils/grpcservice/route_guide_grpc.pb.go diff --git a/lib/testutils/grpcservice/service.go b/internal/lib/testutils/grpcservice/service.go similarity index 100% rename from lib/testutils/grpcservice/service.go rename to internal/lib/testutils/grpcservice/service.go diff --git a/lib/testutils/httpmultibin/grpc_any_testing/any_test.pb.go b/internal/lib/testutils/httpmultibin/grpc_any_testing/any_test.pb.go similarity index 100% rename from lib/testutils/httpmultibin/grpc_any_testing/any_test.pb.go rename to internal/lib/testutils/httpmultibin/grpc_any_testing/any_test.pb.go diff --git a/lib/testutils/httpmultibin/grpc_any_testing/any_test.proto b/internal/lib/testutils/httpmultibin/grpc_any_testing/any_test.proto similarity index 100% rename from lib/testutils/httpmultibin/grpc_any_testing/any_test.proto rename to internal/lib/testutils/httpmultibin/grpc_any_testing/any_test.proto diff --git a/lib/testutils/httpmultibin/grpc_protoset_testing/test.protoset b/internal/lib/testutils/httpmultibin/grpc_protoset_testing/test.protoset similarity index 100% rename from lib/testutils/httpmultibin/grpc_protoset_testing/test.protoset rename to internal/lib/testutils/httpmultibin/grpc_protoset_testing/test.protoset diff --git a/lib/testutils/httpmultibin/grpc_protoset_testing/test_message.proto b/internal/lib/testutils/httpmultibin/grpc_protoset_testing/test_message.proto similarity index 100% rename from lib/testutils/httpmultibin/grpc_protoset_testing/test_message.proto rename to internal/lib/testutils/httpmultibin/grpc_protoset_testing/test_message.proto diff --git a/lib/testutils/httpmultibin/grpc_protoset_testing/test_service.proto b/internal/lib/testutils/httpmultibin/grpc_protoset_testing/test_service.proto similarity index 100% rename from lib/testutils/httpmultibin/grpc_protoset_testing/test_service.proto rename to internal/lib/testutils/httpmultibin/grpc_protoset_testing/test_service.proto diff --git a/lib/testutils/httpmultibin/grpc_testing/nested_types.proto b/internal/lib/testutils/httpmultibin/grpc_testing/nested_types.proto similarity index 100% rename from lib/testutils/httpmultibin/grpc_testing/nested_types.proto rename to internal/lib/testutils/httpmultibin/grpc_testing/nested_types.proto diff --git a/lib/testutils/httpmultibin/grpc_testing/test.pb.go b/internal/lib/testutils/httpmultibin/grpc_testing/test.pb.go similarity index 100% rename from lib/testutils/httpmultibin/grpc_testing/test.pb.go rename to internal/lib/testutils/httpmultibin/grpc_testing/test.pb.go diff --git a/lib/testutils/httpmultibin/grpc_testing/test.proto b/internal/lib/testutils/httpmultibin/grpc_testing/test.proto similarity index 100% rename from lib/testutils/httpmultibin/grpc_testing/test.proto rename to internal/lib/testutils/httpmultibin/grpc_testing/test.proto diff --git a/lib/testutils/httpmultibin/grpc_testing/test_grpc.pb.go b/internal/lib/testutils/httpmultibin/grpc_testing/test_grpc.pb.go similarity index 100% rename from lib/testutils/httpmultibin/grpc_testing/test_grpc.pb.go rename to internal/lib/testutils/httpmultibin/grpc_testing/test_grpc.pb.go diff --git a/lib/testutils/httpmultibin/grpc_wrappers_testing/service.go b/internal/lib/testutils/httpmultibin/grpc_wrappers_testing/service.go similarity index 100% rename from lib/testutils/httpmultibin/grpc_wrappers_testing/service.go rename to internal/lib/testutils/httpmultibin/grpc_wrappers_testing/service.go diff --git a/lib/testutils/httpmultibin/grpc_wrappers_testing/test.pb.go b/internal/lib/testutils/httpmultibin/grpc_wrappers_testing/test.pb.go similarity index 100% rename from lib/testutils/httpmultibin/grpc_wrappers_testing/test.pb.go rename to internal/lib/testutils/httpmultibin/grpc_wrappers_testing/test.pb.go diff --git a/lib/testutils/httpmultibin/grpc_wrappers_testing/test.proto b/internal/lib/testutils/httpmultibin/grpc_wrappers_testing/test.proto similarity index 100% rename from lib/testutils/httpmultibin/grpc_wrappers_testing/test.proto rename to internal/lib/testutils/httpmultibin/grpc_wrappers_testing/test.proto diff --git a/lib/testutils/httpmultibin/grpc_wrappers_testing/test_grpc.pb.go b/internal/lib/testutils/httpmultibin/grpc_wrappers_testing/test_grpc.pb.go similarity index 100% rename from lib/testutils/httpmultibin/grpc_wrappers_testing/test_grpc.pb.go rename to internal/lib/testutils/httpmultibin/grpc_wrappers_testing/test_grpc.pb.go diff --git a/lib/testutils/httpmultibin/httpmultibin.go b/internal/lib/testutils/httpmultibin/httpmultibin.go similarity index 98% rename from lib/testutils/httpmultibin/httpmultibin.go rename to internal/lib/testutils/httpmultibin/httpmultibin.go index 36e4ad37387..80a38089747 100644 --- a/lib/testutils/httpmultibin/httpmultibin.go +++ b/internal/lib/testutils/httpmultibin/httpmultibin.go @@ -27,9 +27,9 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + grpcanytesting "go.k6.io/k6/internal/lib/testutils/httpmultibin/grpc_any_testing" + grpctest "go.k6.io/k6/internal/lib/testutils/httpmultibin/grpc_testing" "go.k6.io/k6/lib/netext" - grpcanytesting "go.k6.io/k6/lib/testutils/httpmultibin/grpc_any_testing" - grpctest "go.k6.io/k6/lib/testutils/httpmultibin/grpc_testing" "go.k6.io/k6/lib/types" ) diff --git a/lib/testutils/httpmultibin/nested_types/nested_types.proto b/internal/lib/testutils/httpmultibin/nested_types/nested_types.proto similarity index 100% rename from lib/testutils/httpmultibin/nested_types/nested_types.proto rename to internal/lib/testutils/httpmultibin/nested_types/nested_types.proto diff --git a/lib/testutils/logrus_hook.go b/internal/lib/testutils/logrus_hook.go similarity index 100% rename from lib/testutils/logrus_hook.go rename to internal/lib/testutils/logrus_hook.go diff --git a/lib/testutils/minirunner/minirunner.go b/internal/lib/testutils/minirunner/minirunner.go similarity index 100% rename from lib/testutils/minirunner/minirunner.go rename to internal/lib/testutils/minirunner/minirunner.go diff --git a/lib/testutils/mockoutput/mockoutput.go b/internal/lib/testutils/mockoutput/mockoutput.go similarity index 100% rename from lib/testutils/mockoutput/mockoutput.go rename to internal/lib/testutils/mockoutput/mockoutput.go diff --git a/lib/testutils/mockresolver/resolver.go b/internal/lib/testutils/mockresolver/resolver.go similarity index 100% rename from lib/testutils/mockresolver/resolver.go rename to internal/lib/testutils/mockresolver/resolver.go diff --git a/lib/testutils/test_output.go b/internal/lib/testutils/test_output.go similarity index 100% rename from lib/testutils/test_output.go rename to internal/lib/testutils/test_output.go diff --git a/lib/testutils/untar.go b/internal/lib/testutils/untar.go similarity index 100% rename from lib/testutils/untar.go rename to internal/lib/testutils/untar.go diff --git a/lib/trace/doc.go b/internal/lib/trace/doc.go similarity index 100% rename from lib/trace/doc.go rename to internal/lib/trace/doc.go diff --git a/lib/trace/otel.go b/internal/lib/trace/otel.go similarity index 99% rename from lib/trace/otel.go rename to internal/lib/trace/otel.go index 447592236c0..e7040765449 100644 --- a/lib/trace/otel.go +++ b/internal/lib/trace/otel.go @@ -17,7 +17,7 @@ import ( "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/otel/trace/noop" - "go.k6.io/k6/lib/strvals" + "go.k6.io/k6/internal/lib/strvals" ) const serviceName = "k6" diff --git a/lib/trace/otel_test.go b/internal/lib/trace/otel_test.go similarity index 100% rename from lib/trace/otel_test.go rename to internal/lib/trace/otel_test.go diff --git a/loader/filesystems.go b/internal/loader/filesystems.go similarity index 100% rename from loader/filesystems.go rename to internal/loader/filesystems.go diff --git a/loader/loader.go b/internal/loader/loader.go similarity index 100% rename from loader/loader.go rename to internal/loader/loader.go diff --git a/loader/loader_test.go b/internal/loader/loader_test.go similarity index 98% rename from loader/loader_test.go rename to internal/loader/loader_test.go index 8c626c3eec2..48ecdbd869f 100644 --- a/loader/loader_test.go +++ b/internal/loader/loader_test.go @@ -11,10 +11,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/lib/testutils/httpmultibin" + "go.k6.io/k6/internal/loader" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/lib/testutils/httpmultibin" - "go.k6.io/k6/loader" ) func TestDir(t *testing.T) { diff --git a/loader/readsource.go b/internal/loader/readsource.go similarity index 100% rename from loader/readsource.go rename to internal/loader/readsource.go diff --git a/loader/readsource_test.go b/internal/loader/readsource_test.go similarity index 99% rename from loader/readsource_test.go rename to internal/loader/readsource_test.go index 8382cda1a6a..00eca176d97 100644 --- a/loader/readsource_test.go +++ b/internal/loader/readsource_test.go @@ -10,8 +10,8 @@ import ( "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" ) type errorReader string diff --git a/log/file.go b/internal/log/file.go similarity index 99% rename from log/file.go rename to internal/log/file.go index 626423df683..e4ea1f99cc4 100644 --- a/log/file.go +++ b/internal/log/file.go @@ -12,8 +12,8 @@ import ( "syscall" "github.com/sirupsen/logrus" + "go.k6.io/k6/internal/lib/strvals" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/strvals" ) // fileHookBufferSize is a default size for the fileHook's loglines channel. diff --git a/log/file_test.go b/internal/log/file_test.go similarity index 100% rename from log/file_test.go rename to internal/log/file_test.go diff --git a/log/levels.go b/internal/log/levels.go similarity index 100% rename from log/levels.go rename to internal/log/levels.go diff --git a/log/levels_test.go b/internal/log/levels_test.go similarity index 100% rename from log/levels_test.go rename to internal/log/levels_test.go diff --git a/log/log.go b/internal/log/log.go similarity index 100% rename from log/log.go rename to internal/log/log.go diff --git a/log/loki.go b/internal/log/loki.go similarity index 99% rename from log/loki.go rename to internal/log/loki.go index 2a3c9bc1fed..9810d685dfa 100644 --- a/log/loki.go +++ b/internal/log/loki.go @@ -13,7 +13,7 @@ import ( "time" "github.com/sirupsen/logrus" - "go.k6.io/k6/lib/strvals" + "go.k6.io/k6/internal/lib/strvals" ) // lokiHook is a Logrus hook for flushing to Loki. diff --git a/log/loki_test.go b/internal/log/loki_test.go similarity index 100% rename from log/loki_test.go rename to internal/log/loki_test.go diff --git a/metrics/engine/engine.go b/internal/metrics/engine/engine.go similarity index 100% rename from metrics/engine/engine.go rename to internal/metrics/engine/engine.go diff --git a/metrics/engine/engine_test.go b/internal/metrics/engine/engine_test.go similarity index 99% rename from metrics/engine/engine_test.go rename to internal/metrics/engine/engine_test.go index a941b4671b8..49c4c09b8da 100644 --- a/metrics/engine/engine_test.go +++ b/internal/metrics/engine/engine_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" "go.k6.io/k6/metrics" ) diff --git a/metrics/engine/ingester.go b/internal/metrics/engine/ingester.go similarity index 100% rename from metrics/engine/ingester.go rename to internal/metrics/engine/ingester.go diff --git a/metrics/engine/ingester_test.go b/internal/metrics/engine/ingester_test.go similarity index 99% rename from metrics/engine/ingester_test.go rename to internal/metrics/engine/ingester_test.go index a6466ffee2f..6e9537a9a04 100644 --- a/metrics/engine/ingester_test.go +++ b/internal/metrics/engine/ingester_test.go @@ -7,8 +7,8 @@ import ( "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" "go.k6.io/k6/metrics" ) diff --git a/output/cloud/expv2/integration/integration_test.go b/internal/output/cloud/expv2/integration/integration_test.go similarity index 98% rename from output/cloud/expv2/integration/integration_test.go rename to internal/output/cloud/expv2/integration/integration_test.go index 2d38810f3b1..feca672fcfc 100644 --- a/output/cloud/expv2/integration/integration_test.go +++ b/internal/output/cloud/expv2/integration/integration_test.go @@ -14,11 +14,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.k6.io/k6/cloudapi" - "go.k6.io/k6/lib/testutils" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/output/cloud/expv2/pbcloud" "go.k6.io/k6/lib/types" "go.k6.io/k6/metrics" "go.k6.io/k6/output/cloud/expv2" - "go.k6.io/k6/output/cloud/expv2/pbcloud" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" "gopkg.in/guregu/null.v3" diff --git a/output/cloud/expv2/integration/testdata/metricset.json b/internal/output/cloud/expv2/integration/testdata/metricset.json similarity index 100% rename from output/cloud/expv2/integration/testdata/metricset.json rename to internal/output/cloud/expv2/integration/testdata/metricset.json diff --git a/output/cloud/expv2/pbcloud/gen.go b/internal/output/cloud/expv2/pbcloud/gen.go similarity index 100% rename from output/cloud/expv2/pbcloud/gen.go rename to internal/output/cloud/expv2/pbcloud/gen.go diff --git a/output/cloud/expv2/pbcloud/metric.pb.go b/internal/output/cloud/expv2/pbcloud/metric.pb.go similarity index 100% rename from output/cloud/expv2/pbcloud/metric.pb.go rename to internal/output/cloud/expv2/pbcloud/metric.pb.go diff --git a/output/cloud/expv2/pbcloud/metric.proto b/internal/output/cloud/expv2/pbcloud/metric.proto similarity index 100% rename from output/cloud/expv2/pbcloud/metric.proto rename to internal/output/cloud/expv2/pbcloud/metric.proto diff --git a/output/cloud/insights/collect.go b/internal/output/cloud/insights/collect.go similarity index 98% rename from output/cloud/insights/collect.go rename to internal/output/cloud/insights/collect.go index 53e1724f26c..66d8aa271b1 100644 --- a/output/cloud/insights/collect.go +++ b/internal/output/cloud/insights/collect.go @@ -4,7 +4,7 @@ import ( "strconv" "sync" - "go.k6.io/k6/cloudapi/insights" + "go.k6.io/k6/internal/cloudapi/insights" "go.k6.io/k6/lib/netext/httpext" "go.k6.io/k6/metrics" ) diff --git a/output/cloud/insights/collect_test.go b/internal/output/cloud/insights/collect_test.go similarity index 99% rename from output/cloud/insights/collect_test.go rename to internal/output/cloud/insights/collect_test.go index 6350dc8eb76..08cf324512f 100644 --- a/output/cloud/insights/collect_test.go +++ b/internal/output/cloud/insights/collect_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - "go.k6.io/k6/cloudapi/insights" + "go.k6.io/k6/internal/cloudapi/insights" "go.k6.io/k6/lib/netext/httpext" "go.k6.io/k6/metrics" ) diff --git a/output/cloud/insights/doc.go b/internal/output/cloud/insights/doc.go similarity index 100% rename from output/cloud/insights/doc.go rename to internal/output/cloud/insights/doc.go diff --git a/output/cloud/insights/enable.go b/internal/output/cloud/insights/enable.go similarity index 100% rename from output/cloud/insights/enable.go rename to internal/output/cloud/insights/enable.go diff --git a/output/cloud/insights/flush.go b/internal/output/cloud/insights/flush.go similarity index 96% rename from output/cloud/insights/flush.go rename to internal/output/cloud/insights/flush.go index 57bb4a0c8cb..449fe5504a8 100644 --- a/output/cloud/insights/flush.go +++ b/internal/output/cloud/insights/flush.go @@ -3,7 +3,7 @@ package insights import ( "context" - "go.k6.io/k6/cloudapi/insights" + "go.k6.io/k6/internal/cloudapi/insights" ) // Client is an interface for sending request metadatas to the Insights API. diff --git a/output/cloud/insights/flush_test.go b/internal/output/cloud/insights/flush_test.go similarity index 98% rename from output/cloud/insights/flush_test.go rename to internal/output/cloud/insights/flush_test.go index 3ee049281c3..f67333bc3aa 100644 --- a/output/cloud/insights/flush_test.go +++ b/internal/output/cloud/insights/flush_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" - "go.k6.io/k6/cloudapi/insights" + "go.k6.io/k6/internal/cloudapi/insights" "go.k6.io/k6/metrics" ) diff --git a/output/cloud/output.go b/internal/output/cloud/output.go similarity index 99% rename from output/cloud/output.go rename to internal/output/cloud/output.go index 1d877d526cf..226e39fc8f7 100644 --- a/output/cloud/output.go +++ b/internal/output/cloud/output.go @@ -13,12 +13,12 @@ import ( "go.k6.io/k6/cloudapi" "go.k6.io/k6/errext" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/lib" "go.k6.io/k6/lib/consts" "go.k6.io/k6/metrics" "go.k6.io/k6/output" cloudv2 "go.k6.io/k6/output/cloud/expv2" - "go.k6.io/k6/usage" ) const ( diff --git a/output/cloud/output_test.go b/internal/output/cloud/output_test.go similarity index 99% rename from output/cloud/output_test.go rename to internal/output/cloud/output_test.go index 578d7b7ee05..e170f85529a 100644 --- a/output/cloud/output_test.go +++ b/internal/output/cloud/output_test.go @@ -14,13 +14,13 @@ import ( "github.com/stretchr/testify/require" "go.k6.io/k6/cloudapi" "go.k6.io/k6/errext" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" "go.k6.io/k6/lib/types" "go.k6.io/k6/metrics" "go.k6.io/k6/output" cloudv2 "go.k6.io/k6/output/cloud/expv2" - "go.k6.io/k6/usage" "gopkg.in/guregu/null.v3" ) diff --git a/output/influxdb/bench_test.go b/internal/output/influxdb/bench_test.go similarity index 100% rename from output/influxdb/bench_test.go rename to internal/output/influxdb/bench_test.go diff --git a/output/influxdb/config.go b/internal/output/influxdb/config.go similarity index 100% rename from output/influxdb/config.go rename to internal/output/influxdb/config.go diff --git a/output/influxdb/config_test.go b/internal/output/influxdb/config_test.go similarity index 100% rename from output/influxdb/config_test.go rename to internal/output/influxdb/config_test.go diff --git a/output/influxdb/output.go b/internal/output/influxdb/output.go similarity index 100% rename from output/influxdb/output.go rename to internal/output/influxdb/output.go diff --git a/output/influxdb/output_test.go b/internal/output/influxdb/output_test.go similarity index 99% rename from output/influxdb/output_test.go rename to internal/output/influxdb/output_test.go index 2aee1177325..7adc0d5f41c 100644 --- a/output/influxdb/output_test.go +++ b/internal/output/influxdb/output_test.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/lib/testutils" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/metrics" "go.k6.io/k6/output" ) diff --git a/output/influxdb/util.go b/internal/output/influxdb/util.go similarity index 100% rename from output/influxdb/util.go rename to internal/output/influxdb/util.go diff --git a/output/influxdb/util_test.go b/internal/output/influxdb/util_test.go similarity index 100% rename from output/influxdb/util_test.go rename to internal/output/influxdb/util_test.go diff --git a/output/json/benchmark_test.go b/internal/output/json/benchmark_test.go similarity index 95% rename from output/json/benchmark_test.go rename to internal/output/json/benchmark_test.go index 1273486a9fe..4ac5a4ce761 100644 --- a/output/json/benchmark_test.go +++ b/internal/output/json/benchmark_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" "go.k6.io/k6/output" ) diff --git a/output/json/json.go b/internal/output/json/json.go similarity index 100% rename from output/json/json.go rename to internal/output/json/json.go diff --git a/output/json/json_easyjson.go b/internal/output/json/json_easyjson.go similarity index 100% rename from output/json/json_easyjson.go rename to internal/output/json/json_easyjson.go diff --git a/output/json/json_test.go b/internal/output/json/json_test.go similarity index 99% rename from output/json/json_test.go rename to internal/output/json/json_test.go index 4f72da27191..02b3695ea6f 100644 --- a/output/json/json_test.go +++ b/internal/output/json/json_test.go @@ -11,8 +11,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" "go.k6.io/k6/metrics" "go.k6.io/k6/output" ) diff --git a/output/json/wrapper.go b/internal/output/json/wrapper.go similarity index 100% rename from output/json/wrapper.go rename to internal/output/json/wrapper.go diff --git a/ui/console/doc.go b/internal/ui/console/doc.go similarity index 100% rename from ui/console/doc.go rename to internal/ui/console/doc.go diff --git a/ui/console/writer.go b/internal/ui/console/writer.go similarity index 100% rename from ui/console/writer.go rename to internal/ui/console/writer.go diff --git a/ui/doc.go b/internal/ui/doc.go similarity index 100% rename from ui/doc.go rename to internal/ui/doc.go diff --git a/ui/form.go b/internal/ui/form.go similarity index 100% rename from ui/form.go rename to internal/ui/form.go diff --git a/ui/form_fields.go b/internal/ui/form_fields.go similarity index 100% rename from ui/form_fields.go rename to internal/ui/form_fields.go diff --git a/ui/form_fields_test.go b/internal/ui/form_fields_test.go similarity index 100% rename from ui/form_fields_test.go rename to internal/ui/form_fields_test.go diff --git a/ui/form_test.go b/internal/ui/form_test.go similarity index 100% rename from ui/form_test.go rename to internal/ui/form_test.go diff --git a/ui/pb/doc.go b/internal/ui/pb/doc.go similarity index 100% rename from ui/pb/doc.go rename to internal/ui/pb/doc.go diff --git a/ui/pb/helpers.go b/internal/ui/pb/helpers.go similarity index 100% rename from ui/pb/helpers.go rename to internal/ui/pb/helpers.go diff --git a/ui/pb/helpers_test.go b/internal/ui/pb/helpers_test.go similarity index 100% rename from ui/pb/helpers_test.go rename to internal/ui/pb/helpers_test.go diff --git a/ui/pb/progressbar.go b/internal/ui/pb/progressbar.go similarity index 100% rename from ui/pb/progressbar.go rename to internal/ui/pb/progressbar.go diff --git a/ui/pb/progressbar_test.go b/internal/ui/pb/progressbar_test.go similarity index 100% rename from ui/pb/progressbar_test.go rename to internal/ui/pb/progressbar_test.go diff --git a/usage/usage.go b/internal/usage/usage.go similarity index 100% rename from usage/usage.go rename to internal/usage/usage.go diff --git a/usage/usage_test.go b/internal/usage/usage_test.go similarity index 100% rename from usage/usage_test.go rename to internal/usage/usage_test.go diff --git a/js/common/event.go b/js/common/event.go index d561c09b812..551fbf919a9 100644 --- a/js/common/event.go +++ b/js/common/event.go @@ -1,6 +1,6 @@ package common -import "go.k6.io/k6/event" +import "go.k6.io/k6/internal/event" // Events are the event subscriber interfaces for the global event system, and // the local (per-VU) event system. diff --git a/js/modules/k6/http/request_test.go b/js/modules/k6/http/request_test.go index 42d6cccd0f5..bd3a69eb317 100644 --- a/js/modules/k6/http/request_test.go +++ b/js/modules/k6/http/request_test.go @@ -36,11 +36,11 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v3" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/lib/testutils/httpmultibin" "go.k6.io/k6/js/modulestest" "go.k6.io/k6/lib" "go.k6.io/k6/lib/netext" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/lib/testutils/httpmultibin" "go.k6.io/k6/metrics" ) diff --git a/js/modules/k6/marshalling_test.go b/js/modules/k6/marshalling_test.go index 6932c65e67e..4857390d173 100644 --- a/js/modules/k6/marshalling_test.go +++ b/js/modules/k6/marshalling_test.go @@ -9,14 +9,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/js" + "go.k6.io/k6/internal/js" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/lib/testutils/httpmultibin" + "go.k6.io/k6/internal/loader" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/lib/testutils/httpmultibin" "go.k6.io/k6/lib/types" - "go.k6.io/k6/loader" "go.k6.io/k6/metrics" - "go.k6.io/k6/usage" ) func TestSetupDataMarshalling(t *testing.T) { diff --git a/js/modules/require_impl.go b/js/modules/require_impl.go index 3131e11e0a4..71098ec3754 100644 --- a/js/modules/require_impl.go +++ b/js/modules/require_impl.go @@ -8,7 +8,7 @@ import ( "github.com/grafana/sobek" - "go.k6.io/k6/loader" + "go.k6.io/k6/internal/loader" ) // Require is the actual call that implements require @@ -202,7 +202,7 @@ func getPreviousRequiringFile(vu VU) (string, error) { for i, frame := range frames[1:] { // first one should be the current require // TODO have this precalculated automatically - if frame.FuncName() == "go.k6.io/k6/js.(*requireImpl).require-fm" { + if frame.FuncName() == "go.k6.io/k6/internal/js.(*requireImpl).require-fm" { // we need to get the one *before* but as we skip the first one the index matches ;) result := frames[i].SrcName() if result == "file:///-" { diff --git a/js/modules/resolution.go b/js/modules/resolution.go index ed5015d6ca6..84d684b9c5a 100644 --- a/js/modules/resolution.go +++ b/js/modules/resolution.go @@ -9,9 +9,9 @@ import ( "github.com/grafana/sobek/ast" "github.com/sirupsen/logrus" - "go.k6.io/k6/js/compiler" - "go.k6.io/k6/loader" - "go.k6.io/k6/usage" + "go.k6.io/k6/internal/js/compiler" + "go.k6.io/k6/internal/loader" + "go.k6.io/k6/internal/usage" ) const notPreviouslyResolvedModule = "the module %q was not previously resolved during initialization (__VU==0)" diff --git a/js/modulestest/runtime.go b/js/modulestest/runtime.go index 6251fd752b5..da714d947a6 100644 --- a/js/modulestest/runtime.go +++ b/js/modulestest/runtime.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/grafana/sobek" + "go.k6.io/k6/internal/js/compiler" + "go.k6.io/k6/internal/js/eventloop" + "go.k6.io/k6/internal/js/modules/k6/timers" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/js/common" - "go.k6.io/k6/js/compiler" - "go.k6.io/k6/js/eventloop" "go.k6.io/k6/js/modules" - "go.k6.io/k6/js/modules/k6/timers" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" "go.k6.io/k6/metrics" - "go.k6.io/k6/usage" ) // Runtime is a helper struct that contains what is needed to run a (simple) module test diff --git a/lib/archive.go b/lib/archive.go index 0ca6ff47825..c855f2a55b5 100644 --- a/lib/archive.go +++ b/lib/archive.go @@ -16,8 +16,8 @@ import ( "strings" "time" + "go.k6.io/k6/internal/loader" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/loader" ) var ( diff --git a/lib/archive_test.go b/lib/archive_test.go index 9bb86c9ed7e..9da014800c7 100644 --- a/lib/archive_test.go +++ b/lib/archive_test.go @@ -10,7 +10,7 @@ import ( "runtime" "testing" - "go.k6.io/k6/lib/testutils" + "go.k6.io/k6/internal/lib/testutils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/lib/executor/base_executor.go b/lib/executor/base_executor.go index 9f9ec21d85f..90d5cd29816 100644 --- a/lib/executor/base_executor.go +++ b/lib/executor/base_executor.go @@ -8,9 +8,9 @@ import ( "github.com/sirupsen/logrus" + "go.k6.io/k6/internal/ui/pb" "go.k6.io/k6/lib" "go.k6.io/k6/metrics" - "go.k6.io/k6/ui/pb" ) // BaseExecutor is a helper struct that contains common properties and methods diff --git a/lib/executor/common_test.go b/lib/executor/common_test.go index 3ac6d6e69fb..ac734518a84 100644 --- a/lib/executor/common_test.go +++ b/lib/executor/common_test.go @@ -8,9 +8,9 @@ import ( "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/lib/testutils/minirunner" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/lib/testutils/minirunner" "go.k6.io/k6/metrics" ) diff --git a/lib/executor/constant_arrival_rate.go b/lib/executor/constant_arrival_rate.go index 1675d6eaa2c..66f201aa99a 100644 --- a/lib/executor/constant_arrival_rate.go +++ b/lib/executor/constant_arrival_rate.go @@ -12,10 +12,10 @@ import ( "github.com/sirupsen/logrus" "gopkg.in/guregu/null.v3" + "go.k6.io/k6/internal/ui/pb" "go.k6.io/k6/lib" "go.k6.io/k6/lib/types" "go.k6.io/k6/metrics" - "go.k6.io/k6/ui/pb" ) const constantArrivalRateType = "constant-arrival-rate" diff --git a/lib/executor/constant_vus.go b/lib/executor/constant_vus.go index b0a8ca690f4..9be925809c5 100644 --- a/lib/executor/constant_vus.go +++ b/lib/executor/constant_vus.go @@ -9,10 +9,10 @@ import ( "github.com/sirupsen/logrus" "gopkg.in/guregu/null.v3" + "go.k6.io/k6/internal/ui/pb" "go.k6.io/k6/lib" "go.k6.io/k6/lib/types" "go.k6.io/k6/metrics" - "go.k6.io/k6/ui/pb" ) const constantVUsType = "constant-vus" diff --git a/lib/executor/execution_test.go b/lib/executor/execution_test.go index 7547ff43a78..a2fdb4998a3 100644 --- a/lib/executor/execution_test.go +++ b/lib/executor/execution_test.go @@ -13,9 +13,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/lib/testutils/minirunner" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/lib/testutils/minirunner" ) func TestExecutionStateVUIDs(t *testing.T) { diff --git a/lib/executor/executors_test.go b/lib/executor/executors_test.go index b39d0e84763..0da9ef6e888 100644 --- a/lib/executor/executors_test.go +++ b/lib/executor/executors_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "go.k6.io/k6/lib/testutils" + "go.k6.io/k6/internal/lib/testutils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/lib/executor/externally_controlled.go b/lib/executor/externally_controlled.go index 7f0c876b89f..7cf456ec792 100644 --- a/lib/executor/externally_controlled.go +++ b/lib/executor/externally_controlled.go @@ -12,10 +12,10 @@ import ( "github.com/sirupsen/logrus" "gopkg.in/guregu/null.v3" + "go.k6.io/k6/internal/ui/pb" "go.k6.io/k6/lib" "go.k6.io/k6/lib/types" "go.k6.io/k6/metrics" - "go.k6.io/k6/ui/pb" ) const externallyControlledType = "externally-controlled" diff --git a/lib/executor/helpers.go b/lib/executor/helpers.go index ae513770342..a62a5349c5a 100644 --- a/lib/executor/helpers.go +++ b/lib/executor/helpers.go @@ -10,10 +10,10 @@ import ( "github.com/sirupsen/logrus" "go.k6.io/k6/errext" - "go.k6.io/k6/execution" + "go.k6.io/k6/internal/execution" + "go.k6.io/k6/internal/ui/pb" "go.k6.io/k6/lib" "go.k6.io/k6/lib/types" - "go.k6.io/k6/ui/pb" ) const ( diff --git a/lib/executor/per_vu_iterations.go b/lib/executor/per_vu_iterations.go index 94159bbfb88..15f66cbf189 100644 --- a/lib/executor/per_vu_iterations.go +++ b/lib/executor/per_vu_iterations.go @@ -10,10 +10,10 @@ import ( "github.com/sirupsen/logrus" "gopkg.in/guregu/null.v3" + "go.k6.io/k6/internal/ui/pb" "go.k6.io/k6/lib" "go.k6.io/k6/lib/types" "go.k6.io/k6/metrics" - "go.k6.io/k6/ui/pb" ) const perVUIterationsType = "per-vu-iterations" diff --git a/lib/executor/ramping_arrival_rate.go b/lib/executor/ramping_arrival_rate.go index 84fd89fb735..0dd60c45a91 100644 --- a/lib/executor/ramping_arrival_rate.go +++ b/lib/executor/ramping_arrival_rate.go @@ -11,10 +11,10 @@ import ( "github.com/sirupsen/logrus" "gopkg.in/guregu/null.v3" + "go.k6.io/k6/internal/ui/pb" "go.k6.io/k6/lib" "go.k6.io/k6/lib/types" "go.k6.io/k6/metrics" - "go.k6.io/k6/ui/pb" ) const rampingArrivalRateType = "ramping-arrival-rate" diff --git a/lib/executor/ramping_vus.go b/lib/executor/ramping_vus.go index e95c79fff77..78fb54c2bbb 100644 --- a/lib/executor/ramping_vus.go +++ b/lib/executor/ramping_vus.go @@ -10,10 +10,10 @@ import ( "github.com/sirupsen/logrus" "gopkg.in/guregu/null.v3" + "go.k6.io/k6/internal/ui/pb" "go.k6.io/k6/lib" "go.k6.io/k6/lib/types" "go.k6.io/k6/metrics" - "go.k6.io/k6/ui/pb" ) const rampingVUsType = "ramping-vus" diff --git a/lib/executor/shared_iterations.go b/lib/executor/shared_iterations.go index c1ec7910648..504e4ab1a3e 100644 --- a/lib/executor/shared_iterations.go +++ b/lib/executor/shared_iterations.go @@ -10,10 +10,10 @@ import ( "github.com/sirupsen/logrus" "gopkg.in/guregu/null.v3" + "go.k6.io/k6/internal/ui/pb" "go.k6.io/k6/lib" "go.k6.io/k6/lib/types" "go.k6.io/k6/metrics" - "go.k6.io/k6/ui/pb" ) const sharedIterationsType = "shared-iterations" diff --git a/lib/executor/vu_handle_test.go b/lib/executor/vu_handle_test.go index 623e768cc88..191bc06eb6a 100644 --- a/lib/executor/vu_handle_test.go +++ b/lib/executor/vu_handle_test.go @@ -11,9 +11,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/lib/testutils/minirunner" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils" - "go.k6.io/k6/lib/testutils/minirunner" "go.k6.io/k6/metrics" ) diff --git a/lib/executors.go b/lib/executors.go index 61067382491..11d8733f01d 100644 --- a/lib/executors.go +++ b/lib/executors.go @@ -11,8 +11,8 @@ import ( "github.com/sirupsen/logrus" + "go.k6.io/k6/internal/ui/pb" "go.k6.io/k6/metrics" - "go.k6.io/k6/ui/pb" ) // TODO: remove globals and use some type of explicit dependency injection? diff --git a/lib/netext/dialer_test.go b/lib/netext/dialer_test.go index 4955c4d304a..d87e4fe50b2 100644 --- a/lib/netext/dialer_test.go +++ b/lib/netext/dialer_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils/mockresolver" "go.k6.io/k6/lib" - "go.k6.io/k6/lib/testutils/mockresolver" "go.k6.io/k6/lib/types" ) diff --git a/lib/netext/httpext/error_codes_test.go b/lib/netext/httpext/error_codes_test.go index 1b0ce9ff8fc..c5df6bf18e4 100644 --- a/lib/netext/httpext/error_codes_test.go +++ b/lib/netext/httpext/error_codes_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/net/http2" + "go.k6.io/k6/internal/lib/testutils/httpmultibin" "go.k6.io/k6/lib/netext" - "go.k6.io/k6/lib/testutils/httpmultibin" "go.k6.io/k6/lib/types" ) diff --git a/lib/netext/resolver_test.go b/lib/netext/resolver_test.go index df659c04f45..664dc9b8aea 100644 --- a/lib/netext/resolver_test.go +++ b/lib/netext/resolver_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/lib/testutils/mockresolver" + "go.k6.io/k6/internal/lib/testutils/mockresolver" "go.k6.io/k6/lib/types" ) diff --git a/lib/old_archive_test.go b/lib/old_archive_test.go index d4824e65fa1..e9232dd8e06 100644 --- a/lib/old_archive_test.go +++ b/lib/old_archive_test.go @@ -9,7 +9,7 @@ import ( "path/filepath" "testing" - "go.k6.io/k6/lib/testutils" + "go.k6.io/k6/internal/lib/testutils" "github.com/stretchr/testify/require" diff --git a/lib/test_state.go b/lib/test_state.go index 28a27885483..0a576217258 100644 --- a/lib/test_state.go +++ b/lib/test_state.go @@ -6,10 +6,10 @@ import ( "sync/atomic" "github.com/sirupsen/logrus" - "go.k6.io/k6/event" - "go.k6.io/k6/lib/trace" + "go.k6.io/k6/internal/event" + "go.k6.io/k6/internal/lib/trace" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/metrics" - "go.k6.io/k6/usage" ) // TestPreInitState contains all of the state that can be gathered and built diff --git a/lib/vu_state.go b/lib/vu_state.go index a59b39cf38f..9c7c3a31f75 100644 --- a/lib/vu_state.go +++ b/lib/vu_state.go @@ -12,8 +12,8 @@ import ( "go.opentelemetry.io/otel/trace" "golang.org/x/time/rate" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/metrics" - "go.k6.io/k6/usage" ) // DialContexter is an interface that can dial with a context diff --git a/output/cloud/expv2/flush.go b/output/cloud/expv2/flush.go index 09b37633015..409052d7007 100644 --- a/output/cloud/expv2/flush.go +++ b/output/cloud/expv2/flush.go @@ -5,8 +5,8 @@ import ( "github.com/sirupsen/logrus" + "go.k6.io/k6/internal/output/cloud/expv2/pbcloud" "go.k6.io/k6/metrics" - "go.k6.io/k6/output/cloud/expv2/pbcloud" ) type pusher interface { diff --git a/output/cloud/expv2/flush_test.go b/output/cloud/expv2/flush_test.go index 5ff236c9f54..2293c1adad5 100644 --- a/output/cloud/expv2/flush_test.go +++ b/output/cloud/expv2/flush_test.go @@ -11,9 +11,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/lib/testutils" + "go.k6.io/k6/internal/lib/testutils" + "go.k6.io/k6/internal/output/cloud/expv2/pbcloud" "go.k6.io/k6/metrics" - "go.k6.io/k6/output/cloud/expv2/pbcloud" ) // TODO: additional case diff --git a/output/cloud/expv2/hdr.go b/output/cloud/expv2/hdr.go index 4a72649d500..acb750d56d9 100644 --- a/output/cloud/expv2/hdr.go +++ b/output/cloud/expv2/hdr.go @@ -5,7 +5,7 @@ import ( "math/bits" "sort" - "go.k6.io/k6/output/cloud/expv2/pbcloud" + "go.k6.io/k6/internal/output/cloud/expv2/pbcloud" ) const ( diff --git a/output/cloud/expv2/hdr_test.go b/output/cloud/expv2/hdr_test.go index a7dacbaf7ea..c17811ff920 100644 --- a/output/cloud/expv2/hdr_test.go +++ b/output/cloud/expv2/hdr_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.k6.io/k6/output/cloud/expv2/pbcloud" + "go.k6.io/k6/internal/output/cloud/expv2/pbcloud" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/output/cloud/expv2/mapping.go b/output/cloud/expv2/mapping.go index ee16ee42c14..5e5585880ce 100644 --- a/output/cloud/expv2/mapping.go +++ b/output/cloud/expv2/mapping.go @@ -5,8 +5,8 @@ import ( "strings" "github.com/mstoykov/atlas" + "go.k6.io/k6/internal/output/cloud/expv2/pbcloud" "go.k6.io/k6/metrics" - "go.k6.io/k6/output/cloud/expv2/pbcloud" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/output/cloud/expv2/metrics_client.go b/output/cloud/expv2/metrics_client.go index c9d59cefc52..e46f13cf043 100644 --- a/output/cloud/expv2/metrics_client.go +++ b/output/cloud/expv2/metrics_client.go @@ -13,7 +13,7 @@ import ( "google.golang.org/protobuf/proto" "go.k6.io/k6/cloudapi" - "go.k6.io/k6/output/cloud/expv2/pbcloud" + "go.k6.io/k6/internal/output/cloud/expv2/pbcloud" ) // metricsClient is a Protobuf over HTTP client for sending diff --git a/output/cloud/expv2/metrics_client_test.go b/output/cloud/expv2/metrics_client_test.go index 64517b8f15e..bf098d96b5e 100644 --- a/output/cloud/expv2/metrics_client_test.go +++ b/output/cloud/expv2/metrics_client_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.k6.io/k6/cloudapi" - "go.k6.io/k6/output/cloud/expv2/pbcloud" + "go.k6.io/k6/internal/output/cloud/expv2/pbcloud" ) func TestMetricsClientPush(t *testing.T) { diff --git a/output/cloud/expv2/output.go b/output/cloud/expv2/output.go index b4f66097430..896d8574863 100644 --- a/output/cloud/expv2/output.go +++ b/output/cloud/expv2/output.go @@ -12,13 +12,13 @@ import ( "time" "go.k6.io/k6/cloudapi" - "go.k6.io/k6/cloudapi/insights" "go.k6.io/k6/errext" "go.k6.io/k6/errext/exitcodes" + "go.k6.io/k6/internal/cloudapi/insights" + insightsOutput "go.k6.io/k6/internal/output/cloud/insights" "go.k6.io/k6/lib/consts" "go.k6.io/k6/metrics" "go.k6.io/k6/output" - insightsOutput "go.k6.io/k6/output/cloud/insights" "github.com/sirupsen/logrus" ) diff --git a/output/cloud/expv2/output_test.go b/output/cloud/expv2/output_test.go index 2956f63c3b0..ab946df267a 100644 --- a/output/cloud/expv2/output_test.go +++ b/output/cloud/expv2/output_test.go @@ -14,7 +14,7 @@ import ( "gopkg.in/guregu/null.v3" "go.k6.io/k6/cloudapi" - "go.k6.io/k6/lib/testutils" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib/types" "go.k6.io/k6/metrics" ) diff --git a/output/csv/output_test.go b/output/csv/output_test.go index ff7f4fffdff..3162e95f15f 100644 --- a/output/csv/output_test.go +++ b/output/csv/output_test.go @@ -14,9 +14,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.k6.io/k6/internal/lib/testutils" "go.k6.io/k6/lib" "go.k6.io/k6/lib/fsext" - "go.k6.io/k6/lib/testutils" "go.k6.io/k6/metrics" "go.k6.io/k6/output" ) diff --git a/output/types.go b/output/types.go index 645015979c3..7eb46a29a75 100644 --- a/output/types.go +++ b/output/types.go @@ -10,10 +10,10 @@ import ( "github.com/sirupsen/logrus" + "go.k6.io/k6/internal/usage" "go.k6.io/k6/lib" "go.k6.io/k6/lib/fsext" "go.k6.io/k6/metrics" - "go.k6.io/k6/usage" ) // Params contains all possible constructor parameters an output may need.