Releases: brillout/wildcard-api
Releases · brillout/wildcard-api
Minor breaking changes
- Renamed config
disableEtag
todisableCache
, and configargumentsAlwaysInHttpBody
toshortUrl
. - Minor (but breaking) changes in how Wildcard handles undefined contexts. The main breaking change is that your context function (when using a server framework middleware) is not allowed to return
undefined
anymore, and it must now always return ainstanceof Object
.
v0.4
What's new
Improvements around error handling and other small improvements.
Breaking changes
- Endpoints now live at
const { server } = require('@wildcard-api/server');
andimport { server } from '@wildcard-api/client';
(Instead ofconst { endpoints } = require('@wildcard-api/server');
andimport { endpoints } from '@wildcard-api/client';
.) - Config now lives at
const { config } = require('@wildcard-api/server');
andimport { config } from '@wildcard-api/client';
(Instead ofconst wildcardServer = require('@wildcard-api/server');
andimport wildcardClient from '@wildcard-api/client';
.) - Endpoints that return
undefined
will stayundefined
on the other end (instead of being changed tonull
). - The browser-side error flags
isServerError
andisNetworkError
are renamed toisCodeError
andisConnectionError
. The semantics changed slightly, see the new docs about error handling.
Should you encounter any issue upgrading to 0.4
then open a new issue.
v0.3.0
v0.2.3
- Split and moved package
wildcard-api
to@wildcard-api/server
and@wildcard-api/client
. (The move allowed us to decrease the semver major fromv0.7
tov0.2
.) - Automatic generation of
ETag
HTTP cache header. - Middleware for hapi/express/koa, see "Getting Started" documentation.
- Autoloading of
*.endpoints.*
andendpoints.*
files, see "Getting Started" documentation.
Changed Options Interface
In v0.6.x
options were set like this:
import {WildcardClient} from 'wildcard-api/client';
const endpoints = new WildcardClient({
argumentsAlwaysInHttpBody: true,
});
callEndpoint();
async function callEndpoint() {
await endpoints.myEndpoint();
};
In v0.7.x
options are now set like this:
import wildcardClient, {endpoints} from 'wildcard-api/client';
wildcardClient.argumentsAlwaysInHttpBody = true;
callEndpoint();
async function callEndpoint() {
await endpoints.myEndpoint();
};
Changed Options Interface
In v0.5.x
options were set like this:
import wildcardClient from 'wildcard-api/client';
wildcardClient.argumentsAlwaysInHttpBody = true;
const {endpoints} = wildcardClient;
callEndpoint();
async function callEndpoint() {
await endpoints.myEndpoint();
};
In v0.6.x
options are now set like this:
import {WildcardClient} from 'wildcard-api/client';
const endpoints = new WildcardClient({
argumentsAlwaysInHttpBody: true,
});
callEndpoint();
async function callEndpoint() {
await endpoints.myEndpoint();
};