Home

>

Tools

>

Strapi

>

Releases

>

3.0.0-alpha.6.4

Strapi Release: 3.0.0-alpha.6.4

Tag Name: v3.0.0-alpha.6.4

Release Date: 10/23/2017

Strapi LogoStrapi

Open-source headless CMS built with Node.js. Provides developers with complete freedom in choosing their favorite tools and frameworks for frontend development.

TL;DR

Strapi v3.0.0-alpha.6.4 brings important bug fixes for relationship management, lifecycle callbacks, and development environment dependencies. The router has been updated to use koa-router-joi, and documentation links have been fixed. This release focuses on improving stability and developer experience in the alpha version.

Highlight of the Release

    • Fixed relationship management between models with correct one-to-many relationship information
    • Added new lifecycle callbacks for Mongoose models' findOne() and find() methods
    • Updated router implementation to use koa-router-joi instead of koa-joi-router
    • Fixed Content-Manager relations management and many-to-many relationships
    • Improved development environment with fixed dependency linking

Migration Guide

No major migration steps are required for this alpha release. However, developers should be aware of the following changes:

  1. If you were using custom code that relied on the specific behavior of koa-joi-router, you may need to update it to work with koa-router-joi.

  2. If you were working with relationship data, particularly one-to-many relationships, the data structure returned may have changed slightly to correctly represent these relationships.

  3. If you were using Mongoose models without lifecycle callbacks for findOne() and find() methods, you now have the option to implement before and after callbacks for these operations.

Upgrade Recommendations

As this is an alpha release (v3.0.0-alpha.6.4), it is primarily recommended for developers who are testing or contributing to Strapi's development.

  • Development environments: Upgrade is recommended to benefit from the bug fixes and improvements.
  • Production environments: Not recommended for production use as this is still an alpha version.

To upgrade from v3.0.0-alpha.6.3 to v3.0.0-alpha.6.4:

npm install [email protected] --save

Or if using Yarn:

yarn add [email protected]

After upgrading, restart your Strapi application to ensure all changes take effect.

Bug Fixes

Framework Fixes

  • Fixed relationship information between models, now correctly returning data about one-to-many relationships (#296)
  • Fixed dependency linking in development environment, ensuring proper module resolution (c5daff6)
  • Fixed MySQL connection by removing schema setting that was causing issues
  • Fixed lifecycle callbacks implementation (#298)
  • Fixed setup script for smoother installation process

Content Management Fixes

  • Fixed Content-Manager relations management interface (#300)
  • Fixed many-to-many relationships handling to ensure proper data association

Documentation Fixes

  • Fixed edit links in documentation for better navigation (#297)
  • Updated Contributing.md with clearer guidelines and correct information (#284)

New Features

New Lifecycle Callbacks

Added new lifecycle callbacks for Mongoose models:

  • before and after callbacks for the findOne() method
  • before and after callbacks for the find() method

These callbacks provide developers with more control points to execute custom logic during data retrieval operations.

Security Updates

No specific security fixes were included in this release.

Performance Improvements

Router Improvements

The router implementation has been updated to use koa-router-joi instead of koa-joi-router (#294). This change brings:

  • Better performance for route handling
  • Improved request validation
  • More maintainable routing code structure

Path Handling Optimization

Implemented dynamic separator usage instead of hardcoded '/' characters, which improves path handling across different operating systems and environments.

Impact Summary

This release focuses on stabilizing Strapi's alpha version by fixing several critical bugs related to data relationships, lifecycle callbacks, and development environment setup. The router implementation has been updated to use a more modern approach with koa-router-joi.

The most significant improvements are in relationship handling, both at the framework level and in the Content-Manager interface. These fixes ensure that one-to-many and many-to-many relationships are correctly represented and managed, which is fundamental for proper data modeling and content management.

The addition of lifecycle callbacks for Mongoose's findOne() and find() methods expands the framework's extensibility, allowing developers to implement custom logic before and after these common data retrieval operations.

Documentation improvements, including fixed edit links and updated contributing guidelines, enhance the developer experience for those looking to learn about or contribute to Strapi.

Overall, while this is an incremental alpha release, it addresses important foundational aspects of the CMS that will benefit developers working with Strapi's data modeling, API, and content management capabilities.

Full Release Notes

🐛 Bug Fix

  • [Framework] Return correct information about one-to-many relationships between models (#296).
  • [Framework] Add new lifecycle before and after callbacks for findOne() and find() methods for Mongoose's model (#298).
  • [Framework] Correctly link dependencies in development environment (c5daff6)

💅 Enhancement

  • [Framework] Use up-to-date router (#294).
  • [Doc] Fix Edit link (#297)

Statistics:

File Changed41
Line Additions117
Line Deletions97
Line Changes214
Total Commits23

User Affected:

  • Fixed relationship management between models, improving data integrity
  • Added new lifecycle callbacks for Mongoose models, enhancing customization options
  • Fixed development environment dependency linking for smoother local development
  • Updated router implementation for better performance and maintainability

Contributors:

Aurelsicokosprucelauriejim