Skip to content

Conversation

@mfdebian
Copy link
Contributor

@mfdebian mfdebian commented Sep 13, 2025

This PR adds a bunch of changes to the core lib files but basically does 2 things asked for in #203:

  • Drops support for Node.js below 6
  • Add promise support to async helpers

it also makes the code es6 compliant.

I've intentionally not touched any tests (besides replacing var) and not changed anything in the intended behavior of the library.

@mfdebian mfdebian mentioned this pull request Sep 13, 2025
6 tasks
@UlisesGascon UlisesGascon self-assigned this Oct 1, 2025
@UlisesGascon UlisesGascon changed the base branch from master to 5.0 October 6, 2025 19:07
@UlisesGascon UlisesGascon added the v5 label Oct 6, 2025
Copy link
Member

@UlisesGascon UlisesGascon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will let this PR open for other reviewers... I plan to land this PR next week. Great refactor @mfdebian 👏

- Node.js 10.x
- Node.js 12.x
- Node.js 14.x
- Node.js 16.x
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a separate PR we can add support for newer versions too :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

friendly bump @mfdebian :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will work on this during the weekend! 🫡

Copy link
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are style changes, it's a big PR, I'd like to review it more carefully

@bjohansebas bjohansebas self-assigned this Oct 26, 2025
@UlisesGascon
Copy link
Member

@bjohansebas I plan to land this next week. I did an online review with @mfdebian of the changes as this PR was quite extensive. Let me know if you want us to organize a similar session with you 👍

Copy link
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, this is my first review. Just a small comment that isn’t very important. I’ll continue reviewing it tomorrow


return res;
};
const obj = Object.create(null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it basically prevents an error from being thrown if someone does delete Object.create

Suggested change
const obj = Object.create(null);
const obj = { __proto__: null };

Copy link
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great work.

I think it would be great if in the next version you stopped supporting Express v3, and maybe started creating tests for Express v5. Although in principle they should be the same tests as Express v4, so they could be reused for Express v5.

}
}

// TODO check if layout path has .hbs extension
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this TODO is complete with this line:

hbs/lib/hbs.js

Line 307 in bd43246

const isValidTemplate = /\.(html|hbs)$/.test(filepath);

@bjohansebas
Copy link
Member

Note that when making linter changes that affect a large portion of the code, it's better to do them in a separate PR and add .git-blame-ignore-revs so the blame history isn't affected by linter changes. This is just a suggestion in case something similar is done in another package, this one can be left as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants