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.
- Removed old TestEZ unit testing in favor of Jest.
- Added Lune scripts for building.
- Improved the documentation.
- Fixed doc comments being way too long.
- Rewrote the API to be correct for Luau LSP strict mode and Roblox strict mode.
- Changed the
Janitor.AddPromise
API to be a better typed version. - Rewrote the code to be a little bit more readable.
- Optimized the code with funny micro optimizations.
- Fixed suspicious thread cleanup.
- Added
Janitor.AddObject
for constructing an object. - Made the type for Janitor more accurate (you can now actually do
__call
without it whining!)
- Changed some minor syntax things.
- Added
Janitor.instanceof
for rbxts usage.
- 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.
- Added a small safeguard in
Janitor:LinkToInstances()
that prevents non-Instances.
- The Promise dependency has been bumped to
4.0.0-rc.2
. - Changed how the formatting of Janitor is (120 character lines).
- Fixed an error that would only happen if you set SuppressInstanceReDestroy (tries to clean it up). Thanks Meta-Maxim!
- "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.
- Promise is now a required dependency. This prevents a bug with
AddPromise
not detecting a Promise library if it is not called exactlyPromise
. Thanks colbert2677!
- Added a toggle to avoid double destruction of instances. Thanks Meta-Maxim!
- Fixed an error being thrown when an ended thread is cleaned up. (#31) Thanks brinkokevin!
- Changed how threads are cleaned up internally.
Janitor.new
actually returns the typed Janitor class.
- Added
Janitor:GetAll
as requested by AlreadyPro.
- Fixed incorrect type in the Janitor exported type.
- Fixed out of date documentation in
Installation.md
.
- Removed the old toml files for Selene.
- Removed
foreman.toml
.
- Added
Janitor:RemoveNoClean
andJanitor:RemoveListNoClean
, which allows removal without cleaning. - Added a nicer type return for Janitor. No more
typeof(Janitor.new())
!
- Fixed serious issue where
Janitor:RemoveList
would not actually remove anything from the indices reference.
- Fixed Janitor error when attempting call task.cancel on a running thread
- Added a new
LinkToInstance
method which will instead useInstance.Destroying
. - Added traceback to
Janitor:AddPromise
for invalid promises.
- The legacy
LinkToInstance
method has been renamed toLegacyLinkToInstance
.
- Fixed Janitor not warning about an invalid
MethodName
for threads and functions. - Fixed incorrect documentation about
Janitor.CurrentlyCleaning
.
- You can now add a
thread
using:Add
. This will cancel said thread when the Janitor is cleaned up. - Added
__tostring
to the Janitor class. - Added
:RemoveList
as an alternative to long:Remove
chains. - Added the properties of
Janitor
andRbxScriptConnection
to the documentation.
- Recompiled with L+ C Edition.
- Put
RbxScriptConnection
in a separate file. - Documentation now will split the code examples by language more obviously.
Janitor:Cleanup
now uses a while loop instead of a for loop when cleaning up. Fixed by @codesenseAye.
Janitor:AddPromise
now will handle cancellations properly.
- Finding Promise is now more aware for plugins. This way it won't load a Promise library inside of ReplicatedStorage.
- APIs that return Janitor like
Janitor::Remove
no longer explicitly state the return type. This seems to cause problems with typed Luau.
- A brand new documentation site.
- Janitor's
__index
no longer points to a separate table.
- Urgent fix for the cleanup loop. I had forgotten the
continue
so it would've likely broken.
- This version has been scrubbed from GitHub releases for a reason.
- Added support for Promise existing in the
Server*
services. - Documentation comments have been overhauled.
- A singular version of Janitor is now the only version. This still supports Promises, it just searches for the Promise library.
- The file tree for Janitor has been standardized.
- The cleanup loop now uses
in pairs
instead ofin next
.
- The
task.spawn
cleanups are now removed.
- Janitor now cleans up the tasks using
task.spawn
. - Janitor now has types.
- Janitor will work far better with typed Luau as well.
Janitor:LinkToInstance
now works on deferred event mode. Shoutout to @Elttob for fixing it.
- Initial release.