Janitor Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.18.2] - 2025-03-10
Fixed
- Broke a unit test.
[1.18.1] - 2025-03-10
Changed
- Cleaning up should be faster. Compared to Duster with the UltraJanitor modification, it is within 3%.
[1.18.0] - 2025-03-09
Added
- Added unique index support to
Janitor:AddPromise. - Literally doubled performance. This is not a joke, it is twice as fast and is also the fastest on every CPU architecture.
Changed
- Changed how
Janitor:Cleanup's loop is handled. We are not using theGetFenvfunction anymore. - Changed the
Janitorsweak metatable slightly.
[1.17.0] - 2024-08-12
Added
- Removed old TestEZ unit testing in favor of Jest.
- Added Lune scripts for building.
- Improved the documentation.
- Fixed doc comments being way too long.
Changed
- Rewrote the API to be correct for Luau LSP strict mode and Roblox strict mode.
- Changed the
Janitor.AddPromiseAPI to be a better typed version. - Rewrote the code to be a little bit more readable.
- Optimized the code with funny micro optimizations.
Fixed
- Fixed suspicious thread cleanup.
[1.16.0] - 2024-05-01
Added
- Added
Janitor.AddObjectfor constructing an object. - Made the type for Janitor more accurate (you can now actually do
__callwithout it whining!)
Changed
- Changed some minor syntax things.
[1.15.7] - 2023-12-27
Added
- Added
Janitor.instanceoffor rbxts usage.
Changed
- Made the Promise dependency "optional". It's still required in the Wally file, but it's not actually required if it can't detect it.
- Updated the dependencies in the aftman file.
- Changed one of the tests to use itSKIP.
[1.15.6] - 2023-08-09
Added
- Added a small safeguard in
Janitor:LinkToInstances()that prevents non-Instances.
Changed
- The Promise dependency has been bumped to
4.0.0-rc.2. - Changed how the formatting of Janitor is (120 character lines).
Fixed
- Fixed an error that would only happen if you set SuppressInstanceReDestroy (tries to clean it up). Thanks Meta-Maxim!
Removed
- "Removed"
LegacyLinkToInstance. This reduces the overall size of the package. The function itself still technically exists, just as a pointer toLinkToInstance, but it is not exported with the class type. - Removed the Symbol ModuleScript. We're gonna use a metatable'd table instead from now on. This also reduces the size of the package.
[1.15.5] - 2023-07-28
Changed
- Promise is now a required dependency. This prevents a bug with
AddPromisenot detecting a Promise library if it is not called exactlyPromise. Thanks colbert2677!
[1.15.4] - 2023-07-20
Added
- Added a toggle to avoid double destruction of instances. Thanks Meta-Maxim!
Fixed
- Fixed an error being thrown when an ended thread is cleaned up. (#31) Thanks brinkokevin!
[1.15.3] - 2023-07-01
Changed
- Changed how threads are cleaned up internally.
[1.15.2] - 2023-04-11
Changed
Janitor.newactually returns the typed Janitor class.
[1.15.1] - 2022-11-30
Added
- Added
Janitor:GetAllas requested by AlreadyPro.
Fixed
- Fixed incorrect type in the Janitor exported type.
- Fixed out of date documentation in
Installation.md.
Removed
- Removed the old toml files for Selene.
- Removed
foreman.toml.
[1.15.0] - 2022-11-30
Added
- Added
Janitor:RemoveNoCleanandJanitor:RemoveListNoClean, which allows removal without cleaning. - Added a nicer type return for Janitor. No more
typeof(Janitor.new())!
Fixed
- Fixed serious issue where
Janitor:RemoveListwould not actually remove anything from the indices reference.
[1.14.2] - 2022-11-09
Added
Fixed
- Fixed Janitor error when attempting call task.cancel on a running thread
1.14.1 - 2022-03-17
Added
- Added a new
LinkToInstancemethod which will instead useInstance.Destroying. - Added traceback to
Janitor:AddPromisefor invalid promises.
Changed
- The legacy
LinkToInstancemethod has been renamed toLegacyLinkToInstance.
Fixed
- Fixed Janitor not warning about an invalid
MethodNamefor threads and functions. - Fixed incorrect documentation about
Janitor.CurrentlyCleaning.
1.14 - 2022-03-12
Added
- You can now add a
threadusing:Add. This will cancel said thread when the Janitor is cleaned up. - Added
__tostringto the Janitor class. - Added
:RemoveListas an alternative to long:Removechains. - Added the properties of
JanitorandRbxScriptConnectionto the documentation.
Changed
- Recompiled with L+ C Edition.
- Put
RbxScriptConnectionin a separate file. - Documentation now will split the code examples by language more obviously.
1.13.15 - 2021-11-24
Changed
Janitor:Cleanupnow uses a while loop instead of a for loop when cleaning up. Fixed by @codesenseAye.
1.13.14 - 2021-11-05
Fixed
Janitor:AddPromisenow will handle cancellations properly.
1.13.13 - 2021-10-20
Changed
- Finding Promise is now more aware for plugins. This way it won't load a Promise library inside of ReplicatedStorage.
Fixed
- APIs that return Janitor like
Janitor::Removeno longer explicitly state the return type. This seems to cause problems with typed Luau.
1.13.12 - 2021-10-02
Added
- A brand new documentation site.
Changed
- Janitor's
__indexno longer points to a separate table.
Fixed
- Urgent fix for the cleanup loop. I had forgotten the
continueso it would've likely broken.
1.13.11 -
- This version has been scrubbed from GitHub releases for a reason.
1.13.10 - 2021-09-29
Added
- Added support for Promise existing in the
Server*services. - Documentation comments have been overhauled.
1.13.9 - 2021-09-18
Added
- A singular version of Janitor is now the only version. This still supports Promises, it just searches for the Promise library.
Changed
- The file tree for Janitor has been standardized.
1.13.7 - 2021-09-16
Changed
- The cleanup loop now uses
in pairsinstead ofin next.
Removed
- The
task.spawncleanups are now removed.
1.13.6 - 2021-08-21
Added
- Janitor now cleans up the tasks using
task.spawn. - Janitor now has types.
- Janitor will work far better with typed Luau as well.
1.13.4 - 2021-05-27
Fixed
Janitor:LinkToInstancenow works on deferred event mode. Shoutout to @Elttob for fixing it.
1.0.0 -
- Initial release.