@netlify/build 29.29.0 → 29.29.1
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/lib/error/types.d.ts +7 -1
- package/lib/error/types.js +10 -0
- package/package.json +2 -2
package/lib/error/types.d.ts
CHANGED
|
@@ -65,10 +65,16 @@ export type TitleFunction = ({ location }: {
|
|
|
65
65
|
location: ErrorLocation;
|
|
66
66
|
}) => string;
|
|
67
67
|
export type ErrorInfo = {
|
|
68
|
-
plugin?:
|
|
68
|
+
plugin?: PluginInfo;
|
|
69
69
|
tsConfig?: any;
|
|
70
70
|
location: ErrorLocation;
|
|
71
71
|
};
|
|
72
|
+
type PluginInfo = {
|
|
73
|
+
packageName: string;
|
|
74
|
+
pluginPackageJson: {
|
|
75
|
+
version?: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
72
78
|
export type BuildCommandLocation = {
|
|
73
79
|
buildCommand: string;
|
|
74
80
|
buildCommandOrigin: string;
|
package/lib/error/types.js
CHANGED
|
@@ -105,6 +105,15 @@ const errorLocationToTracingAttributes = function (location) {
|
|
|
105
105
|
}
|
|
106
106
|
return {};
|
|
107
107
|
};
|
|
108
|
+
const pluginDataToTracingAttributes = function (pluginInfo) {
|
|
109
|
+
const pluginAttributePrefix = `${buildErrorAttributePrefix}.plugin`;
|
|
110
|
+
if (typeof pluginInfo === 'undefined')
|
|
111
|
+
return {};
|
|
112
|
+
return {
|
|
113
|
+
[`${pluginAttributePrefix}.name`]: pluginInfo?.packageName,
|
|
114
|
+
[`${pluginAttributePrefix}.version`]: pluginInfo?.pluginPackageJson?.version,
|
|
115
|
+
};
|
|
116
|
+
};
|
|
108
117
|
/**
|
|
109
118
|
* Given a BuildError, extract the relevant trace attributes to add to the on-going Span
|
|
110
119
|
*/
|
|
@@ -122,6 +131,7 @@ export const buildErrorToTracingAttributes = function (error) {
|
|
|
122
131
|
return {
|
|
123
132
|
...attributes,
|
|
124
133
|
...errorLocationToTracingAttributes(error.errorInfo?.location),
|
|
134
|
+
...pluginDataToTracingAttributes(error.errorInfo?.plugin),
|
|
125
135
|
};
|
|
126
136
|
};
|
|
127
137
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "29.29.
|
|
3
|
+
"version": "29.29.1",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/index.js",
|
|
@@ -157,5 +157,5 @@
|
|
|
157
157
|
"engines": {
|
|
158
158
|
"node": "^14.16.0 || >=16.0.0"
|
|
159
159
|
},
|
|
160
|
-
"gitHead": "
|
|
160
|
+
"gitHead": "4541a6ca7ab30fb073e9f01c52aa0b52f8c63ae7"
|
|
161
161
|
}
|