Skip to content

Conversation

Fdawgs
Copy link
Contributor

@Fdawgs Fdawgs commented Feb 26, 2025

What this does:

This PR adds missing 'use strict' directives to the cjs files in this repo. Strict mode can improve performance by eliminating some JavaScript features that hinder optimizations. It also helps avoid subtle bugs by enforcing more consistent scoping and variable declarations.

The MDN article on strict mode alludes to it, but the V8 JS engine used by Node will use more optimised execution paths when strict mode is enabled. See related Stack Overflow discussion for an example.

Related issues:

N/A

Pre/Post merge checklist:

  • Update change log

@dhensby
Copy link
Collaborator

dhensby commented Feb 27, 2025

The build failures are fixed in #1730, so merging this in expectation they'll pass after 😅

@dhensby dhensby merged commit 4571b2c into tediousjs:master Feb 27, 2025
5 of 13 checks passed
@Fdawgs Fdawgs deleted the chore/strict branch February 28, 2025 06:15
Copy link

🎉 This PR is included in version 12.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

2 participants