This PR removes several deprecation messages triggered by @octokit/rest.
Details
const Octokit = require("@octokit/rest") is deprecated. Use const { Octokit } = require("@octokit/rest") instead
```node
[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead
Deprecation: [@octokit/rest] Setting the "new Octokit({ auth })" option to an object without also setting the "authStrategy" option is deprecated and will be removed in v17. See (https://octokit.github.io/rest.js/#authentication)
at authenticationPlugin (/Users/wvega/Projects/skyverge/wc-plugins/node_modules/@octokit/rest/plugins/authentication/index.js:58:5)
at /Users/wvega/Projects/skyverge/wc-plugins/node_modules/@octokit/rest/lib/constructor.js:26:37
at Array.forEach (:null:null)
at new Octokit (/Users/wvega/Projects/skyverge/wc-plugins/node_modules/@octokit/rest/lib/constructor.js:26:11)
at new DeprecatedOctokit (/Users/wvega/Projects/skyverge/wc-plugins/node_modules/@octokit/rest/index.js:29:10)
at getGithub (/Users/wvega/Projects/skyverge/wc-plugins/node_modules/sake/tasks/github.js:16:24)
at /Users/wvega/Projects/skyverge/wc-plugins/node_modules/sake/tasks/github.js:31:18
at github:get_rissue (/Users/wvega/Projects/skyverge/wc-plugins/node_modules/undertaker/lib/set-task.js:13:15)
at bound (domain.js:426:14)
at runBound (domain.js:439:12)
at asyncRunner (/Users/wvega/Projects/skyverge/wc-plugins/node_modules/async-done/index.js:55:18)
at processTicksAndRejections (internal/process/task_queues.js:79:11)
{
name: 'Deprecation'
}
```
"file" parameter is deprecated for ".repos.uploadReleaseAsset()". Use "data" instead
```node
Deprecation: [@octokit/rest] "file" parameter is deprecated for ".repos.uploadReleaseAsset()". Use "data" instead
at /Users/wvega/Projects/skyverge/wc-plugins/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js:13145:26
at Array.forEach (:null:null)
at Object.patchedMethod [as uploadReleaseAsset] (/Users/wvega/Projects/skyverge/wc-plugins/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js:13142:26)
at /Users/wvega/Projects/skyverge/wc-plugins/node_modules/sake/tasks/github.js:207:22
at processTicksAndRejections (internal/process/task_queues.js:97:5)
{
name: 'Deprecation'
}
```
Setting the "new Octokit({ auth })" option to an object without also setting the "authStrategy" option is deprecated and will be removed in v17.
```node
Deprecation: [@octokit/rest] Setting the "new Octokit({ auth })" option to an object without also setting the "authStrategy" option is deprecated and will be removed in v17. See (https://octokit.github.io/rest.js/#authentication)
at authenticationPlugin (/Users/wvega/Projects/skyverge/wc-plugins/node_modules/@octokit/rest/plugins/authentication/index.js:58:5)
at /Users/wvega/Projects/skyverge/wc-plugins/node_modules/@octokit/rest/lib/constructor.js:26:37
at Array.forEach (:null:null)
at new Octokit (/Users/wvega/Projects/skyverge/wc-plugins/node_modules/@octokit/rest/lib/constructor.js:26:11)
at getGithub (/Users/wvega/Projects/skyverge/wc-plugins/node_modules/sake/tasks/github.js:16:24)
at /Users/wvega/Projects/skyverge/wc-plugins/node_modules/sake/tasks/github.js:31:18
at github:get_rissue (/Users/wvega/Projects/skyverge/wc-plugins/node_modules/undertaker/lib/set-task.js:13:15)
at bound (domain.js:426:14)
at runBound (domain.js:439:12)
at asyncRunner (/Users/wvega/Projects/skyverge/wc-plugins/node_modules/async-done/index.js:55:18)
at processTicksAndRejections (internal/process/task_queues.js:79:11)
{
name: 'Deprecation'
}
```
QA
I deployed WooCommerce Tab Manager using this version, so I don't expect QA to show any errors.
You can either try it on another deploy or run the following task to test the output.
Setup
Update wc-plugins/package.json to use version github:skyverge/sake#remove-deprecation-messages of sake.
Run npm install
Cases
cd into wc-plugins/woocommerce-google-analytics-pro
Execute npx sake github:get_rissue
[x] Sake prompts you to select an issue to close
[x] No deprecation warnings are shown
Teardown
Update wc-plugins/package.json to use version github:skyverge/sake of sake.
Summary
This PR removes several deprecation messages triggered by
@octokit/rest
.Details
```node [@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead Deprecation: [@octokit/rest] Setting the "new Octokit({ auth })" option to an object without also setting the "authStrategy" option is deprecated and will be removed in v17. See (https://octokit.github.io/rest.js/#authentication) at authenticationPlugin (/Users/wvega/Projects/skyverge/wc-plugins/node_modules/@octokit/rest/plugins/authentication/index.js:58:5) at /Users/wvega/Projects/skyverge/wc-plugins/node_modules/@octokit/rest/lib/constructor.js:26:37 at Array.forEach (const Octokit = require("@octokit/rest")
is deprecated. Useconst { Octokit } = require("@octokit/rest")
instead"file" parameter is deprecated for ".repos.uploadReleaseAsset()". Use "data" instead
```node Deprecation: [@octokit/rest] "file" parameter is deprecated for ".repos.uploadReleaseAsset()". Use "data" instead at /Users/wvega/Projects/skyverge/wc-plugins/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js:13145:26 at Array.forEach (Setting the "new Octokit({ auth })" option to an object without also setting the "authStrategy" option is deprecated and will be removed in v17.
```node Deprecation: [@octokit/rest] Setting the "new Octokit({ auth })" option to an object without also setting the "authStrategy" option is deprecated and will be removed in v17. See (https://octokit.github.io/rest.js/#authentication) at authenticationPlugin (/Users/wvega/Projects/skyverge/wc-plugins/node_modules/@octokit/rest/plugins/authentication/index.js:58:5) at /Users/wvega/Projects/skyverge/wc-plugins/node_modules/@octokit/rest/lib/constructor.js:26:37 at Array.forEach (QA
I deployed WooCommerce Tab Manager using this version, so I don't expect QA to show any errors.
You can either try it on another deploy or run the following task to test the output.
Setup
wc-plugins/package.json
to use versiongithub:skyverge/sake#remove-deprecation-messages
of sake.npm install
Cases
cd
intowc-plugins/woocommerce-google-analytics-pro
npx sake github:get_rissue
Teardown
wc-plugins/package.json
to use versiongithub:skyverge/sake
of sake.npm install