Skip to content

Commit

Permalink
Remove path.sep based on fast-glob 3.0.0 changes. (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
tclindner authored Nov 10, 2019
1 parent f026d1b commit 279c63f
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 370 deletions.
366 changes: 1 addition & 365 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "npm-package-json-lint",
"version": "4.0.4",
"version": "4.0.5",
"description": "Configurable linter for package.json files.",
"keywords": [
"lint",
Expand Down
2 changes: 1 addition & 1 deletion src/config/applyOverrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const applyOverrides = (cwd, filePath, rules, overrides) => {
overrides.forEach(override => {
const filteredPatterns = override.patterns.filter(pattern => pattern.length);
const transformedPatterns = filteredPatterns.map(pattern => {
return pattern.endsWith(`${path.sep}package.json`) ? pattern : `${pattern}${path.sep}package.json`;
return pattern.endsWith(`/package.json`) ? pattern : `${pattern}/package.json`;
});

const globFiles = globby.sync(transformedPatterns, {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/getFileList.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const getFileList = (patterns, cwd) => {

// step 2 - convert directories to globs
const globPatterns = filteredPatterns.map(pattern => {
return pattern.endsWith(`${path.sep}package.json`) ? pattern : `${pattern}${path.sep}**${path.sep}package.json`;
return pattern.endsWith(`/package.json`) ? pattern : `${pattern}/**/package.json`;
});

debug('globPatterns');
Expand Down
1 change: 0 additions & 1 deletion test/unit/utils/getIgnorer.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const fs = require('fs');
const path = require('path');
const ignore = require('ignore');
const getIgnorer = require('../../../src/utils/getIgnorer');

Expand Down
1 change: 1 addition & 0 deletions website/versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
"4.0.5",
"4.0.4",
"4.0.0",
"3.7.0"
Expand Down

0 comments on commit 279c63f

Please sign in to comment.