@vercel/build-utils 6.3.0 → 6.3.2

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.
@@ -25,14 +25,19 @@ async function readConfigFile(files) {
25
25
  const data = await readFileOrNull(name);
26
26
  if (data) {
27
27
  const str = data.toString('utf8');
28
- if (name.endsWith('.json')) {
29
- return JSON.parse(str);
28
+ try {
29
+ if (name.endsWith('.json')) {
30
+ return JSON.parse(str);
31
+ }
32
+ else if (name.endsWith('.toml')) {
33
+ return toml_1.default.parse(str);
34
+ }
35
+ else if (name.endsWith('.yaml') || name.endsWith('.yml')) {
36
+ return js_yaml_1.default.safeLoad(str, { filename: name });
37
+ }
30
38
  }
31
- else if (name.endsWith('.toml')) {
32
- return toml_1.default.parse(str);
33
- }
34
- else if (name.endsWith('.yaml') || name.endsWith('.yml')) {
35
- return js_yaml_1.default.safeLoad(str, { filename: name });
39
+ catch (error) {
40
+ console.log(`Error while parsing config file: "${name}"`);
36
41
  }
37
42
  }
38
43
  }
package/dist/index.js CHANGED
@@ -30943,14 +30943,19 @@ async function readConfigFile(files) {
30943
30943
  const data = await readFileOrNull(name);
30944
30944
  if (data) {
30945
30945
  const str = data.toString('utf8');
30946
- if (name.endsWith('.json')) {
30947
- return JSON.parse(str);
30948
- }
30949
- else if (name.endsWith('.toml')) {
30950
- return toml_1.default.parse(str);
30946
+ try {
30947
+ if (name.endsWith('.json')) {
30948
+ return JSON.parse(str);
30949
+ }
30950
+ else if (name.endsWith('.toml')) {
30951
+ return toml_1.default.parse(str);
30952
+ }
30953
+ else if (name.endsWith('.yaml') || name.endsWith('.yml')) {
30954
+ return js_yaml_1.default.safeLoad(str, { filename: name });
30955
+ }
30951
30956
  }
30952
- else if (name.endsWith('.yaml') || name.endsWith('.yml')) {
30953
- return js_yaml_1.default.safeLoad(str, { filename: name });
30957
+ catch (error) {
30958
+ console.log(`Error while parsing config file: "${name}"`);
30954
30959
  }
30955
30960
  }
30956
30961
  }
package/dist/types.d.ts CHANGED
@@ -313,6 +313,7 @@ export interface BuilderV3 {
313
313
  startDevServer?: StartDevServer;
314
314
  }
315
315
  declare type ImageFormat = 'image/avif' | 'image/webp';
316
+ declare type ImageContentDispositionType = 'inline' | 'attachment';
316
317
  export declare type RemotePattern = {
317
318
  /**
318
319
  * Must be `http` or `https`.
@@ -344,6 +345,7 @@ export interface Images {
344
345
  formats?: ImageFormat[];
345
346
  dangerouslyAllowSVG?: boolean;
346
347
  contentSecurityPolicy?: string;
348
+ contentDispositionType?: ImageContentDispositionType;
347
349
  }
348
350
  /**
349
351
  * If a Builder ends up creating filesystem outputs conforming to
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "6.3.0",
3
+ "version": "6.3.2",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",
@@ -51,5 +51,5 @@
51
51
  "typescript": "4.3.4",
52
52
  "yazl": "2.5.1"
53
53
  },
54
- "gitHead": "3d98d1cdea151b7125deb082c2c8469c865027d0"
54
+ "gitHead": "e0f8bc98202146eda0f2b85efac74b803654e786"
55
55
  }