File tree Expand file tree Collapse file tree 5 files changed +26
-5
lines changed Expand file tree Collapse file tree 5 files changed +26
-5
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @primer/css " : patch
3
+ ---
4
+
5
+ Removing the duplicate deprecation backgrounds
Original file line number Diff line number Diff line change 2
2
getCurrentVersion ,
3
3
getPackageStats ,
4
4
getSelectorDiff ,
5
- getVariableDiff
5
+ getVariableDiff ,
6
+ currentVersionDeprecations
6
7
} from './utils/css'
7
8
import semver from 'semver'
8
9
@@ -20,3 +21,13 @@ describe('css', () => {
20
21
expect ( supportStats . size ) . toEqual ( 0 )
21
22
} )
22
23
} )
24
+
25
+ describe ( 'deprecations' , ( ) => {
26
+ it ( 'expects deprecations and their replacement to not be equal.' , ( ) => {
27
+ const deprecations = currentVersionDeprecations ( )
28
+ Object . keys ( deprecations [ "selectors" ] ) . forEach ( deprecation => {
29
+ const replacement = deprecations [ "selectors" ] [ deprecation ]
30
+ expect ( deprecation ) . not . toEqual ( replacement )
31
+ } )
32
+ } )
33
+ } )
Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ export function getPackageStats(packageName) {
38
38
return stats
39
39
}
40
40
41
+ function getDeprecations ( versionPath ) {
42
+ const deprecations = JSON . parse ( fs . readFileSync ( join ( versionPath , './deprecations.json' ) ) )
43
+ return deprecations
44
+ }
45
+
41
46
function currentVersionSelectors ( ) {
42
47
return getSelectors ( join ( currentPath , './dist' ) )
43
48
}
@@ -46,6 +51,10 @@ function currentVersionVariables() {
46
51
return getVariables ( join ( currentPath , './dist' ) )
47
52
}
48
53
54
+ export function currentVersionDeprecations ( ) {
55
+ return getDeprecations ( join ( currentPath , './dist' ) )
56
+ }
57
+
49
58
function lastVersionSelectors ( ) {
50
59
return getSelectors ( join ( lastPath , './dist' ) )
51
60
}
Original file line number Diff line number Diff line change @@ -64,9 +64,7 @@ See [color utility classes](/utilities/colors) for a list of all the functional
64
64
| ` .color-bg-tertiary ` | ` .color-bg-subtle ` |
65
65
| ` .color-bg-info ` | ` .color-bg-accent ` |
66
66
| ` .color-bg-info-inverse ` | ` .color-bg-accent-emphasis ` |
67
- | ` .color-bg-danger ` | ` .color-bg-danger ` |
68
67
| ` .color-bg-danger-inverse ` | ` .color-bg-danger-emphasis ` |
69
- | ` .color-bg-success ` | ` .color-bg-success ` |
70
68
| ` .color-bg-success-inverse ` | ` .color-bg-success-emphasis ` |
71
69
| ` .color-bg-warning ` | ` .color-bg-attention ` |
72
70
| ` .color-bg-warning-inverse ` | ` .color-bg-attention-emphasis ` |
Original file line number Diff line number Diff line change 30
30
"color-bg-tertiary" : " color-bg-subtle" ,
31
31
"color-bg-info" : " color-bg-accent" ,
32
32
"color-bg-info-inverse" : " color-bg-accent-emphasis" ,
33
- "color-bg-danger" : " color-bg-danger" ,
34
33
"color-bg-danger-inverse" : " color-bg-danger-emphasis" ,
35
- "color-bg-success" : " color-bg-success" ,
36
34
"color-bg-success-inverse" : " color-bg-success-emphasis" ,
37
35
"color-bg-warning" : " color-bg-attention" ,
38
36
"color-bg-warning-inverse" : " color-bg-attention-emphasis" ,
You can’t perform that action at this time.
0 commit comments