@@ -13,6 +13,7 @@ END SNAPSHOT"
13
13
exports [` Test apply-multiple-patches: 01: patch-package stores a state file to list the patches that have been applied 1` ] = `
14
14
"SNAPSHOT: patch-package stores a state file to list the patches that have been applied
15
15
{
16
+ \\" isRebasing\\ " : false ,
16
17
\\" patches\\ " : [
17
18
{
18
19
\\" didApply\\ " : true ,
@@ -30,62 +31,80 @@ exports[`Test apply-multiple-patches: 01: patch-package stores a state file to l
30
31
\\" patchFilename\\ " : \\" left-pad+1.3.0+004+goodbye.patch\\ "
31
32
}
32
33
],
33
- \\" version\\ " : 0
34
+ \\" version\\ " : 1
34
35
} END SNAPSHOT"
35
36
` ;
36
37
37
- exports [` Test apply-multiple-patches: 02: patch-package only applies the first patch if the second of three is invalid 1` ] = `
38
+ exports [` Test apply-multiple-patches: 02: patch-package fails when a patch in the sequence is invalid 1` ] = `
39
+ "SNAPSHOT: patch-package fails when a patch in the sequence is invalid
40
+ patch-package 0.0.0
41
+ Applying patches...
42
+
43
+
44
+ ⛔ ERROR
45
+
46
+ Failed to apply patch file left-pad+1.3.0+002+broken.patch.
47
+
48
+ If this patch file is no longer useful, delete it and run
49
+
50
+ patch-package
51
+
52
+ Otherwise you should open node_modules/left-pad, manually apply the changes from the patch file, and run
53
+
54
+ patch-package left-pad
55
+
56
+ to update the patch file.
57
+
58
+ END SNAPSHOT"
59
+ ` ;
60
+
61
+ exports [` Test apply-multiple-patches: 03: patch-package only applies the first patch if the second of three is invalid 1` ] = `
38
62
"SNAPSHOT: patch-package only applies the first patch if the second of three is invalid
39
63
patch-package 0.0.0
40
64
Applying patches...
41
65
66
+
67
+ ⛔ ERROR
68
+
69
+ Failed to apply patch file left-pad+1.3.0+002+broken.patch.
70
+
71
+ If this patch file is no longer useful, delete it and run
72
+
73
+ patch-package
74
+
75
+ Otherwise you should open node_modules/left-pad, manually apply the changes from the patch file, and run
76
+
77
+ patch-package left-pad
78
+
79
+ to update the patch file.
80
+
42
81
END SNAPSHOT"
43
82
` ;
44
83
45
- exports [` Test apply-multiple-patches: 03 : patch-package stores a state file of only the first patch if there was an error 1` ] = `
84
+ exports [` Test apply-multiple-patches: 04 : patch-package stores a state file of only the first patch if there was an error 1` ] = `
46
85
"SNAPSHOT: patch-package stores a state file of only the first patch if there was an error
47
86
{
87
+ \\" isRebasing\\ " : true ,
48
88
\\" patches\\ " : [
49
89
{
50
90
\\" didApply\\ " : true ,
51
91
\\" patchContentHash\\ " : \\" 404c604ed830db6a0605f86cb9165ced136848f70986b23bf877bcf38968c1c9\\ " ,
52
92
\\" patchFilename\\ " : \\" left-pad+1.3.0+001+hello.patch\\ "
93
+ },
94
+ {
95
+ \\" didApply\\ " : false ,
96
+ \\" patchContentHash\\ " : \\" 9c5c141e2578b4178fd57dd7726488c2f7eab32e23a7848701da29dcb371b9f2\\ " ,
97
+ \\" patchFilename\\ " : \\" left-pad+1.3.0+002+broken.patch\\ "
53
98
}
54
99
],
55
- \\" version\\ " : 0
100
+ \\" version\\ " : 1
56
101
} END SNAPSHOT"
57
102
` ;
58
103
59
- exports [` Test apply-multiple-patches: 04: patch-package fails when a patch in the sequence is invalid 1` ] = `
60
- "SNAPSHOT: patch-package fails when a patch in the sequence is invalid
61
-
62
- **ERROR** Failed to apply patch for package left-pad at path
63
-
64
- node_modules/left-pad
65
-
66
- This error was caused because patch-package cannot apply the following patch file:
67
-
68
- patches/left-pad+1.3.0+002+broken.patch
69
-
70
- Try removing node_modules and trying again. If that doesn't work, maybe there was
71
- an accidental change made to the patch file? Try recreating it by manually
72
- editing the appropriate files and running:
73
-
74
- patch-package left-pad
75
-
76
- If that doesn't work, then it's a bug in patch-package, so please submit a bug
77
- report. Thanks!
78
-
79
- https://github.com/ds300/patch-package/issues
80
-
81
-
82
- ---
83
- patch-package finished with 1 error(s).
84
- END SNAPSHOT"
85
- ` ;
86
-
87
104
exports [` Test apply-multiple-patches: 05: patch-package fails when a patch file is removed 1` ] = `
88
105
"SNAPSHOT: patch-package fails when a patch file is removed
106
+ patch-package 0.0.0
107
+ Applying patches...
89
108
Error: The patches for left-pad have changed. You should reinstall your node_modules folder to make sure the package is up to date
90
109
END SNAPSHOT"
91
110
` ;
0 commit comments