diff --git a/Project.toml b/Project.toml index eb4806a..b43e571 100644 --- a/Project.toml +++ b/Project.toml @@ -18,6 +18,7 @@ JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Pluto = "c3e4b0f8-55cb-11ea-2926-15256bba5781" +PlutoDependencyExplorer = "72656b73-756c-7461-726b-72656b6b696b" SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce" Sockets = "6462fe0b-24de-5631-8697-dd941f90decc" TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" @@ -38,7 +39,8 @@ HTTP = "^1.0.2" JSON = "0.21" Logging = "1" Pkg = "1" -Pluto = "0.19.18" +Pluto = "0.19.39" +PlutoDependencyExplorer = "1" SHA = "0.7, 1" Sockets = "1" TOML = "1" diff --git a/src/MoreAnalysis.jl b/src/MoreAnalysis.jl index 48762de..2a211bf 100644 --- a/src/MoreAnalysis.jl +++ b/src/MoreAnalysis.jl @@ -1,5 +1,6 @@ import Pluto import Pluto: Cell, Notebook, NotebookTopology, ExpressionExplorer, ServerSession +import PlutoDependencyExplorer "Return the given cells, and all cells that depend on them (recursively)." @@ -20,7 +21,7 @@ function downstream_recursive!( from::Vector{Cell}, ) for cell in from - one_down = Pluto.where_referenced(notebook, topology, cell) + one_down = PlutoDependencyExplorer.where_referenced(topology, cell) for next in one_down if next ∉ found push!(found, next) @@ -52,7 +53,7 @@ function upstream_recursive!( ) for cell in from references = topology.nodes[cell].references - for upstream in Pluto.where_assigned(notebook, topology, references) + for upstream in PlutoDependencyExplorer.where_assigned(topology, references) if upstream ∉ found push!(found, upstream) upstream_recursive!(found, notebook, topology, Cell[upstream])