@netlify/build 27.20.1 → 27.20.2-rc.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/bin.js +1 -1
- package/lib/core/build.js +0 -1
- package/lib/core/flags.js +0 -2
- package/lib/core/severity.js +1 -1
- package/lib/error/build.js +0 -2
- package/lib/error/monitor/report.js +4 -3
- package/lib/error/monitor/start.js +3 -1
- package/lib/plugins/child/logic.js +0 -1
- package/lib/plugins/error.js +3 -1
- package/lib/plugins/ipc.js +0 -2
- package/lib/plugins_core/edge_functions/index.js +0 -1
- package/lib/plugins_core/functions/index.js +1 -1
- package/lib/steps/run_core_steps.js +0 -1
- package/lib/time/report.js +1 -1
- package/lib/utils/package.js +3 -1
- package/lib/utils/resolve.js +0 -1
- package/package.json +8 -5
package/bin.js
CHANGED
package/lib/core/build.js
CHANGED
|
@@ -133,7 +133,6 @@ const tExecBuild = async function ({
|
|
|
133
133
|
const systemLog = getSystemLogger(logs, debug, systemLogFile)
|
|
134
134
|
const pluginsOptions = addCorePlugins({ netlifyConfig, constants })
|
|
135
135
|
// `errorParams` is purposely stateful
|
|
136
|
-
// eslint-disable-next-line fp/no-mutating-assign
|
|
137
136
|
Object.assign(errorParams, { netlifyConfig, pluginsOptions, siteInfo, childEnv, userNodeVersion })
|
|
138
137
|
|
|
139
138
|
const {
|
package/lib/core/flags.js
CHANGED
package/lib/core/severity.js
CHANGED
|
@@ -7,7 +7,7 @@ export const getSeverity = function (severity = FALLBACK_SEVERITY) {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
// Map error severities to exit codes and status (used for telemetry purposes)
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
const SEVERITY_MAP = {
|
|
12
12
|
success: { severityCode: 0, status: 'success' },
|
|
13
13
|
none: { severityCode: 1, status: 'cancelled' },
|
package/lib/error/build.js
CHANGED
|
@@ -6,13 +6,11 @@ import { CUSTOM_ERROR_KEY } from './info.js'
|
|
|
6
6
|
// process. We need this since errors static properties are not kept by
|
|
7
7
|
// `v8.serialize()`.
|
|
8
8
|
export const jsonToError = function ({ name, message, stack, ...errorProps }) {
|
|
9
|
-
// eslint-disable-next-line unicorn/error-message
|
|
10
9
|
const error = new Error('')
|
|
11
10
|
|
|
12
11
|
assignErrorProps(error, { name, message, stack })
|
|
13
12
|
// Assign static error properties (if any)
|
|
14
13
|
// We need to mutate the `error` directly to preserve its `name`, `stack`, etc.
|
|
15
|
-
// eslint-disable-next-line fp/no-mutating-assign
|
|
16
14
|
Object.assign(error, errorProps)
|
|
17
15
|
|
|
18
16
|
return error
|
|
@@ -97,7 +97,9 @@ const updateErrorName = function (error, type) {
|
|
|
97
97
|
// This might fail if `name` is a getter or is non-writable.
|
|
98
98
|
try {
|
|
99
99
|
error.name = type
|
|
100
|
-
} catch {
|
|
100
|
+
} catch {
|
|
101
|
+
// continue regardless error
|
|
102
|
+
}
|
|
101
103
|
return name
|
|
102
104
|
}
|
|
103
105
|
|
|
@@ -126,11 +128,10 @@ const getEventProps = function ({ severity, group, groupingHash, metadata, app }
|
|
|
126
128
|
// Add more information to Bugsnag events
|
|
127
129
|
const onError = function (event, eventProps) {
|
|
128
130
|
// Bugsnag client requires directly mutating the `event`
|
|
129
|
-
// eslint-disable-next-line fp/no-mutating-assign
|
|
130
131
|
Object.assign(event, {
|
|
131
132
|
...eventProps,
|
|
132
133
|
unhandled: event.unhandled || eventProps.unhandled,
|
|
133
|
-
|
|
134
|
+
|
|
134
135
|
_metadata: { ...event._metadata, ...eventProps._metadata },
|
|
135
136
|
app: { ...event.app, ...eventProps.app },
|
|
136
137
|
})
|
|
@@ -22,7 +22,6 @@ const importLogic = async function (pluginPath, tsNodeService) {
|
|
|
22
22
|
// which is currently making it impossible for local plugins to use both
|
|
23
23
|
// pure ES modules and TypeScript.
|
|
24
24
|
if (tsNodeService !== undefined) {
|
|
25
|
-
// eslint-disable-next-line import/no-dynamic-require
|
|
26
25
|
return require(pluginPath)
|
|
27
26
|
}
|
|
28
27
|
|
package/lib/plugins/error.js
CHANGED
|
@@ -39,7 +39,9 @@ const getError = function (error, message, func) {
|
|
|
39
39
|
// This might fail if `name` is a getter or is non-writable.
|
|
40
40
|
try {
|
|
41
41
|
error.message = `${message}\n${error.message}`
|
|
42
|
-
} catch {
|
|
42
|
+
} catch {
|
|
43
|
+
// continue regardless error
|
|
44
|
+
}
|
|
43
45
|
return error
|
|
44
46
|
}
|
|
45
47
|
|
package/lib/plugins/ipc.js
CHANGED
|
@@ -101,14 +101,12 @@ const sendEventToChild = async function ({ childProcess, callId, eventName, payl
|
|
|
101
101
|
// Respond to events from parent to child process.
|
|
102
102
|
// This runs forever until `childProcess.kill()` is called.
|
|
103
103
|
// We need to use `new Promise()` and callbacks because this runs forever.
|
|
104
|
-
// eslint-disable-next-line promise/prefer-await-to-callbacks
|
|
105
104
|
export const getEventsFromParent = function (callback) {
|
|
106
105
|
return new Promise((resolve, reject) => {
|
|
107
106
|
process.on('message', async (message) => {
|
|
108
107
|
try {
|
|
109
108
|
const [callId, eventName, payload] = message
|
|
110
109
|
const payloadA = parsePayload(payload)
|
|
111
|
-
// eslint-disable-next-line promise/prefer-await-to-callbacks
|
|
112
110
|
return await callback(callId, eventName, payloadA)
|
|
113
111
|
} catch (error) {
|
|
114
112
|
reject(error)
|
|
@@ -14,7 +14,6 @@ import { validateEdgeFunctionsManifest } from './validate_manifest/validate_edge
|
|
|
14
14
|
const DENO_CLI_CACHE_DIRECTORY = '.netlify/plugins/deno-cli'
|
|
15
15
|
const IMPORT_MAP_FILENAME = 'edge-functions-import-map.json'
|
|
16
16
|
|
|
17
|
-
// eslint-disable-next-line complexity, max-statements
|
|
18
17
|
const coreStep = async function ({
|
|
19
18
|
buildDir,
|
|
20
19
|
constants: {
|
package/lib/time/report.js
CHANGED
|
@@ -33,7 +33,7 @@ const sendTimers = async function ({ timers, host, port, framework }) {
|
|
|
33
33
|
// the internal API.
|
|
34
34
|
const startClient = async function (host, port) {
|
|
35
35
|
const client = new StatsdClient({ host, port, socketTimeout: 0 })
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
await promisify(client._socket._createSocket.bind(client._socket))()
|
|
38
38
|
return client
|
|
39
39
|
}
|
package/lib/utils/package.js
CHANGED
|
@@ -19,5 +19,7 @@ const getPackageObj = async function ({ cwd, normalize = true }) {
|
|
|
19
19
|
return await readPackageUp({ cwd, normalize })
|
|
20
20
|
// If the `package.json` is invalid and `normalize` is `true`, an error is
|
|
21
21
|
// thrown. We return `undefined` then.
|
|
22
|
-
} catch {
|
|
22
|
+
} catch {
|
|
23
|
+
// continue regardless error
|
|
24
|
+
}
|
|
23
25
|
}
|
package/lib/utils/resolve.js
CHANGED
|
@@ -34,7 +34,6 @@ export const resolvePath = async function (path, basedir) {
|
|
|
34
34
|
// https://github.com/browserify/resolve/issues/151#issuecomment-368210310
|
|
35
35
|
const resolvePathWithBasedir = function (path, basedir) {
|
|
36
36
|
return new Promise((resolve, reject) => {
|
|
37
|
-
// eslint-disable-next-line promise/prefer-await-to-callbacks
|
|
38
37
|
resolveLib(path, { basedir }, (error, resolvedPath) => {
|
|
39
38
|
if (error) {
|
|
40
39
|
return reject(error)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "27.20.
|
|
3
|
+
"version": "27.20.2-rc.0",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/core/main.js",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"Swyx <swyx@netlify.com> (https://www.swyx.io)"
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
|
-
"prepublishOnly": "cd ../../ && npm run prepublishOnly",
|
|
25
24
|
"prebuild": "rm -rf lib",
|
|
26
25
|
"build": "cp -a src lib/",
|
|
26
|
+
"pretest": "tsd .",
|
|
27
27
|
"test": "ava",
|
|
28
28
|
"test:ci": "c8 -r lcovonly -r text -r json ava",
|
|
29
29
|
"test:measure": "node tools/tests_duration.mjs"
|
|
@@ -62,12 +62,12 @@
|
|
|
62
62
|
"license": "MIT",
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@bugsnag/js": "^7.0.0",
|
|
65
|
-
"@netlify/edge-bundler": "^2.6.0",
|
|
66
65
|
"@netlify/cache-utils": "^4.1.5",
|
|
67
66
|
"@netlify/config": "^18.2.4",
|
|
67
|
+
"@netlify/edge-bundler": "^2.6.0",
|
|
68
68
|
"@netlify/functions-utils": "^4.2.10",
|
|
69
69
|
"@netlify/git-utils": "^4.1.2",
|
|
70
|
-
"@netlify/plugins-list": "^6.
|
|
70
|
+
"@netlify/plugins-list": "^6.48.0",
|
|
71
71
|
"@netlify/run-utils": "^4.0.2",
|
|
72
72
|
"@netlify/zip-it-and-ship-it": "^7.1.2",
|
|
73
73
|
"@sindresorhus/slugify": "^2.0.0",
|
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
"@netlify/nock-udp": "^1.0.0",
|
|
122
122
|
"atob": "^2.1.2",
|
|
123
123
|
"ava": "^4.0.0",
|
|
124
|
+
"c8": "^7.12.0",
|
|
124
125
|
"cpy": "^8.1.0",
|
|
125
126
|
"del": "^6.0.0",
|
|
126
127
|
"fast-safe-stringify": "^2.0.7",
|
|
@@ -134,9 +135,11 @@
|
|
|
134
135
|
"path-key": "^4.0.0",
|
|
135
136
|
"process-exists": "^5.0.0",
|
|
136
137
|
"sinon": "^13.0.0",
|
|
138
|
+
"tsd": "^0.24.1",
|
|
137
139
|
"yarn": "^1.22.4"
|
|
138
140
|
},
|
|
139
141
|
"engines": {
|
|
140
142
|
"node": "^12.20.0 || ^14.14.0 || >=16.0.0"
|
|
141
|
-
}
|
|
143
|
+
},
|
|
144
|
+
"gitHead": "c69809b43e71f04802d72061ae7c8da2f48cbdcf"
|
|
142
145
|
}
|