All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
2.4.2 - 2023-04-17
- Updated vm2 to 3.9.16 - #341
- Do not set form-data field if value is
null
orundefined
- #342
2.4.1 - 2023-02-28
2.4.0 - 2023-02-27
ISandbox
to allow different implementations on different environments - #335
2.3.1 - 2023-02-15
- Correctly handle objects with
null
prototype inisClassInstance
- #333 - Treat not defined input in profile as nullable data structure - #334
2.3.0 - 2023-02-07
- Handle
None
(jsnull
andundefined
) - #314 - Required field validation uses
Object.hasOwn
to check field presence - #318 - Header and query parameters must be
string
orstring[]
- #324 - If profile doesn't have input defined, input isn't added to interpreter stack (input can't be access from Comlink Map) - #323
- Trailing comments in comlink script expressions broke sandbox evaluation - #327
- Ignore response body if status 204 received - #332
2.2.0 - 2023-01-02
BinaryData
type, not surfaced in Comlink Profile - #296, #304- version validation during loading of map and provider
setPriority
super json helper can be used to remove priority
- nullable enum input validation 311
2.1.0 - 2022-11-16
multipart/form-data
supports array values to define duplicate fields
- Reworked map interpreter into an asynchronous generator. It should be 1:1 replacement of the original interpreter, but opens up the road to expose streaming perform later.
- Do not set
Accept
andContent-Type
header when defined in HTTP request headers - #264 - Replaced
isomorphic-form-data
withform-data
package to fixFormData
serialization - #291 - Create valid
headersInit
shape inNodeFetch.fetch
- Added
UnexpectedError
andSDKExecutionError
to MapInterpreter and BoundProfileProvider return signatures. - An http call to
/
url returning an error about it being an absolute url
2.0.0 - 2022-08-15
- Pass
cache
flag to SuperfaceClient constructor - Pass
debug
flag to SuperfaceClient constructor - Pass
mapVariant
andmapRevision
values inperform
- Optionally pass
version
togetProfile
- Pass
security
andparameters
values ingetProvider
- BREAKING CHANGE: .supr files are no longer allowed
- BREAKING CHANGE: removed SuperJson class
- Default cache location is
node_modules/.cache/superface
- *BREAKING CHANGE: removed Parser
1.5.2 - 2022-06-15
- Do not call
Config.instance()
in the global scope to defer reading of env variables - Refactor security values passing in
perform
1.5.1 - 2022-06-14
- Do not recache ProviderConfiguration on security values change
1.5.0 - 2022-06-09
- SuperfaceClient supports passing SuperJson as constructor parameter
- Pass security values in
perform
1.4.1 - 2022-05-17
- Send multipart boundary in content-type header for
multipart/form-data
1.4.0 - 2022-05-17
- Sandbox stdlib -
std.unstable.time.{isoDateToUnixTimestamp, unixTimestampToIsoDate}, std.unstable.debug.log
provider.json
caching- Superjson simple retry policy configuration is now supported
- Superjson circuit breaker configuration accepts
openTime
(default 30s, previously hardcoded)
- Default backoff start value changed from 50ms to 500ms
- Fixed iterated variable in
foreach
being merged instead of overwritten, breaking iteration of objects - Fixed Buffer (
Buffer.isBuffer(x) == true
) being considered a composite structure and being merged as an object - Fixed authentication clearing query parameters
- Fixed url path parameter replacement not working with whitespace around replacement keys
- Fixup of arrays coming from vm2 sandbox
1.3.0 - 2022-02-15
- Added support for service selection in http calls
- Added support for digest authentication in http calls
1.2.2 - 2022-02-11
- Make sandbox timeout configurable through environment variable
SUPERFACE_SANDBOX_TIMEOUT
1.2.1 - 2022-01-19
This is a recovery release after introduction of compatibility-breaking changes in version 1.2.0.
- No changes since 1.1.0
1.1.0 - 2021-12-22
- Pass integration parameters in
perform
- Display query parameters in URL with
DEBUG=superface:http:sensitive
1.0.1 - 2021-11-24
- Use JSON Pointer (arrays not supported) to specify api token location in body
- ProfileParameterValidator now resolves named models before field references
- Buffer serialization in request body
undefined
values are removed when stringifying records
1.0.0 - 2021-11-04
- Module for mocking of Superface components
- MapInterpreter now supports integration parameters
- Removed unnecessary result propagation in interpreter - using stackTop.result instead
- Terminal outcome statements should now correctly exit from iteration
- MappedHTTPErrors and MappedErrors are handled a little better
- Parser uses AST metadata to check if source was changed
- Profile provider resolves integration parameters and fallback to default during
bind
- replaced zod with ast validations
- deprecated cacheBoundProfileProvider function on SuperfaceClient
- operation call no longer overwrites already mapped result
- caller scope no longer leaks into operation callees
result
variable no longer has special meaningoutcome.data
is no longer overwritten byresult
fail
correctly setsoutcome.error
in caller- errors are passed correctly through multiple levels of operation calls
- inline calls throw error when they fail
- Integration parameters are passed from super.json to BoundProfileProvider
0.0.40 - 2021-10-18
- Updated AST with examples
0.0.39 - 2021-10-18
0.0.38 - 2021-10-16
- Log warning when user does not handle rejections properly
- Locked AST version with matching schemas from parser
0.0.37 - 2021-10-14
- Make
configuration
ofBoundProfileProvider
public
- Removed unnecessary result propagation in interpreter - using stackTop.result instead
- Terminal outcome statements should now correctly exit from iteration
- BREAKING CHANGE: provider.json schemas moved to ast
- BREAKING CHANGE: absolute URLs are no longer allowed in maps
- BREAKING CHANGE: interpolation no longer works in base URLs
0.0.36 - 2021-09-29
- Export
PerformError
class - Export
ErrorBase
,SDKExecutionError
andUnexpectedError
classes
- Use super.json
priority
correctly - provider names are validated across super.json, provider.json and map file header
- when fetch throws an unknown error, it gets passed down the failover machinery
0.0.33 - 2021-08-31
0.0.31 - 2021-08-25
- Superjson mutate set methods for profile, profileProvider and provider
0.0.30 - 2021-08-24
- Failover event adapter failover restore in
pre-bind-and-perform
hook - Maps and profiles are parsed on-the-fly
- Superjson mutate swap variant methods for provider and profile provider
- Failover event adapter tests are now parametrized over untyped and typed client, removing repeated code
- Failover event adapter structure, abstracted repeated code
pre-
eventabort
resolution does not preventpost-
event from being emitted- Streamlined how
reason
is propagated and handled in failure policies, implementedFailurePolicyReason
- ProfileProvider can now fetch provider json when a map is local
- Config now has friendlier API
- every
throw
now uses an instance of an Error subclass
0.0.29 - 2021-07-20
MetricReporter
class that hooks on various events and reports metrics to Superface backend services- Internal Event system
- Interface and implementation of backoffs
- Interface for failure policies
- Implementation of common failure policies
ErrorBase
now containstoString()
method and getter forSymbol.toStringTag
CrossFetchError
is now union ofNetworkFetchError
andRequestFetchError
classesSuperfaceClient::getProvider
throws if the provider is not foundSuperfaceClient::getProviderForProfile
no longer takes an optional non-documented preference argumentFailurePolicyRouter::constructor
now takes a function which is called to instantiate policy for specified provider
0.0.28 - 2021-06-15
- Superjson config hash for analytics
0.0.27 - 2021-05-17
- Errors returned (mostly) security value resolution and from http client are now friendlier
- NonNullable types in ProfileParameterValidator
0.0.26 - 2021-05-07
- ENV variable to change superface path
0.0.25 - 2021-05-04
- Provider name check
0.0.23 - 2021-04-28
- ENV variable to change API URL
0.0.22 - 2021-04-26
- user agent header to HTTP requests
- changed API URLs to public
0.0.21 - 2021-04-26
- Export TypedProfile class
0.0.19 - 2021-04-23
- Logging to ProfileParameterValidator
- Status code to mapped errors
- Preserve trailing slash in URLs
0.0.18 - 2021-04-23
- Throw error when usecase not found
0.0.17 - 2021-04-22
- Improved Result documentation
0.0.16 - 2021-04-22
- Renamed repository to
one-sdk-js
0.0.15 - 2021-04-21
- Typed SDK interface
- Default result type from
unknown
toany
in perform method
0.0.14 - 2021-03-25
- Security configuration merged from schemes in provider.json and values in super.json
- Env variable resolution is not part of SuperJson normalization
0.0.13 - 2021-03-17
- Only combine URL and base URL after interpolation
0.0.12 - 2021-03-17
- Narrow interpolation parameter regex
- Pass headers and status code to HTTP response handler
0.0.11 - 2021-03-15
- New untyped SuperfaceClient, Profile, Provider, Usecase API
- Refactored Result library
- Correctly resolve nested variables in path params
- Normalize url when building it in for http requests
0.0.10 - 2021-03-11
- provider.json zod schemes
0.0.9 - 2021-02-25
- super.json support
- Environment variable resolution from super.json
- Normalized super.json representation
Provider
class interface simplified- File uris to use
file://
protocol prefix - Simplified the parameters to MapInterpreter
0.0.8 - 2021-02-11
- Iteration support in Maps
- Incorrect scoping
0.0.7 - 2021-01-21
- Inline call and call statement not correctly handling call stack arguments
- Array handling in mergeVariables function
0.0.6 - 2021-01-11
- Updated AST version
0.0.5 - 2020-12-22
- Enhanced logging of HTTP Errors
0.0.4 - 2020-12-15
- Better DX and error experience
- Debug logging to map interpreter
- Sandbox tests
- Repository and package name
Provider
andBoundProvider
interface
0.0.3 - 2020-11-25
- Providers
- Profile and map fetching functions
- Service finder
- Apikey http security scheme
- Readme using convention
- Name of the package scope to
@superfaceai
- Sandbox tests and return values
- Unused interfaces
- Github workflow actions failing due to github security update
- Map interpreter
vm2
based js sandbox- Profile parameter validator
- CI/CD workflows