Skip to content

Conversation

@gabegorelick
Copy link
Contributor

@gabegorelick gabegorelick commented Jan 13, 2026

Don't use deprecated util.isArray.

This was originally approved as hashicorp/terraform-cdk#3861 but never merged.

Related issue

Fixes hashicorp/terraform-cdk#3860

Description

When running on Node 22+, the following deprecation warning is logged:

[DEP0044] DeprecationWarning: The util.isArray API is deprecated. Please use Array.isArray() instead.

See https://nodejs.org/api/deprecations.html#DEP0044

There's no good reason to use util.isArray. It's an ancient API that's been superseded by Array.isArray(). It's use here seems to be totally unintentional, perhaps from bad autocomplete.

Checklist

  • I have updated the PR title to match CDKTF's style guide
  • I have run the linter on my code locally
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation if applicable
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works if applicable
  • New and existing unit tests pass locally with my changes

Don't use deprecated `util.isArray`.

This was originally approved as hashicorp/terraform-cdk#3861 but never
merged.

Fixes hashicorp/terraform-cdk#3860
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.

cdktf: DEP0044 in TerraformOutput

1 participant