pugjs/pug-parser

NPM is outdated

Closed this issue · 1 comments

Currently, the NPM package uses "const" twice in in the source. This has been fixed in the repo, but has not been updated on the package. It is causing Travis CI tests to fail on old versions of Node.

NPM Package:

388  parseBlockExpansion: function(){
389    var tok = this.accept(':');
390    if (tok) {
391      const expr = this.parseExpr();
392      return expr.type === 'Block' ? expr : this.initBlock(tok.line, [expr]);

corresponding to
Repo:

382  parseBlockExpansion: function(){
383    var tok = this.accept(':');
384    if (tok) {
385      return this.initBlock(tok.line, [this.parseExpr()]);

and one other removed instance.
NPM Package:

1056      case ':':
1057        this.advance();
1058        const expr = this.parseExpr();
1059        tag.block = expr.type === 'Block' ? expr : this.initBlock(tag.line, [expr]);
1060        break;

This package has moved to the monorepo at https://github.com/pugjs/pug it would need to be fixed there.