Skip to content

Commit

Permalink
BAAS-22176: bump to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabri3l committed Jun 12, 2024
1 parent cb620be commit 1880453
Show file tree
Hide file tree
Showing 59 changed files with 99 additions and 97 deletions.
2 changes: 1 addition & 1 deletion added_values.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"reflect"
"strconv"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

func (i valueNumber) MemUsage(ctx *MemUsageContext) (memUsage uint64, err error) {
Expand Down
2 changes: 1 addition & 1 deletion array.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"reflect"
"strconv"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

type arrayIterObject struct {
Expand Down
2 changes: 1 addition & 1 deletion array_sparse.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"sort"
"strconv"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

type sparseArrayItem struct {
Expand Down
6 changes: 3 additions & 3 deletions ast/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ node types are concerned) and may change in the future.
package ast

import (
"github.com/dop251/goja/file"
"github.com/dop251/goja/token"
"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/file"
"github.com/dop251/goja/v2/token"
"github.com/dop251/goja/v2/unistring"
)

type PropertyKind string
Expand Down
2 changes: 1 addition & 1 deletion builtin_error.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package goja

import "github.com/dop251/goja/unistring"
import "github.com/dop251/goja/v2/unistring"

const propNameStack = "stack"

Expand Down
2 changes: 1 addition & 1 deletion builtin_global.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"sync"
"unicode/utf8"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

const hexUpper = "0123456789ABCDEF"
Expand Down
2 changes: 1 addition & 1 deletion builtin_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"unicode/utf16"
"unicode/utf8"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

const hex = "0123456789abcdef"
Expand Down
2 changes: 1 addition & 1 deletion builtin_number.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"math"
"sync"

"github.com/dop251/goja/ftoa"
"github.com/dop251/goja/v2/ftoa"
)

func (r *Runtime) toNumber(v Value) Value {
Expand Down
2 changes: 1 addition & 1 deletion builtin_proxy.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package goja

import (
"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

type nativeProxyHandler struct {
Expand Down
2 changes: 1 addition & 1 deletion builtin_regexp.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"unicode/utf16"
"unicode/utf8"

"github.com/dop251/goja/parser"
"github.com/dop251/goja/v2/parser"
)

func (r *Runtime) newRegexpObject(proto *Object) *regexpObject {
Expand Down
4 changes: 2 additions & 2 deletions builtin_string.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"unicode/utf16"
"unicode/utf8"

"github.com/dop251/goja/parser"
"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/parser"
"github.com/dop251/goja/v2/unistring"
"golang.org/x/text/collate"
"golang.org/x/text/language"
"golang.org/x/text/unicode/norm"
Expand Down
2 changes: 1 addition & 1 deletion builtin_symbol.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package goja

import "github.com/dop251/goja/unistring"
import "github.com/dop251/goja/v2/unistring"

var (
SymHasInstance = newSymbol(asciiString("Symbol.hasInstance"))
Expand Down
2 changes: 1 addition & 1 deletion builtin_typedarrays.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sync"
"unsafe"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

type typedArraySortCtx struct {
Expand Down
8 changes: 4 additions & 4 deletions compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"fmt"
"sort"

"github.com/dop251/goja/token"
"github.com/dop251/goja/v2/token"

"github.com/dop251/goja/ast"
"github.com/dop251/goja/file"
"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/ast"
"github.com/dop251/goja/v2/file"
"github.com/dop251/goja/v2/unistring"
)

type blockType int
Expand Down
8 changes: 4 additions & 4 deletions compiler_expr.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package goja

import (
"github.com/dop251/goja/ast"
"github.com/dop251/goja/file"
"github.com/dop251/goja/token"
"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/ast"
"github.com/dop251/goja/v2/file"
"github.com/dop251/goja/v2/token"
"github.com/dop251/goja/v2/unistring"
)

type compiledExpr interface {
Expand Down
8 changes: 4 additions & 4 deletions compiler_stmt.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package goja

import (
"github.com/dop251/goja/ast"
"github.com/dop251/goja/file"
"github.com/dop251/goja/token"
"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/ast"
"github.com/dop251/goja/v2/file"
"github.com/dop251/goja/v2/token"
"github.com/dop251/goja/v2/unistring"
)

func (c *compiler) compileStatement(v ast.Statement, needResult bool) {
Expand Down
2 changes: 1 addition & 1 deletion date_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

func TestDateUTC(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion destruct.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package goja
import (
"reflect"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

type destructKeyedSource struct {
Expand Down
2 changes: 1 addition & 1 deletion ftoa/ftostr.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"math"
"strconv"

"github.com/dop251/goja/ftoa/internal/fast"
"github.com/dop251/goja/v2/ftoa/internal/fast"
)

type FToStrMode int
Expand Down
2 changes: 1 addition & 1 deletion func.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"reflect"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

type baseFuncObject struct {
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
module github.com/dop251/goja
module github.com/dop251/goja/v2

go 1.16

require (
github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91
github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06
github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d
github.com/go-sourcemap/sourcemap v2.1.3+incompatible
github.com/google/go-cmp v0.5.9
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91 h1:Izz0+t1Z5nI16/II7vuEo/nHjodOg0p7+OiDpjX5t1E=
github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06 h1:XqC5eocqw7r3+HOhKYqaYH07XBiBDp9WE3NQK8XHSn4=
github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk=
github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y=
github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d h1:W1n4DvpzZGOISgp7wWNtraLcHtnmnTwBlJidqtMIuwQ=
Expand Down
2 changes: 1 addition & 1 deletion native.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"errors"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

type Property struct {
Expand Down
2 changes: 1 addition & 1 deletion object.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"sort"
"sync"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion object_args.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package goja

import "github.com/dop251/goja/unistring"
import "github.com/dop251/goja/v2/unistring"

type argumentsObject struct {
baseObject
Expand Down
2 changes: 1 addition & 1 deletion object_dynamic.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"reflect"
"strconv"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

/*
Expand Down
2 changes: 1 addition & 1 deletion object_dynamic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"sync"
"testing"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

type testDynObject struct {
Expand Down
2 changes: 1 addition & 1 deletion object_goarray_reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"strconv"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

type objectGoArrayReflect struct {
Expand Down
2 changes: 1 addition & 1 deletion object_gomap.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package goja
import (
"reflect"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

type objectGoMapSimple struct {
Expand Down
2 changes: 1 addition & 1 deletion object_gomap_reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package goja
import (
"reflect"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

type objectGoMapReflect struct {
Expand Down
4 changes: 2 additions & 2 deletions object_goreflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"reflect"
"strings"

"github.com/dop251/goja/parser"
"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/parser"
"github.com/dop251/goja/v2/unistring"
)

// JsonEncodable allows custom JSON encoding by JSON.stringify()
Expand Down
2 changes: 1 addition & 1 deletion object_goslice.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"reflect"
"strconv"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

type objectGoSlice struct {
Expand Down
2 changes: 1 addition & 1 deletion object_goslice_reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"math/bits"
"reflect"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

type objectGoSliceReflect struct {
Expand Down
2 changes: 1 addition & 1 deletion object_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"reflect"
"sort"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

type templatePropFactory func(*Runtime) Value
Expand Down
2 changes: 1 addition & 1 deletion object_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/unistring"
)

func TestDefineProperty(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions parser/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"sort"

"github.com/dop251/goja/file"
"github.com/dop251/goja/token"
"github.com/dop251/goja/v2/file"
"github.com/dop251/goja/v2/token"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions parser/expression.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package parser
import (
"strings"

"github.com/dop251/goja/ast"
"github.com/dop251/goja/file"
"github.com/dop251/goja/token"
"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/ast"
"github.com/dop251/goja/v2/file"
"github.com/dop251/goja/v2/token"
"github.com/dop251/goja/v2/unistring"
)

func (self *_parser) parseIdentifier() *ast.Identifier {
Expand Down
6 changes: 3 additions & 3 deletions parser/lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (

"golang.org/x/text/unicode/rangetable"

"github.com/dop251/goja/file"
"github.com/dop251/goja/token"
"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/file"
"github.com/dop251/goja/v2/token"
"github.com/dop251/goja/v2/unistring"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions parser/lexer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package parser
import (
"testing"

"github.com/dop251/goja/file"
"github.com/dop251/goja/token"
"github.com/dop251/goja/unistring"
"github.com/dop251/goja/v2/file"
"github.com/dop251/goja/v2/token"
"github.com/dop251/goja/v2/unistring"
)

func TestLexer(t *testing.T) {
Expand Down
Loading

0 comments on commit 1880453

Please sign in to comment.