@depup/serverless 4.33.0-depup.0 → 4.33.1-depup.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/README.md CHANGED
@@ -13,8 +13,8 @@ npm install @depup/serverless
13
13
 
14
14
  | Field | Value |
15
15
  |-------|-------|
16
- | Original | [serverless](https://www.npmjs.com/package/serverless) @ 4.33.0 |
17
- | Processed | 2026-03-17 |
16
+ | Original | [serverless](https://www.npmjs.com/package/serverless) @ 4.33.1 |
17
+ | Processed | 2026-03-31 |
18
18
  | Smoke test | failed |
19
19
  | Deps updated | 2 |
20
20
 
@@ -22,8 +22,8 @@ npm install @depup/serverless
22
22
 
23
23
  | Dependency | From | To |
24
24
  |------------|------|-----|
25
- | axios | ^1.13.5 | ^1.13.6 |
26
- | rimraf | ^5.0.10 | ^6.1.3 |
25
+ | rimraf | 5.0.10 | ^6.1.3 |
26
+ | undici | 6.24.1 | ^7.24.6 |
27
27
 
28
28
  ---
29
29
 
package/binary.js CHANGED
@@ -1,8 +1,7 @@
1
1
  const os = require('os')
2
- const { configureProxy } = require('axios-proxy-builder')
3
- const axios = require('axios')
2
+ const { ProxyAgent } = require('undici')
4
3
 
5
- const { existsSync, mkdirSync, rmSync, createWriteStream } = require('fs')
4
+ const { existsSync, mkdirSync, rmSync, writeFileSync } = require('fs')
6
5
  const { join } = require('path')
7
6
  const { spawnSync } = require('child_process')
8
7
 
@@ -13,6 +12,55 @@ const error = (msg) => {
13
12
  process.exit(1)
14
13
  }
15
14
 
15
+ const formatHostName = (hostname) => hostname.replace(/^\.*/, '.').toLowerCase()
16
+
17
+ const parseNoProxyZone = (zone) => {
18
+ zone = zone.trim()
19
+ const zoneParts = zone.split(':', 2)
20
+ const zoneHost = formatHostName(zoneParts[0])
21
+ const zonePort = zoneParts[1]
22
+ const hasPort = zone.indexOf(':') > -1
23
+ return { hostname: zoneHost, port: zonePort, hasPort }
24
+ }
25
+
26
+ const shouldBypassProxy = (requestURL) => {
27
+ const noProxy = process.env.NO_PROXY || process.env.no_proxy || ''
28
+ if (noProxy === '*') return true
29
+ if (noProxy === '') return false
30
+
31
+ const port =
32
+ requestURL.port || (requestURL.protocol === 'https:' ? '443' : '80')
33
+ const hostname = formatHostName(requestURL.hostname)
34
+
35
+ return noProxy
36
+ .split(',')
37
+ .map(parseNoProxyZone)
38
+ .some((noProxyZone) => {
39
+ const isMatchedAt = hostname.indexOf(noProxyZone.hostname)
40
+ const hostnameMatched =
41
+ isMatchedAt > -1 &&
42
+ isMatchedAt === hostname.length - noProxyZone.hostname.length
43
+ if (noProxyZone.hasPort) {
44
+ return port === noProxyZone.port && hostnameMatched
45
+ }
46
+ return hostnameMatched
47
+ })
48
+ }
49
+
50
+ const getProxyUrl = (url) => {
51
+ const requestURL = new URL(url)
52
+
53
+ if (shouldBypassProxy(requestURL)) return null
54
+
55
+ if (requestURL.protocol === 'http:') {
56
+ return process.env.HTTP_PROXY || process.env.http_proxy || null
57
+ }
58
+ if (requestURL.protocol === 'https:') {
59
+ return process.env.HTTPS_PROXY || process.env.https_proxy || null
60
+ }
61
+ return null
62
+ }
63
+
16
64
  class Binary {
17
65
  constructor(name, url, version, config) {
18
66
  const errors = []
@@ -87,7 +135,7 @@ class Binary {
87
135
  }
88
136
  }
89
137
 
90
- install(fetchOptions, suppressLogs = false) {
138
+ install(suppressLogs = false) {
91
139
  if (this.exists()) {
92
140
  if (!suppressLogs) {
93
141
  console.error(
@@ -117,19 +165,20 @@ class Binary {
117
165
  this.removeBinary()
118
166
  })
119
167
 
120
- return axios({ ...fetchOptions, url: this.url, responseType: 'stream' })
168
+ const proxyUrl = getProxyUrl(this.url)
169
+ const fetchOptions = proxyUrl
170
+ ? { dispatcher: new ProxyAgent(proxyUrl) }
171
+ : {}
172
+
173
+ return fetch(this.url, fetchOptions)
121
174
  .then((res) => {
122
- return new Promise((resolve, reject) => {
123
- const writeStream = createWriteStream(this.binaryPath, {
124
- mode: 0o755,
125
- })
126
- res.data.pipe(writeStream)
127
- writeStream.on('error', (err) => {
128
- writeStream.close()
129
- reject(err)
130
- })
131
- writeStream.on('close', () => resolve())
132
- })
175
+ if (!res.ok) {
176
+ throw new Error(`HTTP ${res.status}: ${res.statusText}`)
177
+ }
178
+ return res.arrayBuffer()
179
+ })
180
+ .then((buffer) => {
181
+ writeFileSync(this.binaryPath, Buffer.from(buffer), { mode: 0o755 })
133
182
  })
134
183
  .then(() => {
135
184
  if (!suppressLogs) {
@@ -142,10 +191,8 @@ class Binary {
142
191
  })
143
192
  }
144
193
 
145
- run(fetchOptions) {
146
- const promise = !this.exists()
147
- ? this.install(fetchOptions, true)
148
- : Promise.resolve()
194
+ run() {
195
+ const promise = !this.exists() ? this.install(true) : Promise.resolve()
149
196
 
150
197
  promise
151
198
  .then(() => {
@@ -213,10 +260,7 @@ const getBinary = () => {
213
260
 
214
261
  const install = async () => {
215
262
  const binary = getBinary()
216
-
217
- const proxy = configureProxy(binary.url)
218
-
219
- return binary.install(proxy, true) // Suppresses logs from binary-install
263
+ return binary.install(true) // Suppresses logs from binary-install
220
264
  }
221
265
 
222
266
  const run = async () => {
package/changes.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "bumped": {
3
- "axios": {
4
- "from": "^1.13.5",
5
- "to": "^1.13.6"
6
- },
7
3
  "rimraf": {
8
- "from": "^5.0.10",
4
+ "from": "5.0.10",
9
5
  "to": "^6.1.3"
6
+ },
7
+ "undici": {
8
+ "from": "6.24.1",
9
+ "to": "^7.24.6"
10
10
  }
11
11
  },
12
- "timestamp": "2026-03-17T18:44:29.233Z",
12
+ "timestamp": "2026-03-31T20:18:59.027Z",
13
13
  "totalUpdated": 2
14
14
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@depup/serverless",
3
- "version": "4.33.0-depup.0",
4
- "description": "[DepUp] Dependency-bumped version of serverless",
3
+ "version": "4.33.1-depup.0",
4
+ "description": "serverless with all dependencies updated to latest",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "lint": "eslint",
@@ -10,10 +10,12 @@
10
10
  "prettier:fix": "prettier -w . --ignore-path ../../.prettierignore"
11
11
  },
12
12
  "keywords": [
13
+ "serverless",
13
14
  "depup",
14
- "dependency-bumped",
15
- "updated-deps",
16
- "serverless"
15
+ "updated-dependencies",
16
+ "security",
17
+ "latest",
18
+ "patched"
17
19
  ],
18
20
  "author": "Serverless Inc.",
19
21
  "repository": {
@@ -25,30 +27,28 @@
25
27
  "sls": "run.js"
26
28
  },
27
29
  "dependencies": {
28
- "axios": "^1.13.6",
29
- "axios-proxy-builder": "^0.1.2",
30
30
  "rimraf": "^6.1.3",
31
- "xml2js": "0.6.2"
31
+ "undici": "^7.24.6"
32
32
  },
33
33
  "devDependencies": {},
34
34
  "engines": {
35
- "node": ">=18.0.0"
35
+ "node": ">=18.17.0"
36
36
  },
37
37
  "depup": {
38
38
  "changes": {
39
- "axios": {
40
- "from": "^1.13.5",
41
- "to": "^1.13.6"
42
- },
43
39
  "rimraf": {
44
- "from": "^5.0.10",
40
+ "from": "5.0.10",
45
41
  "to": "^6.1.3"
42
+ },
43
+ "undici": {
44
+ "from": "6.24.1",
45
+ "to": "^7.24.6"
46
46
  }
47
47
  },
48
48
  "depsUpdated": 2,
49
49
  "originalPackage": "serverless",
50
- "originalVersion": "4.33.0",
51
- "processedAt": "2026-03-17T18:44:30.856Z",
50
+ "originalVersion": "4.33.1",
51
+ "processedAt": "2026-03-31T20:19:00.348Z",
52
52
  "smokeTest": "failed"
53
53
  }
54
54
  }