mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-08-26 15:08:03 -04:00
[PR #84] [MERGED] fix: allow explicit ESM import #92
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/stoatchat/javascript-client-sdk/pull/84
Author: @williamhorning
Created: 7/9/2023
Status: ✅ Merged
Merged: 6/8/2024
Merged by: @insertish
Base:
master← Head:fix-explicit-esm📝 Commits (7)
68e3de9fix: allow explicit ESM import2331d71Merge branch 'master' into fix-explicit-esma451a61Merge branch 'revoltchat:master' into fix-explicit-esm1333735Merge branch 'master' into fix-explicit-esmd172d54Merge branch 'master' into fix-explicit-esm1a41abfupdate PRd7468a5Merge branchrevoltchat:masterinto fix-explicit-esm📊 Changes
53 files changed (+211 additions, -174 deletions)
View changed files
➕
package-esm.json(+3 -0)📝
package.json(+2 -2)📝
src/Client.ts(+14 -7)📝
src/classes/Bot.ts(+1 -1)📝
src/classes/Channel.ts(+7 -4)📝
src/classes/ChannelUnread.ts(+1 -1)📝
src/classes/ChannelWebhook.ts(+2 -2)📝
src/classes/Emoji.ts(+1 -1)📝
src/classes/File.ts(+1 -1)📝
src/classes/Invite.ts(+1 -1)📝
src/classes/MFA.ts(+1 -1)📝
src/classes/Message.ts(+2 -2)📝
src/classes/MessageEmbed.ts(+1 -1)📝
src/classes/PublicBot.ts(+1 -1)📝
src/classes/PublicInvite.ts(+2 -2)📝
src/classes/Server.ts(+12 -9)📝
src/classes/ServerBan.ts(+1 -1)📝
src/classes/ServerMember.ts(+9 -6)📝
src/classes/Session.ts(+1 -1)📝
src/classes/SystemMessage.ts(+1 -1)...and 33 more files
📄 Description
This pull request fixes #83 by updating the build step to add a package.json to the
lib/esmdirectory when building to allow people to explicitly import the ESM version when using something like Deno. It also updates all directory imports, making them explicitly importindex.jsso they don't throwERR_UNSUPPORTED_DIR_IMPORTerrors. This also fixes the issues fixed by #80.test.mjs)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.