Skip to content

Commit 6d5e6be

Browse files
authored
Resolved an issue in the CLIEngine where the file path separator was incompatible with Windows path separators (#92)
Fixes #91
1 parent ca25109 commit 6d5e6be

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
### Removed
1313

14+
## [3.3.1] - 2018-08-23
15+
### Fixed
16+
- Resolved an issue in the CLIEngine where the file path separator was incompatible with Windows path separators. Addresses [#91](https://github.com/tclindner/npm-package-json-lint/issues/91) from @aduth.
17+
1418
## [3.3.0] - 2018-08-03
1519
### Added
1620
- New rule: [description-format](https://github.com/tclindner/npm-package-json-lint/wiki/description-format). Addresses [#89](https://github.com/tclindner/npm-package-json-lint/issues/89) from @ntwb.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "npm-package-json-lint",
3-
"version": "3.3.0",
3+
"version": "3.3.1",
44
"description": "Configurable linter for package.json files.",
55
"keywords": [
66
"lint",

src/CLIEngine.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ const getFileList = function(patterns, options) {
178178
const fileStats = fs.statSync(resolvedPath);
179179

180180
if (fileStats.isFile()) {
181-
if (resolvedPath.endsWith('/package.json')) {
181+
if (resolvedPath.endsWith(`${path.sep}package.json`)) {
182182
newPath = resolvedPath;
183183
} else {
184184
throw new Error(`Pattern, ${pattern}, is a file, but isn't a package.json file.`);

0 commit comments

Comments
 (0)