Releases: ThePhar/archipelago.js
archipelago.js@1.1.0
Archipelago.js 1.1.0 - Changelog
Made some quality of life improvements for using this library when it comes to item and location lookup. Also more functionality for PlayersManager
and ItemsManager
.
What's New?
- Updated version number to
1.1.0
. ItemsManager
now contains areceived
andindex
property.ItemsManager.received
returns an array of allNetworkItem
s that have been sent from the server.ItemsManager.index
returns the index of the next expected item to be received from the server. Any items with a lower index are stored inItemsManager.received
.- Useful for tracking if new items have been received or to check if a de-sync event occurred.
ItemsManager
will automatically attempt re-sync if it notices an item index higher than what it is expecting.PlayersManager
now contains anall
property andget
method for player lookup.PlayersManager.all
returns an array of all players. Synonymous withDataManager.players
.PlayersManager.get(id)
returns aPlayer
object orundefined
if no player was found. Synonymous withDataManager.players[id]
.
Player
objects returned fromDataManager.players
,PlayersManager.all
, orPlayersManager.get
have two helper functions for looking up item and location names.Player.item(id)
returns the name of an item that belongs to this player's game.Player.location(id)
returns the name of a location that belongs to this player's game.
What's Changed?
DataManager.players
now returns aReadonlyArray<Player>
, instead of aReadonlyMap<Player>
.- Renamed
HintManager
toHintsManager
. - Export all types again.
ItemsManager
's andLocationsManager
'sname
methods can now request either a game name or player id to lookup an item or location name.- For item/location lookup in the context of a player however, it is recommended to use the new helper functions on the
Player
object. See "What's New?" for details.
- For item/location lookup in the context of a player however, it is recommended to use the new helper functions on the
ItemsManager.name
andLocationsManager.name
returns"Unknown Item: {id}"
or"Unknown Location: {id}"
instead now.ItemsManager.name
andLocationsManager.name
will throw an error ifplayer
is not a safe integer.
What's Removed?
ItemsManager.id
andLocationsManager.id
have been removed. If needed, useDataManager.package
to lookup the inverse table.
Full Changelog: 1.0.0...1.1.0
archipelago.js@1.0.2
What's Changed
- Changes to how connection information is passed to
Client.connect
. - Changed name of
ArchipelagoClient
back toClient
. Utilize Vite for bundling instead of Webpack.(reverted in 1.0.1)- More examples in
README.md
and updated documentation. - Changed names of events for
Client.addListener
andClient.removeListener
- Turned most interfaces into types.
- Turned all enums into consts.
- Added a
HintManager
class toClient
. Currently only keeps track of own hints. - Changed how
name
andid
lookup foritems
andlocations
work in preparation for ArchipelagoMW/Archipelago's PR 1933. Lookups require game name as well. This will eventually allow each world to use any id without worry of id collisions. - Added a helper class for doing complex set operations in
DataManager
. Client
will no longer request entireDataPackage
from Archipelago server. Only for games that exist in room.- Add item group and location group names to DataPackage and add checksum support. Still no caching is built in, but is prepared for a future update.
- Added
hintPoints
,hintCost
,slotData
,slot
,team
,seed
, andpermissions
properties to DataManager for real-time room information. Updates when room updates. - Improved name lookup and added id lookup for
ItemsManager
andLocationsManager
, as part of look up changes. - Added group lookup for
ItemsManager
andLocationsManager
to pull all items in a given group name for a game. - Changed type of
Client
toClient<SlotDataType>
for TypeScript users to specify the structure of their slot data in advance for better typing information. - Improved
checked
andmissing
locations array properties inLocationsManager
to actually work. - Added
game
name lookup method for a player id inPlayersManager
for easy lookup since in all contexts you you need name for id of location or item, you have the player id. - Added
members
method inPlayersManager
to look up all players in a given Item Link group. Returns empty list if not an item link group. - Removed a lot of redundant code.
- Improved type hinting and inference.
- Removed all mentions of
version
inDataPackage
andGamePackage
. Planned to be removed from AP in PR 1933. - Added all the newer
PrintJSONPacket
types and their appropriate args. remaining
is now aReducedPermission
type instead ofPermission
since it can't have AUTO-type permissions.players
property inDataManager
is of a type that's a combination ofNetworkPlayer
andNetworkSlot
to have all information together after connection.- Added WSS support.
- Added
Hint
type. Used byHintManager
class. - Adjusted build settings.
- And probably a bunch of bug fixes that I forgot about.
This is a very breaking API change, but hoping to keep it stable for the most part for a while now. If you notice any issues, please reach out to me here or in Discord (thephar).
Thanks!
Full Changelog: 0.5.2...1.0.0
archipelago.js@0.5.2
What's Changed
- Update packages to latest. by @ThePhar in #138
- Update
archipelago.js
to Archipelago API v0.4.0 by @ThePhar in #139 - Add a helper for PrintJSON and remove print event handlers. by @ThePhar in #140
- Add wss support by @ThePhar in #141
- Fix const enum issues and restore
class: "Version"
in NetworkVersion. by @ThePhar in #142 - Actually fix the missing_locations bug this time. by @ThePhar in #143
Full Changelog: 0.4.1...0.5.2
archipelago.js@0.4.1
0.4.1 - What's Changed
Made some adjustments to the build to allow the library to be used in the browser. See below. No API changes were made.
Full Changelog: 0.4.0...0.4.1
archipelago.js@0.4.0
0.4.0 - What's Changed
- Change alias import conversion from runtime to compile-time and minify output by @ThePhar in #12
- Add API documentation and revert module aliases. by @ThePhar in #13
Full Changelog: 0.3.0...0.4.0
archipelago.js@0.3.0
0.3.0 - What's Changed
- Bump @typescript-eslint/parser from 5.27.1 to 5.28.0 by @dependabot in #3
- Bump @typescript-eslint/eslint-plugin from 5.27.1 to 5.28.0 by @dependabot in #2
- Bump prettier from 2.6.2 to 2.7.0 by @dependabot in #1
- Remove
deploy
script, as GitHub actions will publish to NPM on release by @ThePhar in #4 - Add additional helper objects to
ArchipelagoClient
for Locations, Items, and Players by @ThePhar in #5 - Update README and version to 0.3.0 by @ThePhar in #6
New Contributors
- @dependabot made their first contribution in #3
- @ThePhar made their first contribution in #4
Full Changelog: 0.2.1...0.3.0
archipelago.js@0.2.1
0.2.1
Misc Changes:
- Changes to .npmignore to ignore development files.
Full Changelog: 0.2.0...0.2.1
archipelago.js@0.2.0
0.2.0
Features:
-
Added specialized events for each type of server packet the client can receive that implementers can subscribe to via
ArchipelagoClient.addListener()
:packetReceived
bounced
connected
connectionRefused
dataPackage
invalidPacket
locationInfo
printJSON
print
receivedItems
retrieved
roomInfo
roomUpdate
setReply
-
When connected to the Archipelago server, the
ArchipelagoClient
will fire aGetDataPackage
packet to update its data package cache. -
Added
DataManager
object toArchipelagoClient
that automatically listens forDataPackage
packets and updates its cache accordingly.
API Changes:
- Converted client packet classes into interfaces.
- Connecting to the Archipelago server via
ArchipelagoClient.connect()
does not resolve the promise until completely connected to the room or if the websocket fails to connect or server refuses the connection.
Misc Changes:
- Moved all source files into a
src
directory.
Full Changelog: 0.1.6...0.2.0
archipelago.js@0.1.6
0.1.6
Features:
- Made
password
optional argument when connecting viaArchipelagoClient.connect()
.
Full Changelog: 0.1.5...0.1.6
archipelago.js@0.1.5
0.1.5
Features:
- Implicitly determines type of packet when comparing
cmd
property on a packet.
Full Changelog: 0.1.4...0.1.5