Skip to content

Releases: bramstein/url-template

v3.1.1

13 Dec 17:37
dc56c52
Compare
Choose a tag to compare

Bug Fixes 🐞

  • Allow nested array values for expand() in type definition (see #70)

v3.1.0

17 Jul 16:39
Compare
Choose a tag to compare

New Features ✨

  • A primitive value of null is now allowed by the TypeScript definitions (see #56).

Bug Fixes 🐞

  • Missing TypeScript definitions for array and object values have been added (see #56).

v3.0.0

31 Jan 10:17
Compare
Choose a tag to compare

New Features ✨

  • Package is now distributed in the ECMAScript module syntax (see #36).
  • Definitions for TypeScript are now included out of the box (see #37).

Enhancements 📝

  • The the NPM package only includes the production files (see #23).

Breaking Changes 💥

  • Support for Bower has been dropped, use NPM or another package manager instead.
  • Some functions that were already marked as private are now no longer available (see #37).
  • Support for CommonJS modules has been dropped, use the ES module import instead (see migration guide).
  • The default export has been changed to a named export (see migration guide).

Migration 🚚

Use the new import

Previously when importing a default export would be provided with methods attached to it, this has been replaced with a named one.

This means the following code:

const template = require('url-template');
const emailUrlTemplate = template.parse('/{email}/{folder}/{id}');

Will become:

import { parseTemplate } from 'url-template';
const emailUrlTemplate = parseTemplate('/{email}/{folder}/{id}');

TypeScript

If you are a user of TypeScript you can remove @types/url-template from your project. The type definitions are now included in the package itself, so it is no longer required to keep a separate dependency around.

npm uninstall @types/url-template