Skip to content

Conversation

gabegorelick
Copy link

Don't use deprecated util.isArray.

Closes #3860

Related issue

Fixes #3860

Description

util.isArray is deprecated in favor of Array.isArray.

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

Copy link

hashicorp-cla-app bot commented Apr 23, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

Copy link
Member

@mutahhir mutahhir left a comment

Choose a reason for hiding this comment

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

Thank you!

Don't use deprecated `util.isArray`.

Closes hashicorp#3860
@mutahhir
Copy link
Member

mutahhir commented Jun 2, 2025

@gabegorelick can you confirm if you've signed the CLA? The bot above is being ambiguous.

@gabegorelick
Copy link
Author

can you confirm if you've signed the CLA?

I can confirm that I've signed the CLA.

@gabegorelick
Copy link
Author

Is there anything I can do to help get this merged? This deprecation warning is quite annoying.

@willgriffin
Copy link

should this be checking to see whether it should use the old or new ?

@gabegorelick
Copy link
Author

should this be checking to see whether it should use the old or new ?

No. There are already dozens of unconditional uses of Array.isArray in this repo. Array.isArray has been supported since at least Node 0.10. It is ancient at this point. There is no reason to use util.isArray, which is why its use is deprecated. I am sure that Terraform does not support running on any platforms without Array.isArray.

@gabegorelick
Copy link
Author

The inability to get this simple fixed merged is quite depressing. It makes me question the health of terraform-cdk going forward.

@pauldraper
Copy link

The inability to get this simple fixed merged is quite depressing. It makes me question the health of terraform-cdk going forward.

Thanks for your efforts 🫡

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
4 participants