manage deprecated modules

This commit is contained in:
Brian Hicks 2020-10-30 10:31:43 -05:00
parent d4dfeea46b
commit 803b488efa
3 changed files with 20 additions and 4 deletions

View File

@ -58,6 +58,7 @@ main =
cmd (FileStdout out) "jq" "--indent" "4" ["{ root: \"../src\", tests: .[\"exposed-modules\"] }"] "elm.json"
"script/deprecated-imports.csv" %> \out -> do
getEnv "DEPRECATED_MODULES"
elmFiles <- getDirectoryFiles "." ["src/**/*.elm", "tests/**/*.elm"]
need (["elm.json", "script/deprecated-imports.py"] ++ elmFiles)
cmd_ "script/deprecated-imports.py" "--imports-file" out "update"
@ -99,10 +100,10 @@ main =
cmd (FileStdout out) "script/format-axe-report.sh" "log/axe-report.json"
"log/deprecated-imports-report.txt" %> \out -> do
getEnv "DEPRECATED_MODULES"
elmFiles <- getDirectoryFiles "." ["src/**/*.elm", "tests/**/*.elm"]
need (["elm.json", "script/deprecated-imports.py"] ++ elmFiles)
-- still need to do something when this fails (e.g. run "check" instead of "report")
cmd (FileStdout out) "script/deprecated-imports.py" "report"
cmd (FileStdout out) "script/deprecated-imports.py" "check"
"log/check-exposed.txt" %> \out -> do
elmFiles <- getDirectoryFiles "." ["src/**/*.elm"]

View File

@ -1,8 +1,19 @@
filename,name,version
src/Nri/Ui/ClickableSvg/V1.elm,Nri.Ui.Tooltip,1
src/Nri/Ui/Menu/V1.elm,Nri.Ui.Tooltip,1
src/Nri/Ui/Modal/V3.elm,Nri.Ui.Icon,3
src/Nri/Ui/Page/V3.elm,Nri.Ui.Text,2
src/Nri/Ui/SlideModal/V2.elm,Nri.Ui.Button,8
src/Nri/Ui/SlideModal/V2.elm,Nri.Ui.Text,2
src/Nri/Ui/Button/V8.elm,Html,DEPRECATED
src/Nri/Ui/Menu/V1.elm,Nri.Ui.Tooltip,1
src/Nri/Ui/Icon/V3.elm,Accessibility.Role,DEPRECATED
src/Nri/Ui/Icon/V3.elm,Html,DEPRECATED
src/Nri/Ui/Icon/V5.elm,Accessibility.Role,DEPRECATED
src/Nri/Ui/Icon/V5.elm,Html,DEPRECATED
src/Nri/Ui/Icon/V4.elm,Accessibility.Role,DEPRECATED
src/Nri/Ui/Icon/V4.elm,Html,DEPRECATED
src/Nri/Ui/Modal/V3.elm,Nri.Ui.Icon,3
tests/Spec/Nri/Ui/Tooltip.elm,Accessibility.Aria,DEPRECATED
tests/Spec/Nri/Ui/Tooltip.elm,Accessibility.Widget,DEPRECATED
tests/Spec/Nri/Ui/Tooltip.elm,Html,DEPRECATED
tests/Spec/Nri/Ui/Select.elm,Html,DEPRECATED
tests/Spec/Nri/Ui/Select.elm,Nri.Ui.Select,5

1 filename name version
2 src/Nri/Ui/ClickableSvg/V1.elm Nri.Ui.Tooltip 1
src/Nri/Ui/Menu/V1.elm Nri.Ui.Tooltip 1
src/Nri/Ui/Modal/V3.elm Nri.Ui.Icon 3
3 src/Nri/Ui/Page/V3.elm Nri.Ui.Text 2
4 src/Nri/Ui/SlideModal/V2.elm Nri.Ui.Button 8
5 src/Nri/Ui/SlideModal/V2.elm Nri.Ui.Text 2
6 src/Nri/Ui/Button/V8.elm Html DEPRECATED
7 src/Nri/Ui/Menu/V1.elm Nri.Ui.Tooltip 1
8 src/Nri/Ui/Icon/V3.elm Accessibility.Role DEPRECATED
9 src/Nri/Ui/Icon/V3.elm Html DEPRECATED
10 src/Nri/Ui/Icon/V5.elm Accessibility.Role DEPRECATED
11 src/Nri/Ui/Icon/V5.elm Html DEPRECATED
12 src/Nri/Ui/Icon/V4.elm Accessibility.Role DEPRECATED
13 src/Nri/Ui/Icon/V4.elm Html DEPRECATED
14 src/Nri/Ui/Modal/V3.elm Nri.Ui.Icon 3
15 tests/Spec/Nri/Ui/Tooltip.elm Accessibility.Aria DEPRECATED
16 tests/Spec/Nri/Ui/Tooltip.elm Accessibility.Widget DEPRECATED
17 tests/Spec/Nri/Ui/Tooltip.elm Html DEPRECATED
18 tests/Spec/Nri/Ui/Select.elm Html DEPRECATED
19 tests/Spec/Nri/Ui/Select.elm Nri.Ui.Select 5

View File

@ -32,4 +32,8 @@ stdenv.mkDerivation {
# stuff we need for running builds in a `nix-shell --pure` environment.
which
] ++ lib.optionals stdenv.isLinux [ pkgs.fsatrace pkgs.strace pkgs.cacert ];
# environment variables
DEPRECATED_MODULES =
"Html,Accessibility,Accessibility.Aria,Accessibility.Key,Accessibility.Landmark,Accessibility.Live,Accessibility.Role,Accessibility.Style,Accessibility.Widget";
}