trullock / NUglify

NUglify is a HTML, JavaScript and CSS minification Library for .NET (fork of AjaxMin + new features)
Other
398 stars 79 forks source link

Error compiling HttpClient class in signalr.js due to delete method #353

Closed failwyn closed 1 year ago

failwyn commented 1 year ago

ISSUE: Error compiling HttpClient class in signalr.js due to delete method.

TEST CASE: Run the Test NUglify.Tests.JavaScript => Bugs => Bug353 (Fixed in PR#354)

Stack Trace:  TestHelper.RunErrorTest(String settingsSwitches, JSError[] expectedErrorArray) line 906 TestHelper.RunErrorTest(JSError[] expectedErrorArray) line 700 Bugs.BugXXX() line 18 1) at NUglify.Tests.JavaScript.Common.TestHelper.RunErrorTest(String settingsSwitches, JSError[] expectedErrorArray) in \NUglify\src\NUglify.Tests\JavaScript\Common\TestHelper.cs:line 906 TestHelper.RunErrorTest(JSError[] expectedErrorArray) line 700 Bugs.BugXXX() line 18

Standard Output:  INPUT FILE: \NUglify\src\NUglify.Tests\bin\Debug\TestData\JS\Input\Bugs\BugXXX.js class HttpClient { delete(url, options) { return this.send({ ...options, method: "DELETE", url, }); } }

---ERRORS---
NoIdentifier

    Error JS1010 at Line 2, Column 5: Expected identifier: delete
        Expected identifier: delete
        UNEXPECTED

UNEXPECTED ERROR RESULTS

FIX: Added the following code to JSKeyword.cs

case JSToken.Delete: return "delete";