netlify 8.0.4 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "netlify",
3
3
  "description": "Netlify Node.js API client",
4
- "version": "8.0.4",
4
+ "version": "9.0.0",
5
5
  "files": [
6
6
  "src/**/*.js",
7
7
  "!src/**/*.test.js",
@@ -62,7 +62,7 @@
62
62
  "node client"
63
63
  ],
64
64
  "dependencies": {
65
- "@netlify/open-api": "^2.5.2",
65
+ "@netlify/open-api": "^2.6.0",
66
66
  "lodash.camelcase": "^4.3.0",
67
67
  "micro-api-client": "^3.3.0",
68
68
  "node-fetch": "^2.6.1",
@@ -75,7 +75,7 @@
75
75
  "@babel/plugin-transform-runtime": "^7.12.17",
76
76
  "@babel/preset-env": "^7.12.17",
77
77
  "@babel/runtime": "^7.12.18",
78
- "@netlify/eslint-config-node": "^3.3.5",
78
+ "@netlify/eslint-config-node": "^3.3.8",
79
79
  "ava": "^2.4.0",
80
80
  "babel-loader": "^8.2.2",
81
81
  "from2-string": "^1.1.0",
@@ -88,7 +88,7 @@
88
88
  "webpack-cli": "^4.5.0"
89
89
  },
90
90
  "engines": {
91
- "node": ">=10.18.0"
91
+ "node": "^12.20.0 || ^14.14.0 || >=16.0.0"
92
92
  },
93
93
  "ava": {
94
94
  "files": [
package/src/operations.js CHANGED
@@ -3,17 +3,13 @@ const omit = require('omit.js').default
3
3
 
4
4
  // Retrieve all OpenAPI operations
5
5
  const getOperations = function () {
6
- // TODO: switch to Array.flat() once we drop support for Node.js < 11.0.0
7
- // eslint-disable-next-line unicorn/prefer-spread
8
- return [].concat(
9
- ...Object.entries(paths).map(([path, pathItem]) => {
10
- const operations = omit(pathItem, ['parameters'])
11
- return Object.entries(operations).map(([method, operation]) => {
12
- const parameters = getParameters(pathItem.parameters, operation.parameters)
13
- return { ...operation, verb: method, path, parameters }
14
- })
15
- }),
16
- )
6
+ return Object.entries(paths).flatMap(([path, pathItem]) => {
7
+ const operations = omit(pathItem, ['parameters'])
8
+ return Object.entries(operations).map(([method, operation]) => {
9
+ const parameters = getParameters(pathItem.parameters, operation.parameters)
10
+ return { ...operation, verb: method, path, parameters }
11
+ })
12
+ })
17
13
  }
18
14
 
19
15
  const getParameters = function (pathParameters = [], operationParameters = []) {