forked from OctoLinker/OctoLinker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for .NET Framework packages.config (OctoLinker#367)
- Loading branch information
1 parent
02c0d06
commit 8b25456
Showing
7 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import nugetResolver from '../resolver/nuget'; | ||
import { NET_PACKAGE } from '../../packages/helper-grammar-regex-collection/index.js'; | ||
|
||
export default { | ||
name: 'DotNet', | ||
|
||
resolve({ target }) { | ||
return nugetResolver({ target }); | ||
}, | ||
|
||
getPattern() { | ||
return { | ||
pathPatterns: ['/packages.config$'], | ||
githubClasses: [], | ||
}; | ||
}, | ||
|
||
getLinkRegexes() { | ||
return NET_PACKAGE; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default function ({ target }) { | ||
return [ | ||
`https://www.nuget.org/packages/${target}`, | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import assert from 'assert'; | ||
import dotNet from '../../lib/plugins/dot-net'; | ||
|
||
describe('dotNet', () => { | ||
it('resolves EntityFramework to https://www.nuget.org/packages/EntityFramework', () => { | ||
assert.deepEqual( | ||
dotNet.resolve({ target: 'EntityFramework' }), | ||
['https://www.nuget.org/packages/EntityFramework'], | ||
); | ||
}); | ||
|
||
it('resolves Stanford.NLP.CoreNLP to https://www.nuget.org/packages/Stanford.NLP.CoreNLP', () => { | ||
assert.deepEqual( | ||
dotNet.resolve({ target: 'Stanford.NLP.CoreNLP' }), | ||
['https://www.nuget.org/packages/Stanford.NLP.CoreNLP'], | ||
); | ||
}); | ||
}); |