mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-15 19:22:19 +08:00
fix(core): upgrade Jint and fix errors
This commit is contained in:
parent
1440f2c2d9
commit
fa18af50a6
|
@ -13,7 +13,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Fluid.Core" Version="2.2.15" />
|
||||
<PackageReference Include="Jint" Version="3.0.0-preview-275" />
|
||||
<PackageReference Include="Jint" Version="3.0.0-preview-336" />
|
||||
<PackageReference Include="JsonSubTypes" Version="1.9.0" />
|
||||
<PackageReference Include="HierarchicalPropertyDefault" Version="0.1.4-beta-g75fdf624b1" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
|
||||
|
|
|
@ -29,9 +29,9 @@ namespace BililiveRecorder.Core.Scripting
|
|||
|
||||
static UserScriptRunner()
|
||||
{
|
||||
setupScript = new JavaScriptParser(@"
|
||||
setupScript = new JavaScriptParser(new ParserOptions()).ParseScript(@"
|
||||
globalThis.recorderEvents = {};
|
||||
", new ParserOptions(@"internalSetup.js")).ParseScript();
|
||||
", "internalSetup.js", true);
|
||||
}
|
||||
|
||||
public UserScriptRunner(GlobalConfig config)
|
||||
|
@ -73,8 +73,8 @@ globalThis.recorderEvents = {};
|
|||
return null;
|
||||
}
|
||||
|
||||
var parser = new JavaScriptParser(source!, new ParserOptions("userscript.js"));
|
||||
var script = parser.ParseScript();
|
||||
var parser = new JavaScriptParser();
|
||||
var script = parser.ParseScript(source!, "userscript.js", true);
|
||||
|
||||
this.cachedScript = script;
|
||||
this.cachedScriptSource = source;
|
||||
|
|
Loading…
Reference in New Issue
Block a user