Skip to content

Releases: Kampfkarren/selene

[0.21.0] - 2022-09-17

17 Sep 16:50
Compare
Choose a tag to compare

Added

  • undefined_variable now properly catches global as undefined in function global.name().
  • Added the "luau" builtin library.
  • unused_variable and incorrect_standard_library_use will now suggest configuring a standard library if one is detected.
  • Added constant_table_comparison check to catch x == {}, which will always fail.
  • Added high_cyclomatic_complexity check to catch overly complex functions that are hard to test, and harder to reason about. This lint is disabled by default.
  • Added Font.new to the Roblox standard library.
  • roblox_incorrect_roact_usage now lints for invalid events.

Changed

  • Match .luau filename extension by default.
  • Allow --pattern to be passed multiple times.
  • roblox_incorrect_roact_usage now uses the generated standard library to know what classes and properties exist, meaning a selene update is no longer necessary to update.
  • Roblox standard libraries are now guaranteed to regenerate when the previously generated standard library is on a different version.

Fixed

  • Fixed unused_variable incorrectly tagging function global.name() when global is defined in the standard library.
  • Fixed unscoped_variables incorrectly tagging function global.name() as creating an unscoped variable for global.
  • Fixed roblox_incorrect_roact_usage always showing the class name as "Instance". (#297)
  • roblox_incorrect_roact_usage will now find instances of createElement that do not specify properties.
  • Fixed issues where roblox_incorrect_color3_new_bounds would sometimes fail to run.

New Contributors

  • @Yumacide made their first contribution in #399
  • @LastTalon made their first contribution in #401
  • @PysephWasntAvailable made their first contribution in #414

[0.20.0] - 2022-07-21

22 Jul 06:27
Compare
Choose a tag to compare

Added

  • Added utf8 globals to the builtin lua53 standard library.
  • Added Roblox datatype constructors CatalogSearchParams.new, FloatCurveKey.new, and RotationCurveKey.new.

Changed

  • Errors for generating Roblox API dumps are now more detailed.

Fixed

  • Fixed newer versions of the Roblox API dump failing to create standard libraries for.
  • Fixed reporting an error when generating standard libraries panicking.

[0.19.1] - 2022-06-22

23 Jun 04:53
Compare
Choose a tag to compare

Fixed

  • Fixed releases coming with Tracy.

[0.19.0] - 2022-06-22

23 Jun 00:29
Compare
Choose a tag to compare

Added

  • table.insert(x) no longer counts as a read to x, which allows selene to alert you that you are only assigning to it.
    • This is done through a new standard library field for arguments called observes. This takes 3 values: "read-write" (the default), signifying a potential read and write, "read", signifying only a read, and "write", signifying only a write. Only "write" has meaning at this time.
  • Added new must_use lint, which will warn you when you are not using the return value of a function that performs no other behavior.
    • This is done through a new standard library field for functions called must_use. Set it to true to gain this functionality.

Fixed

  • Fixed a bunch of performance failures, lowering some benchmarks from 3 seconds to 200ms.

[0.18.2] - 2022-06-10

11 Jun 05:07
Compare
Choose a tag to compare

Fixed

  • Fixed Enum.NAME.Value failing in newly generated standard libraries.

[0.18.1] - 2022-06-07

08 Jun 05:17
Compare
Choose a tag to compare

Changed

[0.18.0] - 2022-06-07

08 Jun 01:52
Compare
Choose a tag to compare

Added

  • Added new YAML based standard library format. The old TOML format is now deprecated and will not have any new functionality added to it, but will be preserved for the forseeable future.
  • You can upgrade old TOML standard libraries by running selene upgrade-std library.toml, which will create a new .yml file of the same name in the new format.
  • This only affects standard library files. selene.toml has not changed.
  • Added new deprecated lint, which can be configured by standard libraries.
  • Added debug.resetmemorycategory to the Roblox standard library.
  • Added debug.setmemorycategory to the Roblox standard library.
  • Added --no-summary option to suppress summary information.

Changed

  • Roblox standard library files are now no longer generated in the project directory, and will be updated automatically every 6 hours. You can update it manually with selene update-roblox-std.
  • As per the deprecation of TOML standard libraries, you should delete your roblox.toml if you have one.
  • It is possible to pin a standard library in the same way roblox.toml was if you are in an environment where you do not want automatic updates, such as one where you want to limit selene's internet usage. Learn more on the Roblox Guide documentation page.

Removed

  • With the introduction of the new deprecated lint, the --deprecated field has been removed from generate-roblox-std, and is now implied.

[0.17.0] - 2022-04-10

11 Apr 06:54
Compare
Choose a tag to compare

Added

  • Added start_line, start_column, end_line, and end_column to JSON diagnostic output.
  • Added Color3.fromHex to the Roblox standard library.
  • Added table.clone to the Roblox standard library.
  • Added coroutine.close to the Roblox standard library.
  • Added task.cancel to the Roblox standard library.

[0.16.0] - 2022-01-30

31 Jan 01:16
Compare
Choose a tag to compare

Added

  • Added support for parsing generic type packs, variadic type packs, and explicit type packs in generic arguments for a type under the roblox feature flag (type X<S...> = Y<(string, number), ...string, S...>)
  • Added support for string and boolean singleton types under the roblox feature flag (type Element = { ["$$typeof"]: number, errorCaught: true, which: "Query" | "Mutation" | "Subscription" }
  • Added support for default types in a generic type declaration under the roblox feature flag (type Foo<X = string> = X)
  • Added table.freeze, table.isfrozen, bit32.countlz, bit32.countrz to the Roblox standard library.
  • Added Vector2.zero, Vector2.one, Vector2.xAxis, Vector2.yAxis to the Roblox standard library.
  • Added Vector3.zero, Vector3.one, Vector3.xAxis, Vector3.yAxis, Vector3.zAxis to the Roblox standard library.
  • Added CFrame.identity to the Roblox standard library.
  • Added gcinfo to the Roblox standard library.

Fixed

  • Fixed a bug where empty else blocks were not properly closing their scope, meaning that they could confuse the shadowing lint. (#116)

[0.15.0] - 2021-11-05

05 Nov 08:46
dcc8045
Compare
Choose a tag to compare

Added

  • Added OverlapParams to the Roblox standard library.
  • Added Enum:GetEnums() to the Roblox standard library. (#312)
  • roblox_incorrect_color3_new_bounds now checks for if the given number is negative. (#83)

Fixed

  • Fixed standard library error when missing files. (#272)
  • Fixed display style option triggering ArgumentConflict when using quiet option. (#288)
  • bad_string_escape now correctly handles escapes of the shape \1a (one or two numbers followed by a hex digit). (#292)
  • Fixed Roblox types not counting towards usage. (#270)

Changed

  • duplicate_keys now has a error severity. (#262)
  • Arguments of collectgarbage now considered to be optional. (#287)
  • Updated internal parser, adding new Luau syntax.

All commits

New Contributors