Skip to content

ignore dependency upgrade should be reverted #41

@kgryte

Description

@kgryte

Subject of the issue

In the 7.0.0 release, the ignore dependency was upgraded to version 5, a semver major upgrade, which changed how relative paths are ignored (see kaelzhang/node-ignore#20).

At L38 of the ignore.js file, you resolve a file path to a relative path. This causes ignore to throw an error because ignore does not accept relative paths.

For example, when running remark on a Markdown file, I encounter the following error:

RangeError: path should be a `path.relative()`d string, but got "../../path/to/file.md"

Your environment

  • OS: MacOS
  • Packages: unified-engine@7.0.0
  • Env: Node.js@12.9.1, npm@6.10.2

Steps to reproduce

Tell us how to reproduce this issue. Please provide a working and simplified example.

Run a command similar to the following (using remark and not unified-engine directly):

$ ./node_modules/.bin/remark --rc-path=./path/to/.remarkrc.js --ignore-path=./path/to/.remarkignore --no-ignore --no-config ./path/to/file.md

For the used .remarkignore file, see here.

Expected behaviour

No error should occur.

Actual behaviour

The following error is encountered:

RangeError: path should be a `path.relative()`d string, but got "../../path/to/file.md"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions