-
-
Notifications
You must be signed in to change notification settings - Fork 277
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 Paket * Rename regexes and add unit tests * Filter based on regex * Add tests for paket.local files * Fix file location * Add some space for easier reading * Use main instead of master
- Loading branch information
Showing
12 changed files
with
199 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,9 @@ root = true | |
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.js] | ||
end_of_line = lf | ||
|
||
[*.json] | ||
indent_size = 2 | ||
|
||
|
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,16 @@ | ||
source https://nuget.org/api/v2 | ||
content: none | ||
|
||
# @OctoLinkerResolve(https://www.nuget.org/packages/FSharp.Core) | ||
nuget FSharp.Core > 4.3 lowest_matching: true, redirects: force | ||
|
||
# @OctoLinkerResolve(https://www.nuget.org/packages/Chessie) | ||
nuget Chessie >= 0.6 | ||
|
||
group Build | ||
framework: net46 | ||
# @OctoLinkerResolve(https://github.com/fsharp/FAKE/blob/master/modules/Octokit/Octokit.fsx) | ||
github fsharp/FAKE modules/Octokit/Octokit.fsx | ||
|
||
# @OctoLinkerResolve(https://github.com/fable-compiler/fake-helpers/blob/fake_legacy/Fable.FakeHelpers.fs) | ||
github fable-compiler/fake-helpers:fake_legacy Fable.FakeHelpers.fs |
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,11 @@ | ||
# @OctoLinkerResolve(https://www.nuget.org/packages/NUnit) | ||
nuget NUnit -> source ./local_source | ||
|
||
# @OctoLinkerResolve(https://www.nuget.org/packages/Microsoft.EntityFrameworkCore) | ||
nuget Microsoft.EntityFrameworkCore -> source ./local_source | ||
|
||
# @OctoLinkerResolve(https://www.nuget.org/packages/NUnit) | ||
nuget NUnit 3.12.0 -> source ./local_source | ||
|
||
# @OctoLinkerResolve(https://www.nuget.org/packages/Microsoft.EntityFrameworkCore) | ||
nuget Microsoft.EntityFrameworkCore 5.0.0-rc.1.20451.13-> source ./local_source |
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 @@ | ||
# @OctoLinkerResolve(https://www.nuget.org/packages/FSharp.Core) | ||
FSharp.Core | ||
|
||
# @OctoLinkerResolve(https://www.nuget.org/packages/Chessie) | ||
Chessie |
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
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,48 @@ | ||
import { | ||
PAKET_DEPENDENCIES_NUGET, | ||
PAKET_DEPENDENCIES_GITHUB, | ||
} from '@octolinker/helper-grammar-regex-collection'; | ||
import nugetResolver from '@octolinker/resolver-nuget'; | ||
|
||
function githubPaths({ target, hash, filePath }) { | ||
const urls = []; | ||
|
||
if (filePath) { | ||
if (hash) { | ||
urls.push(`https://github.com/${target}/blob/${hash}/${filePath}`); | ||
} | ||
|
||
urls.push(`https://github.com/${target}/blob/master/${filePath}`); | ||
} | ||
|
||
if (hash) { | ||
urls.push(`https://github.com/${target}/tree/${hash}`); | ||
} | ||
|
||
urls.push(`https://github.com/${target}`); | ||
|
||
return urls; | ||
} | ||
|
||
export default { | ||
name: 'DotNetPaketDependencies', | ||
|
||
resolve(_path, [target, hash, filePath], _meta, regExp) { | ||
if (regExp === PAKET_DEPENDENCIES_GITHUB) { | ||
return githubPaths({ target, hash, filePath }); | ||
} | ||
|
||
return nugetResolver({ target }); | ||
}, | ||
|
||
getPattern() { | ||
return { | ||
pathRegexes: [/paket\.dependencies$/, /paket\.local$/], | ||
githubClasses: [], | ||
}; | ||
}, | ||
|
||
getLinkRegexes() { | ||
return [PAKET_DEPENDENCIES_NUGET, PAKET_DEPENDENCIES_GITHUB]; | ||
}, | ||
}; |
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,12 @@ | ||
{ | ||
"name": "@octolinker/plugin-dotnet-paket-dependencies", | ||
"version": "1.0.0", | ||
"description": "", | ||
"repository": "https://github.com/octolinker/octolinker/tree/main/packages/plugin-dotnet-paket-dependencies", | ||
"license": "MIT", | ||
"main": "./index.js", | ||
"dependencies": { | ||
"@octolinker/helper-grammar-regex-collection": "1.0.0", | ||
"@octolinker/resolver-nuget": "1.0.0" | ||
} | ||
} |
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 { PAKET_REFERENCES } from '@octolinker/helper-grammar-regex-collection'; | ||
import nugetResolver from '@octolinker/resolver-nuget'; | ||
|
||
export default { | ||
name: 'DotNetPaketReferences', | ||
|
||
resolve(_path, [target]) { | ||
return nugetResolver({ target }); | ||
}, | ||
|
||
getPattern() { | ||
return { | ||
pathRegexes: [/paket\.references$/], | ||
githubClasses: [], | ||
}; | ||
}, | ||
|
||
getLinkRegexes() { | ||
return [PAKET_REFERENCES]; | ||
}, | ||
}; |
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,12 @@ | ||
{ | ||
"name": "@octolinker/plugin-dotnet-paket-references", | ||
"version": "1.0.0", | ||
"description": "", | ||
"repository": "https://github.com/octolinker/octolinker/tree/main/packages/plugin-dotnet-paket-references", | ||
"license": "MIT", | ||
"main": "./index.js", | ||
"dependencies": { | ||
"@octolinker/helper-grammar-regex-collection": "1.0.0", | ||
"@octolinker/resolver-nuget": "1.0.0" | ||
} | ||
} |