[persisted scope] fix: handle recursive directory correctly (#455)

* fix: use correct functions to allow/forbid
Without changing the data structure

* fix: wrong type passed when passing path by ref

* fix: remove '**' before allowing pattern to no trash the scope

* fmt: run fmt

* fix: Remove trailling '*' for non-recursive directories

* fix: remove superfluous asteriks recursively

* info: add changefile

* fix: remove unwated yarn.lock

* fix: simplify directories' fix and apply it to forbid_path too.

* fix: simplify path to str in fix_directory

* don't convert path back to str

* Update persisted-scope-fix-handle-glob-directories.md

---------

Co-authored-by: FabianLars <fabianlars@fabianlars.de>
This commit is contained in:
Thibault
2023-06-29 23:23:08 +02:00
committed by GitHub
parent a305ad3ddb
commit 9174b808dc
2 changed files with 81 additions and 7 deletions
@@ -0,0 +1,7 @@
---
"persisted-scope": patch
---
Fix usage of directory patterns by removing glob asterisks at the end before allowing/forbidding them.
This was causing them to be escaped, and so undesirable paths were allowed/forbidden while polluting the `.persisted_scope` file.