WebCompiler icon indicating copy to clipboard operation
WebCompiler copied to clipboard

Syntax error on compiling nullish coalescing assignment (??=)

Open rbdeenk opened this issue 2 years ago • 8 comments

Installed product versions

  • Visual Studio: 2022 community
  • This extension: 1.14.11

Description

Getting syntax error when trying to compile nullish coalescing assignment (??=).

Steps to recreate

  1. Create a js file
  2. Write any code that implements ??=
  3. Compile file with the extension

Current behavior

It throws an Exception stating "unexpected token"

Expected behavior

It should be able to compile ??= into either a null check with assignment or see ??= as valid.

rbdeenk avatar Mar 11 '24 09:03 rbdeenk

I’ll see if the libraries support this yet, either way we’re due for an update, I just gotta find some time.

failwyn avatar Mar 13 '24 17:03 failwyn

Curious to hear if there is any progression in this issue.

rbdeenk avatar Jun 14 '24 10:06 rbdeenk

I'm working through NUglify Issues, I just fixed an issue with deconstruction, I'll take a look at this next.

failwyn avatar Jun 14 '24 10:06 failwyn

Can you provide your compiler config? What are you compiling the js from/to?

failwyn avatar Jun 18 '24 13:06 failwyn

My files look like the following:

[
    {
        "outputFile": "/js/MyFile.es5.js",
        "inputFile": "/js/MyFile.js"
    }
]

Note that the files throwing the exception are not present in the config. The exception appears in visual studios "Error list". It looks like:

SyntaxError: DISK:/FILEPATH/MyFile.js: Unexpected token (line:column)

   FunctionCausingIssue();

rbdeenk avatar Jun 18 '24 14:06 rbdeenk

Thanks, this looks like an issue with Babel, hopefully updating it will resolve the issue. I'll let you know once I get the rest of the issues addressed and update the dependencies.

failwyn avatar Jun 18 '24 15:06 failwyn

I'm trying to get a new version out, but I am getting errors trying to update the node_modules... I'm getting errors from node-gyp compiling node-sass. Is anyone able to rebuild the node_module.7z file using the build.cmd file?

// I may have to drop node_sass support if I cannot get this working

failwyn avatar Jul 19 '24 16:07 failwyn

Sorry I am not very knowledgeable on how to do this so i won't be of much help sadly

rbdeenk avatar Aug 12 '24 14:08 rbdeenk