Skip to content

Commit 685b841

Browse files
committed
More upgrade checklist info
1 parent dc3a127 commit 685b841

3 files changed

+34
-4
lines changed

src/packageTransformations.js

+18-3
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,23 @@ module.exports = {
7070
ifMet: [{ action: "installPackage", packageName: "elm/regex" }]
7171
}
7272
],
73-
"elm-lang/html": [{ action: "installPackage", packageName: "elm/html" }],
73+
"elm-lang/html": [
74+
{
75+
action: "installPackage",
76+
packageName: "elm/html",
77+
todos: [
78+
"If you used Html.program*, install elm/browser and switch to Browser.element or Browser.document",
79+
"If you used Html.beginnerProgram, install elm/browser and switch Browser.sandbox"
80+
]
81+
}
82+
],
7483
"elm-lang/http": [{ action: "installPackage", packageName: "elm/http" }],
7584
"elm-lang/navigation": [
7685
{
7786
action: "installPackage",
7887
packageName: "elm/browser",
7988
todos: [
80-
"Make sure to use Browser.application to create your program",
89+
"Change code using Navigation.program* to use Browser.application",
8190
"Use the Browser.Key passed to your init function in any calls to Browser.Navigation.pushUrl/replaceUrl/back/forward"
8291
]
8392
},
@@ -102,7 +111,13 @@ module.exports = {
102111
"evancz/elm-markdown": [
103112
{ action: "installPackage", packageName: "elm-explorations/markdown" }
104113
],
105-
"evancz/url-parser": [{ action: "installPackage", packageName: "elm/url" }],
114+
"evancz/url-parser": [
115+
{
116+
action: "installPackage",
117+
packageName: "elm/url",
118+
todos: ["Change code using UrlParser.* to use Url.Parser.*"]
119+
}
120+
],
106121
"mgold/elm-random-pcg": [
107122
{
108123
action: "installPackage",

tests/upgrade-application.t

+11-1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ Upgrading an application from Elm 0.18 to Elm 0.19
102102
- [ ] Changes uses of Json.Decode.Pipeline.decode to Json.Decode.succeed
103103
- elm/core
104104
- [ ] Replace uses of toString with String.fromInt, String.fromFloat, or Debug.toString as appropriate
105+
- elm/html
106+
- [ ] If you used Html.program*, install elm/browser and switch to Browser.element or Browser.document
107+
- [ ] If you used Html.beginnerProgram, install elm/browser and switch Browser.sandbox
108+
- elm/url
109+
- [ ] Change code using UrlParser.* to use Url.Parser.*
105110

106111

107112

@@ -118,7 +123,7 @@ The transformed project should look like:
118123
index e69de29..[0-9a-f]* 100644 (re)
119124
--- a/elm-upgrade-[-0-9.TZ]*\.log (re)
120125
\+\+\+ b/elm-upgrade-[-0-9.TZ]*\.log (re)
121-
@@ -0,0 +1,34 @@
126+
@@ -0,0 +1,39 @@
122127
\+INFO: Found elm at /.*/tests/bin_elm19/elm (re)
123128
+INFO: Found elm 0.19.0
124129
\+INFO: Found elm-format at /.*/tests/bin_elmformat/elm-format (re)
@@ -152,6 +157,11 @@ The transformed project should look like:
152157
+ - [ ] Changes uses of Json.Decode.Pipeline.decode to Json.Decode.succeed
153158
+- elm/core
154159
+ - [ ] Replace uses of toString with String.fromInt, String.fromFloat, or Debug.toString as appropriate
160+
+- elm/html
161+
+ - [ ] If you used Html.program*, install elm/browser and switch to Browser.element or Browser.document
162+
+ - [ ] If you used Html.beginnerProgram, install elm/browser and switch Browser.sandbox
163+
+- elm/url
164+
+ - [ ] Change code using UrlParser.* to use Url.Parser.*
155165
+
156166
diff --git a/elm.json b/elm.json
157167
index e69de29..[0-9a-f]* 100644 (re)

tests/upgrade-dependencies-not-upgraded-application.t

+5
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ When a dependency has not yet been upgraded:
108108
- [ ] Changes uses of Json.Decode.Pipeline.decode to Json.Decode.succeed
109109
- elm/core
110110
- [ ] Replace uses of toString with String.fromInt, String.fromFloat, or Debug.toString as appropriate
111+
- elm/html
112+
- [ ] If you used Html.program*, install elm/browser and switch to Browser.element or Browser.document
113+
- [ ] If you used Html.beginnerProgram, install elm/browser and switch Browser.sandbox
114+
- elm/url
115+
- [ ] Change code using UrlParser.* to use Url.Parser.*
111116

112117
$ git add -N .
113118
$ git status --short

0 commit comments

Comments
 (0)