Skip to content

Commit bca10a6

Browse files
committed
fix: validate exports.default too in Config class
1 parent 0a06952 commit bca10a6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@secjs/utils",
3-
"version": "1.7.6",
3+
"version": "1.7.7",
44
"description": "",
55
"license": "MIT",
66
"author": "João Lenon",

src/Classes/Config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ export class Config {
6464

6565
if (
6666
!fileContent.includes('export default') &&
67-
!fileContent.includes('module.exports')
67+
!fileContent.includes('module.exports') &&
68+
!fileContent.includes('exports.default')
6869
) {
6970
throw new InternalServerException(
7071
`Config file ${base} is not normalized because it is not exporting a default value`,

0 commit comments

Comments
 (0)