first-interaction icon indicating copy to clipboard operation
first-interaction copied to clipboard

Deprecated Warning every run of the action

Open flaxel opened this issue 3 years ago • 6 comments

When the action is always running in my repository, I always get the following warnings:

[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead

This should be fixable by updating the dependencies in the package.json file. Is there a reason why the versions are not explicitly there, but direct files are given? Would it make sense to add a dependabot file to get security updates etc.?

flaxel avatar Apr 12 '21 16:04 flaxel

I think that comes from the actions/github tar archive zip with the following file github.d.ts inside the toolkit folder. I disagree with the updating the dependencies because it can cause to potentially break functionality and add additional errors along the way. You want to unzip them before working on them.

rodrigoargumedo avatar May 14 '21 02:05 rodrigoargumedo

It just requires to change that one-line from that file and use const { module } = require(module_name/class_name) code.

rodrigoargumedo avatar May 14 '21 02:05 rodrigoargumedo

So the procedure would be to edit the file. I could do that over the weekend. 😄

I disagree with the updating the dependencies because it can cause to potentially break functionality and add additional errors along the way.

I would not support the statement. The new versions close security gaps and possibly allow further use of the action. To guarantee the functionality of the action, tests should be written to prevent such problems.

flaxel avatar May 14 '21 17:05 flaxel

@flaxel

Hi is this resolved?

I see you closed the pr without merging

utkarshsethi avatar Dec 24 '21 08:12 utkarshsethi

Oh I didn't know why I'm closing this PR. But I guess it is better to use something like a build management tool.

flaxel avatar Dec 24 '21 08:12 flaxel

This should be taken care of by #296 :)

ncalteen avatar Feb 22 '24 21:02 ncalteen