Skip to content

package/core/0.9.0

Compare
Choose a tag to compare
@blakewilson blakewilson released this 27 Aug 21:09
· 902 commits to canary since this release
7c2abd0

Release package/core/0.9.0

Release 0.9.0 of the NPM packages include BREAKING CHANGES. Existing users of Faust.js will need to update their faust.config.js file to use ESM syntax, opposed to CJS syntax.

For example, users will need to replace their current faust.config.js file:

const { headlessConfig } = require('@faustjs/core');

if (!process.env.NEXT_PUBLIC_WORDPRESS_URL) {
  console.error(
    'You must provide a NEXT_PUBLIC_WORDPRESS_URL environment variable, did you forget to load your .env file?',
  );
}

/**
 * @type {import("@faustjs/core").HeadlessConfig}
 */
module.exports = headlessConfig({
  wpUrl: process.env.NEXT_PUBLIC_WORDPRESS_URL,
  apiClientSecret: process.env.WP_HEADLESS_SECRET,
});

With the following code:

import { headlessConfig } from '@faustjs/core';

if (!process.env.NEXT_PUBLIC_WORDPRESS_URL) {
  console.error(
    'You must provide a NEXT_PUBLIC_WORDPRESS_URL environment variable, did you forget to load your .env file?',
  );
}

/**
 * @type {import("@faustjs/core").HeadlessConfig}
 */
export default headlessConfig({
  wpUrl: process.env.NEXT_PUBLIC_WORDPRESS_URL,
  apiClientSecret: process.env.WP_HEADLESS_SECRET,
});