Skip to content

Commit

Permalink
Use real package name in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Davilarek committed Jun 24, 2024
1 parent 3ec25a6 commit bc40618
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default function (ast: ParseResult<File>, targetedDiscordModApiLibrary: {
for (let index2 = 0; index2 < element.specifiers.length; index2++) {
const spec = element.specifiers[index2] as ImportSpecifier;
if (getKeyValue(targetedDiscordModApiLibrary.default, (spec.imported as Identifier).name as never) === undefined) {
throw new ReferenceError(`Module 'discord-mod-compiler' has no exported member '${(spec.imported as Identifier).name}'.`);
throw new ReferenceError(`Module '${myPackageName}' has no exported member '${(spec.imported as Identifier).name}'.`);
}
importAliasMap.push({ codeName: spec.local.name, internalName: (spec.imported as Identifier).name }); // we'll later watch those for replacement
importsToRemove.push(index);
Expand Down

0 comments on commit bc40618

Please sign in to comment.