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"
Subject of the issue
In the
7.0.0release, theignoredependency was upgraded to version5, a semver major upgrade, which changed how relative paths are ignored (see kaelzhang/node-ignore#20).At L38 of the
ignore.jsfile, you resolve a file path to a relative path. This causesignoreto throw an error becauseignoredoes not accept relative paths.For example, when running
remarkon a Markdown file, I encounter the following error:Your environment
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
remarkand notunified-enginedirectly):For the used
.remarkignorefile, see here.Expected behaviour
No error should occur.
Actual behaviour
The following error is encountered: