Skip to content

Releases: rooseveltframework/single-page-express

2.0.5

01 Feb 16:19
4eb6b8c

Choose a tag to compare

  • Added app.alwaysSkipViewTransition and res.skipViewTransition options. When set to true, if using the default render method, the DOM update will not be wrapped in a document.startViewTransition() call, which is useful in improving performance if you're not doing an animation. Default: false.
  • Fixed a bug that caused some app.get calls to fail despite correctly matching the API.
  • Updated dependencies.

2.0.4

04 Jun 13:21
f734629

Choose a tag to compare

  • Fixed a bug that caused a race condition related to view transitions and afterRender methods and render callbacks.
  • Fixed a bug that caused Single Page Express to trigger on <a> elements that do not have href attributes.
  • Fixed a bug that caused Single Page Express to trigger on <form> elements that do not have action attributes.
  • Fixed a bug that caused history state to be modified in ways that could cause crashes.
  • Updated dependencies.

2.0.2

05 May 15:46
48f803a

Choose a tag to compare

  • Fixed regression that caused middleware support to break routes without middleware.
  • Updated dependencies.

2.0.1

05 May 12:27
3b8681a

Choose a tag to compare

  • Added support for middleware on routes.
  • Updated dependencies.

2.0.0

01 Apr 15:34
81e5cde

Choose a tag to compare

  • Breaking: Changed default Express API version to 5.
  • Fixed a bug that caused req.body to populate {} instead of undefined in Express 5 mode.
  • Fixed a bug that caused the default / route to not load in some situations.
  • Fixed a bug that caused extra <head> tags to get inserted into the DOM with the default render method in some situations.
  • Fixed issues in sample app 2.
  • Updated dependencies.

1.2.0

23 Mar 10:20
d271ca1

Choose a tag to compare

  • Added view transition support in the default render method.
  • Added support for multiple DOM update targets in the default render method.
  • Added req.backButtonPressed and req.forwardButtonPressed to app.
  • Added classes backButtonPressed and forwardButtonPressed which will populate on the <html> element if either button was pressed.
  • Added [data-page-title] to the top of the list of accepted query selectors for sourcing content to announce to screen readers when a new page is rendered.
  • Added new params to the res.beforeRender(params), beforeEveryRender(params), res.afterRender(params), and afterEveryRender(params) methods:
    • It now supplies an object with:
      • model: The data model supplied to the template to be rendered.
      • doc: The document object created from the template after it is rendered.
      • markup: The HTML string that will be written to the page.
      • targets: The list of DOM nodes that will be updated.
  • Fixed a bug that caused postRenderCallbacks not to function properly.
  • Fixed a bug related to script tags from the rendered page being executed unnecessarily.
  • Fixed a bug causing unnecessary outlines to appear on page transitions in Safari.
  • Updated dependencies.

1.1.1

13 Mar 13:47
0ea15de

Choose a tag to compare

  • Fixed crash related to unfinished HTML validation feature.
  • Updated dependencies.

1.1.0

18 Feb 00:31
a1ee60b

Choose a tag to compare

  • Added feature which will allow single-page-express to remember the scroll position of pages that have been visited. It will also remember the scroll position of child containers on each page as well, but only if those containers have assigned id attributes.
    • Added alwaysScrollTop param which will let you disable this behavior app wide and res.resetScroll which will let you disable this behavior on a per-route basis.
  • Added new behaviors to the default render method. It will now:
    • Update the attributes of the <html> and <head> tags.
    • Add new children to the <head> tag if anything new is in the template render.
    • Delay the DOM update until any new <link> or <script> tags load to prevent a FOUC.
    • Set browser focus appropriately after the DOM update. Also added res.focus to let you set it manually.
    • Announce page changes to screen readers.
  • Added res properties which will let you remove elements from the <head> tag on a per route basis: res.removeMetaTags, res.removeStyleTags, res.removeLinkTags, res.removeScriptTags, res.removeBaseTags, res.removeTemplateTags. There is also res.removeHeadTags to remove all children of the <head> tag except the <title> tag.
  • Added topBarRoutes param to allow restricting the top bar to certain routes.
  • Added req.singlePageExpress which you can use to detect if your route is executing in the single-page-express context.
  • Fixed a bug which caused back/forward buttons to not function properly sometimes.
  • Fixed a bug which would cause the top bar not to ever hide if it was enabled but the default render method was replaced.
  • Fixed a bug in the Express sample app that would cause server-rendering to fail on routes with more than one /.
  • Added a new sample app.
  • Added an automated test suite and a few starter tests.
  • Refactored some code to simplify it.
  • Removed some unneeded dependencies.
  • Updated dependencies.

1.0.3

05 Feb 11:21
6146c6a

Choose a tag to compare

  • Fixed missing exports so you can require/import Single Page Express less verbosely in your projects.
  • Updated docs to clarify what the different builds of Single Page Express are meant to be used for.
  • Updated dependencies.

1.0.2

04 Feb 13:33
67aef47

Choose a tag to compare

  • Fixed bug causing custom res variables to not be set properly during certain default render method calls.
  • Fixed broken Express 5 support.
  • Updated dependencies.