From c09b4f2f6f912fd166702f3d69de9a5d9df73331 Mon Sep 17 00:00:00 2001 From: roko <40763333+rokoblox@users.noreply.github.com> Date: Wed, 6 Sep 2023 16:11:01 +0300 Subject: [PATCH 1/4] Update roblox_base.yml please verify line 623, based on https://create.roblox.com/docs/reference/engine/datatypes/SharedTable#increment --- selene-lib/default_std/roblox_base.yml | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/selene-lib/default_std/roblox_base.yml b/selene-lib/default_std/roblox_base.yml index 07e46fa5..39b6e514 100644 --- a/selene-lib/default_std/roblox_base.yml +++ b/selene-lib/default_std/roblox_base.yml @@ -598,6 +598,42 @@ globals: - type: any - required: false type: "..." + SharedTable.new: + args: + - required: false + type: table + SharedTable.clear: + args: + - type: + display: SharedTable + SharedTable.clone: + args: + - type: + display: SharedTable + - required: false + type: boolean + SharedTable.cloneAndFreeze: + args: + - type: + display: SharedTable + - required: false + type: boolean + SharedTable.increment: + args: + - type: "string | number" + - type: number + SharedTable.isFrozen: + args: + - type: + display: SharedTable + SharedTable.size: + args: + - type: + display: SharedTable + SharedTable.increment: + args: + - type: "string | number" + - type: function structs: EnumItem: Name: From 8f8613551df81a33249460c1a437b65d1a973b32 Mon Sep 17 00:00:00 2001 From: roko <40763333+rokoblox@users.noreply.github.com> Date: Tue, 12 Sep 2023 15:56:30 +0300 Subject: [PATCH 2/4] replaced type unions with "any" type --- selene-lib/default_std/roblox_base.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selene-lib/default_std/roblox_base.yml b/selene-lib/default_std/roblox_base.yml index 39b6e514..57a50775 100644 --- a/selene-lib/default_std/roblox_base.yml +++ b/selene-lib/default_std/roblox_base.yml @@ -620,7 +620,7 @@ globals: type: boolean SharedTable.increment: args: - - type: "string | number" + - type: "any" - type: number SharedTable.isFrozen: args: @@ -632,7 +632,7 @@ globals: display: SharedTable SharedTable.increment: args: - - type: "string | number" + - type: "any" - type: function structs: EnumItem: From 7c2cf82cf22069c16c9142ed2ce578cdb7e18c8c Mon Sep 17 00:00:00 2001 From: Christopher Chang <51393127+chriscerie@users.noreply.github.com> Date: Thu, 9 Nov 2023 15:52:44 -0800 Subject: [PATCH 3/4] Fix --- selene-lib/default_std/roblox_base.yml | 81 ++++++++++++++------------ 1 file changed, 45 insertions(+), 36 deletions(-) diff --git a/selene-lib/default_std/roblox_base.yml b/selene-lib/default_std/roblox_base.yml index ba1c97e9..375372dd 100644 --- a/selene-lib/default_std/roblox_base.yml +++ b/selene-lib/default_std/roblox_base.yml @@ -533,6 +533,51 @@ globals: require: args: - type: number + SharedTable.clear: + args: + - type: + display: SharedTable + SharedTable.clone: + args: + - type: + display: SharedTable + - required: false + type: bool + must_use: true + SharedTable.cloneAndFreeze: + args: + - type: + display: SharedTable + - required: false + type: bool + must_use: true + SharedTable.increment: + args: + - type: + display: SharedTable + - type: any + - type: number + SharedTable.isFrozen: + args: + - type: + display: SharedTable + must_use: true + SharedTable.new: + args: + - required: false + type: table + must_use: true + SharedTable.size: + args: + - type: + display: SharedTable + must_use: true + SharedTable.update: + args: + - type: + display: SharedTable + - type: any + - type: function settings: args: [] shared: @@ -598,42 +643,6 @@ globals: - type: any - required: false type: "..." - SharedTable.new: - args: - - required: false - type: table - SharedTable.clear: - args: - - type: - display: SharedTable - SharedTable.clone: - args: - - type: - display: SharedTable - - required: false - type: boolean - SharedTable.cloneAndFreeze: - args: - - type: - display: SharedTable - - required: false - type: boolean - SharedTable.increment: - args: - - type: "any" - - type: number - SharedTable.isFrozen: - args: - - type: - display: SharedTable - SharedTable.size: - args: - - type: - display: SharedTable - SharedTable.increment: - args: - - type: "any" - - type: function structs: EnumItem: Name: From 6cc7d29b903c962f98b2befb293506538af3cc39 Mon Sep 17 00:00:00 2001 From: Christopher Chang <51393127+chriscerie@users.noreply.github.com> Date: Thu, 9 Nov 2023 15:54:27 -0800 Subject: [PATCH 4/4] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ddc0eb7..9571630f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Added new [`mixed_table` lint](https://kampfkarren.github.io/selene/lints/mixed_table.html), which will warn against mixed tables. - Added `bit32.byteswap` to Luau standard library - Added `buffer` library to Luau standard library +- Added `SharedTable` to Roblox standard library ### Fixed - `string.pack` and `string.unpack` now have proper function signatures in the Lua 5.3 standard library.