From a58a3fbc7700ee8239a36fe1e66cfb5c4ffb22ce Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 2 Dec 2021 15:45:02 +0000 Subject: [PATCH] fix(deps): update dependency @netlify/plugins-list to v6 (#3755) * fix(deps): update dependency @netlify/plugins-list to v6 * chore: fix `@netlify/plugins-list` import Co-authored-by: Renovate Bot Co-authored-by: ehmicky --- npm-shrinkwrap.json | 27 ++++++++++++++++++++------- package.json | 2 +- src/utils/init/plugins.js | 5 ++++- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 4d885294590..2ae656b7585 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -15,7 +15,7 @@ "@netlify/framework-info": "^6.0.0", "@netlify/local-functions-proxy": "^1.1.1", "@netlify/plugin-edge-handlers": "^2.0.0", - "@netlify/plugins-list": "^5.0.0", + "@netlify/plugins-list": "^6.0.1", "@netlify/routing-local-proxy": "^0.34.1", "@netlify/zip-it-and-ship-it": "5.2.0", "@oclif/command": "^1.6.1", @@ -2489,6 +2489,14 @@ "node": "^12.20.0 || ^14.14.0 || >=16.0.0" } }, + "node_modules/@netlify/build/node_modules/@netlify/plugins-list": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-5.0.0.tgz", + "integrity": "sha512-reoPM+p/1Sm85KAPIwKr4+WVIneSVJZIZbo54VqZqvQJwcm/4CmyB4kUTthBIkY+b7chPcYEmqfvZxY9EfplAQ==", + "engines": { + "node": "^12.20.0 || ^14.14.0 || >=16.0.0" + } + }, "node_modules/@netlify/build/node_modules/@sindresorhus/is": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz", @@ -3409,9 +3417,9 @@ } }, "node_modules/@netlify/plugins-list": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-5.0.0.tgz", - "integrity": "sha512-reoPM+p/1Sm85KAPIwKr4+WVIneSVJZIZbo54VqZqvQJwcm/4CmyB4kUTthBIkY+b7chPcYEmqfvZxY9EfplAQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.0.1.tgz", + "integrity": "sha512-HD8YgP43GGpgSOowBIW8Yb9+IvFlRGYq+X7Ee7G0okgOjzmgLy0En6JZ1shl0lGpuO8UX5EtLwDiLst3m/UIvg==", "engines": { "node": "^12.20.0 || ^14.14.0 || >=16.0.0" } @@ -23688,6 +23696,11 @@ "yargs": "^15.3.1" }, "dependencies": { + "@netlify/plugins-list": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-5.0.0.tgz", + "integrity": "sha512-reoPM+p/1Sm85KAPIwKr4+WVIneSVJZIZbo54VqZqvQJwcm/4CmyB4kUTthBIkY+b7chPcYEmqfvZxY9EfplAQ==" + }, "@sindresorhus/is": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz", @@ -24325,9 +24338,9 @@ } }, "@netlify/plugins-list": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-5.0.0.tgz", - "integrity": "sha512-reoPM+p/1Sm85KAPIwKr4+WVIneSVJZIZbo54VqZqvQJwcm/4CmyB4kUTthBIkY+b7chPcYEmqfvZxY9EfplAQ==" + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.0.1.tgz", + "integrity": "sha512-HD8YgP43GGpgSOowBIW8Yb9+IvFlRGYq+X7Ee7G0okgOjzmgLy0En6JZ1shl0lGpuO8UX5EtLwDiLst3m/UIvg==" }, "@netlify/routing-local-proxy": { "version": "0.34.1", diff --git a/package.json b/package.json index 3f8aabbda1f..9480270ab18 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "@netlify/framework-info": "^6.0.0", "@netlify/local-functions-proxy": "^1.1.1", "@netlify/plugin-edge-handlers": "^2.0.0", - "@netlify/plugins-list": "^5.0.0", + "@netlify/plugins-list": "^6.0.1", "@netlify/routing-local-proxy": "^0.34.1", "@netlify/zip-it-and-ship-it": "5.2.0", "@oclif/command": "^1.6.1", diff --git a/src/utils/init/plugins.js b/src/utils/init/plugins.js index 1d08b779186..477d7d8123e 100644 --- a/src/utils/init/plugins.js +++ b/src/utils/init/plugins.js @@ -1,10 +1,13 @@ -const { pluginsList, pluginsUrl } = require('@netlify/plugins-list') const fetch = require('node-fetch') +// TODO: use static `import` after migrating this repository to pure ES modules +const netlifyPluginsList = import('@netlify/plugins-list') + // 1 minute const PLUGINS_LIST_TIMEOUT = 6e4 const getPluginsList = async () => { + const { pluginsList, pluginsUrl } = await netlifyPluginsList try { const response = await fetch(pluginsUrl, { timeout: PLUGINS_LIST_TIMEOUT }) return await response.json()