@netlify/build 27.1.2 → 27.1.5

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "27.1.2",
3
+ "version": "27.1.5",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./src/core/main.js",
@@ -56,14 +56,14 @@
56
56
  "license": "MIT",
57
57
  "dependencies": {
58
58
  "@bugsnag/js": "^7.0.0",
59
- "@netlify/edge-bundler": "^1.1.0",
59
+ "@netlify/edge-bundler": "^1.2.1",
60
60
  "@netlify/cache-utils": "^4.0.0",
61
61
  "@netlify/config": "^18.0.0",
62
- "@netlify/functions-utils": "^4.0.0",
62
+ "@netlify/functions-utils": "^4.1.15",
63
63
  "@netlify/git-utils": "^4.0.0",
64
- "@netlify/plugins-list": "^6.25.0",
64
+ "@netlify/plugins-list": "^6.28.0",
65
65
  "@netlify/run-utils": "^4.0.0",
66
- "@netlify/zip-it-and-ship-it": "5.9.2",
66
+ "@netlify/zip-it-and-ship-it": "5.10.2",
67
67
  "@sindresorhus/slugify": "^2.0.0",
68
68
  "@types/node": "^16.0.0",
69
69
  "ansi-escapes": "^5.0.0",
@@ -103,7 +103,7 @@
103
103
  "strip-ansi": "^7.0.0",
104
104
  "supports-color": "^9.0.0",
105
105
  "tmp-promise": "^3.0.2",
106
- "ts-node": "10.4.0",
106
+ "ts-node": "^10.6.0",
107
107
  "typescript": "^4.5.4",
108
108
  "update-notifier": "^5.0.0",
109
109
  "uuid": "^8.0.0",
@@ -34,7 +34,15 @@ const assignErrorProp = function (error, name, value) {
34
34
  }
35
35
 
36
36
  // Inverse of `jsonToError()`.
37
- export const errorToJson = function ({ name, message, stack, [CUSTOM_ERROR_KEY]: customError, ...errorProps }) {
37
+ export const errorToJson = function (error) {
38
+ const { name, message, stack, [CUSTOM_ERROR_KEY]: customError, ...errorProps } = error
39
+
40
+ // diagnosticText is not enumerable in TSError so we need to grab it manually. destructuring won't work.
41
+ if (error.diagnosticText) {
42
+ // eslint-disable-next-line fp/no-mutation
43
+ errorProps.diagnosticText = error.diagnosticText
44
+ }
45
+
38
46
  return {
39
47
  ...safeJsonStringify.ensureProperties(errorProps),
40
48
  ...safeJsonStringify.ensureProperties({ name, message, stack, [CUSTOM_ERROR_KEY]: customError }),
@@ -27,8 +27,14 @@ export const addTsErrorInfo = function (error, tsNodeService) {
27
27
  config: {
28
28
  raw: { compilerOptions },
29
29
  },
30
- options: tsNodeOptions,
30
+ options: realTsNodeOptions,
31
31
  } = tsNodeService
32
+
33
+ // filter out functions as they cannot be serialized
34
+ const tsNodeOptions = Object.fromEntries(
35
+ Object.entries(realTsNodeOptions).filter(([, val]) => typeof val !== 'function'),
36
+ )
37
+
32
38
  addErrorInfo(error, { tsConfig: { compilerOptions, tsNodeOptions } })
33
39
  }
34
40