Frontity release: A bunch of enhancements and bug fixes

Enhancements

  • Improve the Frontity Embedded Mode plugin to make it more secure and easy to use. Moreover, we have released a full explanation of the Embedded Mode implementation in the Frontity docs.

  • Migrate @frontity/connect to be a thin layer on top of react-easy-state. This means that in the future, taking advantage of the bug fixes and other improvements from react-easy-state will be much easier. #415

  • Add an --analyze option to the dev and build commands. The flag should be explicitly set in order to generate HTML files for bundle analysis. #774

  • Add an HMR flag to the Frontity state (state.frontity.hmr) that indicates if the code is run on an HMR refresh or not. #783

  • Modifies the frontity create command so it generates a tsconfig.json file and adds dev dependencies to package.json. Feature discussion: Full TypeScript support in `frontity create`. Thanks @orballo for the Pull Request :tada: !

  • The GooglePublisherTag component now accepts an optional collapseEmptyDiv prop
    which if true will collapse ad slots that are not filled by Google Publisher Tag. Thanks @VinuRaj for the Pull Request :tada: !

  • Make the @frontity/google-tag-manager-analytics package “AMP-aware”. This means it would render an <amp-analytics> tag for each container ID provided, along with the given configuration. #766

  • Add Frontity tests for older browsers using Selenium in BrowserStack. #638

Bug fixes

  • Due to a recent warning in Chrome for missusing preload instead of modulepreload for module files we need to replace the loadable linkType for assets that have to be preloaded as modules instead. #777
  • Return an empty array when there is no <head> tag in the REST API - Head Tags plugin. Thanks @johnfrancisli for the Pull Request :tada: !
  • Fix the <Script> component to allow more attributes and event handlers. Thanks @Koli14 for the Pull Request :tada: !
  • Fix the <Link> component when state.source.url or state.frontity.url contains a pathname, returning the correct final link. #792
  • Fix some errors causing the AMP package to fail the AMP validation: AMP package - #66. #776
  • Export new types related to AMP: AmpConfig, AmpRequest and AmpTrigger. #766
  • Modify derived props so they receive state and libraries as arguments. Also, fix the Derived type definition. #791
  • Move the call of the afterSSR() actions to before taking the state snapshot. This way any afterSSR() action still has an option to modify the snapshot before sending it to the client. This is important for security as we delete the state.source.auth token in that action in wp-source. #764
  • Prevent a possible race condition in useInfiniteScroll. It could happen when a link changes state.router.link right before the useEffect callback that manages the route runs. #785
  • Fix broken links in mars-theme README.md. #789
  • Fix broken links in twentytwenty-theme Readme. #784
  • Fix a bug that causes the URL being incorrectly populated when doing an HMR refresh. #783
  • Make redirection URLs relative, so they redirect to localhost in a dev environment. #775
  • Remove the form.errors property because it is not currently used and was included unnecessarily in the first version of the package. #755
  • Bail out of redirection if frontity is running into embedded mode. #771
  • Fix a bug which caused an infinite loop if the 3xx redirection was “internal” (meaning redirecting to the WP or Frontity domain) and the location of the redirection matched the link as discussed in 301 redirects stored in WordPress database - #28 by luisherranz. #767
  • Fix the pattern of the internal redirection when state.source.homepage is defined, making links with a search param (?s=some+term) to keep using the post archive handler. #793
  • Add different schemas for categories and tags to avoid ID collisions inside libraries.source.populate(). #795

Plugins Changelog

frontity-headtags@1.2.1

Patch Changes

  • 8a28bb2 #51 - Return an empty array when there is no <head> tag.

Packages Changelog


@frontity/amp@0.1.1

Patch Changes


@frontity/analytics@1.4.1

Patch Changes


@frontity/components@1.7.2

Patch Changes

  • 944d5888 #770 Thanks @Koli14! - Fix the <Script> component to allow more attributes and event handlers.

@frontity/connect@1.3.0

Minor Changes

  • 7111b3ce #415 Thanks @luisherranz! - Migrate @frontity/connect to be a thin layer on top of react-easy-state. This means that in the future, taking advantage of the bug fixes and other improvements from react-easy-state will be much easier.

Patch Changes


@frontity/core@1.12.0

Minor Changes

  • 62e60216 #774 Thanks @DAreRodz! - Add an --analyze option to the dev and build commands. The flag should be explicitly set in order to generate HTML files for bundle analysis.
  • 86b2eff9 #783 Thanks @luisherranz! - Add an HMR flag to the Frontity state (state.frontity.hmr) that indicates if the code is run on an HMR refresh or not.

Patch Changes

  • aaa85073 #764 Thanks @michalczaplinski! - Move the call of the afterSSR() actions to before taking the state snapshot. This way any afterSSR() action still has an option to modify the snapshot before sending it to the client. This is important for security as we delete the state.source.auth token in that action in wp-source.
  • 89de8177 #777 Thanks @cristianbote! - Due to a recent warning in Chrome for missusing preload instead of modulepreload for module files we need to replace the loadable linkType for assets that have to be preloaded as modules instead.

  • Updated dependencies [7111b3ce, 641a1cf0]:


frontity@1.15.0

Minor Changes

  • 62e60216 #774 Thanks @DAreRodz! - Add an --analyze option to the dev and build commands. The flag should be explicitly set in order to generate HTML files for bundle analysis.

Patch Changes


@frontity/google-ad-manager@1.0.0

Major Changes

Patch Changes

  • 5ede2b97 #778 Thanks @VinuRaj! - The GooglePublisherTag component now accepts an optional collapseEmptyDiv prop
    which if true will collapse ad slots that are not filled by Google Publisher Tag.
  • Updated dependencies [62e60216, 77e0a286]:
    • frontity@1.15.0

@frontity/google-tag-manager-analytics@1.3.0

Minor Changes

  • 4aea44d8 #766 Thanks @DAreRodz! - Make the @frontity/google-tag-manager-analytics package “AMP-aware”. This means
    it would render an <amp-analytics> tag for each container ID provided, along
    with the given configuration.

Patch Changes


@frontity/hooks@2.2.1

Patch Changes


@frontity/mars-theme@1.5.1

Patch Changes


@frontity/tiny-router@1.4.2

Patch Changes

  • 86b2eff9 #783 Thanks @luisherranz! - Fix a bug that causes the URL being incorrectly populated when doing an HMR refresh.

@frontity/twentytwenty-theme@1.3.1

Patch Changes


@frontity/types@1.8.0

Minor Changes

  • 86b2eff9 #783 Thanks @luisherranz! - Add an HMR flag to the Frontity state (state.frontity.hmr) that indicates if the code is run on an HMR refresh or not.

Patch Changes

  • 641a1cf0 #791 Thanks @DAreRodz! - Modify derived props so they receive state and libraries as arguments. Also, fix the Derived type definition.

@frontity/wp-comments@1.0.0

Major Changes

Patch Changes


@frontity/wp-source@1.11.3

Patch Changes

  • 4f12c5ee #793 Thanks @DAreRodz! - Fix the pattern of the internal redirection when state.source.homepage is defined, making links with a search param (?s=some+term) to keep using the post archive handler.
  • 8083bd0a #795 Thanks @DAreRodz! - Add different schemas for categories and tags to avoid ID collisions inside libraries.source.populate().

  • Updated dependencies [62e60216, 77e0a286]:

    • frontity@1.15.0
3 Likes