diff --git a/compat/compat.go b/compat/compat.go new file mode 100644 index 0000000..58c84b6 --- /dev/null +++ b/compat/compat.go @@ -0,0 +1,19 @@ +package compat + +// CompatibilityFlag is a type that represents a compatibility flag. +type CompatibilityFlag string + +// Compatibility flags. +type CompatibilityFlags []CompatibilityFlag + +// Compatibility flags. +const ( + // NodeJS compatibility flag. + NodeJS CompatibilityFlag = "nodejs" +) + +var Default = compatibilityFlags["2024-20-12"] + +var compatibilityFlags = map[string]CompatibilityFlags{ + "2024-20-12": {NodeJS}, +} diff --git a/go.mod b/go.mod index ed3f4f9..1cc5084 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ toolchain go1.23.4 require ( github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.10.0 + github.com/zeiss/pkg v0.1.19 github.com/zeiss/v8go-polyfills v0.0.0-20241126043451-29233cf876bf ) diff --git a/go.sum b/go.sum index 05b717a..c1930e1 100644 --- a/go.sum +++ b/go.sum @@ -24,6 +24,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/zeiss/pkg v0.1.19 h1:xFhTEvpwDwv5vTU4K69QXcbdc1mKF/apSqSMF8r5Xc0= +github.com/zeiss/pkg v0.1.19/go.mod h1:WCFpyj9/BrA1nWIabZGG8yn86aRy6RUzttD4tyRzJMw= github.com/zeiss/v8go-polyfills v0.0.0-20241126043451-29233cf876bf h1:HW7swZjrYm22vRfqCwlnPIdbbqvJJsDzZbetmR6B8+w= github.com/zeiss/v8go-polyfills v0.0.0-20241126043451-29233cf876bf/go.mod h1:i1pzNqoVMY1h3OQ5CJQ5xM1PybXysbpT0TTrGajDPGU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=