Skip to content

Releases: ThePhar/archipelago.js

archipelago.js@1.1.0

09 Jul 18:03
f2a4b2e
Compare
Choose a tag to compare

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 a received and index property.
    • ItemsManager.received returns an array of all NetworkItems 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 in ItemsManager.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 an all property and get method for player lookup.
    • PlayersManager.all returns an array of all players. Synonymous with DataManager.players.
    • PlayersManager.get(id) returns a Player object or undefined if no player was found. Synonymous with DataManager.players[id].
  • Player objects returned from DataManager.players, PlayersManager.all, or PlayersManager.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 a ReadonlyArray<Player>, instead of a ReadonlyMap<Player>.
  • Renamed HintManager to HintsManager.
  • Export all types again.
  • ItemsManager's and LocationsManager's name 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.
  • ItemsManager.name and LocationsManager.name returns "Unknown Item: {id}" or "Unknown Location: {id}" instead now.
  • ItemsManager.name and LocationsManager.name will throw an error if player is not a safe integer.

What's Removed?

  • ItemsManager.id and LocationsManager.id have been removed. If needed, use DataManager.package to lookup the inverse table.

Full Changelog: 1.0.0...1.1.0

archipelago.js@1.0.2

08 Jul 15:20
5c1ed76
Compare
Choose a tag to compare

What's Changed

  • Changes to how connection information is passed to Client.connect.
  • Changed name of ArchipelagoClient back to Client.
  • 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 and Client.removeListener
  • Turned most interfaces into types.
  • Turned all enums into consts.
  • Added a HintManager class to Client. Currently only keeps track of own hints.
  • Changed how name and id lookup for items and locations 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 entire DataPackage 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, and permissions properties to DataManager for real-time room information. Updates when room updates.
  • Improved name lookup and added id lookup for ItemsManager and LocationsManager, as part of look up changes.
  • Added group lookup for ItemsManager and LocationsManager to pull all items in a given group name for a game.
  • Changed type of Client to Client<SlotDataType> for TypeScript users to specify the structure of their slot data in advance for better typing information.
  • Improved checked and missing locations array properties in LocationsManager to actually work.
  • Added game name lookup method for a player id in PlayersManager 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 in PlayersManager 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 in DataPackage and GamePackage. Planned to be removed from AP in PR 1933.
  • Added all the newer PrintJSONPacket types and their appropriate args.
  • remaining is now a ReducedPermission type instead of Permission since it can't have AUTO-type permissions.
  • players property in DataManager is of a type that's a combination of NetworkPlayer and NetworkSlot to have all information together after connection.
  • Added WSS support.
  • Added Hint type. Used by HintManager 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

10 Apr 05:37
d7941c3
Compare
Choose a tag to compare

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

17 Jun 20:11
e38d13d
Compare
Choose a tag to compare

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.

  • Made adjustments to allow library to run in browser without Node. by @ThePhar in #15

Full Changelog: 0.4.0...0.4.1

archipelago.js@0.4.0

16 Jun 12:59
194d124
Compare
Choose a tag to compare

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

15 Jun 01:52
84d80d3
Compare
Choose a tag to compare

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

Full Changelog: 0.2.1...0.3.0

archipelago.js@0.2.1

14 Jun 07:01
Compare
Choose a tag to compare

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

14 Jun 06:57
Compare
Choose a tag to compare

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 a GetDataPackage packet to update its data package cache.

  • Added DataManager object to ArchipelagoClient that automatically listens for DataPackage 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

13 Jun 20:12
Compare
Choose a tag to compare

0.1.6

Features:

  • Made password optional argument when connecting via ArchipelagoClient.connect().

Full Changelog: 0.1.5...0.1.6

archipelago.js@0.1.5

13 Jun 18:35
Compare
Choose a tag to compare

0.1.5

Features:

  • Implicitly determines type of packet when comparing cmd property on a packet.

Full Changelog: 0.1.4...0.1.5