Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Commit

Permalink
Add missing test dependency and add explicit warning checks for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Feb 20, 2019
1 parent 5730320 commit 0975836
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 7 deletions.
9 changes: 4 additions & 5 deletions src/index.js
Expand Up @@ -29,7 +29,7 @@ function cachedIsFile (file, cb) {
.then(
stat => stat.isFile(),
err => {
if (err.code == 'ENOENT') return false;
if (err.code === 'ENOENT') return false;
delete isFileCache[file];
throw err;
});
Expand Down Expand Up @@ -93,7 +93,6 @@ export default function nodeResolve ( options = {} ) {
}
}


const parts = importee.split( /[/\\]/ );
let id = parts.shift();

Expand All @@ -118,9 +117,9 @@ export default function nodeResolve ( options = {} ) {
if (options.browser && typeof pkg[ 'browser' ] === 'object') {
packageBrowserField = Object.keys(pkg[ 'browser' ]).reduce((browser, key) => {
let resolved = pkg[ 'browser' ][ key ];
if (resolved && resolved[0] === '.') {
resolved = resolve( pkgRoot, pkg[ 'browser' ][ key ] );
}
if (resolved && resolved[0] === '.') {
resolved = resolve( pkgRoot, pkg[ 'browser' ][ key ] );
}
browser[ key ] = resolved;
if ( key[0] === '.' ) {
const absoluteKey = resolve( pkgRoot, key );
Expand Down
1 change: 1 addition & 0 deletions test/node_modules/component-type/index.js

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

3 changes: 3 additions & 0 deletions test/node_modules/component-type/package.json

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

0 comments on commit 0975836

Please sign in to comment.