Skip to content

Releases: brillout/wildcard-api

Minor breaking changes

12 Oct 12:34
Compare
Choose a tag to compare
  • Renamed config disableEtag to disableCache, and config argumentsAlwaysInHttpBody to shortUrl.
  • 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 a instanceof Object.

v0.4

07 Oct 13:24
Compare
Choose a tag to compare

What's new

Improvements around error handling and other small improvements.

Breaking changes

  • Endpoints now live at const { server } = require('@wildcard-api/server'); and import { server } from '@wildcard-api/client'; (Instead of const { endpoints } = require('@wildcard-api/server'); and import { endpoints } from '@wildcard-api/client';.)
  • Config now lives at const { config } = require('@wildcard-api/server'); and import { config } from '@wildcard-api/client'; (Instead of const wildcardServer = require('@wildcard-api/server'); and import wildcardClient from '@wildcard-api/client';.)
  • Endpoints that return undefined will stay undefined on the other end (instead of being changed to null).
  • The browser-side error flags isServerError and isNetworkError are renamed to isCodeError and isConnectionError. 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

13 Apr 20:04
Compare
Choose a tag to compare
  • Changed default base URL from /wildcard/ to /_wildcard_api/.
  • Added baseUrl option.

v0.2.3

13 Dec 11:54
Compare
Choose a tag to compare
  • Split and moved package wildcard-api to @wildcard-api/server and @wildcard-api/client. (The move allowed us to decrease the semver major from v0.7 to v0.2.)
  • Automatic generation of ETag HTTP cache header.
  • Middleware for hapi/express/koa, see "Getting Started" documentation.
  • Autoloading of *.endpoints.* and endpoints.* files, see "Getting Started" documentation.

Changed Options Interface

15 Oct 23:14
Compare
Choose a tag to compare

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

14 Oct 17:19
Compare
Choose a tag to compare

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();
};