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

Remove path.sep based on fast-glob v3.0.0 changes. #157

Merged
merged 1 commit into from
Nov 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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