Skip to content

Commit

Permalink
Stop re-exporting path-exists
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Jul 2, 2024
1 parent b733bb7 commit f118346
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 30 deletions.
5 changes: 0 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,3 @@ export function findUpSync(name, options = {}) {
const matches = findUpMultipleSync(name, {...options, limit: 1});
return matches[0];
}

export {
pathExists,
pathExistsSync,
} from 'path-exists';
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
],
"dependencies": {
"locate-path": "^7.2.0",
"path-exists": "^5.0.0",
"unicorn-magic": "^0.1.0"
},
"devDependencies": {
Expand Down
24 changes: 0 additions & 24 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import {
findUpMultiple,
findUpMultipleSync,
findUpStop,
pathExists,
pathExistsSync,
} from './index.js';

const __dirname = path.dirname(fileURLToPath(import.meta.url));
Expand Down Expand Up @@ -567,28 +565,6 @@ test('sync (matcher function stops early)', t => {
t.is(visited.size, 1);
});

test('async (check if path exists)', async t => {
if (!isWindows) {
t.true(await pathExists(absolute.directoryLink));
t.true(await pathExists(absolute.fileLink));
}

t.true(await pathExists(absolute.barDir));
t.true(await pathExists(absolute.packageJson));
t.false(await pathExists('fake'));
});

test('sync (check if path exists)', t => {
if (!isWindows) {
t.true(pathExistsSync(absolute.directoryLink));
t.true(pathExistsSync(absolute.fileLink));
}

t.true(pathExistsSync(absolute.barDir));
t.true(pathExistsSync(absolute.packageJson));
t.false(pathExistsSync('fake'));
});

test('async multiple (child file)', async t => {
const filePaths = await findUpMultiple(name.qux, {cwd: relative.barDir});

Expand Down

0 comments on commit f118346

Please sign in to comment.