osu changelog
Every osu release, newest first.
Versions
0.6.0
4 addedAdded
- Profiles and scores on the client:
getUserProfile(user, { beforeCall, ruleset })(anOsuUserProfilewith one ruleset's statistics),getUserScores(userId, "best" | "recent" | "firsts", { ruleset, limit, offset, includeFails }),getBeatmapUserScores(beatmapId, userId, { ruleset }),getBeatmapScores(beatmapId, { ruleset, limit }), andgetBeatmap(beatmapId)(metadata plusmaxComboandstatus). Score calls sendx-api-version: 20220705for the lazer score format; a row that fails the schema is left out. For harumin. - Score shapes in
/shapes:osuScoreSchema,toOsuScore,osuModSchema,SCORE_RANKS, and the typesOsuScore,OsuScoreRow,OsuScoreBeatmap,OsuScoreBeatmapset,OsuScoreUser,OsuMod,ScoreRank. Profile shapes:osuUserProfileSchema,toOsuUserProfile,OsuUserProfile,OsuUserStatistics. formatModsandformatAccuracyin/format.OSU_SCORES_API_VERSION,OSU_SCORES_LIMIT, and the typesUserScoreType,UserScoresOptions,BeatmapScoresOptions,BeatmapDetail. New public exports, so this release is a minor version.
- Profiles and scores on the client:
0.5.0
5 addedAdded
getMatch(match, { beforeCall, maxPages })on the client: a multiplayer match from/api/v2/matches/{id}by id or mp link, as{ match, complete }, or null on 404. It pages back through the events withbeforeuntil the first one (at mostmaxPages, 50 by default), merging events and users from every page. It rejects with code"budget"whenbeforeCallrefuses the first page; a refused later page ends the call withcomplete: false.- Match shapes in
/shapes:osuMatchResponseSchema,osuMatchEventSchema,osuMatchGameSchema,osuMatchScoreSchema,toOsuMatch,toMatchEvent,parseMatchId,MATCH_SCORING_TYPES,MATCH_TEAM_TYPES, and the typesOsuMatch,OsuMatchResponse,MatchEvent,MatchGame,MatchScore,MatchTeam. @haruhimemoe/osu/match, safe in browsers:matchGames,gameStatus,listGames(with warmups),isTeamGame,gameWinner(team vs or head-to-head, by the room's win condition or by score, accuracy or combo),mapWins, andmatchCostswithMATCH_COST_FORMULAS: Bathbot's, osu!plus's, Flashlight's (as osu!plus ships it) and Elitebotix's mixed formula, picked by name.@haruhimemoe/osu/tournament, safe in browsers:buildLazerBracketwrites the osu!lazer tournament client'sbracket.jsonfrom teams, rounds and matches, andLAZER_BRACKET_FILENAME.OSU_MATCH_EVENTS_LIMITandOSU_MATCH_PAGE_LIMIT, and the typesMatchOptionsandMatchLookup. The root entry point re-exports/matchand/tournament. These are new public exports, so this release is a minor version.
0.4.0
3 addedAdded
getUser(user, { beforeCall, ruleset })on the client: one user by id (/api/v2/users/{id}?key=id) or username (/api/v2/users/@{name}), with an optional ruleset, as anOsuUser, or null on 404. It rejects with code"budget"whenbeforeCallrefuses, likegetStarRating. pools and bb each had their own token and fetch for this.getUsers(ids, { beforeCall }): users by id, 50 per/api/v2/users?ids[]=call, as{ found, missing, unchecked }likegetBeatmaps.- The types
UserOptions,UsersOptionsandUserLookup. These are new public exports, so this release is a minor version.
0.3.0
3 added, 2 changed, 1 deprecated, 4 fixed, 1 securityAdded
@haruhimemoe/osu/format, safe in browsers and free of imports:formatDuration(m:ss),formatLongDuration(h:mm:ssfrom an hour up),formatStars(two decimals),formatBpm,formatStat(CS/AR/OD/HP),formatBytesandformatRange. packs and pools each had the same copy; the text is unchanged. The root entry point re-exports them. These are new public exports, so this release is a minor version.OSU_BEATMAPSET_FALLBACK_LIMIT, the defaultfallbackLimit(10), named like the client's other constants.- Named types for what the collection helpers take and return:
WriteCollectionDbOptions,CollectionHashes,AddToCollectionResult,MergeCollectionsResultandLazerImportFile. The shapes are unchanged.
Changed
createOsuClientrefuses auserAgentthat isn't printable ASCII with aTypeError. Before, a character past U+00FF (an emoji, say) passed, then every request failed with code"network", and characters from U+0080 to U+00FF went out as raw Latin-1 bytes.- Every exported class, function, type and schema has a doc comment, so editors show it on hover.
OsuApiErrorandCollectionDbErrordocument their constructors.
Deprecated
BEATMAPSET_FALLBACK_LIMIT: useOSU_BEATMAPSET_FALLBACK_LIMIT. It stays exported, with the same value, until a major release.
Fixed
- Calls that got a 401 at the same time each dropped the token another call had just fetched and asked for another, so a revoked token could cost many token requests. They now share one refresh.
- A token that osu! issues for a minute or less is reused for half its life instead of being fetched again on every call.
mergeCollectionsthrows aTypeErrorfor a source collection whosenameisn't a string, as its docs said. It used to create a collection namedundefined(or5), and the error only came later, fromwriteCollectionDb.retryAfterMsreadsRetry-Afteronly as delta-seconds or an HTTP date, like@haruhimemoe/hinai. A malformed value such as1.5or-5gave 0 ms ("retry now"); it now gives null.
Security
- The release workflow runs every action from a pinned commit SHA and installs an exact npm version, since that job can publish with provenance. A release whose version is already on npm now ends with a warning instead of a quiet success. SECURITY.md lists GitHub private vulnerability reporting as the first channel.
0.2.0
3 added, 1 changedAdded
@haruhimemoe/osu/collections, safe in browsers and free of zod:readCollectionDbandwriteCollectionDbfor osu!stable'scollection.db. A file stable wrote round-trips byte for byte. The reader reports oddities as warnings and throws aCollectionDbErrorwith acodeand byte offset for a file it can't read. Both take amaxByteslimit (64 MiB by default). The reader also caps collections plus hashes atmaxBytes / 34and lists at most 1,000 warnings (omittedWarningscounts the rest), so a crafted file can't run a page out of memory.- Helpers that never change their arguments:
createCollectionDb,normalizeHash,collectionHashesFor,addToCollection(by exact name, no duplicate hashes, asimilarNamehint),mergeCollections(lazer's import rules), andlazerImportFiles(the two files lazer's setup wizard imports). - The root entry point re-exports
/collections. These are new public exports, so this release is a minor version.
Changed
- Typechecking
@haruhimemoe/osu(the root entry point) now needs TypeScript 5.7 or later, orskipLibCheck, because it re-exports/collections, whose types useUint8Array<ArrayBuffer>. This holds even for code that only importscreateOsuClient.@haruhimemoe/osu/shapesalone still typechecks on older TypeScript.
0.1.0
3 addedAdded
@haruhimemoe/osu/shapes, safe in browsers:BeatmapMetaand osu!'s beatmap row, beatmapset content fields,toOsuUser, osu! links and cover URLs, and the sign-in endpoints and scopes.createOsuClientfor servers, withgetBeatmaps,getBeatmapsetsandgetStarRating: a cached client-credentials token, a required User-Agent, timeouts, and abeforeCallhook for a shared rate budget.OsuApiErrorwith acode, the HTTPstatusandretryAfterMs.