All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Open an issue if you have any request/feedback :)
- Fixed Docker files to be used in dev and prod. Thanks to Jean-François Morin-Abdullah for the work.
- Fixed gitattributes for eol configuration. Thanks to Nicolas Michel for pointing this.
- Fixed missing shebang in git hooks. Thanks to Nicolas Michel for pointing this.
- Fixed husky related code in create script. Thanks to Kevin Peset for pointing this.
-
Replaced husky with native config for git hooks.
-
Used
tsxin scriptstartto avoid server transpilation.
-
Added
check:fixscript. Thanks to Florian Schaessens. -
Added
.gitattributesfile to mind the end of line.
- Fixed import path in seed system. Thanks to Brian Boudrioux.
- Checked types in addition to biome check.
- Fixed package templates.
- Commented
client/src/main.tsxto make it more pedagogical.
- Cleaned docker files.
-
Fixed double deploy execution in GitHub workflows.
-
Fixed Dockerfile after use of npm workspaces : root directory where
node_modulesbelongs wasn't copied. -
Fixed a variable name in docker-compose files.
- Removed deprecated lines in husky files. Thanks to Kevin Peset for pointing the issue.
-
Fixed error messages in server when client build doesn't exist.
-
Removed mentions to out of date documentation https://wildcodeschool-js-monorepo.vercel.app/.
- Added native integration of CORS package.
- Fixed type declarations to use
import.meta.envin client without error. Thanks to Kevin Peset for the fix.
- Renamed package from
@wildcodeschool/create-js-monorepo(someone created the org before me) to@this-is-to-learn/create-js-monorepo.
-
Added comment about cors types in server.
-
Added middleware example in template README.
-
Added
server/src/types/express/index.d.tsto extend Express Request type. Thanks to Kevin Peset for pointing the issue in middleware declarations.
- Fixed Biome check when there is no files to check. Thanks to Victorien Elvinger for the answer in Biome discord.
-
Breaking change: Renamed package from
create-harmoniato@wildcodeschool/create-js-monorepo. -
Breaking change: Migrated from ESLint and Prettier to Biome.
-
Breaking change: Migrated client and server to TypeScript.
-
Breaking change: Refactored server from MVC to module-based architecture.
- Added
chmodfor husky files during project initialization.
-
Added
commitlint(disabled by default). Thanks to Arthur Heurteubise for the idea. -
Added
validate-branch-name(disabled by default). Thanks to Arthur Heurteubise for the idea.
-
Breaking change: Refactored the repository as a
create-<initializer>package, whereinitializeris harmonia. The template files are moved into a newtemplatefolder. -
Breaking change: Renamed
template/frontendandtemplate/backendfolders astemplate/clientandtemplate/server. -
Breaking change: Splitted server declaration of the routes into
router.jssubfiles in subfolders following URL paths. Thanks to Ayoub Idrissi Ouedrhiri for the idea. -
Moved
template/server/migrate.jsandtemplate/server/seed.jsinto a newtemplate/server/binfolder. Updated server scripts accordingly. -
Managed
template/clientandtemplate/serversubfolders through npm workspaces. -
Breaking change: Renamed database
Managerclasses asRepository, and moved them fromtemplate/server/src/modelsintotemplate/server/database/models. Also movedtemplate/server/src/tables.jsintotemplate/server/database/tables.js. -
Breaking change: Refactored
template/server/database/tables.jsfor a manual, explicit instantiation of the repositories. -
Breaking change: Refactored seed system for the database. See
template/server/database/fixturesfor further details. -
Breaking change: Renamed
template/server/controllers/*Controllers.jsfiles astemplate/server/controllers/*Actions.js. Thanks to Matthieu Lopez for the idea.
-
Fixed serving of React build from the server. Thanks to Samuel Faber, Anthony Gorski and Julien Richard.
-
Fixed deployment scripts, and improved deployment execution time. Thanks to Dimitri Lavaury-Collot and Julien Richard.
- Added
cleanscript in rootpackage.json. Thanks to Damien Buchet for the idea.
- Changed
--cachedoption of thegit diffcommand in the pre-commit hook for the more explicit alias--staged.
-
Fixed allow list in pre-commit hook : root
package.jsonfile can not be changed anymore (but rootpackage-lock.jsonmay be regenerated). -
Fixed GitHub actions for deployment when repository is hosted on a GitHub organization account. Thanks to Jean-François Morin and Julien Richard.
-
Fixed job triggers for deployment. Thanks to Jean-François Morin and Julien Richard.
-
Refined
lint-stagedconfiguration to focus on code files only. Thanks to Dimitri Lavaury-Collot. -
Removed
yarnandpnpmpackage managers in favor of npm. Thanks to Dimitri Lavaury-Collot. -
Used cache to optimize job execution time. Thanks to Dimitri Lavaury-Collot.
- Fixed GitHub actions for lint.
- Fixed issue #11: installed and configured
lint-staged.
-
Installed
supertestin backend, and added smoke testing samples in abackend/tests/items/routes.spec.jsfile. -
Added unit testing samples in a
backend/tests/items/manager.spec.jsfile. -
Added a section in
backend/src/app.jsfor error handling. Reminder: an error-handling middleware must have 4 parameters -
Added support for network-wide testing (ie: mobile testing) using
--hostoption of Vite. Thanks to Loïc Brassart.
-
Isolated
databaseclient frombackend/src/models/AbstractManager.jsinto a separate filebackend/database/client.js, so it is accessible to test suite in a consistent way. -
Breaking change: Refactored deployment using Traefik. Thanks to Jean-François Morin and Anthony Gorski.
-
Fixed issue #84: provided lock files for
pnpmandyarn, and fixed pre-commit hook to allow changes in rootpackage.json. Thanks to Ayoub Idrissi Ouedrhiri. -
Updated code tours in
.toursfolder.
- Installed
@faker-js/fakerin backend.
-
Installed
react-router-domin front, and did a non breaking change inmain.jsx: pages can be added to the router, or everything can be developped in App setting aside the router features. -
Uninstalled
huskyin front (useless dependency). -
Moved to async/await syntax in
backend/src/controllers/itemControllers.js, and passed error handling to next middleware. -
Breaking change: Removed item update and delete routes, and the associated CRUD methods in
ItemManager. -
Breaking change: refactored models. Managers like
backend/src/models/ItemManager.jsshould declare every CRUD methods: they do not inherit read and delete methods fromAbstractManageranymore. Methodsfind,findAllandinsertare renamed asread,readAllandcreate. Moved to async/await syntax. -
Breaking change: manager registration should be done in
backend/src/tables.jsinstead ofbackend/src/models/index.js.
For example, a FooManager.js model was previously registered in backend/src/models/index.js like this:
const models = {};
const FooManager = require("./FooManager");
models.foo = new FooManager();
models.foo.setDatabase(pool);Now it should be registered in backend/src/tables.js like this:
const FooManager = require("./models/FooManager");
const managers = [
// ...
// Add other managers here
FooManager,
];Usage in controllers changes from this:
const models = require("../models");
// ...
models.foo.callSomeCrudMethod();To this:
const tables = require("../tables");
// ...
tables.foo.callSomeCrudMethod();-
Breaking change: split ̀
database.sqllogic into table creation in a filebackend/database/schema.sqland table filling in a filebackend/seed.js. Updatedbackend/migrate.jsaccordingly. -
Breaking change: renamed
migratescript asdb:migrate, and added adb:seedscript. -
Breaking change: removed fallback values for
.envvariables. They have to be defined. -
Breaking change: removed magic configuration, and added pedagogical comments to help rewrite it.
- Fixed deploy workflow. Thanks to Pierre Paillard.
-
Removed useless eslint disable comment in
backend/index.js. Thanks to Benoît Vandanjon. -
Fixed pre-commit hook to reject modifications in the root directory.
- Git commands for Windows users, to fix issues with different newline formats (see README.md).
-
Changed default ports configuration to 3000 for frontend and 6000 for backend. Thanks to Loris Chastanet.
-
Breaking change: removed cutomized alias for imports in frontend.
- Moved
viteand@vitejs/plugin-reactas regular dependencies in frontend, and fixed imports in config. Thanks to Pierre Paillard.
Open an issue if you have any request/feedback :)
- Removed useless code in
package.jsonfiles.
- Deployment workflows using CapRover. Thanks to Anthony Gorski.
- Compatibility with
npmalternatives (yarn,pnpm...). Setconfig.cliin rootpackage.jsonwith the wanted value.
-
Allowed usage
console.infoin ESLint configuration (front and back). -
Bumped dependencies versions. Thanks to Valentin Dupin.
-
Cleaned backend/src/app.js and removed public index.html file to avoid conflicts when serving react build.
-
Breaking change: removed setup script:
npm install(or any other alternative) triggers apostinstallscript. -
Breaking change: removed models "autoloading": now managers should be instantiated manually in
backend/src/models/index.js.
For example, given you created a FooManager.js file to be associated with a foo table,
you should add to index, after const models = {} statement:
const FooManager = require("./FooManager");
models.foo = new FooManager();
models.foo.setDatabase(pool);- Breaking change: renamed
connectionproperty of managers asdatabaseto be consistent with quests.
Managers methods should be fixed from:
findAll() {
return this.connection.query(`select * from ${this.table}`);
}To:
findAll() {
return this.database.query(`select * from ${this.table}`);
}