Giter VIP home page Giter VIP logo

Comments (9)

samthor avatar samthor commented on June 23, 2024 1

Fixed here. We'll try to target the LTS release (currently 4.5) from now-on-in.

from closure-compiler-js.

MatrixFrog avatar MatrixFrog commented on June 23, 2024

The JS is created with GWT which I'm pretty sure only outputs ES5. Are you sure you're seeing a spread operator in the compiler?

from closure-compiler-js.

tquetano-r7 avatar tquetano-r7 commented on June 23, 2024

There error I'm seeing is a node failure:

  out.warnings = [...out.warnings];
                  ^^^

SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)

And checking compile.js in the node_modules folder, it's definitely there.

const jscomp = require('./jscomp.js');

module.exports = function(flags) {
  const clone = {};
  for (const k in flags) {
    clone[k] = flags[k];
  }
  const out = jscomp(clone);

  // hide weird GWT internals
  out.warnings = [...out.warnings];
  out.errors = [...out.errors];

  return out;
};

from closure-compiler-js.

tivac avatar tivac commented on June 23, 2024

@MatrixFrog

out.warnings = [...out.warnings];
out.errors = [...out.errors];

from closure-compiler-js.

MatrixFrog avatar MatrixFrog commented on June 23, 2024

Oh, gotcha. It's not in the gwt-compiled JS, but the small amount of hand-written JS. @samthor what do you think about taking out the ... until the LTS version of node supports it?

from closure-compiler-js.

samthor avatar samthor commented on June 23, 2024

We can do that. I think there may be other reasons we don't support LTS though. I'm not really up to speed on what it does or doesn't support - I'm surprised it seems to support const and let?

@tquetano-r7 can you send a PR? Otw I'll get to it soon.

from closure-compiler-js.

planttheidea avatar planttheidea commented on June 23, 2024

Sorry for the late response, appreciate you jumping on it so quickly!

from closure-compiler-js.

tquetano-r7 avatar tquetano-r7 commented on June 23, 2024

Appreciate you guys fixing this, but is there any chance it can be released? Fresh install of the NPM package still points to 20160822.

from closure-compiler-js.

samthor avatar samthor commented on June 23, 2024

I've published 20160822.0.1 which has the fix.

from closure-compiler-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.