Skip to content

Commit 442be5d

Browse files
committed
3.10.4
1 parent afb81d3 commit 442be5d

File tree

12 files changed

+58
-3
lines changed

12 files changed

+58
-3
lines changed

changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
## Unreleased
44
<!-- Add all new changes here. They will be moved under a version at release -->
55

6+
## 3.10.4
7+
`2024-8-16`
8+
* `NEW` Setting: `Lua.type.checkTableShape`: Add matching checks between the shape of tables and classes, during type checking. [#2768](https://github.com/LuaLS/lua-language-server/pull/2768)
9+
* `NEW` `undefined-field` supports `enum`
10+
* `CHG` Show enumed table as `enum X` instead of `table`
11+
* `FIX` Error `attempt to index a nil value` when `Lua.hint.semicolon == 'All'` [#2788](https://github.com/LuaLS/lua-language-server/issues/2788)
12+
* `FIX` Incorrect LuaCats parsing for `"'"`
13+
* `FIX` Incorrect indent fixings
14+
615
## 3.10.3
716
`2024-8-8`
817
* `FIX` Memory leak with `---@enum(partical)`

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3072,6 +3072,12 @@
30723072
"scope": "resource",
30733073
"type": "boolean"
30743074
},
3075+
"Lua.type.checkTableShape": {
3076+
"default": false,
3077+
"markdownDescription": "%config.type.checkTableShape%",
3078+
"scope": "resource",
3079+
"type": "boolean"
3080+
},
30753081
"Lua.type.inferParamType": {
30763082
"default": false,
30773083
"markdownDescription": "%config.type.inferParamType%",
@@ -3382,5 +3388,5 @@
33823388
"sponsor": {
33833389
"url": "https://github.com/LuaLS/lua-language-server/issues/484"
33843390
},
3385-
"version": "3.10.3"
3391+
"version": "3.10.4"
33863392
}

package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@
217217
"config.spell.dict": "Custom words for spell checking.",
218218
"config.telemetry.enable": "Enable telemetry to send your editor information and error logs over the network. Read our privacy policy [here](https://luals.github.io/privacy/#language-server).\n",
219219
"config.type.castNumberToInteger": "Allowed to assign the `number` type to the `integer` type.",
220+
"config.type.checkTableShape": "Strictly check the shape of the table.\n",
220221
"config.type.inferParamType": "When a parameter type is not annotated, it is inferred from the function's call sites.\n\nWhen this setting is `false`, the type of the parameter is `any` when it is not annotated.\n",
221222
"config.type.weakNilCheck": "When checking the type of union type, ignore the `nil` in it.\n\nWhen this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.\n",
222223
"config.type.weakUnionCheck": "Once one subtype of a union type meets the condition, the union type also meets the condition.\n\nWhen this setting is `false`, the `number|boolean` type cannot be assigned to the `number` type. It can be with `true`.\n",

package.nls.pt-br.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@
217217
"config.spell.dict": "Custom words for spell checking.",
218218
"config.telemetry.enable": "Enable telemetry to send your editor information and error logs over the network. Read our privacy policy [here](https://luals.github.io/privacy/#language-server).\n",
219219
"config.type.castNumberToInteger": "Allowed to assign the `number` type to the `integer` type.",
220+
"config.type.checkTableShape": "对表的形状进行严格检查。\n",
220221
"config.type.inferParamType": "When the parameter type is not annotated, the parameter type is inferred from the function's incoming parameters.\n\nWhen this setting is `false`, the type of the parameter is `any` when it is not annotated.\n",
221222
"config.type.weakNilCheck": "When checking the type of union type, ignore the `nil` in it.\n\nWhen this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.\n",
222223
"config.type.weakUnionCheck": "Once one subtype of a union type meets the condition, the union type also meets the condition.\n\nWhen this setting is `false`, the `number|boolean` type cannot be assigned to the `number` type. It can be with `true`.\n",

package.nls.zh-cn.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@
217217
"config.spell.dict": "拼写检查的自定义单词。",
218218
"config.telemetry.enable": "启用遥测,通过网络发送你的编辑器信息与错误日志。在[此处](https://luals.github.io/privacy/#language-server)阅读我们的隐私声明。\n",
219219
"config.type.castNumberToInteger": "允许将 `number` 类型赋给 `integer` 类型。",
220+
"config.type.checkTableShape": "对表的形状进行严格检查。\n",
220221
"config.type.inferParamType": "未注释参数类型时,参数类型由函数传入参数推断。\n\n如果设置为 \"false\",则在未注释时,参数类型为 \"any\"\n",
221222
"config.type.weakNilCheck": "对联合类型进行类型检查时,忽略其中的 `nil`。\n\n此设置为 `false` 时,`numer|nil` 类型无法赋给 `number` 类型;为 `true` 是则可以。\n",
222223
"config.type.weakUnionCheck": "联合类型中只要有一个子类型满足条件,则联合类型也满足条件。\n\n此设置为 `false` 时,`number|boolean` 类型无法赋给 `number` 类型;为 `true` 时则可以。\n",

package.nls.zh-tw.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@
217217
"config.spell.dict": "拼寫檢查的自訂單詞。",
218218
"config.telemetry.enable": "啟用遙測,透過網路發送你的編輯器資訊與錯誤日誌。在[此處](https://luals.github.io/privacy/#language-server)閱讀我們的隱私聲明。\n",
219219
"config.type.castNumberToInteger": "允許將 `number` 類型賦值給 `integer` 類型。",
220+
"config.type.checkTableShape": "对表的形状进行严格检查。\n",
220221
"config.type.inferParamType": "未注释参数类型时,参数类型由函数传入参数推断。\n\n如果设置为 \"false\",则在未注释时,参数类型为 \"any\"\n",
221222
"config.type.weakNilCheck": "When checking the type of union type, ignore the `nil` in it.\n\nWhen this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.\n",
222223
"config.type.weakUnionCheck": "同位類型中只要有一個子類型滿足條件,則同位類型也滿足條件。\n\n此設定為 `false` 時,`number|boolean` 類型無法賦給 `number` 類型;為 `true` 時則可以。\n",

package/build.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
local json = require 'json-beautify'
22

3-
local VERSION = "3.10.3"
3+
local VERSION = "3.10.4"
44

55
local package = require 'package.package'
66
local fsu = require 'fs-utility'

setting/schema-pt-br.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3279,6 +3279,9 @@
32793279
"castNumberToInteger": {
32803280
"$ref": "#/properties/type.castNumberToInteger"
32813281
},
3282+
"checkTableShape": {
3283+
"$ref": "#/properties/type.checkTableShape"
3284+
},
32823285
"inferParamType": {
32833286
"$ref": "#/properties/type.inferParamType"
32843287
},
@@ -3296,6 +3299,12 @@
32963299
"scope": "resource",
32973300
"type": "boolean"
32983301
},
3302+
"type.checkTableShape": {
3303+
"default": false,
3304+
"markdownDescription": "对表的形状进行严格检查。\n",
3305+
"scope": "resource",
3306+
"type": "boolean"
3307+
},
32993308
"type.inferParamType": {
33003309
"default": false,
33013310
"markdownDescription": "When the parameter type is not annotated, the parameter type is inferred from the function's incoming parameters.\n\nWhen this setting is `false`, the type of the parameter is `any` when it is not annotated.\n",

setting/schema-zh-cn.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3279,6 +3279,9 @@
32793279
"castNumberToInteger": {
32803280
"$ref": "#/properties/type.castNumberToInteger"
32813281
},
3282+
"checkTableShape": {
3283+
"$ref": "#/properties/type.checkTableShape"
3284+
},
32823285
"inferParamType": {
32833286
"$ref": "#/properties/type.inferParamType"
32843287
},
@@ -3296,6 +3299,12 @@
32963299
"scope": "resource",
32973300
"type": "boolean"
32983301
},
3302+
"type.checkTableShape": {
3303+
"default": false,
3304+
"markdownDescription": "对表的形状进行严格检查。\n",
3305+
"scope": "resource",
3306+
"type": "boolean"
3307+
},
32993308
"type.inferParamType": {
33003309
"default": false,
33013310
"markdownDescription": "未注释参数类型时,参数类型由函数传入参数推断。\n\n如果设置为 \"false\",则在未注释时,参数类型为 \"any\"\n",

0 commit comments

Comments
 (0)