Skip to content

Commit 1173c57

Browse files
renovate[bot]renovate-botehmicky
authored
fix(deps): update dependency netlify to v10 (#3737)
* fix(deps): update dependency netlify to v10 * fix: new js-client major release Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: ehmicky <ehmicky@gmail.com>
1 parent 8e3d9e7 commit 1173c57

File tree

5 files changed

+74
-12
lines changed

5 files changed

+74
-12
lines changed

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ module.exports = {
2525
'fp/no-this': 0,
2626
'import/max-dependencies': 0,
2727
'node/no-sync': 0,
28+
// TODO: remove once bug in eslint-plugin-node is fixed:
29+
// https://github.com/mysticatea/eslint-plugin-node/issues/250
30+
'node/no-unsupported-features/es-syntax': [2, { ignores: ['modules', 'dynamicImport'] }],
2831
'sort-destructure-keys/sort-destructure-keys': 2,
2932
'unicorn/consistent-destructuring': 0,
3033
// TODO: harmonize with filename snake_case in other Netlify Dev projects

npm-shrinkwrap.json

Lines changed: 61 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
"minimist": "^1.2.5",
153153
"mock-require": "^3.0.3",
154154
"multiparty": "^4.2.1",
155-
"netlify": "^9.0.0",
155+
"netlify": "^10.0.0",
156156
"netlify-headers-parser": "^5.0.0",
157157
"netlify-redirect-parser": "^12.0.0",
158158
"netlify-redirector": "^0.2.1",

src/commands/api.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
const oclif = require('@oclif/command')
22
const AsciiTable = require('ascii-table')
33
const chalk = require('chalk')
4-
const { methods } = require('netlify')
4+
5+
// TODO: use static `import` after migrating this repository to pure ES modules
6+
const jsClient = import('netlify')
57

68
const { isEmptyCommand } = require('../utils/check-command-inputs')
79
const Command = require('../utils/command')
@@ -17,6 +19,7 @@ class APICommand extends Command {
1719
if (isEmptyCommand(flags, args) || flags.list) {
1820
const table = new AsciiTable(`Netlify API Methods`)
1921
table.setHeading('API Method', 'Docs Link')
22+
const { methods } = await jsClient
2023
methods.forEach((method) => {
2124
const { operationId } = method
2225
table.addRow(operationId, `https://open-api.netlify.com/#operation/${operationId}`)

src/utils/command.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ const resolveConfig = require('@netlify/config')
55
const { flags: flagsLib } = require('@oclif/command')
66
const oclifParser = require('@oclif/parser')
77
const merge = require('lodash/merge')
8-
const API = require('netlify')
8+
9+
// TODO: use static `import` after migrating this repository to pure ES modules
10+
const jsClient = import('netlify')
911

1012
const { getAgent } = require('../lib/http-agent')
1113

@@ -57,9 +59,10 @@ class BaseCommand extends TrackedCommand {
5759
const apiOpts = { ...apiUrlOpts, agent }
5860
const globalConfig = await getGlobalConfig()
5961

62+
const { NetlifyAPI } = await jsClient
6063
this.netlify = {
6164
// api methods
62-
api: new API(token || '', apiOpts),
65+
api: new NetlifyAPI(token || '', apiOpts),
6366
repositoryRoot,
6467
// current site context
6568
site: {

0 commit comments

Comments
 (0)