Skip to content

Commit 6723adf

Browse files
authored
Merge pull request #65 from rofinn/rf/extensions
Requires.jl -> pkg extensions, dropping pre-1.9 Julia versions
2 parents 648fe7f + 79d6ef7 commit 6723adf

6 files changed

Lines changed: 37 additions & 31 deletions

File tree

.github/workflows/CI.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI
22
# Run on master, tags, or any pull request
33
on:
44
schedule:
5-
- cron: '0 1 * * *' # Daily at 1 AM UTC (7 PM CST)
5+
- cron: "0 1 * * *" # Daily at 1 AM UTC (7 PM CST)
66
push:
77
branches: [master]
88
tags: ["*"]
@@ -24,30 +24,21 @@ jobs:
2424
arch:
2525
- x64
2626
include:
27-
# Add a 1.0 job just to make sure we still support it
27+
# Add a 1.9 job just to make sure we still support it
2828
- os: ubuntu-latest
29-
version: 1.0.5
29+
version: 1.9
3030
arch: x64
3131
# Add a 32-bit job to ensure we don't have any 64-bit specific logic
3232
- os: ubuntu-latest
3333
version: 1
3434
arch: x86
3535
steps:
36-
- uses: actions/checkout@v2
37-
- uses: julia-actions/setup-julia@v1
36+
- uses: actions/checkout@v4
37+
- uses: julia-actions/setup-julia@latest
3838
with:
3939
version: ${{ matrix.version }}
4040
arch: ${{ matrix.arch }}
41-
- uses: actions/cache@v1
42-
env:
43-
cache-name: cache-artifacts
44-
with:
45-
path: ~/.julia/artifacts
46-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
47-
restore-keys: |
48-
${{ runner.os }}-test-${{ env.cache-name }}-
49-
${{ runner.os }}-test-
50-
${{ runner.os }}-
41+
- uses: julia-actions/cache@v2
5142
- uses: julia-actions/julia-buildpkg@latest
5243
- run: |
5344
git config --global user.name Tester

Project.toml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
11
name = "FilePaths"
22
uuid = "8fc22ac5-c921-52a6-82fd-178b2807b824"
33
authors = ["Rory Finnegan"]
4-
version = "0.8.3"
4+
version = "0.9.0"
55

66
[deps]
77
FilePathsBase = "48062228-2e41-5def-b9a4-89aafe57970f"
88
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
99
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
10-
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
10+
11+
[weakdeps]
12+
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c"
13+
URIParser = "30578b45-9adc-5946-b283-645ec420af67"
14+
URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
15+
16+
[extensions]
17+
FilePathsGlobExt = "Glob"
18+
FilePathsURIParserExt = "URIParser"
19+
FilePathsURIsExt = "URIs"
1120

1221
[compat]
1322
FilePathsBase = "0.9"
1423
Glob = "1"
1524
MacroTools = "0.5"
1625
Reexport = "0.2, 1.0"
17-
Requires = "1"
1826
URIParser = "0.4"
1927
URIs = "1.1"
20-
julia = "1"
28+
julia = "1.9"
2129

2230
[extras]
2331
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c"
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
using .Glob
2-
using .Glob: GlobMatch
1+
module FilePathsGlobExt
2+
3+
using Glob
4+
using Glob: GlobMatch
5+
using FilePaths
36

47
Base.readdir(pattern::GlobMatch, prefix::AbstractPath) = glob(pattern, prefix)
58

69
function Glob.glob(pattern, prefix::T) where T<:AbstractPath
710
return [parse(T, m) for m in glob(pattern, string(prefix))]
811
end
12+
13+
end
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
using .URIParser
1+
module FilePathsURIParserExt
2+
3+
using URIParser
4+
using FilePaths
25

36
function URIParser.URI(p::AbstractPath; query="", fragment="")
4-
Base.depwarn("`URIParser` is deprecated, use `URIs` instead.", :URIParser)
57
if isempty(p.root)
68
throw(ArgumentError("$p is not an absolute path"))
79
end
@@ -21,3 +23,5 @@ function URIParser.URI(p::AbstractPath; query="", fragment="")
2123

2224
return URIParser.URI(URIParser.URI(String(take!(b))); query=query, fragment=fragment)
2325
end
26+
27+
end

src/uris.jl renamed to ext/FilePathsURIsExt.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using .URIs
1+
module FilePathsURIsExt
2+
3+
using URIs
4+
using FilePaths
25

36
const absent = SubString("absent", 1, 0)
47

@@ -22,3 +25,5 @@ function URIs.URI(p::AbstractPath; query=absent, fragment=absent)
2225

2326
return URIs.URI(URIs.URI(String(take!(b))); query=query, fragment=fragment)
2427
end
28+
29+
end

src/FilePaths.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,9 @@ module FilePaths
22

33
using MacroTools
44
using Reexport
5-
using Requires
65

76
@reexport using FilePathsBase
87

98
include("compat.jl")
109

11-
function __init__()
12-
@require Glob="c27321d9-0574-5035-807b-f59d2c89b15c" include("glob.jl")
13-
@require URIParser="30578b45-9adc-5946-b283-645ec420af67" include("uriparser.jl")
14-
@require URIs="5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" include("uris.jl")
15-
end
16-
1710
end # end of module

0 commit comments

Comments
 (0)