brighterscript 0.66.0-alpha.8 → 0.67.0
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.
- package/CHANGELOG.md +120 -71
- package/README.md +14 -418
- package/dist/BsConfig.d.ts +25 -2
- package/dist/Cache.js +3 -3
- package/dist/Cache.js.map +1 -1
- package/dist/CodeActionUtil.d.ts +3 -3
- package/dist/CodeActionUtil.js.map +1 -1
- package/dist/CommentFlagProcessor.d.ts +3 -4
- package/dist/CommentFlagProcessor.js +4 -3
- package/dist/CommentFlagProcessor.js.map +1 -1
- package/dist/DependencyGraph.js +8 -8
- package/dist/DependencyGraph.js.map +1 -1
- package/dist/DiagnosticFilterer.d.ts +8 -4
- package/dist/DiagnosticFilterer.js +71 -38
- package/dist/DiagnosticFilterer.js.map +1 -1
- package/dist/DiagnosticMessages.d.ts +15 -36
- package/dist/DiagnosticMessages.js +15 -61
- package/dist/DiagnosticMessages.js.map +1 -1
- package/dist/DiagnosticSeverityAdjuster.js +3 -0
- package/dist/DiagnosticSeverityAdjuster.js.map +1 -1
- package/dist/FunctionScope.d.ts +2 -3
- package/dist/FunctionScope.js +0 -3
- package/dist/FunctionScope.js.map +1 -1
- package/dist/LanguageServer.d.ts +1 -2
- package/dist/LanguageServer.js +29 -35
- package/dist/LanguageServer.js.map +1 -1
- package/dist/Logger.d.ts +5 -9
- package/dist/Logger.js +18 -22
- package/dist/Logger.js.map +1 -1
- package/dist/PluginInterface.d.ts +13 -15
- package/dist/PluginInterface.js +16 -70
- package/dist/PluginInterface.js.map +1 -1
- package/dist/Program.d.ts +105 -138
- package/dist/Program.js +479 -702
- package/dist/Program.js.map +1 -1
- package/dist/ProgramBuilder.d.ts +8 -19
- package/dist/ProgramBuilder.js +82 -87
- package/dist/ProgramBuilder.js.map +1 -1
- package/dist/Scope.d.ts +56 -46
- package/dist/Scope.js +281 -217
- package/dist/Scope.js.map +1 -1
- package/dist/Stopwatch.js +1 -1
- package/dist/Stopwatch.js.map +1 -1
- package/dist/SymbolTable.d.ts +12 -68
- package/dist/SymbolTable.js +28 -213
- package/dist/SymbolTable.js.map +1 -1
- package/dist/XmlScope.d.ts +5 -7
- package/dist/XmlScope.js +36 -76
- package/dist/XmlScope.js.map +1 -1
- package/dist/astUtils/{Editor.d.ts → AstEditor.d.ts} +1 -6
- package/dist/astUtils/{Editor.js → AstEditor.js} +3 -9
- package/dist/astUtils/AstEditor.js.map +1 -0
- package/dist/astUtils/{Editor.spec.js → AstEditor.spec.js} +6 -10
- package/dist/astUtils/AstEditor.spec.js.map +1 -0
- package/dist/astUtils/creators.d.ts +8 -19
- package/dist/astUtils/creators.js +22 -54
- package/dist/astUtils/creators.js.map +1 -1
- package/dist/astUtils/creators.spec.js +0 -10
- package/dist/astUtils/creators.spec.js.map +1 -1
- package/dist/astUtils/reflection.d.ts +45 -81
- package/dist/astUtils/reflection.js +157 -220
- package/dist/astUtils/reflection.js.map +1 -1
- package/dist/astUtils/reflection.spec.js +19 -96
- package/dist/astUtils/reflection.spec.js.map +1 -1
- package/dist/astUtils/stackedVisitor.spec.js.map +1 -1
- package/dist/astUtils/visitors.d.ts +14 -18
- package/dist/astUtils/visitors.js +9 -22
- package/dist/astUtils/visitors.js.map +1 -1
- package/dist/astUtils/visitors.spec.js +9 -62
- package/dist/astUtils/visitors.spec.js.map +1 -1
- package/dist/astUtils/xml.d.ts +9 -9
- package/dist/astUtils/xml.js +6 -6
- package/dist/astUtils/xml.js.map +1 -1
- package/dist/bscPlugin/BscPlugin.d.ts +8 -11
- package/dist/bscPlugin/BscPlugin.js +21 -29
- package/dist/bscPlugin/BscPlugin.js.map +1 -1
- package/dist/bscPlugin/CallExpressionInfo.d.ts +6 -5
- package/dist/bscPlugin/CallExpressionInfo.js +2 -2
- package/dist/bscPlugin/CallExpressionInfo.js.map +1 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +11 -11
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +4 -4
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/completions/CompletionsProcessor.d.ts +1 -49
- package/dist/bscPlugin/completions/CompletionsProcessor.js +23 -424
- package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -1
- package/dist/bscPlugin/definition/DefinitionProvider.d.ts +13 -0
- package/dist/bscPlugin/definition/DefinitionProvider.js +200 -0
- package/dist/bscPlugin/definition/DefinitionProvider.js.map +1 -0
- package/dist/bscPlugin/definition/DefinitionProvider.spec.js +87 -0
- package/dist/bscPlugin/definition/DefinitionProvider.spec.js.map +1 -0
- package/dist/bscPlugin/hover/HoverProcessor.d.ts +3 -7
- package/dist/bscPlugin/hover/HoverProcessor.js +88 -128
- package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -1
- package/dist/bscPlugin/hover/HoverProcessor.spec.js +24 -336
- package/dist/bscPlugin/hover/HoverProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/references/ReferencesProvider.d.ts +12 -0
- package/dist/bscPlugin/references/ReferencesProvider.js +56 -0
- package/dist/bscPlugin/references/ReferencesProvider.js.map +1 -0
- package/dist/bscPlugin/references/ReferencesProvider.spec.js +51 -0
- package/dist/bscPlugin/references/ReferencesProvider.spec.js.map +1 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.d.ts +0 -1
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js +5 -49
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -1
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js +0 -22
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.d.ts +7 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.js +22 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.js.map +1 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.js +290 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.d.ts +7 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.js +26 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.js.map +1 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.js +245 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/symbols/symbolUtils.d.ts +5 -0
- package/dist/bscPlugin/symbols/symbolUtils.js +140 -0
- package/dist/bscPlugin/symbols/symbolUtils.js.map +1 -0
- package/dist/bscPlugin/transpile/{BrsFileTranspileProcessor.d.ts → BrsFilePreTranspileProcessor.d.ts} +2 -4
- package/dist/bscPlugin/transpile/{BrsFileTranspileProcessor.js → BrsFilePreTranspileProcessor.js} +15 -36
- package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.js.map +1 -0
- package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.spec.js +46 -0
- package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/validation/BrsFileValidator.d.ts +1 -0
- package/dist/bscPlugin/validation/BrsFileValidator.js +30 -41
- package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -1
- package/dist/bscPlugin/validation/BrsFileValidator.spec.js +2 -2
- package/dist/bscPlugin/validation/BrsFileValidator.spec.js.map +1 -1
- package/dist/bscPlugin/validation/ProgramValidator.d.ts +3 -3
- package/dist/bscPlugin/validation/ProgramValidator.js +6 -6
- package/dist/bscPlugin/validation/ProgramValidator.js.map +1 -1
- package/dist/bscPlugin/validation/ScopeValidator.d.ts +6 -28
- package/dist/bscPlugin/validation/ScopeValidator.js +166 -387
- package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -1
- package/dist/bscPlugin/validation/XmlFileValidator.js +9 -9
- package/dist/bscPlugin/validation/XmlFileValidator.js.map +1 -1
- package/dist/diagnosticUtils.d.ts +2 -3
- package/dist/diagnosticUtils.js +5 -5
- package/dist/diagnosticUtils.js.map +1 -1
- package/dist/examples/plugins/removePrint.js +1 -1
- package/dist/examples/plugins/removePrint.js.map +1 -1
- package/dist/files/BrsFile.Class.spec.js +143 -114
- package/dist/files/BrsFile.Class.spec.js.map +1 -1
- package/dist/files/BrsFile.d.ts +61 -83
- package/dist/files/BrsFile.js +552 -607
- package/dist/files/BrsFile.js.map +1 -1
- package/dist/files/BrsFile.spec.js +1365 -1201
- package/dist/files/BrsFile.spec.js.map +1 -1
- package/dist/files/XmlFile.d.ts +28 -56
- package/dist/files/XmlFile.js +103 -89
- package/dist/files/XmlFile.js.map +1 -1
- package/dist/files/XmlFile.spec.js +179 -122
- package/dist/files/XmlFile.spec.js.map +1 -1
- package/dist/files/tests/imports.spec.js +19 -29
- package/dist/files/tests/imports.spec.js.map +1 -1
- package/dist/files/tests/optionalChaning.spec.js +14 -14
- package/dist/files/tests/optionalChaning.spec.js.map +1 -1
- package/dist/globalCallables.js +83 -88
- package/dist/globalCallables.js.map +1 -1
- package/dist/index.d.ts +1 -9
- package/dist/index.js +1 -9
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +173 -423
- package/dist/interfaces.js +0 -24
- package/dist/interfaces.js.map +1 -1
- package/dist/lexer/Lexer.d.ts +9 -15
- package/dist/lexer/Lexer.js +35 -46
- package/dist/lexer/Lexer.js.map +1 -1
- package/dist/lexer/Lexer.spec.js +48 -40
- package/dist/lexer/Lexer.spec.js.map +1 -1
- package/dist/lexer/Token.d.ts +1 -5
- package/dist/lexer/Token.js +1 -1
- package/dist/lexer/Token.js.map +1 -1
- package/dist/lexer/TokenKind.d.ts +0 -6
- package/dist/lexer/TokenKind.js +2 -14
- package/dist/lexer/TokenKind.js.map +1 -1
- package/dist/logging.d.ts +9 -0
- package/dist/logging.js +16 -0
- package/dist/logging.js.map +1 -0
- package/dist/parser/AstNode.d.ts +6 -90
- package/dist/parser/AstNode.js +5 -96
- package/dist/parser/AstNode.js.map +1 -1
- package/dist/parser/AstNode.spec.js.map +1 -1
- package/dist/parser/BrsTranspileState.d.ts +3 -4
- package/dist/parser/BrsTranspileState.js +2 -3
- package/dist/parser/BrsTranspileState.js.map +1 -1
- package/dist/parser/Expression.d.ts +114 -137
- package/dist/parser/Expression.js +244 -373
- package/dist/parser/Expression.js.map +1 -1
- package/dist/parser/Parser.Class.spec.js +19 -46
- package/dist/parser/Parser.Class.spec.js.map +1 -1
- package/dist/parser/Parser.d.ts +18 -14
- package/dist/parser/Parser.js +196 -175
- package/dist/parser/Parser.js.map +1 -1
- package/dist/parser/Parser.spec.d.ts +0 -2
- package/dist/parser/Parser.spec.js +10 -674
- package/dist/parser/Parser.spec.js.map +1 -1
- package/dist/parser/SGParser.d.ts +6 -44
- package/dist/parser/SGParser.js +198 -194
- package/dist/parser/SGParser.js.map +1 -1
- package/dist/parser/SGParser.spec.js +11 -14
- package/dist/parser/SGParser.spec.js.map +1 -1
- package/dist/parser/SGTypes.d.ts +52 -280
- package/dist/parser/SGTypes.js +185 -562
- package/dist/parser/SGTypes.js.map +1 -1
- package/dist/parser/Statement.d.ts +140 -172
- package/dist/parser/Statement.js +201 -337
- package/dist/parser/Statement.js.map +1 -1
- package/dist/parser/Statement.spec.js.map +1 -1
- package/dist/parser/TranspileState.d.ts +3 -2
- package/dist/parser/TranspileState.js +8 -10
- package/dist/parser/TranspileState.js.map +1 -1
- package/dist/parser/tests/Parser.spec.js +3 -5
- package/dist/parser/tests/Parser.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/For.spec.js +8 -16
- package/dist/parser/tests/controlFlow/For.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/ForEach.spec.js +6 -12
- package/dist/parser/tests/controlFlow/ForEach.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/While.spec.js +4 -8
- package/dist/parser/tests/controlFlow/While.spec.js.map +1 -1
- package/dist/parser/tests/expression/Call.spec.js +4 -4
- package/dist/parser/tests/expression/Call.spec.js.map +1 -1
- package/dist/parser/tests/expression/Indexing.spec.js +25 -0
- package/dist/parser/tests/expression/Indexing.spec.js.map +1 -1
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +73 -29
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.js +10 -10
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js +24 -24
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js +47 -35
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TernaryExpression.spec.js +83 -36
- package/dist/parser/tests/expression/TernaryExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/UnaryExpression.spec.js +2 -2
- package/dist/parser/tests/expression/UnaryExpression.spec.js.map +1 -1
- package/dist/parser/tests/statement/ConstStatement.spec.js +26 -27
- package/dist/parser/tests/statement/ConstStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Continue.spec.js +2 -2
- package/dist/parser/tests/statement/Continue.spec.js.map +1 -1
- package/dist/parser/tests/statement/Dim.spec.js.map +1 -1
- package/dist/parser/tests/statement/Enum.spec.js +393 -90
- package/dist/parser/tests/statement/Enum.spec.js.map +1 -1
- package/dist/parser/tests/statement/For.spec.js +6 -6
- package/dist/parser/tests/statement/For.spec.js.map +1 -1
- package/dist/parser/tests/statement/ForEach.spec.js +4 -4
- package/dist/parser/tests/statement/ForEach.spec.js.map +1 -1
- package/dist/parser/tests/statement/Function.spec.js +1 -1
- package/dist/parser/tests/statement/Function.spec.js.map +1 -1
- package/dist/parser/tests/statement/InterfaceStatement.spec.js +18 -18
- package/dist/parser/tests/statement/InterfaceStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Misc.spec.js.map +1 -1
- package/dist/parser/tests/statement/PrintStatement.spec.js +13 -16
- package/dist/parser/tests/statement/PrintStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/ReturnStatement.spec.js +3 -5
- package/dist/parser/tests/statement/ReturnStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Set.spec.js +13 -26
- package/dist/parser/tests/statement/Set.spec.js.map +1 -1
- package/dist/parser/tests/statement/Throw.spec.js.map +1 -1
- package/dist/parser/tests/statement/TryCatch.spec.js.map +1 -1
- package/dist/preprocessor/Chunk.js +1 -2
- package/dist/preprocessor/Chunk.js.map +1 -1
- package/dist/preprocessor/Preprocessor.d.ts +3 -4
- package/dist/preprocessor/Preprocessor.js +3 -3
- package/dist/preprocessor/Preprocessor.js.map +1 -1
- package/dist/preprocessor/PreprocessorParser.js +8 -1
- package/dist/preprocessor/PreprocessorParser.js.map +1 -1
- package/dist/roku-types/data.json +293 -243
- package/dist/roku-types/index.d.ts +38 -17
- package/dist/types/ArrayType.d.ts +4 -9
- package/dist/types/ArrayType.js +24 -72
- package/dist/types/ArrayType.js.map +1 -1
- package/dist/types/ArrayType.spec.js +10 -39
- package/dist/types/ArrayType.spec.js.map +1 -1
- package/dist/types/BooleanType.d.ts +4 -8
- package/dist/types/BooleanType.js +8 -19
- package/dist/types/BooleanType.js.map +1 -1
- package/dist/types/BooleanType.spec.js +3 -9
- package/dist/types/BooleanType.spec.js.map +1 -1
- package/dist/types/BscType.d.ts +2 -29
- package/dist/types/BscType.js +0 -113
- package/dist/types/BscType.js.map +1 -1
- package/dist/types/CustomType.d.ts +9 -0
- package/dist/types/CustomType.js +32 -0
- package/dist/types/CustomType.js.map +1 -0
- package/dist/types/DoubleType.d.ts +4 -8
- package/dist/types/DoubleType.js +20 -23
- package/dist/types/DoubleType.js.map +1 -1
- package/dist/types/DoubleType.spec.js +3 -11
- package/dist/types/DoubleType.spec.js.map +1 -1
- package/dist/types/DynamicType.d.ts +3 -9
- package/dist/types/DynamicType.js +2 -18
- package/dist/types/DynamicType.js.map +1 -1
- package/dist/types/DynamicType.spec.js +4 -15
- package/dist/types/DynamicType.spec.js.map +1 -1
- package/dist/types/FloatType.d.ts +4 -8
- package/dist/types/FloatType.js +20 -23
- package/dist/types/FloatType.js.map +1 -1
- package/dist/types/FloatType.spec.js +3 -3
- package/dist/types/FloatType.spec.js.map +1 -1
- package/dist/types/FunctionType.d.ts +20 -10
- package/dist/types/FunctionType.js +52 -27
- package/dist/types/FunctionType.js.map +1 -1
- package/dist/types/FunctionType.spec.js +23 -0
- package/dist/types/FunctionType.spec.js.map +1 -0
- package/dist/types/IntegerType.d.ts +4 -8
- package/dist/types/IntegerType.js +20 -23
- package/dist/types/IntegerType.js.map +1 -1
- package/dist/types/IntegerType.spec.js +3 -7
- package/dist/types/IntegerType.spec.js.map +1 -1
- package/dist/types/InterfaceType.d.ts +10 -12
- package/dist/types/InterfaceType.js +48 -23
- package/dist/types/InterfaceType.js.map +1 -1
- package/dist/types/InterfaceType.spec.js +45 -82
- package/dist/types/InterfaceType.spec.js.map +1 -1
- package/dist/types/InvalidType.d.ts +4 -7
- package/dist/types/InvalidType.js +8 -18
- package/dist/types/InvalidType.js.map +1 -1
- package/dist/types/InvalidType.spec.js +3 -7
- package/dist/types/InvalidType.spec.js.map +1 -1
- package/dist/types/LongIntegerType.d.ts +4 -8
- package/dist/types/LongIntegerType.js +20 -23
- package/dist/types/LongIntegerType.js.map +1 -1
- package/dist/types/LongIntegerType.spec.js +3 -9
- package/dist/types/LongIntegerType.spec.js.map +1 -1
- package/dist/types/ObjectType.d.ts +4 -8
- package/dist/types/ObjectType.js +7 -21
- package/dist/types/ObjectType.js.map +1 -1
- package/dist/types/ObjectType.spec.js +2 -2
- package/dist/types/ObjectType.spec.js.map +1 -1
- package/dist/types/StringType.d.ts +4 -11
- package/dist/types/StringType.js +8 -23
- package/dist/types/StringType.js.map +1 -1
- package/dist/types/StringType.spec.js +2 -2
- package/dist/types/StringType.spec.js.map +1 -1
- package/dist/types/UninitializedType.d.ts +3 -7
- package/dist/types/UninitializedType.js +3 -14
- package/dist/types/UninitializedType.js.map +1 -1
- package/dist/types/VoidType.d.ts +4 -8
- package/dist/types/VoidType.js +8 -18
- package/dist/types/VoidType.js.map +1 -1
- package/dist/types/VoidType.spec.js +2 -2
- package/dist/types/VoidType.spec.js.map +1 -1
- package/dist/util.d.ts +43 -104
- package/dist/util.js +243 -640
- package/dist/util.js.map +1 -1
- package/dist/validators/ClassValidator.d.ts +6 -1
- package/dist/validators/ClassValidator.js +61 -20
- package/dist/validators/ClassValidator.js.map +1 -1
- package/package.json +13 -12
- package/dist/ActionPipeline.d.ts +0 -10
- package/dist/ActionPipeline.js +0 -40
- package/dist/ActionPipeline.js.map +0 -1
- package/dist/AstValidationSegmenter.d.ts +0 -25
- package/dist/AstValidationSegmenter.js +0 -150
- package/dist/AstValidationSegmenter.js.map +0 -1
- package/dist/CacheVerifier.d.ts +0 -7
- package/dist/CacheVerifier.js +0 -20
- package/dist/CacheVerifier.js.map +0 -1
- package/dist/astUtils/Editor.js.map +0 -1
- package/dist/astUtils/Editor.spec.js.map +0 -1
- package/dist/bscPlugin/FileWriter.d.ts +0 -6
- package/dist/bscPlugin/FileWriter.js +0 -24
- package/dist/bscPlugin/FileWriter.js.map +0 -1
- package/dist/bscPlugin/completions/CompletionsProcessor.spec.js +0 -1658
- package/dist/bscPlugin/completions/CompletionsProcessor.spec.js.map +0 -1
- package/dist/bscPlugin/fileProviders/FileProvider.d.ts +0 -9
- package/dist/bscPlugin/fileProviders/FileProvider.js +0 -51
- package/dist/bscPlugin/fileProviders/FileProvider.js.map +0 -1
- package/dist/bscPlugin/serialize/BslibInjector.spec.js +0 -19
- package/dist/bscPlugin/serialize/BslibInjector.spec.js.map +0 -1
- package/dist/bscPlugin/serialize/BslibManager.d.ts +0 -9
- package/dist/bscPlugin/serialize/BslibManager.js +0 -40
- package/dist/bscPlugin/serialize/BslibManager.js.map +0 -1
- package/dist/bscPlugin/serialize/FileSerializer.d.ts +0 -9
- package/dist/bscPlugin/serialize/FileSerializer.js +0 -72
- package/dist/bscPlugin/serialize/FileSerializer.js.map +0 -1
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js.map +0 -1
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.js +0 -41
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.js.map +0 -1
- package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.d.ts +0 -11
- package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js +0 -53
- package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js.map +0 -1
- package/dist/bscPlugin/validation/ScopeValidator.spec.js +0 -2004
- package/dist/bscPlugin/validation/ScopeValidator.spec.js.map +0 -1
- package/dist/files/AssetFile.d.ts +0 -26
- package/dist/files/AssetFile.js +0 -26
- package/dist/files/AssetFile.js.map +0 -1
- package/dist/files/Factory.d.ts +0 -25
- package/dist/files/Factory.js +0 -22
- package/dist/files/Factory.js.map +0 -1
- package/dist/files/File.d.ts +0 -106
- package/dist/files/File.js +0 -16
- package/dist/files/File.js.map +0 -1
- package/dist/files/LazyFileData.d.ts +0 -20
- package/dist/files/LazyFileData.js +0 -54
- package/dist/files/LazyFileData.js.map +0 -1
- package/dist/files/LazyFileData.spec.js +0 -27
- package/dist/files/LazyFileData.spec.js.map +0 -1
- package/dist/parser/tests/expression/TypeExpression.spec.js +0 -127
- package/dist/parser/tests/expression/TypeExpression.spec.js.map +0 -1
- package/dist/types/AssociativeArrayType.d.ts +0 -11
- package/dist/types/AssociativeArrayType.js +0 -52
- package/dist/types/AssociativeArrayType.js.map +0 -1
- package/dist/types/BaseFunctionType.d.ts +0 -9
- package/dist/types/BaseFunctionType.js +0 -25
- package/dist/types/BaseFunctionType.js.map +0 -1
- package/dist/types/BscTypeKind.d.ts +0 -25
- package/dist/types/BscTypeKind.js +0 -30
- package/dist/types/BscTypeKind.js.map +0 -1
- package/dist/types/BuiltInInterfaceAdder.d.ts +0 -23
- package/dist/types/BuiltInInterfaceAdder.js +0 -160
- package/dist/types/BuiltInInterfaceAdder.js.map +0 -1
- package/dist/types/BuiltInInterfaceAdder.spec.d.ts +0 -1
- package/dist/types/BuiltInInterfaceAdder.spec.js +0 -116
- package/dist/types/BuiltInInterfaceAdder.spec.js.map +0 -1
- package/dist/types/ClassType.d.ts +0 -17
- package/dist/types/ClassType.js +0 -58
- package/dist/types/ClassType.js.map +0 -1
- package/dist/types/ClassType.spec.d.ts +0 -1
- package/dist/types/ClassType.spec.js +0 -77
- package/dist/types/ClassType.spec.js.map +0 -1
- package/dist/types/ComponentType.d.ts +0 -26
- package/dist/types/ComponentType.js +0 -83
- package/dist/types/ComponentType.js.map +0 -1
- package/dist/types/EnumType.d.ts +0 -40
- package/dist/types/EnumType.js +0 -81
- package/dist/types/EnumType.js.map +0 -1
- package/dist/types/EnumType.spec.d.ts +0 -1
- package/dist/types/EnumType.spec.js +0 -33
- package/dist/types/EnumType.spec.js.map +0 -1
- package/dist/types/InheritableType.d.ts +0 -28
- package/dist/types/InheritableType.js +0 -152
- package/dist/types/InheritableType.js.map +0 -1
- package/dist/types/NamespaceType.d.ts +0 -12
- package/dist/types/NamespaceType.js +0 -28
- package/dist/types/NamespaceType.js.map +0 -1
- package/dist/types/ReferenceType.d.ts +0 -63
- package/dist/types/ReferenceType.js +0 -423
- package/dist/types/ReferenceType.js.map +0 -1
- package/dist/types/ReferenceType.spec.d.ts +0 -1
- package/dist/types/ReferenceType.spec.js +0 -137
- package/dist/types/ReferenceType.spec.js.map +0 -1
- package/dist/types/TypedFunctionType.d.ts +0 -33
- package/dist/types/TypedFunctionType.js +0 -106
- package/dist/types/TypedFunctionType.js.map +0 -1
- package/dist/types/TypedFunctionType.spec.d.ts +0 -1
- package/dist/types/TypedFunctionType.spec.js +0 -122
- package/dist/types/TypedFunctionType.spec.js.map +0 -1
- package/dist/types/UnionType.d.ts +0 -20
- package/dist/types/UnionType.js +0 -123
- package/dist/types/UnionType.js.map +0 -1
- package/dist/types/UnionType.spec.d.ts +0 -1
- package/dist/types/UnionType.spec.js +0 -130
- package/dist/types/UnionType.spec.js.map +0 -1
- package/dist/types/helper.spec.d.ts +0 -1
- package/dist/types/helper.spec.js +0 -145
- package/dist/types/helper.spec.js.map +0 -1
- package/dist/types/helpers.d.ts +0 -24
- package/dist/types/helpers.js +0 -178
- package/dist/types/helpers.js.map +0 -1
- package/dist/types/index.d.ts +0 -22
- package/dist/types/index.js +0 -39
- package/dist/types/index.js.map +0 -1
- /package/dist/astUtils/{Editor.spec.d.ts → AstEditor.spec.d.ts} +0 -0
- /package/dist/bscPlugin/{completions/CompletionsProcessor.spec.d.ts → definition/DefinitionProvider.spec.d.ts} +0 -0
- /package/dist/bscPlugin/{serialize/BslibInjector.spec.d.ts → references/ReferencesProvider.spec.d.ts} +0 -0
- /package/dist/bscPlugin/{transpile/BrsFileTranspileProcessor.spec.d.ts → symbols/DocumentSymbolProcessor.spec.d.ts} +0 -0
- /package/dist/bscPlugin/{validation/ScopeValidator.spec.d.ts → symbols/WorkspaceSymbolProcessor.spec.d.ts} +0 -0
- /package/dist/{files/LazyFileData.spec.d.ts → bscPlugin/transpile/BrsFilePreTranspileProcessor.spec.d.ts} +0 -0
- /package/dist/{parser/tests/expression/TypeExpression.spec.d.ts → types/FunctionType.spec.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -11,12 +11,10 @@ A superset of Roku's BrightScript language. Compiles to standard BrightScript.
|
|
|
11
11
|
|
|
12
12
|
## Overview
|
|
13
13
|
|
|
14
|
-
**WARNING: this is the v0.66.0 branch with experimental features**
|
|
15
|
-
|
|
16
14
|
The BrighterScript language provides new features and syntax enhancements to Roku's BrightScript language. Because the language is a superset of BrightScript, the parser and associated tools (VSCode integration, cli, etc...) work with standard BrightScript (.brs) files. This means you will get benefits (as described in the following section) from using the BrighterScript compiler, whether your project contains BrighterScript (.bs) files or not. The BrighterScript language transpiles to standard BrightScript, so your code is fully compatible with all roku devices.
|
|
17
15
|
|
|
18
16
|
## Features
|
|
19
|
-
BrighterScript adds several new features to the BrightScript language such as
|
|
17
|
+
BrighterScript adds several new features to the BrightScript language such as namespaces, classes, import statements, and more. Take a look at the language specification docs for more information.
|
|
20
18
|
|
|
21
19
|
[BrighterScript Language Specification](https://github.com/rokucommunity/BrighterScript/blob/master/docs/readme.md)
|
|
22
20
|
|
|
@@ -93,8 +91,7 @@ BrighterScript adds several new features to the BrightScript language such as Na
|
|
|
93
91
|
</p>
|
|
94
92
|
<br/>
|
|
95
93
|
|
|
96
|
-
|
|
97
|
-
The BrighterScript project is used to power the popular [Brightscript Language](https://marketplace.visualstudio.com/items?itemName=rokucommunity.brightscript) VSCode extension, the [maestro framework](https://github.com/georgejecook/maestro/blob/master/docs/index.md), and more.
|
|
94
|
+
The BrighterScript project is used to power the popular [Brightscript Language](https://marketplace.visualstudio.com/items?itemName=rokucommunity.brightscript) VSCode extension, the [maestro framework](https://github.com/georgejecook/maestro-roku), and more.
|
|
98
95
|
|
|
99
96
|
[Contact us](https://github.com/rokucommunity/brighterscript/issues/new) if you use BrighterScript in your project and would like your logo listed above. More projects are adopting BrighterScript all the time, from using the new BrighterScript language features to simply using the compiler in their build pipeline.
|
|
100
97
|
|
|
@@ -165,428 +162,27 @@ If you need to configure `bsc`, you can do so in two ways:
|
|
|
165
162
|
## bsconfig.json
|
|
166
163
|
|
|
167
164
|
### Overview
|
|
168
|
-
The presence of a `bsconfig.json` file in a directory indicates that the directory is the root of a BrightScript project. The `bsconfig.json` file specifies the root files and the compiler options required to compile the project.
|
|
169
|
-
|
|
170
|
-
### Configuration inheritance with `extends`
|
|
171
|
-
|
|
172
|
-
A `bsconfig.json` file can inherit configurations from another file using the `extends` property.
|
|
173
|
-
|
|
174
|
-
The extends is a top-level property in `bsconfig.json`. `extends`’ value is a string containing a path to another configuration file to inherit from.
|
|
175
|
-
|
|
176
|
-
The configuration from the base file are loaded first, then overridden by those in the inheriting config file. If a circularity is encountered, we report an error.
|
|
177
|
-
|
|
178
|
-
The `files` property from the inheriting config file overwrite those from the base config file.
|
|
179
|
-
|
|
180
|
-
All relative paths found in the configuration file will be resolved relative to the configuration file they originated in.
|
|
181
|
-
|
|
182
|
-
### Optional `extends` and `project`
|
|
183
|
-
There are situations where you want to store some compiler settings in a config file, but not fail if that config file doesn't exist. To do this, you can denote that your `extends` or `project` path is optional by prefixing it with a question mark (`?`). For example:
|
|
184
|
-
|
|
185
|
-
- **bsconfig.json** `extends`
|
|
186
|
-
```json
|
|
187
|
-
{
|
|
188
|
-
"extends": "?path/to/optional/bsconfig.json"
|
|
189
|
-
}
|
|
190
|
-
```
|
|
191
|
-
- CLI "extends"
|
|
192
|
-
```
|
|
193
|
-
bsc --extends "?path/to/optional/bsconfig.json"
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
- CLI `project` argument
|
|
197
|
-
```
|
|
198
|
-
bsc --project "?path/to/optional/bsconfig.json"
|
|
199
|
-
```
|
|
200
|
-
- Node.js API `extends`
|
|
201
|
-
```
|
|
202
|
-
var programBuilder = new ProgramBuilder({
|
|
203
|
-
"extends": "?path/to/optional/bsconfig.json"
|
|
204
|
-
});
|
|
205
|
-
```
|
|
206
|
-
- Node.js API `project`
|
|
207
|
-
```
|
|
208
|
-
var programBuilder = new ProgramBuilder({
|
|
209
|
-
"project": "?path/to/optional/bsconfig.json"
|
|
210
|
-
});
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### `bsconfig.json` options
|
|
214
|
-
|
|
215
|
-
These are the options available in the `bsconfig.json` file.
|
|
216
|
-
|
|
217
|
-
#### `project`
|
|
218
|
-
|
|
219
|
-
Type: `string`
|
|
220
|
-
|
|
221
|
-
A path to a project file. This is really only passed in from the command line or the NodeJS API, and should not be present in `bsconfig.json` files. Prefix with a question mark (?) to prevent throwing an exception when the file does not exist.
|
|
222
|
-
|
|
223
|
-
#### `extends`
|
|
224
|
-
|
|
225
|
-
Type: `string`
|
|
226
|
-
|
|
227
|
-
Relative or absolute path to another `bsconfig.json` file that this `bsconfig.json` file should import and then override. Prefix with a question mark (?) to prevent throwing an exception when the file does not exist. Defaults to `undefined`.
|
|
228
|
-
|
|
229
|
-
Note: child config properties completely replace parent config properties. For example: if a parent and child bsconfigs both specify an array for `plugins`, or `files`, or `diagnosticFilters`, etc., then the parent's setting will be completely ignored and the child's setting will be used instead.
|
|
230
|
-
|
|
231
|
-
#### `cwd`
|
|
232
|
-
|
|
233
|
-
Type: `string`
|
|
234
|
-
|
|
235
|
-
If present, overrides the current working directory when invoking `bsc`. Defaults to `process.cwd()`.
|
|
236
|
-
|
|
237
|
-
#### `rootDir`
|
|
238
|
-
|
|
239
|
-
Type: `string`
|
|
240
|
-
|
|
241
|
-
The root directory of your roku project. Defaults to `process.cwd()`.
|
|
242
|
-
|
|
243
|
-
#### `stagingDir`
|
|
244
|
-
|
|
245
|
-
Type: `string`
|
|
246
|
-
|
|
247
|
-
The folder where the transpiled files are placed. This folder will be created automatically if it does not exist, and will be deleted after transpilation completes unless `retainStagingDir` is set to `true`. Defaults to `./out/.roku-deploy-staging`.
|
|
248
|
-
|
|
249
|
-
#### `retainStagingDir`
|
|
250
|
-
|
|
251
|
-
Type: `boolean`
|
|
252
|
-
|
|
253
|
-
Prevent the staging folder from being deleted after creating the package. Defaults to `false`, meaning that the folder is deleted every time.
|
|
254
|
-
|
|
255
|
-
#### `removeParameterTypes`
|
|
256
|
-
|
|
257
|
-
Type: `boolean`
|
|
258
|
-
|
|
259
|
-
If true, removes the explicit type to function's parameters and return (i.e. the `as type` syntax); otherwise keep this information.
|
|
260
|
-
|
|
261
|
-
#### `files`
|
|
262
|
-
|
|
263
|
-
Type:
|
|
264
|
-
```typescript
|
|
265
|
-
Array<
|
|
266
|
-
string |
|
|
267
|
-
string[] |
|
|
268
|
-
{
|
|
269
|
-
src: string | string[],
|
|
270
|
-
dest: string
|
|
271
|
-
}>
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
The files array is how you specify what files are included in your project. Any strings found in the files array must be relative to rootDir, and are used as include filters, meaning that if a file matches the pattern, it is included.
|
|
275
|
-
|
|
276
|
-
For most standard projects, the default files array should work just fine:
|
|
277
|
-
|
|
278
|
-
```jsonc
|
|
279
|
-
{
|
|
280
|
-
"files": [
|
|
281
|
-
"source/**/*",
|
|
282
|
-
"components/**/*",
|
|
283
|
-
"images/**/*",
|
|
284
|
-
"manifest"
|
|
285
|
-
]
|
|
286
|
-
}
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
This will copy all files from the standard roku folders directly into the package while maintaining each file's relative file path within rootDir.
|
|
290
|
-
|
|
291
|
-
If you want to include additional files, you will need to provide the entire array. For example, if you have a folder with other assets, you could do the following:
|
|
292
|
-
|
|
293
|
-
```jsonc
|
|
294
|
-
{
|
|
295
|
-
"files": [
|
|
296
|
-
"source/**/*",
|
|
297
|
-
"components/**/*",
|
|
298
|
-
"images/**/*",
|
|
299
|
-
"manifest"
|
|
300
|
-
//your folder with other assets
|
|
301
|
-
"assets/**/*",
|
|
302
|
-
]
|
|
303
|
-
}
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
If a `bsconfig.json` file specifies a parent config using the `extends` field, and the child specifies a `files` field, then the parent's `files` field will be completely overridden by the child.
|
|
307
|
-
|
|
308
|
-
##### Excluding files
|
|
309
|
-
|
|
310
|
-
You can exclude files from the output by prefixing your file patterns with "!". This is useful in cases where you want everything in a folder EXCEPT certain files.
|
|
311
|
-
|
|
312
|
-
```jsonc
|
|
313
|
-
{
|
|
314
|
-
"files": [
|
|
315
|
-
"source/**/*",
|
|
316
|
-
"!source/some/unwanted/file.brs"
|
|
317
|
-
]
|
|
318
|
-
}
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
The files array is processed from top to bottom, with later patterns overriding previous ones. This means that in order to exclude a file which is included by another pattern, the negative pattern using `!` must occur **after** the positive pattern.
|
|
322
|
-
|
|
323
|
-
##### File pattern resolution
|
|
324
|
-
|
|
325
|
-
All patterns will be resolved relative to rootDir, with their relative positions within rootDir maintained.
|
|
326
|
-
|
|
327
|
-
Patterns may not reference files outside of `rootDir` unless the `{ src, dest }` form is used (see below). For example:
|
|
328
|
-
|
|
329
|
-
```jsonc
|
|
330
|
-
{
|
|
331
|
-
"rootDir": "C:/projects/CatVideoPlayer",
|
|
332
|
-
"files": [
|
|
333
|
-
"source/main.brs",
|
|
334
|
-
|
|
335
|
-
//NOT allowed because it navigates outside the rootDir
|
|
336
|
-
"../common/promise.brs"
|
|
337
|
-
]
|
|
338
|
-
}
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
Any valid glob pattern is supported. For more information, see the documentation on the underlying [fast-glob](https://github.com/mrmlnc/fast-glob) library.
|
|
342
|
-
|
|
343
|
-
Empty folders are not copied.
|
|
344
|
-
|
|
345
|
-
Paths to folders will be ignored. If you want to copy a folder and its contents, use the glob syntax (i.e. `some_folder/**/*`).
|
|
346
|
-
|
|
347
|
-
##### Specifying file destinations
|
|
348
|
-
|
|
349
|
-
For more advanced use cases, you may provide an object which contains the source pattern and output path. This allows you to be very specific about what files to copy, and where they are placed in the output folder. This option also supports copying files from outside the `rootDir`.
|
|
350
|
-
|
|
351
|
-
The object structure is as follows:
|
|
352
|
-
|
|
353
|
-
```typescript
|
|
354
|
-
{
|
|
355
|
-
/**
|
|
356
|
-
* A glob pattern string or file path, or an array of glob pattern strings and/or file paths.
|
|
357
|
-
* These can be relative paths or absolute paths.
|
|
358
|
-
* All non-absolute paths are resolved relative to the rootDir
|
|
359
|
-
*/
|
|
360
|
-
src: Array<string | string[]>;
|
|
361
|
-
/**
|
|
362
|
-
* The relative path to the location in the output folder where the files should be placed,
|
|
363
|
-
* relative to the root of the output folder
|
|
364
|
-
*/
|
|
365
|
-
dest: string | undefined
|
|
366
|
-
}
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
If `src` is a non-glob path to a single file, then `dest` should include the filename and extension. For example:
|
|
370
|
-
|
|
371
|
-
```jsonc
|
|
372
|
-
{ "src": "lib/Promise/promise.brs", "dest": "source/promise.brs" }
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
If `src` is a glob pattern, then dest should be a path to the folder in the output directory. For example:
|
|
376
|
-
|
|
377
|
-
```jsonc
|
|
378
|
-
{ "src": "lib/*.brs", "dest": "source/lib" }
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
If `src` is a path to a folder, it will be ignored. If you want to copy a folder and its contents, use the glob syntax. The following example will copy all files from the lib/vendor folder recursively:
|
|
382
|
-
|
|
383
|
-
```jsonc
|
|
384
|
-
{ "src": "lib/vendor/**/*", "dest": "vendor" }
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
If `dest` is not specified it will default to the root of the output folder.
|
|
388
|
-
|
|
389
|
-
An example of combining regular and advanced file patterns:
|
|
390
|
-
|
|
391
|
-
```jsonc
|
|
392
|
-
{
|
|
393
|
-
"rootDir": "C:/projects/CatVideoPlayer",
|
|
394
|
-
"files": [
|
|
395
|
-
"source/main.brs",
|
|
396
|
-
{
|
|
397
|
-
"src": "../common/promise.brs",
|
|
398
|
-
"dest": "source/common"
|
|
399
|
-
}
|
|
400
|
-
]
|
|
401
|
-
}
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
##### File collision handling
|
|
405
|
-
|
|
406
|
-
Because file entries are processed in order you can override a file by specifying an alternative later in the files array.
|
|
407
|
-
|
|
408
|
-
For example, if you have a base project and a child project that wants to override specific files, you could do the following:
|
|
165
|
+
The presence of a `bsconfig.json` file in a directory indicates that the directory is the root of a BrightScript project. The `bsconfig.json` file specifies the root files and the compiler options required to compile the project. Here is a minimal example, which is recommended for new projects:
|
|
409
166
|
|
|
410
167
|
```jsonc
|
|
411
168
|
{
|
|
169
|
+
"rootDir": "src",
|
|
412
170
|
"files": [
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
]
|
|
171
|
+
"**/*"
|
|
172
|
+
],
|
|
173
|
+
"stagingFolderPath": "dist",
|
|
174
|
+
"retainStagingFolder": true,
|
|
175
|
+
//this flag tells BrighterScript that for every xml file, try to import a .bs file with the same name and location
|
|
176
|
+
"autoImportComponentScript": true,
|
|
177
|
+
"sourceMap": true
|
|
421
178
|
}
|
|
422
179
|
```
|
|
423
180
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
Type: `string`
|
|
427
|
-
|
|
428
|
-
The path (including filename) where the output file should be placed. Defaults to `"./out/${WORKSPACE_FOLDER_NAME}.zip"`.
|
|
429
|
-
|
|
430
|
-
#### `createPackage`
|
|
431
|
-
|
|
432
|
-
Type: `boolean`
|
|
433
|
-
|
|
434
|
-
Causes the build to create a zip package. Defaults to `true`. This setting is ignored when `deploy` is enabled.
|
|
435
|
-
|
|
436
|
-
#### `watch`
|
|
437
|
-
|
|
438
|
-
Type: `boolean`
|
|
439
|
-
|
|
440
|
-
If `true`, the server will keep running and will watch and recompile on every file change. Defaults to `false`.
|
|
441
|
-
|
|
442
|
-
#### `deploy`
|
|
443
|
-
|
|
444
|
-
Type: `boolean`
|
|
445
|
-
|
|
446
|
-
If `true`, after a successful build, the project will be deployed to the Roku specified in host. Defaults to `false`. If this field is set to `true`, then the `host` and `password` fields must be set as well.
|
|
447
|
-
|
|
448
|
-
#### `host`
|
|
449
|
-
|
|
450
|
-
Type: `string`
|
|
451
|
-
|
|
452
|
-
The host of the Roku that this project will deploy to when the `deploy` field is set to `true`. Defaults to `undefined`.
|
|
453
|
-
|
|
454
|
-
#### `username`
|
|
455
|
-
|
|
456
|
-
Type: `string`
|
|
457
|
-
|
|
458
|
-
The username that will be used to deploy to the Roku device when the `deploy` field is set to `true`. Defaults to `undefined`.
|
|
459
|
-
|
|
460
|
-
#### `password`
|
|
461
|
-
|
|
462
|
-
Type: `string`
|
|
463
|
-
|
|
464
|
-
The password that will be used to deploy to the Roku device when the `deploy` field is set to `true`. Defaults to `undefined`.
|
|
465
|
-
|
|
466
|
-
#### `emitFullPaths`
|
|
467
|
-
|
|
468
|
-
Type: `boolean`
|
|
469
|
-
|
|
470
|
-
Emit full paths to files when printing diagnostics to the console. Defaults to `false`.
|
|
471
|
-
|
|
472
|
-
#### `emitDefinitions`
|
|
473
|
-
|
|
474
|
-
Type: `boolean`
|
|
475
|
-
|
|
476
|
-
Emit type definition files (`d.bs`) during transpile. Defaults to `false`.
|
|
477
|
-
|
|
478
|
-
#### `diagnosticFilters`
|
|
479
|
-
|
|
480
|
-
Type: `Array<string | number | {src: string; codes: number[]}`
|
|
481
|
-
|
|
482
|
-
A list of filters used to hide diagnostics.
|
|
483
|
-
- A `string` value should be a relative-to-root-dir or absolute file path or glob pattern of the files that should be excluded. Any file matching this pattern will have all diagnostics supressed.
|
|
484
|
-
- A `number` value should be a diagnostic code. This will supress all diagnostics with that code for the whole project.
|
|
485
|
-
- An object can also be provided to filter specific diagnostic codes for a file pattern. For example,
|
|
486
|
-
|
|
487
|
-
```jsonc
|
|
488
|
-
"diagnosticFilters": [{
|
|
489
|
-
"src": "vendor/**/*",
|
|
490
|
-
"codes": [1000, 1011] //ignore these specific codes from vendor libraries
|
|
491
|
-
}]
|
|
492
|
-
```
|
|
493
|
-
|
|
494
|
-
Defaults to `undefined`.
|
|
495
|
-
|
|
496
|
-
If a child bsconfig extends from a parent bsconfig, and both bsconfigs specify `diagnosticFilters`, the parent bsconfig's `diagnosticFilters` field will be completely overwritten.
|
|
497
|
-
|
|
498
|
-
#### `diagnosticSeverityOverrides`
|
|
499
|
-
|
|
500
|
-
Type: `Record<string | number, 'hint' | 'info' | 'warn' | 'error'>`
|
|
501
|
-
|
|
502
|
-
A map of error codes and severity levels that will override diagnostics' severity. When a diagnostic generator doesn't offer enough control on an error's severity, this is a tool to work around blocking errors, or raise the level of other errors.
|
|
503
|
-
|
|
504
|
-
```jsonc
|
|
505
|
-
"diagnosticSeverityOverrides": {
|
|
506
|
-
"1011": "error", //raise a warning to an error
|
|
507
|
-
"LINT1001": "warn" //oops we have lots of those to fix... later
|
|
508
|
-
}
|
|
509
|
-
```
|
|
510
|
-
|
|
511
|
-
#### `diagnosticLevel`
|
|
512
|
-
|
|
513
|
-
Type: `"hint" | "info" | "warn" | "error"`
|
|
514
|
-
|
|
515
|
-
Specify what diagnostic levels are printed to the console. This has no effect on what diagnostics are reported in the LanguageServer. Defaults to `"warn"`.
|
|
516
|
-
|
|
517
|
-
#### `autoImportComponentScript`
|
|
518
|
-
|
|
519
|
-
Type: `bool`
|
|
520
|
-
|
|
521
|
-
BrighterScript only: will automatically import a script at transpile-time for a component with the same name if it exists. Defaults to `false`.
|
|
522
|
-
|
|
523
|
-
#### `sourceRoot`
|
|
524
|
-
|
|
525
|
-
Type: `string`
|
|
526
|
-
|
|
527
|
-
Override the root directory path where debugger should locate the source files. The location will be embedded in the source map to help debuggers locate the original source files. This only applies to files found within `rootDir`. This is useful when you want to preprocess files before passing them to BrighterScript, and want a debugger to open the original files. This option also affects the `SOURCE_FILE_PATH` and `SOURCE_LOCATION` source literals.
|
|
528
|
-
|
|
529
|
-
#### `plugins`
|
|
530
|
-
|
|
531
|
-
Type: `Array<string>`
|
|
532
|
-
|
|
533
|
-
List of node scripts or npm modules to load as plugins to the BrighterScript compiler. Defaults to `undefined`.
|
|
534
|
-
|
|
535
|
-
If a child bsconfig extends from a parent bsconfig, and both bsconfigs specify a `plugins` field, the child's `plugins` field will completely overwrite the parent's `plugins` field.
|
|
536
|
-
|
|
537
|
-
#### `require`
|
|
538
|
-
|
|
539
|
-
Type: `Array<string>`
|
|
540
|
-
|
|
541
|
-
List of node scripts or npm modules to load during the startup sequence. Useful for running things like `ts-node/require`. Defaults to `undefined`.
|
|
542
|
-
|
|
543
|
-
If a child bsconfig extends from a parent bsconfig, and both bsconfigs specify a `require` field, the child's `require` field will completely overwrite the parent's `require` field.
|
|
544
|
-
|
|
545
|
-
#### `allowBrighterScriptInBrightScript`
|
|
546
|
-
|
|
547
|
-
Type: `boolean`
|
|
548
|
-
|
|
549
|
-
Allow BrighterScript features (classes, interfaces, etc...) to be included in BrightScript (`.brs`) files, and force those files to be transpiled.
|
|
550
|
-
|
|
551
|
-
#### `bslibDestinationDir`
|
|
552
|
-
|
|
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`.
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
## Ignore errors and warnings on a per-line basis
|
|
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:
|
|
563
|
-
- `bs:disable-next-line`
|
|
564
|
-
- `bs:disable-next-line: code1 code2 code3`
|
|
565
|
-
- `bs:disable-line`
|
|
566
|
-
- `bs:disable-line: code1 code2 code3`
|
|
567
|
-
|
|
568
|
-
Here are some examples:
|
|
569
|
-
|
|
570
|
-
```BrightScript
|
|
571
|
-
sub Main()
|
|
572
|
-
'disable errors about invalid syntax here
|
|
573
|
-
'bs:disable-next-line
|
|
574
|
-
DoSomething(
|
|
575
|
-
|
|
576
|
-
DoSomething( 'bs:disable-line
|
|
577
|
-
|
|
578
|
-
'disable errors about wrong parameter count
|
|
579
|
-
DoSomething(1,2,3) 'bs:disable-line
|
|
580
|
-
|
|
581
|
-
DoSomething(1,2,3) 'bs:disable-line:1002
|
|
582
|
-
end sub
|
|
583
|
-
|
|
584
|
-
sub DoSomething()
|
|
585
|
-
end sub
|
|
586
|
-
```
|
|
181
|
+
More information on the config file format may be found in the [bsconfig.json documentation](https://github.com/rokucommunity/BrighterScript/blob/master/docs/bsconfig.md).
|
|
587
182
|
|
|
588
|
-
|
|
183
|
+
## Suppressing compiler messages
|
|
589
184
|
|
|
185
|
+
The BrighterScript compiler emits errors and warnings when it encounters potentially invalid code. Errors and warnings may also be emitted by compiler plugins, such as by [the BrighterScript linter](https://github.com/rokucommunity/bslint). These messages can be suppressed if needed; see [the documentation](https://github.com/rokucommunity/BrighterScript/blob/master/docs/suppressing-compiler-messages.md).
|
|
590
186
|
|
|
591
187
|
## ropm support
|
|
592
188
|
In order for BrighterScript-transpiled projects to work as ropm modules, they need a reference to [bslib](https://github.com/rokucommunity/bslib/blob/master/source/bslib.brs) (the BrightScript runtime library for BrighterScript features) in their package. As `ropm` and `brighterscript` become more popular, this could result in many duplicate copies of `bslib.brs`.
|
package/dist/BsConfig.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LogLevel } from './
|
|
1
|
+
import type { LogLevel } from './logging';
|
|
2
2
|
export interface BsConfig {
|
|
3
3
|
/**
|
|
4
4
|
* The inheritance tree for all parent configs used to generate this config. Do not set this, it is computed.
|
|
@@ -77,10 +77,21 @@ export interface BsConfig {
|
|
|
77
77
|
* @default false
|
|
78
78
|
*/
|
|
79
79
|
retainStagingDir?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Prevent the staging folder from being deleted after creating the package
|
|
82
|
+
* @default false
|
|
83
|
+
* @deprecated use `retainStagingDir` instead
|
|
84
|
+
*/
|
|
85
|
+
retainStagingFolder?: boolean;
|
|
80
86
|
/**
|
|
81
87
|
* The path to the staging directory (wehre the output files are copied immediately before creating the zip)
|
|
82
88
|
*/
|
|
83
89
|
stagingDir?: string;
|
|
90
|
+
/**
|
|
91
|
+
* The path to the staging folder (where all files are copied to right before creating the zip package)
|
|
92
|
+
* @deprecated use `stagingDir` instead
|
|
93
|
+
*/
|
|
94
|
+
stagingFolderPath?: string;
|
|
84
95
|
/**
|
|
85
96
|
* A list of error codes the compiler should NOT emit, even if encountered.
|
|
86
97
|
*/
|
|
@@ -141,7 +152,7 @@ export interface BsConfig {
|
|
|
141
152
|
* The log level.
|
|
142
153
|
* @default LogLevel.log
|
|
143
154
|
*/
|
|
144
|
-
logLevel?: LogLevel | 'error' | 'warn' | 'log' | 'info' | 'debug' | 'trace';
|
|
155
|
+
logLevel?: LogLevel | 'error' | 'warn' | 'log' | 'info' | 'debug' | 'trace' | 'off';
|
|
145
156
|
/**
|
|
146
157
|
* Override the path to source files in source maps. Use this if you have a preprocess step and want
|
|
147
158
|
* to ensure the source maps point to the original location.
|
|
@@ -154,6 +165,15 @@ export interface BsConfig {
|
|
|
154
165
|
* @default true
|
|
155
166
|
*/
|
|
156
167
|
sourceMap?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Excludes empty files from being included in the output. Some Brighterscript files
|
|
170
|
+
* are left empty or with only comments after transpilation to Brightscript.
|
|
171
|
+
* The default behavior is to write these to disk after transpilation.
|
|
172
|
+
* Setting this flag to `true` will prevent empty files being written and will
|
|
173
|
+
* remove associated script tags from XML
|
|
174
|
+
* @default false
|
|
175
|
+
*/
|
|
176
|
+
pruneEmptyCodeFiles?: boolean;
|
|
157
177
|
/**
|
|
158
178
|
* Allow brighterscript features (classes, interfaces, etc...) to be included in BrightScript (`.brs`) files, and force those files to be transpiled.
|
|
159
179
|
* @default false
|
|
@@ -167,3 +187,6 @@ export interface BsConfig {
|
|
|
167
187
|
*/
|
|
168
188
|
bslibDestinationDir?: string;
|
|
169
189
|
}
|
|
190
|
+
declare type OptionalBsConfigFields = '_ancestors' | 'sourceRoot' | 'project' | 'manifest' | 'noProject' | 'extends' | 'host' | 'password' | 'require' | 'stagingFolderPath' | 'diagnosticLevel' | 'rootDir' | 'stagingDir';
|
|
191
|
+
export declare type FinalizedBsConfig = Omit<Required<BsConfig>, OptionalBsConfigFields> & Pick<BsConfig, OptionalBsConfigFields>;
|
|
192
|
+
export {};
|
package/dist/Cache.js
CHANGED
|
@@ -10,13 +10,13 @@ class Cache extends Map {
|
|
|
10
10
|
* otherwise call the factory function to create the value, add it to the cache, and return it.
|
|
11
11
|
*/
|
|
12
12
|
getOrAdd(key, factory) {
|
|
13
|
-
if (!
|
|
13
|
+
if (!this.has(key)) {
|
|
14
14
|
const value = factory(key);
|
|
15
|
-
|
|
15
|
+
this.set(key, value);
|
|
16
16
|
return value;
|
|
17
17
|
}
|
|
18
18
|
else {
|
|
19
|
-
return
|
|
19
|
+
return this.get(key);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
/**
|
package/dist/Cache.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cache.js","sourceRoot":"","sources":["../src/Cache.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,KAAgC,SAAQ,GAAiB;IAElE;;;OAGG;IACI,QAAQ,CAA4B,GAAS,EAAE,OAAyB;QAC3E,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"Cache.js","sourceRoot":"","sources":["../src/Cache.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,KAAgC,SAAQ,GAAiB;IAElE;;;OAGG;IACI,QAAQ,CAA4B,GAAS,EAAE,OAAyB;QAC3E,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YAChB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;YAC3B,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YACrB,OAAO,KAAK,CAAC;SAChB;aAAM;YACH,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;SACxB;IACL,CAAC;IAED;;OAEG;IACI,GAAG,CAA4B,GAAS;QAC3C,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAM,CAAC;IAC/B,CAAC;CACJ;AAtBD,sBAsBC"}
|
package/dist/CodeActionUtil.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ import type { Diagnostic, Position, Range } from 'vscode-languageserver';
|
|
|
2
2
|
import { CodeActionKind, CodeAction } from 'vscode-languageserver';
|
|
3
3
|
export declare class CodeActionUtil {
|
|
4
4
|
createCodeAction(obj: CodeActionShorthand): CodeAction;
|
|
5
|
-
serializableDiagnostics(diagnostics: Diagnostic[]): {
|
|
5
|
+
serializableDiagnostics(diagnostics: Diagnostic[] | undefined): {
|
|
6
6
|
range: Range;
|
|
7
|
-
severity: import("vscode-languageserver").DiagnosticSeverity;
|
|
7
|
+
severity: import("vscode-languageserver-types").DiagnosticSeverity;
|
|
8
8
|
source: string;
|
|
9
9
|
code: string | number;
|
|
10
10
|
message: string;
|
|
11
|
-
relatedInformation: import("vscode-languageserver").DiagnosticRelatedInformation[];
|
|
11
|
+
relatedInformation: import("vscode-languageserver-types").DiagnosticRelatedInformation[];
|
|
12
12
|
}[];
|
|
13
13
|
}
|
|
14
14
|
export { CodeActionKind };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeActionUtil.js","sourceRoot":"","sources":["../src/CodeActionUtil.ts"],"names":[],"mappings":";;;AACA,iEAA6E;AA4CpE,+FA5CA,sCAAc,OA4CA;AA3CvB,2CAAiC;AAEjC,MAAa,cAAc;IAEhB,gBAAgB,CAAC,GAAwB;QAC5C,MAAM,IAAI,GAAG;YACT,OAAO,EAAE,EAAE;SACG,CAAC;QACnB,KAAK,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE;YAC9B,MAAM,GAAG,GAAG,gBAAG,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;YAEjD,4CAA4C;YAC5C,IAAI,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"CodeActionUtil.js","sourceRoot":"","sources":["../src/CodeActionUtil.ts"],"names":[],"mappings":";;;AACA,iEAA6E;AA4CpE,+FA5CA,sCAAc,OA4CA;AA3CvB,2CAAiC;AAEjC,MAAa,cAAc;IAEhB,gBAAgB,CAAC,GAAwB;QAC5C,MAAM,IAAI,GAAG;YACT,OAAO,EAAE,EAAE;SACG,CAAC;QACnB,KAAK,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE;YAC9B,MAAM,GAAG,GAAG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V,OAAO,EAAE,OAAO;YAChB,kBAAkB,EAAE,kBAAkB;SACzC,CAAC,CAAC,CAAC;IACR,CAAC;CACJ;AAvCD,wCAuCC;AA0BY,QAAA,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { Range } from 'vscode-languageserver';
|
|
2
|
-
import type {
|
|
3
|
-
import type { BsDiagnostic, CommentFlag, DiagnosticCode } from './interfaces';
|
|
2
|
+
import type { BscFile, BsDiagnostic, CommentFlag, DiagnosticCode } from './interfaces';
|
|
4
3
|
export declare class CommentFlagProcessor {
|
|
5
4
|
/**
|
|
6
5
|
* The file this processor applies to
|
|
7
6
|
*/
|
|
8
|
-
file:
|
|
7
|
+
file: BscFile;
|
|
9
8
|
/**
|
|
10
9
|
* An array of strings containing the types of text that a comment starts with. (i.e. `REM`, `'`, `<!--`)
|
|
11
10
|
*/
|
|
@@ -22,7 +21,7 @@ export declare class CommentFlagProcessor {
|
|
|
22
21
|
/**
|
|
23
22
|
* The file this processor applies to
|
|
24
23
|
*/
|
|
25
|
-
file:
|
|
24
|
+
file: BscFile,
|
|
26
25
|
/**
|
|
27
26
|
* An array of strings containing the types of text that a comment starts with. (i.e. `REM`, `'`, `<!--`)
|
|
28
27
|
*/
|
|
@@ -45,10 +45,11 @@ class CommentFlagProcessor {
|
|
|
45
45
|
if (tokenized.disableType === 'line') {
|
|
46
46
|
affectedRange = util_1.util.createRange(range.start.line, 0, range.start.line, range.start.character);
|
|
47
47
|
}
|
|
48
|
-
else
|
|
48
|
+
else {
|
|
49
|
+
// tokenized.disableType must be 'next-line'
|
|
49
50
|
affectedRange = util_1.util.createRange(range.start.line + 1, 0, range.start.line + 1, Number.MAX_SAFE_INTEGER);
|
|
50
51
|
}
|
|
51
|
-
let commentFlag;
|
|
52
|
+
let commentFlag = null;
|
|
52
53
|
//statement to disable EVERYTHING
|
|
53
54
|
if (tokenized.codes.length === 0) {
|
|
54
55
|
commentFlag = {
|
|
@@ -103,7 +104,7 @@ class CommentFlagProcessor {
|
|
|
103
104
|
tokenize(text, range) {
|
|
104
105
|
let lowerText = text.toLowerCase();
|
|
105
106
|
let offset = 0;
|
|
106
|
-
let commentTokenText;
|
|
107
|
+
let commentTokenText = null;
|
|
107
108
|
for (const starter of this.commentStarters) {
|
|
108
109
|
if (text.startsWith(starter)) {
|
|
109
110
|
commentTokenText = starter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommentFlagProcessor.js","sourceRoot":"","sources":["../src/CommentFlagProcessor.ts"],"names":[],"mappings":";;;AACA,6DAA0D;
|
|
1
|
+
{"version":3,"file":"CommentFlagProcessor.js","sourceRoot":"","sources":["../src/CommentFlagProcessor.ts"],"names":[],"mappings":";;;AACA,6DAA0D;AAE1D,iCAA8B;AAE9B,MAAa,oBAAoB;IAC7B;IACI;;OAEG;IACI,IAAa;IACpB;;OAEG;IACI,kBAAkB,EAAc;IACvC;;OAEG;IACI,kBAAkB,EAAsB;IAC/C;;OAEG;IACI,wBAAwB,EAAsB;QAZ9C,SAAI,GAAJ,IAAI,CAAS;QAIb,oBAAe,GAAf,eAAe,CAAiB;QAIhC,oBAAe,GAAf,eAAe,CAAyB;QAIxC,0BAAqB,GAArB,qBAAqB,CAAyB;QAOzD;;WAEG;QACI,iBAAY,GAAG,EAAmB,CAAC;QAE1C;;WAEG;QACI,gBAAW,GAAG,EAAoB,CAAC;QAZtC,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IAE3G,CAAC;IAiBM,MAAM,CAAC,IAAY,EAAE,KAAY;;QACpC,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC7C,IAAI,CAAC,SAAS,EAAE;YACZ,OAAO;SACV;Q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