Skip to content

Commit fd2a638

Browse files
committed
feat: improve error message
1 parent f5ec64d commit fd2a638

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ internals.createPackageLoader = async (packageName) => {
4545
const result = await repositoryLoader.loadFile(filename, options);
4646

4747
if (filename === 'package.json' && result.name !== packageName) {
48-
throw new Error(`${repository} does not contain ${packageName}`);
48+
throw new Error(`${repository} does not contain ${packageName}. Monorepo not supported: https://github.com/pkgjs/detect-node-support/issues/6`);
4949
}
5050

5151
return result;

test/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ describe('detect-node-support', () => {
762762
.reply(200, Fs.readFileSync(Path.join(__dirname, '..', 'package.json')));
763763

764764
await expect(NodeSupport.detect({ packageName: 'detect-node-support' }))
765-
.to.reject('git+https://github.com/pkgjs/detect-node-support.git does not contain detect-node-support');
765+
.to.reject('git+https://github.com/pkgjs/detect-node-support.git does not contain detect-node-support. Monorepo not supported: https://github.com/pkgjs/detect-node-support/issues/6');
766766
});
767767
});
768768

0 commit comments

Comments
 (0)