Commit 501fa39
authored
fix: DEP0044 in TerraformOutput (#2)
Don't use deprecated `util.isArray`.
This was originally approved as hashicorp/terraform-cdk#3861 but never
merged.
<!--
Unless this is a very simple 1-line-of-code change, please create a new
issue describing the change you're proposing first, then link to it from
this PR.
Read more about our process in our contributing guide:
https://github.com/open-constructs/cdk-terrain/blob/main/CONTRIBUTING.md
-->
### 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](https://github.com/open-constructs/cdk-terrain/blob/main/CONTRIBUTING.md#pull-requests-1)
- [ ] I have run the linter on my code locally
- [x] 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](https://github.com/hashicorp/web-unified-docs/tree/main/content/terraform-cdk)
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
<!-- If this is still a work in progress, feel free to open a draft PR
until you're able to check off all the items on the list above -->1 parent 5c259e9 commit 501fa39
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
| 68 | + | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
| |||
0 commit comments