Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Eslint & drop nodejs 6 #61

Merged
merged 6 commits into from Jul 28, 2019
Merged

Bump Eslint & drop nodejs 6 #61

merged 6 commits into from Jul 28, 2019

Conversation

tomap
Copy link
Contributor

@tomap tomap commented Jun 25, 2019

Last version of eslint does not support nodejs 6

dependabot-preview bot and others added 2 commits June 25, 2019 05:30
Updates the requirements on [eslint](https://github.com/eslint/eslint) to permit the latest version.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](eslint/eslint@v5.9.0...v6.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
@tomap
Copy link
Contributor Author

tomap commented Jun 25, 2019

To be able to complete #60
Related to hexojs/hexo#3508

@segayuu segayuu added this to the v0.7.0 milestone Jul 3, 2019
@curbengh curbengh mentioned this pull request Jul 21, 2019
@curbengh curbengh closed this Jul 21, 2019
@curbengh curbengh reopened this Jul 21, 2019
@curbengh
Copy link
Contributor

Is there any prerequisite? I can't test it locally,

$ npm test
hexo-util/highlight_alias.json: Unexpected end of JSON input

For the Node 12 issue, try

  it('str must be a string', () => {
    const errorCallback = sinon.spy(err => {
      err.should.have.property('message', 'str must be a string!');
    });

    try {
      highlight();
    } catch (err) {
      errorCallback(err);
    }

    errorCallback.calledOnce.should.be.true;
  });

@tomap
Copy link
Contributor Author

tomap commented Jul 28, 2019

The two failing tests are those ones:

it('verbose - stdout', () => {
    const spawn = rewire('../../lib/spawn');
    const stdoutCache = new CacheStream();
    const stderrCache = new CacheStream();
    const content = 'something';

    spawn.__set__('process', {
      stdout: stdoutCache,
      stderr: stderrCache
    });

    return spawn('echo', [content], {
      verbose: true
    }).then(() => {
      stdoutCache.getCache().toString('utf8').trim().should.eql(content);
    });
  });

  it('verbose - stderr', () => {
    const spawn = rewire('../../lib/spawn');
    const stdoutCache = new CacheStream();
    const stderrCache = new CacheStream();

    spawn.__set__('process', {
      stdout: stdoutCache,
      stderr: stderrCache
    });

    return spawn('cat', ['nothing'], {
      verbose: true
    }).catch(() => {
      stderrCache.getCache().toString('utf8').trim().should
        .eql('cat: nothing: No such file or directory');
    });
  });

@tomap
Copy link
Contributor Author

tomap commented Jul 28, 2019

Fixed using the comments in this issue:
jhnns/rewire#167

@curbengh curbengh merged commit 3d9e404 into hexojs:master Jul 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants