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

The use of Array.at is only on node-16. This breaks @oclif/plugins-plugin@^2.4.8 #731

Closed
shazron opened this issue Jul 12, 2023 · 3 comments · Fixed by #741
Closed

The use of Array.at is only on node-16. This breaks @oclif/plugins-plugin@^2.4.8 #731

shazron opened this issue Jul 12, 2023 · 3 comments · Fixed by #741
Labels
bug Something isn't working

Comments

@shazron
Copy link

shazron commented Jul 12, 2023

See: https://github.com/oclif/core/blame/3f4b0f825623448fc18627a4c924fa6cf0b1c470/src/parser/parse.ts#L248
(there should be a total of 6 occurrences of Array.at usage in that commit)

Array.at:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at#browser_compatibility

@oclif/plugins-plugin@2.x uses @oclif/core@^2.8.2 and still supports node-14.
@oclif/plugins-plugin@3.x does drop node 14 support.

Consider reverting use of Array.at at that line (and the other 5 lines) with the equivalent node-14 compatible code:

fws.tokens?.slice(-1)?.input

If not the release with the use of this Array.at syntax should follow semver and be a major version update.

cc @mshanemc

@shazron
Copy link
Author

shazron commented Jul 17, 2023

Engines say it supports node-14:

"node": ">=14.0.0"

@mdonnalley
Copy link
Contributor

Thanks for posting this @shazron I'm looking into it now

@mdonnalley mdonnalley added the bug Something isn't working label Jul 25, 2023
@git2gus
Copy link

git2gus bot commented Jul 25, 2023

This issue has been linked to a new work item: W-13822830

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants