@netlify/edge-bundler
Advanced tools
Comparing version 8.12.2 to 8.12.3
export default class ManifestValidationError extends Error { | ||
customErrorInfo: { | ||
type: string; | ||
}; | ||
constructor(message: string | undefined); | ||
} |
export default class ManifestValidationError extends Error { | ||
constructor(message) { | ||
super(`Validation of Edge Functions manifest failed\n${message}`); | ||
this.customErrorInfo = { | ||
type: 'functionsBundling', | ||
}; | ||
this.name = 'ManifestValidationError'; | ||
@@ -5,0 +8,0 @@ // https://github.com/microsoft/TypeScript-wiki/blob/0fecbda7263f130c57394d779b8ca13f0a2e9123/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work |
@@ -48,2 +48,15 @@ import chalk from 'chalk'; | ||
}); | ||
test('should throw ManifestValidationError with customErrorInfo', () => { | ||
try { | ||
validateManifest('manifest'); | ||
} | ||
catch (error) { | ||
expect(error).toBeInstanceOf(ManifestValidationError); | ||
const { customErrorInfo } = error; | ||
expect(customErrorInfo).toBeDefined(); | ||
expect(customErrorInfo.type).toBe('functionsBundling'); | ||
return; | ||
} | ||
expect.fail('should have thrown'); | ||
}); | ||
test('should throw on additional property on root level', () => { | ||
@@ -50,0 +63,0 @@ const manifest = getBaseManifest(); |
{ | ||
"name": "@netlify/edge-bundler", | ||
"version": "8.12.2", | ||
"version": "8.12.3", | ||
"description": "Intelligently prepare Netlify Edge Functions for deployment", | ||
@@ -5,0 +5,0 @@ "type": "module", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3069698
7628