brighterscript 0.66.0-alpha.1 → 0.66.0-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/CHANGELOG.md +224 -10
  2. package/README.md +13 -3
  3. package/bsconfig.schema.json +15 -0
  4. package/dist/ActionPipeline.d.ts +10 -0
  5. package/dist/ActionPipeline.js +40 -0
  6. package/dist/ActionPipeline.js.map +1 -0
  7. package/dist/AstValidationSegmenter.d.ts +25 -0
  8. package/dist/AstValidationSegmenter.js +150 -0
  9. package/dist/AstValidationSegmenter.js.map +1 -0
  10. package/dist/BsConfig.d.ts +13 -4
  11. package/dist/BusyStatusTracker.d.ts +31 -0
  12. package/dist/BusyStatusTracker.js +83 -0
  13. package/dist/BusyStatusTracker.js.map +1 -0
  14. package/dist/Cache.js +3 -3
  15. package/dist/Cache.js.map +1 -1
  16. package/dist/CacheVerifier.d.ts +0 -1
  17. package/dist/CodeActionUtil.d.ts +2 -2
  18. package/dist/CommentFlagProcessor.d.ts +4 -3
  19. package/dist/CommentFlagProcessor.js.map +1 -1
  20. package/dist/DiagnosticCollection.js +8 -5
  21. package/dist/DiagnosticCollection.js.map +1 -1
  22. package/dist/DiagnosticMessages.d.ts +34 -4
  23. package/dist/DiagnosticMessages.js +59 -4
  24. package/dist/DiagnosticMessages.js.map +1 -1
  25. package/dist/FunctionScope.d.ts +1 -1
  26. package/dist/LanguageServer.d.ts +23 -1
  27. package/dist/LanguageServer.js +139 -57
  28. package/dist/LanguageServer.js.map +1 -1
  29. package/dist/Logger.d.ts +3 -2
  30. package/dist/Logger.js +10 -2
  31. package/dist/Logger.js.map +1 -1
  32. package/dist/PluginInterface.d.ts +11 -2
  33. package/dist/PluginInterface.js +69 -10
  34. package/dist/PluginInterface.js.map +1 -1
  35. package/dist/Program.d.ts +138 -49
  36. package/dist/Program.js +644 -349
  37. package/dist/Program.js.map +1 -1
  38. package/dist/ProgramBuilder.d.ts +10 -4
  39. package/dist/ProgramBuilder.js +76 -74
  40. package/dist/ProgramBuilder.js.map +1 -1
  41. package/dist/Scope.d.ts +52 -49
  42. package/dist/Scope.js +298 -274
  43. package/dist/Scope.js.map +1 -1
  44. package/dist/SymbolTable.d.ts +35 -14
  45. package/dist/SymbolTable.js +90 -29
  46. package/dist/SymbolTable.js.map +1 -1
  47. package/dist/Throttler.d.ts +12 -0
  48. package/dist/Throttler.js +39 -0
  49. package/dist/Throttler.js.map +1 -1
  50. package/dist/XmlScope.d.ts +7 -4
  51. package/dist/XmlScope.js +52 -12
  52. package/dist/XmlScope.js.map +1 -1
  53. package/dist/astUtils/{AstEditor.d.ts → Editor.d.ts} +6 -1
  54. package/dist/astUtils/{AstEditor.js → Editor.js} +9 -3
  55. package/dist/astUtils/Editor.js.map +1 -0
  56. package/dist/astUtils/{AstEditor.spec.js → Editor.spec.js} +10 -6
  57. package/dist/astUtils/Editor.spec.js.map +1 -0
  58. package/dist/astUtils/creators.d.ts +3 -1
  59. package/dist/astUtils/creators.js +14 -4
  60. package/dist/astUtils/creators.js.map +1 -1
  61. package/dist/astUtils/reflection.d.ts +37 -9
  62. package/dist/astUtils/reflection.js +83 -14
  63. package/dist/astUtils/reflection.js.map +1 -1
  64. package/dist/astUtils/reflection.spec.js +87 -5
  65. package/dist/astUtils/reflection.spec.js.map +1 -1
  66. package/dist/astUtils/visitors.d.ts +14 -3
  67. package/dist/astUtils/visitors.js +22 -2
  68. package/dist/astUtils/visitors.js.map +1 -1
  69. package/dist/astUtils/visitors.spec.js +58 -7
  70. package/dist/astUtils/visitors.spec.js.map +1 -1
  71. package/dist/bscPlugin/BscPlugin.d.ts +10 -2
  72. package/dist/bscPlugin/BscPlugin.js +24 -4
  73. package/dist/bscPlugin/BscPlugin.js.map +1 -1
  74. package/dist/bscPlugin/CallExpressionInfo.d.ts +3 -3
  75. package/dist/bscPlugin/CallExpressionInfo.js.map +1 -1
  76. package/dist/bscPlugin/FileWriter.d.ts +6 -0
  77. package/dist/bscPlugin/FileWriter.js +24 -0
  78. package/dist/bscPlugin/FileWriter.js.map +1 -0
  79. package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +8 -8
  80. package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
  81. package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +4 -4
  82. package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +1 -1
  83. package/dist/bscPlugin/completions/CompletionsProcessor.d.ts +50 -1
  84. package/dist/bscPlugin/completions/CompletionsProcessor.js +445 -23
  85. package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -1
  86. package/dist/bscPlugin/completions/CompletionsProcessor.spec.js +1737 -0
  87. package/dist/bscPlugin/completions/CompletionsProcessor.spec.js.map +1 -0
  88. package/dist/bscPlugin/fileProviders/FileProvider.d.ts +9 -0
  89. package/dist/bscPlugin/fileProviders/FileProvider.js +51 -0
  90. package/dist/bscPlugin/fileProviders/FileProvider.js.map +1 -0
  91. package/dist/bscPlugin/hover/HoverProcessor.d.ts +7 -3
  92. package/dist/bscPlugin/hover/HoverProcessor.js +133 -103
  93. package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -1
  94. package/dist/bscPlugin/hover/HoverProcessor.spec.js +241 -29
  95. package/dist/bscPlugin/hover/HoverProcessor.spec.js.map +1 -1
  96. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.d.ts +1 -0
  97. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js +43 -0
  98. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -1
  99. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js +22 -0
  100. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js.map +1 -1
  101. package/dist/bscPlugin/serialize/BslibInjector.spec.js +19 -0
  102. package/dist/bscPlugin/serialize/BslibInjector.spec.js.map +1 -0
  103. package/dist/bscPlugin/serialize/BslibManager.d.ts +9 -0
  104. package/dist/bscPlugin/serialize/BslibManager.js +40 -0
  105. package/dist/bscPlugin/serialize/BslibManager.js.map +1 -0
  106. package/dist/bscPlugin/serialize/FileSerializer.d.ts +9 -0
  107. package/dist/bscPlugin/serialize/FileSerializer.js +72 -0
  108. package/dist/bscPlugin/serialize/FileSerializer.js.map +1 -0
  109. package/dist/bscPlugin/transpile/{BrsFilePreTranspileProcessor.d.ts → BrsFileTranspileProcessor.d.ts} +4 -2
  110. package/dist/bscPlugin/transpile/{BrsFilePreTranspileProcessor.js → BrsFileTranspileProcessor.js} +29 -5
  111. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js.map +1 -0
  112. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.d.ts +1 -0
  113. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.js +41 -0
  114. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.js.map +1 -0
  115. package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.d.ts +2 -2
  116. package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js.map +1 -1
  117. package/dist/bscPlugin/validation/BrsFileValidator.d.ts +0 -4
  118. package/dist/bscPlugin/validation/BrsFileValidator.js +34 -29
  119. package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -1
  120. package/dist/bscPlugin/validation/BrsFileValidator.spec.js +1 -1
  121. package/dist/bscPlugin/validation/BrsFileValidator.spec.js.map +1 -1
  122. package/dist/bscPlugin/validation/ScopeValidator.d.ts +28 -7
  123. package/dist/bscPlugin/validation/ScopeValidator.js +393 -205
  124. package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -1
  125. package/dist/bscPlugin/validation/ScopeValidator.spec.d.ts +1 -0
  126. package/dist/bscPlugin/validation/ScopeValidator.spec.js +2038 -0
  127. package/dist/bscPlugin/validation/ScopeValidator.spec.js.map +1 -0
  128. package/dist/bscPlugin/validation/XmlFileValidator.js +2 -2
  129. package/dist/bscPlugin/validation/XmlFileValidator.js.map +1 -1
  130. package/dist/cli.js +104 -13
  131. package/dist/cli.js.map +1 -1
  132. package/dist/deferred.d.ts +3 -3
  133. package/dist/deferred.js.map +1 -1
  134. package/dist/diagnosticUtils.d.ts +8 -2
  135. package/dist/diagnosticUtils.js +45 -16
  136. package/dist/diagnosticUtils.js.map +1 -1
  137. package/dist/examples/plugins/removePrint.js +1 -1
  138. package/dist/examples/plugins/removePrint.js.map +1 -1
  139. package/dist/files/AssetFile.d.ts +26 -0
  140. package/dist/files/AssetFile.js +26 -0
  141. package/dist/files/AssetFile.js.map +1 -0
  142. package/dist/files/BrsFile.Class.spec.js +383 -56
  143. package/dist/files/BrsFile.Class.spec.js.map +1 -1
  144. package/dist/files/BrsFile.d.ts +73 -46
  145. package/dist/files/BrsFile.js +370 -534
  146. package/dist/files/BrsFile.js.map +1 -1
  147. package/dist/files/BrsFile.spec.js +1139 -682
  148. package/dist/files/BrsFile.spec.js.map +1 -1
  149. package/dist/files/Factory.d.ts +25 -0
  150. package/dist/files/Factory.js +22 -0
  151. package/dist/files/Factory.js.map +1 -0
  152. package/dist/files/File.d.ts +106 -0
  153. package/dist/files/File.js +16 -0
  154. package/dist/files/File.js.map +1 -0
  155. package/dist/files/LazyFileData.d.ts +20 -0
  156. package/dist/files/LazyFileData.js +54 -0
  157. package/dist/files/LazyFileData.js.map +1 -0
  158. package/dist/files/LazyFileData.spec.d.ts +1 -0
  159. package/dist/files/LazyFileData.spec.js +27 -0
  160. package/dist/files/LazyFileData.spec.js.map +1 -0
  161. package/dist/files/XmlFile.d.ts +56 -23
  162. package/dist/files/XmlFile.js +88 -60
  163. package/dist/files/XmlFile.js.map +1 -1
  164. package/dist/files/XmlFile.spec.js +64 -93
  165. package/dist/files/XmlFile.spec.js.map +1 -1
  166. package/dist/files/tests/imports.spec.js +21 -8
  167. package/dist/files/tests/imports.spec.js.map +1 -1
  168. package/dist/files/tests/optionalChaning.spec.js +14 -14
  169. package/dist/files/tests/optionalChaning.spec.js.map +1 -1
  170. package/dist/globalCallables.js +88 -84
  171. package/dist/globalCallables.js.map +1 -1
  172. package/dist/index.d.ts +9 -1
  173. package/dist/index.js +9 -1
  174. package/dist/index.js.map +1 -1
  175. package/dist/interfaces.d.ts +389 -94
  176. package/dist/interfaces.js +13 -2
  177. package/dist/interfaces.js.map +1 -1
  178. package/dist/lexer/Lexer.d.ts +12 -0
  179. package/dist/lexer/Lexer.js +28 -8
  180. package/dist/lexer/Lexer.js.map +1 -1
  181. package/dist/lexer/Lexer.spec.js +40 -0
  182. package/dist/lexer/Lexer.spec.js.map +1 -1
  183. package/dist/lexer/Token.d.ts +4 -0
  184. package/dist/lexer/Token.js.map +1 -1
  185. package/dist/lexer/TokenKind.d.ts +5 -0
  186. package/dist/lexer/TokenKind.js +14 -2
  187. package/dist/lexer/TokenKind.js.map +1 -1
  188. package/dist/parser/AstNode.d.ts +9 -2
  189. package/dist/parser/AstNode.js +16 -0
  190. package/dist/parser/AstNode.js.map +1 -1
  191. package/dist/parser/BrsTranspileState.d.ts +3 -2
  192. package/dist/parser/BrsTranspileState.js +3 -2
  193. package/dist/parser/BrsTranspileState.js.map +1 -1
  194. package/dist/parser/Expression.d.ts +21 -5
  195. package/dist/parser/Expression.js +130 -35
  196. package/dist/parser/Expression.js.map +1 -1
  197. package/dist/parser/Parser.Class.spec.js +103 -1
  198. package/dist/parser/Parser.Class.spec.js.map +1 -1
  199. package/dist/parser/Parser.d.ts +7 -0
  200. package/dist/parser/Parser.js +117 -21
  201. package/dist/parser/Parser.js.map +1 -1
  202. package/dist/parser/Parser.spec.js +557 -5
  203. package/dist/parser/Parser.spec.js.map +1 -1
  204. package/dist/parser/SGParser.d.ts +4 -4
  205. package/dist/parser/SGParser.js +3 -3
  206. package/dist/parser/SGParser.js.map +1 -1
  207. package/dist/parser/SGParser.spec.js +2 -2
  208. package/dist/parser/SGParser.spec.js.map +1 -1
  209. package/dist/parser/SGTypes.d.ts +2 -2
  210. package/dist/parser/Statement.d.ts +37 -12
  211. package/dist/parser/Statement.js +153 -46
  212. package/dist/parser/Statement.js.map +1 -1
  213. package/dist/parser/tests/Parser.spec.js +2 -1
  214. package/dist/parser/tests/Parser.spec.js.map +1 -1
  215. package/dist/parser/tests/controlFlow/For.spec.js +16 -8
  216. package/dist/parser/tests/controlFlow/For.spec.js.map +1 -1
  217. package/dist/parser/tests/controlFlow/ForEach.spec.js +12 -6
  218. package/dist/parser/tests/controlFlow/ForEach.spec.js.map +1 -1
  219. package/dist/parser/tests/controlFlow/While.spec.js +8 -4
  220. package/dist/parser/tests/controlFlow/While.spec.js.map +1 -1
  221. package/dist/parser/tests/expression/Call.spec.js +4 -4
  222. package/dist/parser/tests/expression/Call.spec.js.map +1 -1
  223. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +29 -29
  224. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +1 -1
  225. package/dist/parser/tests/expression/RegexLiteralExpression.spec.js +10 -10
  226. package/dist/parser/tests/expression/RegexLiteralExpression.spec.js.map +1 -1
  227. package/dist/parser/tests/expression/SourceLiteralExpression.spec.js +24 -24
  228. package/dist/parser/tests/expression/SourceLiteralExpression.spec.js.map +1 -1
  229. package/dist/parser/tests/expression/TemplateStringExpression.spec.js +75 -36
  230. package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +1 -1
  231. package/dist/parser/tests/expression/TernaryExpression.spec.js +36 -36
  232. package/dist/parser/tests/expression/TernaryExpression.spec.js.map +1 -1
  233. package/dist/parser/tests/expression/UnaryExpression.spec.d.ts +1 -0
  234. package/dist/parser/tests/expression/UnaryExpression.spec.js +52 -0
  235. package/dist/parser/tests/expression/UnaryExpression.spec.js.map +1 -0
  236. package/dist/parser/tests/statement/ConstStatement.spec.js +71 -22
  237. package/dist/parser/tests/statement/ConstStatement.spec.js.map +1 -1
  238. package/dist/parser/tests/statement/Continue.spec.js +2 -2
  239. package/dist/parser/tests/statement/Continue.spec.js.map +1 -1
  240. package/dist/parser/tests/statement/Enum.spec.js +38 -285
  241. package/dist/parser/tests/statement/Enum.spec.js.map +1 -1
  242. package/dist/parser/tests/statement/For.spec.js +6 -6
  243. package/dist/parser/tests/statement/For.spec.js.map +1 -1
  244. package/dist/parser/tests/statement/ForEach.spec.js +4 -4
  245. package/dist/parser/tests/statement/ForEach.spec.js.map +1 -1
  246. package/dist/parser/tests/statement/InterfaceStatement.spec.js +26 -10
  247. package/dist/parser/tests/statement/InterfaceStatement.spec.js.map +1 -1
  248. package/dist/parser/tests/statement/PrintStatement.spec.js +16 -13
  249. package/dist/parser/tests/statement/PrintStatement.spec.js.map +1 -1
  250. package/dist/parser/tests/statement/ReturnStatement.spec.js +5 -3
  251. package/dist/parser/tests/statement/ReturnStatement.spec.js.map +1 -1
  252. package/dist/parser/tests/statement/Set.spec.js +26 -13
  253. package/dist/parser/tests/statement/Set.spec.js.map +1 -1
  254. package/dist/preprocessor/Manifest.d.ts +1 -1
  255. package/dist/preprocessor/Manifest.js +2 -2
  256. package/dist/preprocessor/Manifest.js.map +1 -1
  257. package/dist/roku-types/data.json +244 -294
  258. package/dist/roku-types/index.d.ts +17 -38
  259. package/dist/types/ArrayType.d.ts +4 -1
  260. package/dist/types/ArrayType.js +46 -6
  261. package/dist/types/ArrayType.js.map +1 -1
  262. package/dist/types/ArrayType.spec.js +32 -3
  263. package/dist/types/ArrayType.spec.js.map +1 -1
  264. package/dist/types/AssociativeArrayType.d.ts +11 -0
  265. package/dist/types/AssociativeArrayType.js +52 -0
  266. package/dist/types/AssociativeArrayType.js.map +1 -0
  267. package/dist/types/BaseFunctionType.d.ts +9 -0
  268. package/dist/types/BaseFunctionType.js +25 -0
  269. package/dist/types/BaseFunctionType.js.map +1 -0
  270. package/dist/types/BooleanType.d.ts +2 -1
  271. package/dist/types/BooleanType.js +8 -2
  272. package/dist/types/BooleanType.js.map +1 -1
  273. package/dist/types/BscType.d.ts +10 -6
  274. package/dist/types/BscType.js +69 -16
  275. package/dist/types/BscType.js.map +1 -1
  276. package/dist/types/BscTypeKind.d.ts +3 -0
  277. package/dist/types/BscTypeKind.js +3 -0
  278. package/dist/types/BscTypeKind.js.map +1 -1
  279. package/dist/types/BuiltInInterfaceAdder.d.ts +23 -0
  280. package/dist/types/BuiltInInterfaceAdder.js +164 -0
  281. package/dist/types/BuiltInInterfaceAdder.js.map +1 -0
  282. package/dist/types/BuiltInInterfaceAdder.spec.d.ts +1 -0
  283. package/dist/types/BuiltInInterfaceAdder.spec.js +116 -0
  284. package/dist/types/BuiltInInterfaceAdder.spec.js.map +1 -0
  285. package/dist/types/ClassType.d.ts +10 -4
  286. package/dist/types/ClassType.js +32 -5
  287. package/dist/types/ClassType.js.map +1 -1
  288. package/dist/types/ClassType.spec.js +5 -3
  289. package/dist/types/ClassType.spec.js.map +1 -1
  290. package/dist/types/ComponentType.d.ts +26 -0
  291. package/dist/types/ComponentType.js +83 -0
  292. package/dist/types/ComponentType.js.map +1 -0
  293. package/dist/types/DoubleType.d.ts +2 -1
  294. package/dist/types/DoubleType.js +9 -2
  295. package/dist/types/DoubleType.js.map +1 -1
  296. package/dist/types/DynamicType.d.ts +2 -2
  297. package/dist/types/DynamicType.js +3 -1
  298. package/dist/types/DynamicType.js.map +1 -1
  299. package/dist/types/EnumType.d.ts +24 -6
  300. package/dist/types/EnumType.js +29 -7
  301. package/dist/types/EnumType.js.map +1 -1
  302. package/dist/types/FloatType.d.ts +2 -1
  303. package/dist/types/FloatType.js +9 -2
  304. package/dist/types/FloatType.js.map +1 -1
  305. package/dist/types/FunctionType.d.ts +8 -20
  306. package/dist/types/FunctionType.js +17 -45
  307. package/dist/types/FunctionType.js.map +1 -1
  308. package/dist/types/InheritableType.d.ts +7 -4
  309. package/dist/types/InheritableType.js +67 -3
  310. package/dist/types/InheritableType.js.map +1 -1
  311. package/dist/types/IntegerType.d.ts +2 -1
  312. package/dist/types/IntegerType.js +9 -2
  313. package/dist/types/IntegerType.js.map +1 -1
  314. package/dist/types/InterfaceType.d.ts +6 -4
  315. package/dist/types/InterfaceType.js +8 -11
  316. package/dist/types/InterfaceType.js.map +1 -1
  317. package/dist/types/InterfaceType.spec.js +30 -2
  318. package/dist/types/InterfaceType.spec.js.map +1 -1
  319. package/dist/types/InvalidType.d.ts +2 -1
  320. package/dist/types/InvalidType.js +7 -1
  321. package/dist/types/InvalidType.js.map +1 -1
  322. package/dist/types/LongIntegerType.d.ts +2 -1
  323. package/dist/types/LongIntegerType.js +9 -2
  324. package/dist/types/LongIntegerType.js.map +1 -1
  325. package/dist/types/NamespaceType.d.ts +2 -1
  326. package/dist/types/NamespaceType.js +3 -0
  327. package/dist/types/NamespaceType.js.map +1 -1
  328. package/dist/types/ObjectType.d.ts +2 -2
  329. package/dist/types/ObjectType.js +5 -10
  330. package/dist/types/ObjectType.js.map +1 -1
  331. package/dist/types/ReferenceType.d.ts +15 -3
  332. package/dist/types/ReferenceType.js +173 -24
  333. package/dist/types/ReferenceType.js.map +1 -1
  334. package/dist/types/ReferenceType.spec.js +21 -6
  335. package/dist/types/ReferenceType.spec.js.map +1 -1
  336. package/dist/types/StringType.d.ts +2 -1
  337. package/dist/types/StringType.js +9 -2
  338. package/dist/types/StringType.js.map +1 -1
  339. package/dist/types/TypedFunctionType.d.ts +33 -0
  340. package/dist/types/TypedFunctionType.js +106 -0
  341. package/dist/types/TypedFunctionType.js.map +1 -0
  342. package/dist/types/TypedFunctionType.spec.d.ts +1 -0
  343. package/dist/types/TypedFunctionType.spec.js +122 -0
  344. package/dist/types/TypedFunctionType.spec.js.map +1 -0
  345. package/dist/types/UninitializedType.d.ts +2 -1
  346. package/dist/types/UninitializedType.js +1 -1
  347. package/dist/types/UninitializedType.js.map +1 -1
  348. package/dist/types/UnionType.d.ts +4 -2
  349. package/dist/types/UnionType.js +36 -4
  350. package/dist/types/UnionType.js.map +1 -1
  351. package/dist/types/UnionType.spec.js +46 -19
  352. package/dist/types/UnionType.spec.js.map +1 -1
  353. package/dist/types/VoidType.d.ts +2 -1
  354. package/dist/types/VoidType.js +7 -2
  355. package/dist/types/VoidType.js.map +1 -1
  356. package/dist/types/helper.spec.js +15 -0
  357. package/dist/types/helper.spec.js.map +1 -1
  358. package/dist/types/helpers.d.ts +5 -0
  359. package/dist/types/helpers.js +50 -3
  360. package/dist/types/helpers.js.map +1 -1
  361. package/dist/types/index.d.ts +1 -1
  362. package/dist/types/index.js +1 -1
  363. package/dist/types/index.js.map +1 -1
  364. package/dist/util.d.ts +71 -15
  365. package/dist/util.js +578 -150
  366. package/dist/util.js.map +1 -1
  367. package/dist/validators/ClassValidator.d.ts +0 -1
  368. package/dist/validators/ClassValidator.js +0 -22
  369. package/dist/validators/ClassValidator.js.map +1 -1
  370. package/package.json +3 -2
  371. package/dist/astUtils/AstEditor.js.map +0 -1
  372. package/dist/astUtils/AstEditor.spec.js.map +0 -1
  373. package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.js.map +0 -1
  374. package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.spec.js +0 -31
  375. package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.spec.js.map +0 -1
  376. package/dist/types/FunctionType.spec.js +0 -23
  377. package/dist/types/FunctionType.spec.js.map +0 -1
  378. /package/dist/astUtils/{AstEditor.spec.d.ts → Editor.spec.d.ts} +0 -0
  379. /package/dist/bscPlugin/{transpile/BrsFilePreTranspileProcessor.spec.d.ts → completions/CompletionsProcessor.spec.d.ts} +0 -0
  380. /package/dist/{types/FunctionType.spec.d.ts → bscPlugin/serialize/BslibInjector.spec.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -6,6 +6,127 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
 
8
8
 
9
+ ## [0.66.0-alpha.11](https://github.com/rokucommunity/brighterscript/compare/v0.66.0-alpha.10...v0.66.0-alpha.11) - 2023-12-21
10
+ ### Changed
11
+ - Make `roSGNode` and `roSGNodeNode` the same ([#984](https://github.com/rokucommunity/brighterscript/pull/984))
12
+ ### Fixed
13
+ - Scope validation crash ([#991](https://github.com/rokucommunity/brighterscript/pull/991))
14
+ - Namespace validation crash ([#989](https://github.com/rokucommunity/brighterscript/pull/989))
15
+
16
+
17
+
18
+ ## [0.66.0-alpha.10](https://github.com/rokucommunity/brighterscript/compare/v0.66.0-alpha.9...v0.66.0-alpha.10) - 2023-12-07
19
+ ### Fixed
20
+ - class constructor used as function transpilation and validation ([#972](https://github.com/rokucommunity/brighterscript/pull/972))
21
+ - exception when given unknown type ([#983](https://github.com/rokucommunity/brighterscript/pull/983))
22
+ ### Changed
23
+ - classes do not include AA members ([#970](https://github.com/rokucommunity/brighterscript/pull/970))
24
+ - remove post-transpiled symbols from .bs code completion ([#979](https://github.com/rokucommunity/brighterscript/pull/979))
25
+ - general purpose name collision diagnostic ([#982](https://github.com/rokucommunity/brighterscript/pull/982))
26
+
27
+
28
+
29
+ ## [0.66.0-alpha.9](https://github.com/rokucommunity/brighterscript/compare/v0.66.0-alpha.8...v0.66.0-alpha.9) - 2023-11-28
30
+ ### Fixed
31
+ - removed `v8-profiler-next` package as a dependency (it'll be installed on-demand) ([#1287a5d](https://github.com/rokucommunity/brighterscript/commits/1287a5d7628c0e3ae3154697dfa4d12df5d7e96a))
32
+
33
+
34
+
35
+ ## [0.66.0-alpha.8](https://github.com/rokucommunity/brighterscript/compare/v0.66.0-alpha.7...v0.66.0-alpha.8) - 2023-11-27
36
+ ### Added
37
+ - Interface optional properties ([#946](https://github.com/rokucommunity/brighterscript/pull/946))
38
+ - ifDraw2d to reRegion interface ([#960](https://github.com/rokucommunity/brighterscript/pull/960))
39
+ ### Changed
40
+ - cache `range` and `position` to improve performance ([#940](https://github.com/rokucommunity/brighterscript/pull/940))
41
+ - changes to make use with Plugins easier ([#959](https://github.com/rokucommunity/brighterscript/pull/959))
42
+ ### Fixed
43
+ - parsing order for `not` keyword ([#932](https://github.com/rokucommunity/brighterscript/pull/932))
44
+ - class fields using constructors not transpiling correctly ([#933](https://github.com/rokucommunity/brighterscript/pull/933))
45
+ - performance fixes ([#936](https://github.com/rokucommunity/brighterscript/pull/936))
46
+ - validation Performance: File level providedSymbols and `requiredSymbols` ([#944](https://github.com/rokucommunity/brighterscript/pull/944))
47
+ - interface & class support for go-to-definition ([#948](https://github.com/rokucommunity/brighterscript/pull/948))
48
+ - fixes using Enums directly in namespaced situations ([#949](https://github.com/rokucommunity/brighterscript/pull/949))
49
+ - completion performance ([#958](https://github.com/rokucommunity/brighterscript/pull/958))
50
+ - param order for AST class constructors for interface/class members ([#954](https://github.com/rokucommunity/brighterscript/pull/954))
51
+
52
+
53
+
54
+ ## [0.66.0-alpha.7](https://github.com/rokucommunity/brighterscript/compare/v0.66.0-alpha.6...v0.66.0-alpha.7) - 2023-10-16
55
+ ### Changed
56
+ - all changes from [v0.65.6](https://github.com/rokucommunity/brighterscript/compare/v0.65.5...v0.65.6) and [v0.65.7](https://github.com/rokucommunity/brighterscript/compare/v0.65.6...v0.65.7)
57
+ - Better multi-scope messages ([#904](https://github.com/rokucommunity/brighterscript/pull/904))
58
+ - Refine type compatibility message ([#908](https://github.com/rokucommunity/brighterscript/pull/908))
59
+ - Allow classes and native components in Typed Arrays ([#919](https://github.com/rokucommunity/brighterscript/pull/919))
60
+ - Fixes some enum validation stuff ([#920](https://github.com/rokucommunity/brighterscript/pull/920))
61
+ - Fixes compatibility of built in types (roArray -> typed arrays) ([#925](https://github.com/rokucommunity/brighterscript/pull/925))
62
+ - Semantic Tokes for Native Components and Type completion in Type Expressions ([#927](https://github.com/rokucommunity/brighterscript/pull/927))
63
+ - Adds callFunc as member method to Custom Components ([#929](https://github.com/rokucommunity/brighterscript/pull/929))
64
+ - Allows scrape-roku-docs to consolidate overloaded methods ([#930](https://github.com/rokucommunity/brighterscript/pull/930))
65
+ - File api ([#408](https://github.com/rokucommunity/brighterscript/pull/408))
66
+
67
+
68
+
69
+ ## [0.66.0-alpha.6](https://github.com/rokucommunity/brighterscript/compare/v0.66.0-alpha.5...v0.66.0-alpha.6) - 2023-09-20
70
+ ### Changed
71
+ - Validates DottedSetStatements for type compatibility ([#894](https://github.com/rokucommunity/brighterscript/pull/894))
72
+ - Adds Native Brightscript Component Types and Custom Components (Nodes) to Type System ([#891](https://github.com/rokucommunity/brighterscript/pull/891))
73
+ - Adds validation for binary operators ([#896](https://github.com/rokucommunity/brighterscript/pull/896))
74
+ - Fix union type unary operations and Array.sort(by) optional params ([#897](https://github.com/rokucommunity/brighterscript/pull/897))
75
+ - Interface param support ([#900](https://github.com/rokucommunity/brighterscript/pull/900))
76
+ - Fixes issues with Interface validations, and adds extra details about missing or mismatches members ([#901](https://github.com/rokucommunity/brighterscript/pull/901))
77
+ - Fix isLiteralInvalid ([#902](https://github.com/rokucommunity/brighterscript/pull/902))
78
+
79
+
80
+
81
+ ## [0.66.0-alpha.5](https://github.com/rokucommunity/brighterscript/compare/v0.66.0-alpha.4...v0.66.0-alpha.5) - 2023-09-14
82
+ ### Changed
83
+ - all changes from [v0.65.5](https://github.com/rokucommunity/brighterscript/compare/v0.65.4...v0.65.5)
84
+ - Type casts are not allowed in BrightScript ([#859](https://github.com/rokucommunity/brighterscript/pull/859))
85
+ - Fixes small hover issues ([#860](https://github.com/rokucommunity/brighterscript/pull/860))
86
+ - Fixes ReferenceTypes in Binary Operations & UnionTypes as args ([#858](https://github.com/rokucommunity/brighterscript/pull/858))
87
+ - Refactor completion logic ([#864](https://github.com/rokucommunity/brighterscript/pull/864))
88
+ - Fix built in methods parameter types ([#866](https://github.com/rokucommunity/brighterscript/pull/866))
89
+ - Fixes types on call expression info class ([#877](https://github.com/rokucommunity/brighterscript/pull/877))
90
+ - Adds Return type validation ([#876](https://github.com/rokucommunity/brighterscript/pull/876))
91
+ - Adds Typed Arrays ([#875](https://github.com/rokucommunity/brighterscript/pull/875))
92
+ - Use Symbol Tables for Completions ([#874](https://github.com/rokucommunity/brighterscript/pull/874))
93
+ - Adds Leading Trivia to all tokens ([#885](https://github.com/rokucommunity/brighterscript/pull/885))
94
+ - Adds built in Interfaces to primitive types & Validates class method calls ([#856](https://github.com/rokucommunity/brighterscript/pull/856))
95
+
96
+
97
+
98
+ ## [0.66.0-alpha.4](https://github.com/rokucommunity/brighterscript/compare/v0.66.0-alpha.3...v0.66.0-alpha.4) - 2023-07-26
99
+ ### Changed
100
+ - all changes from [v0.65.4](https://github.com/rokucommunity/brighterscript/compare/v0.65.3...v0.65.4)
101
+ ### Fixes
102
+ - assignment from return of member functions of primitive types ([#855](https://github.com/rokucommunity/brighterscript/pull/855))
103
+ - using invalid as a default param value (now sets type to dynamic) ([#855](https://github.com/rokucommunity/brighterscript/pull/855))
104
+ - missing `Roku_Event_Dispatcher()` global callable (from library `Roku_Event_Dispatcher.brs`) ([#855](https://github.com/rokucommunity/brighterscript/pull/855))
105
+ - `FormatJson()` function signature ([#855](https://github.com/rokucommunity/brighterscript/pull/855))
106
+
107
+
108
+
109
+ ## [0.66.0-alpha.3](https://github.com/rokucommunity/brighterscript/compare/v0.66.0-alpha.2...v0.66.0-alpha.3) - 2023-07-24
110
+ ## Fixed
111
+ - performance fixes ([#834](https://github.com/rokucommunity/brighterscript/pull/834))
112
+ - remove enable type validation option ([#846](https://github.com/rokucommunity/brighterscript/pull/846))
113
+ - BinaryExpression and UnaryExpression infer resultant types ([#827](https://github.com/rokucommunity/brighterscript/pull/827))
114
+ - improve hover to use symbol tables ([#828](https://github.com/rokucommunity/brighterscript/pull/828))
115
+ - fix issue with enums not being properly treated as their underlying types when passed to functions ([#849](https://github.com/rokucommunity/brighterscript/pull/849))
116
+ - object type wider support ([#850](https://github.com/rokucommunity/brighterscript/pull/850))
117
+ - functions as params ([#853](https://github.com/rokucommunity/brighterscript/pull/853))
118
+
119
+
120
+
121
+ ## [0.66.0-alpha.2](https://github.com/rokucommunity/brighterscript/compare/v0.66.0-alpha.1...v0.66.0-alpha.2) - 2023-06-14
122
+ ### Fixed
123
+ - Fixes some issues related to Classes as Properties and Consts validation ([#826](https://github.com/rokucommunity/brighterscript/pull/826))
124
+ - Fixes when a Class is a Property of another class, and being unable to resolve it
125
+ - Fixes issue with Consts value looking at a typetime value of the RHS
126
+ - Does a better job of caching symbol lookups on memberTables
127
+
128
+
129
+
9
130
  ## [0.66.0-alpha.1](https://github.com/rokucommunity/brighterscript/compare/v0.66.0-alpha.0...v0.66.0-alpha.1) - 2023-06-11
10
131
  ### Changed
11
132
  - plugin event structures (all events now take a single event object instead of ordered params)
@@ -17,6 +138,109 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
17
138
  ## [0.66.0-alpha.0](https://github.com/rokucommunity/brighterscript/compare/v0.65.1...v0.66.0-alpha.0) - 2023-06-09
18
139
  ### Changed
19
140
  - all the type tracking stuff!
141
+ ## [0.65.12](https://github.com/rokucommunity/brighterscript/compare/v0.65.11...v0.65.12) - 2023-12-07
142
+ ### Added
143
+ - `optional` modifier for interface and class members ([#955](https://github.com/rokucommunity/brighterscript/pull/955))
144
+ - manifest loading from files ([#942](https://github.com/rokucommunity/brighterscript/pull/942))
145
+ ### Changed
146
+ - use regex for faster manifest/typedef detection ([#976](https://github.com/rokucommunity/brighterscript/pull/976))
147
+ - out-of-date transpile blocks in docs ([#956](https://github.com/rokucommunity/brighterscript/pull/956))
148
+ ### Fixed
149
+ - Correct RANGE in template string when dealing with quotes in annotations ([#975](https://github.com/rokucommunity/brighterscript/pull/975))
150
+
151
+
152
+
153
+ ## [0.65.11](https://github.com/rokucommunity/brighterscript/compare/v0.65.10...v0.65.11) - 2023-11-30
154
+ ### Changed
155
+ - upgrade to [roku-deploy@3.11.1](https://github.com/rokucommunity/roku-deploy/blob/master/CHANGELOG.md#3111---2023-11-30). Notable changes since 3.10.5:
156
+ - Wait for file stream to close before resolving promise ([roku-deploy#133](https://github.com/rokucommunity/roku-deploy/pull/133))
157
+ ### Fixed
158
+ - enums as class initial values ([#950](https://github.com/rokucommunity/brighterscript/pull/950))
159
+
160
+
161
+
162
+ ## [0.65.10](https://github.com/rokucommunity/brighterscript/compare/v0.65.9...v0.65.10) - 2023-11-14
163
+ ### Changed
164
+ - upgrade to [roku-deploy@3.10.5](https://github.com/rokucommunity/roku-deploy/blob/master/CHANGELOG.md#3105---2023-11-14). Notable changes since 3.10.4:
165
+ - Add better device-info docs ([roku-deploy#128](https://github.com/rokucommunity/roku-deploy/pull/128))
166
+ - Added some more message grabbing logic ([roku-deploy#127](https://github.com/rokucommunity/roku-deploy/pull/127))
167
+
168
+
169
+
170
+ ## [0.65.9](https://github.com/rokucommunity/brighterscript/compare/v0.65.8...v0.65.9) - 2023-11-06
171
+ ### Changed
172
+ - upgrade to [roku-deploy@3.10.4](https://github.com/rokucommunity/roku-deploy/blob/master/CHANGELOG.md#3104---2023-11-03). Notable changes since 3.10.3:
173
+ - Enhance getDeviceInfo() method ([roku-deploy#120](https://github.com/rokucommunity/roku-deploy/pull/120))
174
+ ### Fixed
175
+ - issue with unary expression parsing ([#938](https://github.com/rokucommunity/brighterscript/pull/938))
176
+
177
+
178
+
179
+ ## [0.65.8](https://github.com/rokucommunity/brighterscript/compare/v0.65.7...v0.65.8) - 2023-10-06
180
+ ### Added
181
+ - interface parameter support ([#924](https://github.com/rokucommunity/brighterscript/pull/924))
182
+ ### Changed
183
+ - Bump postcss from 8.2.15 to 8.4.31 ([#928](https://github.com/rokucommunity/brighterscript/pull/928))
184
+ ### Fixed
185
+ - chore: fix typescript typing for `Deferred` ([#923](https://github.com/rokucommunity/brighterscript/pull/923))
186
+
187
+
188
+
189
+ ## [0.65.7](https://github.com/rokucommunity/brighterscript/compare/v0.65.6...v0.65.7) - 2023-09-28
190
+ ### Fixed
191
+ - fix bug in --noproject flag logic ([#922](https://github.com/rokucommunity/brighterscript/pull/922))
192
+
193
+
194
+
195
+ ## [0.65.6](https://github.com/rokucommunity/brighterscript/compare/v0.65.5...v0.65.6) - 2023-09-28
196
+ ### Added
197
+ - `noProject` flag to bsc so `bsconfig.json` loading can be skipped entirely even if present ([#868](https://github.com/rokucommunity/brighterscript/pull/868))
198
+ ### Changed
199
+ - docs: add some more details to the plugins ([#913](https://github.com/rokucommunity/brighterscript/pull/913))
200
+ - docs: add missing emitDefinitions ([#893](https://github.com/rokucommunity/brighterscript/pull/893))
201
+ ### Fixed
202
+ - incorrect quasi location in template string ([#921](https://github.com/rokucommunity/brighterscript/pull/921))
203
+ - `UnaryExpression` transpile for namespace and const ([#914](https://github.com/rokucommunity/brighterscript/pull/914))
204
+
205
+
206
+
207
+ ## [0.65.5](https://github.com/rokucommunity/brighterscript/compare/v0.65.4...v0.65.5) - 2023-09-06
208
+ ### Added
209
+ - support overriding bs_const values in bsconfig ([#887](https://github.com/rokucommunity/brighterscript/pull/887))
210
+ - allow optionally specifying bslib destination directory ([#871](https://github.com/rokucommunity/brighterscript/pull/871))
211
+ - Print diagnostic related information ([#867](https://github.com/rokucommunity/brighterscript/pull/867))
212
+ ### Fixed
213
+ - ensure consistent insertion of bslib.brs ([#870](https://github.com/rokucommunity/brighterscript/pull/870))
214
+ - Fix crashes in util for null ranges ([#869](https://github.com/rokucommunity/brighterscript/pull/869))
215
+ - Fix tab issue when printing diagnostics ([#865](https://github.com/rokucommunity/brighterscript/pull/865))
216
+
217
+
218
+
219
+ ## [0.65.4](https://github.com/rokucommunity/brighterscript/compare/v0.65.3...v0.65.4) - 2023-07-24
220
+ ### Changed
221
+ - Install `v8-profiler-next` on demand instead of being a dependency ([#854](https://github.com/rokucommunity/brighterscript/pull/854))
222
+
223
+
224
+
225
+ ## [0.65.3](https://github.com/rokucommunity/brighterscript/compare/v0.65.2...v0.65.3) - 2023-07-22
226
+ ### Changed
227
+ - Show busy spinner for lsp builds. Remove `build-status` event in favor of new `busy-status` ([#852](https://github.com/rokucommunity/brighterscript/pull/852))
228
+ - upgrade to [roku-deploy@3.10.3](https://github.com/rokucommunity/roku-deploy/blob/master/CHANGELOG.md#3103---2023-07-22). Notable changes since 3.10.2:
229
+ - Bump word-wrap from 1.2.3 to 1.2.4 ([roku-deploy#117](https://github.com/rokucommunity/roku-deploy/pull/117))
230
+ - Bump word-wrap from 1.2.3 to 1.2.4 ([#851](https://github.com/rokucommunity/brighterscript/pull/851))
231
+
232
+
233
+
234
+ ## [0.65.2](https://github.com/rokucommunity/brighterscript/compare/v0.65.1...v0.65.2) - 2023-07-17
235
+ ### Added
236
+ - beforeProgramDispose event ([#844](https://github.com/rokucommunity/brighterscript/pull/844)), ([#845](https://github.com/rokucommunity/brighterscript/pull/845))
237
+ - profiling support to the cli via the `--profile` flag ([#833](https://github.com/rokucommunity/brighterscript/pull/833))
238
+ ### Changed
239
+ - Make component ready on afterScopeCreate ([#843](https://github.com/rokucommunity/brighterscript/pull/843))
240
+ - Add project index to language server log entries ([#836](https://github.com/rokucommunity/brighterscript/pull/836))
241
+ - Prevent crashing when diagnostic is missing range. ([#832](https://github.com/rokucommunity/brighterscript/pull/832))
242
+ - Prevent crash when diagnostic is missing range ([#831](https://github.com/rokucommunity/brighterscript/pull/831))
243
+ - Add baseline interface docs ([#829](https://github.com/rokucommunity/brighterscript/pull/829))
20
244
 
21
245
 
22
246
 
@@ -1630,13 +1854,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1630
1854
  ## [0.1.0](https://github.com/rokucommunity/brighterscript/compare/v0.1.0...v0.1.0) - 2019-08-10
1631
1855
  ### Changed
1632
1856
  - Cloned from [brightscript-language](https://github.com/rokucommunity/brightscript-language)
1633
-
1634
-
1635
-
1636
-
1637
-
1638
-
1639
-
1640
-
1641
-
1642
-
package/README.md CHANGED
@@ -469,6 +469,12 @@ Type: `boolean`
469
469
 
470
470
  Emit full paths to files when printing diagnostics to the console. Defaults to `false`.
471
471
 
472
+ #### `emitDefinitions`
473
+
474
+ Type: `boolean`
475
+
476
+ Emit type definition files (`d.bs`) during transpile. Defaults to `false`.
477
+
472
478
  #### `diagnosticFilters`
473
479
 
474
480
  Type: `Array<string | number | {src: string; codes: number[]}`
@@ -542,11 +548,15 @@ Type: `boolean`
542
548
 
543
549
  Allow BrighterScript features (classes, interfaces, etc...) to be included in BrightScript (`.brs`) files, and force those files to be transpiled.
544
550
 
545
- #### `enableTypeValidation`
551
+ #### `bslibDestinationDir`
546
552
 
547
- Type: `boolean`
553
+ Type: `string`
554
+
555
+ Override the destination directory for the bslib.brs file. Use this if you want
556
+ to customize where the bslib.brs file is located in the staging directory. Note
557
+ that using a location outside of `source` will break scripts inside `source`
558
+ that depend on bslib.brs. Defaults to `source`.
548
559
 
549
- Performs additional validation on all declared and inferred types, such as checking member accesses in Classes and Interfaces, verifying that Namespace members exist when accessed, etc.
550
560
 
551
561
  ## Ignore errors and warnings on a per-line basis
552
562
  In addition to disabling an entire class of errors in `bsconfig.json` by using `ignoreErrorCodes`, you may also disable errors for a subset of the complier rules within a file with the following comment flags:
@@ -21,6 +21,21 @@
21
21
  "description": "The root directory of your Roku project. Defaults to the current working directory (or cwd property)",
22
22
  "type": "string"
23
23
  },
24
+ "manifest": {
25
+ "description": "A entry to modify manifest values",
26
+ "type": "object",
27
+ "properties": {
28
+ "bs_const": {
29
+ "description": "A dictionary of bs_consts to change or add to the manifest. Each entry ",
30
+ "type": "object",
31
+ "patternProperties": {
32
+ "^.+$": {
33
+ "type": ["boolean", "null"]
34
+ }
35
+ }
36
+ }
37
+ }
38
+ },
24
39
  "files": {
25
40
  "description": "The list of files that should be used in this project. Supports globs. Optionally, you can specify an object with `src` and `dest` properties to move files from one location into a different destination location",
26
41
  "default": [
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Enforces that a single action can be running at a time
3
+ */
4
+ export declare class ActionPipeline {
5
+ private workQueue;
6
+ run<T extends Action<any>, R extends Awaited<PromiseLike<ReturnType<T>>>>(action: T): Promise<R>;
7
+ private process;
8
+ private isProcessing;
9
+ }
10
+ export declare type Action<T> = () => T | PromiseLike<T>;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActionPipeline = void 0;
4
+ const deferred_1 = require("./deferred");
5
+ /**
6
+ * Enforces that a single action can be running at a time
7
+ */
8
+ class ActionPipeline {
9
+ constructor() {
10
+ this.workQueue = [];
11
+ this.isProcessing = false;
12
+ }
13
+ run(action) {
14
+ const work = {
15
+ action: action,
16
+ deferred: new deferred_1.Deferred()
17
+ };
18
+ this.workQueue.push(work);
19
+ this.process();
20
+ return work.deferred.promise;
21
+ }
22
+ process() {
23
+ //if we're already processing,
24
+ if (this.isProcessing) {
25
+ return;
26
+ }
27
+ while (this.workQueue.length > 0) {
28
+ const work = this.workQueue.shift();
29
+ try {
30
+ const result = Promise.resolve(work.action());
31
+ work.deferred.resolve(result);
32
+ }
33
+ catch (e) {
34
+ work.deferred.reject(e);
35
+ }
36
+ }
37
+ }
38
+ }
39
+ exports.ActionPipeline = ActionPipeline;
40
+ //# sourceMappingURL=ActionPipeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActionPipeline.js","sourceRoot":"","sources":["../src/ActionPipeline.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAEtC;;GAEG;AACH,MAAa,cAAc;IAA3B;QACY,cAAS,GAAqB,EAAE,CAAC;QA6BjC,iBAAY,GAAG,KAAK,CAAC;IACjC,CAAC;IA5BU,GAAG,CAAuE,MAAS;QACtF,MAAM,IAAI,GAAG;YACT,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,IAAI,mBAAQ,EAAO;SAChC,CAAC;QACF,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;IACjC,CAAC;IAEO,OAAO;QACX,8BAA8B;QAC9B,IAAI,IAAI,CAAC,YAAY,EAAE;YACnB,OAAO;SACV;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;YACpC,IAAI;gBACA,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAC1B,IAAI,CAAC,MAAM,EAAE,CAChB,CAAC;gBACF,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;aACjC;YAAC,OAAO,CAAC,EAAE;gBACR,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;aAC3B;SACJ;IACL,CAAC;CAEJ;AA/BD,wCA+BC"}
@@ -0,0 +1,25 @@
1
+ import type { DottedGetExpression, TypeExpression, VariableExpression } from './parser/Expression';
2
+ import { SymbolTypeFlag } from './SymbolTable';
3
+ import type { TypeChainEntry } from './interfaces';
4
+ import type { AstNode } from './parser/AstNode';
5
+ export declare const InsideSegmentWalkMode: number;
6
+ export interface UnresolvedSymbol {
7
+ typeChain: TypeChainEntry[];
8
+ flags: SymbolTypeFlag;
9
+ endChainFlags: SymbolTypeFlag;
10
+ containingNamespaces: string[];
11
+ }
12
+ export declare class AstValidationSegmenter {
13
+ validatedSegments: Map<AstNode, boolean>;
14
+ segmentsForValidation: AstNode[];
15
+ singleValidationSegments: Set<AstNode>;
16
+ unresolvedSegmentsSymbols: Map<AstNode, Set<UnresolvedSymbol>>;
17
+ ast: AstNode;
18
+ reset(): void;
19
+ processTree(ast: AstNode): void;
20
+ checkExpressionForUnresolved(segment: AstNode, expression: VariableExpression | DottedGetExpression | TypeExpression, assignedSymbols?: Set<string>): boolean;
21
+ private currentNamespaceStatement;
22
+ checkSegmentWalk(segment: AstNode): void;
23
+ getSegments(changedSymbols: Map<SymbolTypeFlag, Set<string>>): AstNode[];
24
+ markSegmentAsValidated(segment: AstNode): void;
25
+ }
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AstValidationSegmenter = exports.InsideSegmentWalkMode = void 0;
4
+ const SymbolTable_1 = require("./SymbolTable");
5
+ const reflection_1 = require("./astUtils/reflection");
6
+ const visitors_1 = require("./astUtils/visitors");
7
+ const util_1 = require("./util");
8
+ // eslint-disable-next-line no-bitwise
9
+ exports.InsideSegmentWalkMode = visitors_1.WalkMode.visitStatements | visitors_1.WalkMode.visitExpressions | visitors_1.WalkMode.recurseChildFunctions;
10
+ class AstValidationSegmenter {
11
+ constructor() {
12
+ this.validatedSegments = new Map();
13
+ this.segmentsForValidation = new Array();
14
+ this.singleValidationSegments = new Set();
15
+ this.unresolvedSegmentsSymbols = new Map();
16
+ }
17
+ reset() {
18
+ this.validatedSegments.clear();
19
+ this.singleValidationSegments.clear();
20
+ this.unresolvedSegmentsSymbols.clear();
21
+ this.segmentsForValidation = [];
22
+ }
23
+ processTree(ast) {
24
+ this.reset();
25
+ ast === null || ast === void 0 ? void 0 : ast.walk((segment) => {
26
+ this.checkSegmentWalk(segment);
27
+ }, {
28
+ walkMode: visitors_1.WalkMode.visitStatements
29
+ });
30
+ }
31
+ checkExpressionForUnresolved(segment, expression, assignedSymbols) {
32
+ var _a, _b;
33
+ if (!expression || (0, reflection_1.isCommentStatement)(expression)) {
34
+ return false;
35
+ }
36
+ if ((0, reflection_1.isVariableExpression)(expression) && expression.name.text.toLowerCase() === 'm') {
37
+ return false;
38
+ }
39
+ const flag = util_1.util.isInTypeExpression(expression) ? SymbolTable_1.SymbolTypeFlag.typetime : SymbolTable_1.SymbolTypeFlag.runtime;
40
+ const typeChain = [];
41
+ const options = { flags: flag, onlyCacheResolvedTypes: true, typeChain: typeChain };
42
+ const nodeType = expression.getType(options);
43
+ if (!(nodeType === null || nodeType === void 0 ? void 0 : nodeType.isResolvable())) {
44
+ let symbolsSet;
45
+ if (!(assignedSymbols === null || assignedSymbols === void 0 ? void 0 : assignedSymbols.has(typeChain[0].name.toLowerCase()))) {
46
+ if (!this.unresolvedSegmentsSymbols.has(segment)) {
47
+ symbolsSet = new Set();
48
+ this.unresolvedSegmentsSymbols.set(segment, symbolsSet);
49
+ }
50
+ else {
51
+ symbolsSet = this.unresolvedSegmentsSymbols.get(segment);
52
+ }
53
+ symbolsSet.add({ typeChain: typeChain, flags: typeChain[0].flags, endChainFlags: flag, containingNamespaces: (_b = (_a = this.currentNamespaceStatement) === null || _a === void 0 ? void 0 : _a.getNameParts()) === null || _b === void 0 ? void 0 : _b.map(t => t.text) });
54
+ }
55
+ return true;
56
+ }
57
+ return false;
58
+ }
59
+ checkSegmentWalk(segment) {
60
+ if ((0, reflection_1.isNamespaceStatement)(segment) || (0, reflection_1.isBody)(segment) || (0, reflection_1.isCommentStatement)(segment)) {
61
+ return;
62
+ }
63
+ if ((0, reflection_1.isClassStatement)(segment)) {
64
+ if (segment.parentClassName) {
65
+ this.segmentsForValidation.push(segment.parentClassName);
66
+ this.validatedSegments.set(segment.parentClassName, false);
67
+ let foundUnresolvedInSegment = this.checkExpressionForUnresolved(segment.parentClassName, segment.parentClassName);
68
+ if (!foundUnresolvedInSegment) {
69
+ this.singleValidationSegments.add(segment.parentClassName);
70
+ }
71
+ }
72
+ return;
73
+ }
74
+ if ((0, reflection_1.isInterfaceStatement)(segment)) {
75
+ if (segment.parentInterfaceName) {
76
+ this.segmentsForValidation.push(segment.parentInterfaceName);
77
+ this.validatedSegments.set(segment.parentInterfaceName, false);
78
+ let foundUnresolvedInSegment = this.checkExpressionForUnresolved(segment.parentInterfaceName, segment.parentInterfaceName);
79
+ if (!foundUnresolvedInSegment) {
80
+ this.singleValidationSegments.add(segment.parentInterfaceName);
81
+ }
82
+ }
83
+ return;
84
+ }
85
+ this.segmentsForValidation.push(segment);
86
+ this.validatedSegments.set(segment, false);
87
+ let foundUnresolvedInSegment = false;
88
+ const skipper = new visitors_1.ChildrenSkipper();
89
+ const assignedSymbols = new Set();
90
+ this.currentNamespaceStatement = segment.findAncestor(reflection_1.isNamespaceStatement);
91
+ segment.walk((0, visitors_1.createVisitor)({
92
+ AssignmentStatement: (stmt) => {
93
+ assignedSymbols.add(stmt.name.text.toLowerCase());
94
+ },
95
+ FunctionParameterExpression: (expr) => {
96
+ assignedSymbols.add(expr.name.text.toLowerCase());
97
+ },
98
+ VariableExpression: (expr) => {
99
+ if (!assignedSymbols.has(expr.name.text.toLowerCase())) {
100
+ const expressionIsUnresolved = this.checkExpressionForUnresolved(segment, expr, assignedSymbols);
101
+ foundUnresolvedInSegment = expressionIsUnresolved || foundUnresolvedInSegment;
102
+ }
103
+ skipper.skip();
104
+ },
105
+ DottedGetExpression: (expr) => {
106
+ const expressionIsUnresolved = this.checkExpressionForUnresolved(segment, expr, assignedSymbols);
107
+ foundUnresolvedInSegment = expressionIsUnresolved || foundUnresolvedInSegment;
108
+ skipper.skip();
109
+ },
110
+ TypeExpression: (expr) => {
111
+ const expressionIsUnresolved = this.checkExpressionForUnresolved(segment, expr, assignedSymbols);
112
+ foundUnresolvedInSegment = expressionIsUnresolved || foundUnresolvedInSegment;
113
+ skipper.skip();
114
+ }
115
+ }), {
116
+ walkMode: exports.InsideSegmentWalkMode,
117
+ skipChildren: skipper
118
+ });
119
+ if (!foundUnresolvedInSegment) {
120
+ this.singleValidationSegments.add(segment);
121
+ }
122
+ }
123
+ getSegments(changedSymbols) {
124
+ const segmentsToWalkForValidation = [];
125
+ for (const segment of this.segmentsForValidation) {
126
+ const symbolsRequired = this.unresolvedSegmentsSymbols.get(segment);
127
+ const isSingleValidationSegment = this.singleValidationSegments.has(segment);
128
+ const singleValidationSegmentAlreadyValidated = isSingleValidationSegment ? this.validatedSegments.get(segment) : false;
129
+ let segmentNeedsRevalidation = !singleValidationSegmentAlreadyValidated;
130
+ if (symbolsRequired) {
131
+ for (const requiredSymbol of symbolsRequired.values()) {
132
+ const changeSymbolSetForFlag = changedSymbols.get(requiredSymbol.flags);
133
+ if (util_1.util.setContainsUnresolvedSymbol(changeSymbolSetForFlag, requiredSymbol)) {
134
+ segmentsToWalkForValidation.push(segment);
135
+ break;
136
+ }
137
+ }
138
+ }
139
+ else if (segmentNeedsRevalidation) {
140
+ segmentsToWalkForValidation.push(segment);
141
+ }
142
+ }
143
+ return segmentsToWalkForValidation;
144
+ }
145
+ markSegmentAsValidated(segment) {
146
+ this.validatedSegments.set(segment, true);
147
+ }
148
+ }
149
+ exports.AstValidationSegmenter = AstValidationSegmenter;
150
+ //# sourceMappingURL=AstValidationSegmenter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AstValidationSegmenter.js","sourceRoot":"","sources":["../src/AstValidationSegmenter.ts"],"names":[],"mappings":";;;AACA,+CAA+C;AAC/C,sDAAuJ;AACvJ,kDAA+E;AAG/E,iCAA8B;AAG9B,sCAAsC;AACzB,QAAA,qBAAqB,GAAG,mBAAQ,CAAC,eAAe,GAAG,mBAAQ,CAAC,gBAAgB,GAAG,mBAAQ,CAAC,qBAAqB,CAAC;AAS3H,MAAa,sBAAsB;IAAnC;QAEW,sBAAiB,GAAG,IAAI,GAAG,EAAoB,CAAC;QAChD,0BAAqB,GAAG,IAAI,KAAK,EAAW,CAAC;QAC7C,6BAAwB,GAAG,IAAI,GAAG,EAAW,CAAC;QAC9C,8BAAyB,GAAG,IAAI,GAAG,EAAkC,CAAC;IAkJjF,CAAC;IA/IG,KAAK;QACD,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;QAC/B,IAAI,CAAC,wBAAwB,CAAC,KAAK,EAAE,CAAC;QACtC,IAAI,CAAC,yBAAyB,CAAC,KAAK,EAAE,CAAC;QACvC,IAAI,CAAC,qBAAqB,GAAG,EAAE,CAAC;IACpC,CAAC;IAED,WAAW,CAAC,GAAY;QACpB,IAAI,CAAC,KAAK,EAAE,CAAC;QAEb,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;YAClB,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACnC,CAAC,EAAE;YACC,QAAQ,EAAE,mBAAQ,CAAC,eAAe;SACrC,CAAC,CAAC;IACP,CAAC;IAED,4BAA4B,CAAC,OAAgB,EAAE,UAAqE,EAAE,eAA6B;;QAC/I,IAAI,CAAC,UAAU,IAAI,IAAA,+BAAkB,EAAC,UAAU,CAAC,EAAE;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nD,MAAM,sBAAsB,GAAG,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;oBACxE,IAAI,WAAI,CAAC,2BAA2B,CAAC,sBAAsB,EAAE,cAAc,CAAC,EAAE;wBAC1E,2BAA2B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;wBAC1C,MAAM;qBACT;iBACJ;aACJ;iBAAM,IAAI,wBAAwB,EAAE;gBACjC,2BAA2B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;aAC7C;SACJ;QACD,OAAO,2BAA2B,CAAC;IACvC,CAAC;IAED,sBAAsB,CAAC,OAAgB;QACnC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC9C,CAAC;CACJ;AAvJD,wDAuJC"}
@@ -9,6 +9,13 @@ export interface BsConfig {
9
9
  * Prefix with a question mark (?) to prevent throwing an exception if the file does not exist.
10
10
  */
11
11
  project?: string;
12
+ manifest?: {
13
+ bs_const?: Record<string, boolean | null>;
14
+ };
15
+ /**
16
+ * when set, bsconfig.json loading is disabled
17
+ */
18
+ noProject?: boolean;
12
19
  /**
13
20
  * Relative or absolute path to another bsconfig.json file that this file should import and then override.
14
21
  * Prefix with a question mark (?) to prevent throwing an exception if the file does not exist.
@@ -88,7 +95,7 @@ export interface BsConfig {
88
95
  emitFullPaths?: boolean;
89
96
  /**
90
97
  * Emit type definition files (`d.bs`)
91
- * @default true
98
+ * @default false
92
99
  */
93
100
  emitDefinitions?: boolean;
94
101
  /**
@@ -153,8 +160,10 @@ export interface BsConfig {
153
160
  */
154
161
  allowBrighterScriptInBrightScript?: boolean;
155
162
  /**
156
- * Do full type checking & validation based on declared and inferred types.
157
- * @default false
163
+ * Override the destination directory for the bslib.brs file. Use this if
164
+ * you want to customize where the bslib.brs file is located in the staging
165
+ * directory. Note that using a location outside of `source` will break
166
+ * scripts inside `source` that depend on bslib.brs. Defaults to `source`.
158
167
  */
159
- enableTypeValidation?: boolean;
168
+ bslibDestinationDir?: string;
160
169
  }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Tracks the busy/idle status of various sync or async tasks
3
+ * Reports the overall status to the client
4
+ */
5
+ export declare class BusyStatusTracker {
6
+ /**
7
+ * @readonly
8
+ */
9
+ activeRuns: Set<{
10
+ label?: string;
11
+ startTime?: Date;
12
+ }>;
13
+ /**
14
+ * Start a new piece of work
15
+ */
16
+ run<T, R = T | Promise<T>>(callback: (finalize?: FinalizeBuildStatusRun) => R, label?: string): R;
17
+ private emitter;
18
+ on(eventName: 'change', handler: (status: BusyStatus) => void): () => void;
19
+ private emit;
20
+ destroy(): void;
21
+ /**
22
+ * The current status of the busy tracker.
23
+ * @readonly
24
+ */
25
+ get status(): BusyStatus;
26
+ }
27
+ export declare type FinalizeBuildStatusRun = (status?: BusyStatus) => void;
28
+ export declare enum BusyStatus {
29
+ busy = "busy",
30
+ idle = "idle"
31
+ }