nrwl / nx-set-shas

:sparkles: A Github Action which sets the base and head SHAs required for `nx affected` commands in CI
https://nx.dev
MIT License
157 stars 72 forks source link

[DEP0005] DeprecationWarning: Buffer() is deprecated #50

Closed iamstarkov closed 1 year ago

iamstarkov commented 2 years ago

Hello, in my GitHub actions with Node.js 16.16.0 build I see this error. I suspect it will stop working in the future.

(node:613) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[91](https://github.com/nordnet-private/nx-experiment/runs/7406784956?check_suite_focus=true#step:14:93)
(Use `node --trace-deprecation ...` to show where the warning was created)

Please take a look and let me know if you need any help of have any questions

meeroslav commented 2 years ago

Thank you @iamstarkov for reporting this.

We do not use Buffer directly. It's used via GitHub API tools. They might need to be updated. I will have a look.

meeroslav commented 2 years ago

Can you tell me which version of the nx-set-shas you are using?

miluoshi commented 2 years ago

I'm getting the same warning and I'm using latest version with tag nrwl/nx-set-shas@v2

iamstarkov commented 2 years ago

@meeroslav latest v2

Run nrwl/nx-set-shas@v2
[34](https://github.com/nordnet-private/monorepo-cms/runs/8092993037?check_suite_focus=true#step:9:35)
Run node $GITHUB_ACTION_PATH/dist/index.js *** master false push . 
[63](https://github.com/nordnet-private/monorepo-cms/runs/8092993037?check_suite_focus=true#step:9:64)

[63](https://github.com/nordnet-private/monorepo-cms/runs/8092993037?check_suite_focus=true#step:9:65)
(node:473) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[64](https://github.com/nordnet-private/monorepo-cms/runs/8092993037?check_suite_focus=true#step:9:66)
(Use `node --trace-deprecation ...` to show where the warning was created)
Buckwich commented 1 year ago

Here is the deprecation notice from github: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

So @actions/core needs to be updated to v1.10.0

iamstarkov commented 1 year ago

@meeroslav is this issue still more info needed or is it actionable now?

meeroslav commented 1 year ago

This will be fixed with https://github.com/nrwl/nx-set-shas/pull/71