Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] DeprecationWarnings in node v22 DEP0055 DEP0047 DEP0044 #765

Open
mdouglass opened this issue May 14, 2024 · 0 comments
Open

[BUG] DeprecationWarnings in node v22 DEP0055 DEP0047 DEP0044 #765

mdouglass opened this issue May 14, 2024 · 0 comments

Comments

@mdouglass
Copy link

Describe the bug
On startup, we see multiple DeprecationWarnings from config.js calling util.isArray, util.isRegExp and util.isDate:

(node:2639986) [DEP0044] DeprecationWarning: The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.
1595.292626 warn: warning DeprecationWarning: The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.
    at _clone (/obscured/node_modules/config/lib/config.js:1006:15)
    at Config.cloneDeep (/obscured/node_modules/config/lib/config.js:1048:10)
    at /obscured/node_modules/config/lib/config.js:1323:32
    at Array.forEach (<anonymous>)
    at Config.util.extendDeep (/obscured/node_modules/config/lib/config.js:1298:9)
    at /obscured/node_modules/config/lib/config.js:653:12
    at Array.forEach (<anonymous>)
    at Config.util.loadFileConfigs (/obscured/node_modules/config/lib/config.js:650:16)
    at new Config (/obscured/node_modules/config/lib/config.js:116:27)
    at Object.<anonymous> (/obscured/node_modules/config/lib/config.js:1515:33)
(node:2639986) [DEP0055] DeprecationWarning: The `util.isRegExp` API is deprecated. Please use `arg instanceof RegExp` instead.
1600.924325 warn: warning DeprecationWarning: The `util.isRegExp` API is deprecated. Please use `arg instanceof RegExp` instead.
    at _clone (/obscured/node_modules/config/lib/config.js:1008:22)
    at Config.cloneDeep (/obscured/node_modules/config/lib/config.js:1048:10)
    at /obscured/node_modules/config/lib/config.js:1323:32
    at Array.forEach (<anonymous>)
    at Config.util.extendDeep (/obscured/node_modules/config/lib/config.js:1298:9)
    at /obscured/node_modules/config/lib/config.js:653:12
    at Array.forEach (<anonymous>)
    at Config.util.loadFileConfigs (/obscured/node_modules/config/lib/config.js:650:16)
    at new Config (/obscured/node_modules/config/lib/config.js:116:27)
    at Object.<anonymous> (/obscured/node_modules/config/lib/config.js:1515:33)
(node:2639986) [DEP0047] DeprecationWarning: The `util.isDate` API is deprecated.  Please use `arg instanceof Date` instead.
1601.225412 warn: warning DeprecationWarning: The `util.isDate` API is deprecated.  Please use `arg instanceof Date` instead.
    at _clone (/obscured/node_modules/config/lib/config.js:1011:22)
    at Config.cloneDeep (/obscured/node_modules/config/lib/config.js:1048:10)
    at /obscured/node_modules/config/lib/config.js:1323:32
    at Array.forEach (<anonymous>)
    at Config.util.extendDeep (/obscured/node_modules/config/lib/config.js:1298:9)
    at /obscured/node_modules/config/lib/config.js:653:12
    at Array.forEach (<anonymous>)
    at Config.util.loadFileConfigs (/obscured/node_modules/config/lib/config.js:650:16)
    at new Config (/obscured/node_modules/config/lib/config.js:116:27)
    at Object.<anonymous> (/obscured/node_modules/config/lib/config.js:1515:33)

Expected behavior
No deprecation warnings when starting on node v22.

Please tell us about your environment:

  • node-config version: 3.3.11
  • node-version: 22.1.0

Other information

I'm happy to submit a PR to make the recommended changes but wanted to make sure it was OK to do so first as I don't know how it would fit in with your back-compat strategy for previous node.js versions.

Thanks!

mdouglass added a commit to mdouglass/node-config that referenced this issue May 14, 2024
@mdouglass mdouglass changed the title [BUG] DreprecationWarnings in node v22 DEP0055 DEP0047 DEP0044 [BUG] DeprecationWarnings in node v22 DEP0055 DEP0047 DEP0044 May 14, 2024
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

No branches or pull requests

1 participant