Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Replaced deprecFix: Replace deprecated util.isArray with Array.isArray for Node.js compatibilityated util.isArray with Array.isArray#77

Open
VivekGhule wants to merge 1 commit into
jaredhanson:masterjaredhanson/connect-flash:masterfrom
VivekGhule:mainVivekGhule/connect-flash:mainCopy head branch name to clipboard
Open

Replaced deprecFix: Replace deprecated util.isArray with Array.isArray for Node.js compatibilityated util.isArray with Array.isArray#77
VivekGhule wants to merge 1 commit into
jaredhanson:masterjaredhanson/connect-flash:masterfrom
VivekGhule:mainVivekGhule/connect-flash:mainCopy head branch name to clipboard

Conversation

@VivekGhule

Copy link
Copy Markdown

Summary:
This pull request addresses a deprecation warning in Node.js: [DEP0044] DeprecationWarning: util.isArray is deprecated. The legacy util.isArray() function has been replaced with the modern Array.isArray() method to ensure compatibility with current and future Node.js versions.

Changes Made:

  1. Removed var isArray = require('util').isArray.
  2. Replaced all usages of isArray(msg) with Array.isArray(msg) in lib/flash.js.
  3. No functional changes were made to existing flash message logic — behavior remains identical.

Benefits:

  1. Eliminates the deprecation warning when running applications using connect-flash.
  2. Ensures compatibility with Node.js v16+ and future releases.
  3. Improves code maintainability by using standard, modern APIs.

Testing:

  1. Verified that flash messages still work as expected in a local Express.js project.
  2. Confirmed that the [DEP0044] warning no longer appears.

Additional Notes:
This is a backward-compatible change and does not affect any existing functionality of the package.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.