@atlaskit/codemod-cli 0.13.4 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +71 -52
  2. package/dist/cjs/main.js +3 -3
  3. package/dist/cjs/presets/css-to-design-tokens/css-to-design-tokens.js +65 -135
  4. package/dist/cjs/presets/css-to-design-tokens/lib/colors.js +49 -0
  5. package/dist/cjs/presets/css-to-design-tokens/lib/declaration.js +29 -0
  6. package/dist/cjs/presets/css-to-design-tokens/{utils → lib}/legacy-colors.js +13 -17
  7. package/dist/cjs/presets/css-to-design-tokens/lib/logger.js +18 -0
  8. package/dist/cjs/presets/css-to-design-tokens/lib/meta.js +157 -0
  9. package/dist/cjs/presets/css-to-design-tokens/lib/tokens.js +47 -0
  10. package/dist/cjs/presets/css-to-design-tokens/lib/value.js +80 -0
  11. package/dist/cjs/presets/index.js +1 -2
  12. package/dist/cjs/presets/styled-to-emotion/styled-to-emotion.js +1 -2
  13. package/dist/cjs/presets/theme-remove-deprecated-mixins/utils/replacements.js +2 -3
  14. package/dist/cjs/presets/theme-to-design-tokens/theme-to-design-tokens.js +348 -104
  15. package/dist/cjs/presets/theme-to-design-tokens/utils/ast.js +1 -1
  16. package/dist/cjs/presets/theme-to-design-tokens/utils/color.js +17 -17
  17. package/dist/cjs/presets/theme-to-design-tokens/utils/css-utils.js +38 -0
  18. package/dist/cjs/presets/theme-to-design-tokens/utils/fuzzy-search.js +1 -2
  19. package/dist/cjs/presets/theme-to-design-tokens/utils/legacy-colors.js +4 -7
  20. package/dist/cjs/presets/theme-to-design-tokens/utils/named-colors.js +1 -2
  21. package/dist/cjs/presets/theme-to-design-tokens/utils/string-utils.js +25 -0
  22. package/dist/cjs/presets/theme-to-design-tokens/utils/tokens.js +3 -5
  23. package/dist/cjs/sinceRef.js +1 -2
  24. package/dist/cjs/transforms.js +6 -12
  25. package/dist/cjs/types.js +3 -5
  26. package/dist/cjs/utils.js +2 -3
  27. package/dist/es2019/presets/css-to-design-tokens/css-to-design-tokens.js +61 -115
  28. package/dist/es2019/presets/css-to-design-tokens/lib/colors.js +34 -0
  29. package/dist/es2019/presets/css-to-design-tokens/lib/declaration.js +17 -0
  30. package/dist/es2019/presets/css-to-design-tokens/{utils → lib}/legacy-colors.js +9 -10
  31. package/dist/es2019/presets/css-to-design-tokens/lib/logger.js +11 -0
  32. package/dist/es2019/presets/css-to-design-tokens/lib/meta.js +133 -0
  33. package/dist/es2019/presets/css-to-design-tokens/lib/tokens.js +24 -0
  34. package/dist/es2019/presets/css-to-design-tokens/lib/value.js +68 -0
  35. package/dist/es2019/presets/theme-to-design-tokens/theme-to-design-tokens.js +191 -32
  36. package/dist/es2019/presets/theme-to-design-tokens/utils/ast.js +1 -1
  37. package/dist/es2019/presets/theme-to-design-tokens/utils/color.js +12 -10
  38. package/dist/es2019/presets/theme-to-design-tokens/utils/css-utils.js +31 -0
  39. package/dist/es2019/presets/theme-to-design-tokens/utils/string-utils.js +13 -0
  40. package/dist/esm/main.js +3 -3
  41. package/dist/esm/presets/css-to-design-tokens/css-to-design-tokens.js +65 -135
  42. package/dist/esm/presets/css-to-design-tokens/lib/colors.js +38 -0
  43. package/dist/esm/presets/css-to-design-tokens/lib/declaration.js +19 -0
  44. package/dist/esm/presets/css-to-design-tokens/{utils → lib}/legacy-colors.js +9 -10
  45. package/dist/esm/presets/css-to-design-tokens/lib/logger.js +11 -0
  46. package/dist/esm/presets/css-to-design-tokens/lib/meta.js +146 -0
  47. package/dist/esm/presets/css-to-design-tokens/lib/tokens.js +40 -0
  48. package/dist/esm/presets/css-to-design-tokens/lib/value.js +73 -0
  49. package/dist/esm/presets/theme-to-design-tokens/theme-to-design-tokens.js +346 -100
  50. package/dist/esm/presets/theme-to-design-tokens/utils/ast.js +1 -1
  51. package/dist/esm/presets/theme-to-design-tokens/utils/color.js +12 -10
  52. package/dist/esm/presets/theme-to-design-tokens/utils/css-utils.js +31 -0
  53. package/dist/esm/presets/theme-to-design-tokens/utils/string-utils.js +17 -0
  54. package/dist/types/main.d.ts +0 -1
  55. package/dist/types/presets/css-to-design-tokens/css-to-design-tokens.d.ts +1 -1
  56. package/dist/types/presets/css-to-design-tokens/lib/colors.d.ts +6 -0
  57. package/dist/types/presets/css-to-design-tokens/lib/declaration.d.ts +5 -0
  58. package/dist/types/presets/css-to-design-tokens/{utils → lib}/legacy-colors.d.ts +1 -1
  59. package/dist/types/presets/css-to-design-tokens/lib/logger.d.ts +4 -0
  60. package/dist/types/presets/css-to-design-tokens/lib/meta.d.ts +6 -0
  61. package/dist/types/presets/css-to-design-tokens/lib/tokens.d.ts +7 -0
  62. package/dist/types/presets/css-to-design-tokens/lib/value.d.ts +6 -0
  63. package/dist/types/presets/theme-to-design-tokens/theme-to-design-tokens.d.ts +1 -1
  64. package/dist/types/presets/theme-to-design-tokens/utils/ast.d.ts +1 -1
  65. package/dist/types/presets/theme-to-design-tokens/utils/color.d.ts +2 -1
  66. package/dist/types/presets/theme-to-design-tokens/utils/css-utils.d.ts +2 -0
  67. package/dist/types/presets/theme-to-design-tokens/utils/string-utils.d.ts +3 -0
  68. package/dist/types-ts4.5/main.d.ts +0 -1
  69. package/dist/types-ts4.5/presets/css-to-design-tokens/css-to-design-tokens.d.ts +1 -1
  70. package/dist/types-ts4.5/presets/css-to-design-tokens/lib/colors.d.ts +6 -0
  71. package/dist/types-ts4.5/presets/css-to-design-tokens/lib/declaration.d.ts +5 -0
  72. package/dist/types-ts4.5/presets/css-to-design-tokens/{utils → lib}/legacy-colors.d.ts +1 -1
  73. package/dist/types-ts4.5/presets/css-to-design-tokens/lib/logger.d.ts +4 -0
  74. package/dist/types-ts4.5/presets/css-to-design-tokens/lib/meta.d.ts +6 -0
  75. package/dist/types-ts4.5/presets/css-to-design-tokens/lib/tokens.d.ts +7 -0
  76. package/dist/types-ts4.5/presets/css-to-design-tokens/lib/value.d.ts +6 -0
  77. package/dist/types-ts4.5/presets/theme-to-design-tokens/theme-to-design-tokens.d.ts +1 -1
  78. package/dist/types-ts4.5/presets/theme-to-design-tokens/utils/ast.d.ts +1 -1
  79. package/dist/types-ts4.5/presets/theme-to-design-tokens/utils/color.d.ts +2 -1
  80. package/dist/types-ts4.5/presets/theme-to-design-tokens/utils/css-utils.d.ts +2 -0
  81. package/dist/types-ts4.5/presets/theme-to-design-tokens/utils/string-utils.d.ts +6 -0
  82. package/package.json +2 -2
  83. package/report.api.md +0 -2
  84. package/tmp/api-report-tmp.d.ts +0 -2
  85. package/dist/cjs/presets/css-to-design-tokens/utils/meta.js +0 -53
  86. package/dist/es2019/presets/css-to-design-tokens/utils/meta.js +0 -33
  87. package/dist/esm/presets/css-to-design-tokens/utils/meta.js +0 -46
  88. package/dist/types/presets/css-to-design-tokens/utils/meta.d.ts +0 -1
  89. package/dist/types-ts4.5/presets/css-to-design-tokens/utils/meta.d.ts +0 -1
package/CHANGELOG.md CHANGED
@@ -1,58 +1,77 @@
1
1
  # @atlaskit/codemod-cli
2
2
 
3
+ ## 0.15.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#40270](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40270) [`27bbdfcb6ad`](https://bitbucket.org/atlassian/atlassian-frontend/commits/27bbdfcb6ad) - This update includes several improvements and fixes to the css-to-design-tokens preset:
8
+
9
+ - Resolved transformation errors.
10
+ - Added support for new color properties such as `border-color-left`.
11
+ - Omitted unrecognized functions, including `url`, and certain Less functions to prevent compile errors.
12
+ - Enhanced codemod to only substitute raw, named colors and known variables (like old Atlaskit colors), and to avoid substituting variables not related to colors.
13
+ - Introduced token filtering for more precise token identification.
14
+ - Added parsing for gradient functions and multiple colors.
15
+
16
+ ## 0.14.0
17
+
18
+ ### Minor Changes
19
+
20
+ - [#39017](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39017) [`26d4e25c2b3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/26d4e25c2b3) - replace strings that contain only the color name; replace hard-coded colors in template literals that have CSS declarations; better color names for literals that have multiple expressions; replace full value of box-shadow in template literals
21
+
3
22
  ## 0.13.4
4
23
 
5
24
  ### Patch Changes
6
25
 
7
- - [`9c4335f135d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9c4335f135d) - Updated README.md
26
+ - [#38813](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38813) [`9c4335f135d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9c4335f135d) - Updated README.md
8
27
 
9
28
  ## 0.13.3
10
29
 
11
30
  ### Patch Changes
12
31
 
13
- - [`50cf866a219`](https://bitbucket.org/atlassian/atlassian-frontend/commits/50cf866a219) - bump semver
32
+ - [#35950](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35950) [`50cf866a219`](https://bitbucket.org/atlassian/atlassian-frontend/commits/50cf866a219) - bump semver
14
33
 
15
34
  ## 0.13.2
16
35
 
17
36
  ### Patch Changes
18
37
 
19
- - [`07f0eb8e1f4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/07f0eb8e1f4) - Refactors `theme-to-design-tokens` to improve its accuracy
38
+ - [#32800](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32800) [`07f0eb8e1f4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/07f0eb8e1f4) - Refactors `theme-to-design-tokens` to improve its accuracy
20
39
 
21
40
  ## 0.13.1
22
41
 
23
42
  ### Patch Changes
24
43
 
25
- - [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing unused dependencies and dev dependencies
44
+ - [#34443](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34443) [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing unused dependencies and dev dependencies
26
45
 
27
46
  ## 0.13.0
28
47
 
29
48
  ### Minor Changes
30
49
 
31
- - [`c528571ef3d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c528571ef3d) - Introduces new codemod "theme-remove-deprecated-mixins" to automate the removal of deprecated color mixins
50
+ - [#34602](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34602) [`c528571ef3d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c528571ef3d) - Introduces new codemod "theme-remove-deprecated-mixins" to automate the removal of deprecated color mixins
32
51
 
33
52
  ## 0.12.3
34
53
 
35
54
  ### Patch Changes
36
55
 
37
- - [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
56
+ - [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
38
57
 
39
58
  ## 0.12.2
40
59
 
41
60
  ### Patch Changes
42
61
 
43
- - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
62
+ - [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
44
63
 
45
64
  ## 0.12.1
46
65
 
47
66
  ### Patch Changes
48
67
 
49
- - [`07020547a93`](https://bitbucket.org/atlassian/atlassian-frontend/commits/07020547a93) - Safe direct migraiton to design token API. This change is not visible for those who aren't using design tokens
68
+ - [#33377](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33377) [`07020547a93`](https://bitbucket.org/atlassian/atlassian-frontend/commits/07020547a93) - Safe direct migraiton to design token API. This change is not visible for those who aren't using design tokens
50
69
 
51
70
  ## 0.12.0
52
71
 
53
72
  ### Minor Changes
54
73
 
55
- - [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
74
+ - [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
56
75
 
57
76
  ### Patch Changes
58
77
 
@@ -62,20 +81,20 @@
62
81
 
63
82
  ### Patch Changes
64
83
 
65
- - [`cc84a1ed227`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cc84a1ed227) - Updates default behaviour of codemods when a suggested token cannot be found
84
+ - [#27634](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27634) [`cc84a1ed227`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cc84a1ed227) - Updates default behaviour of codemods when a suggested token cannot be found
66
85
  - Updated dependencies
67
86
 
68
87
  ## 0.11.4
69
88
 
70
89
  ### Patch Changes
71
90
 
72
- - [`708957d360f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/708957d360f) - Upgrade a dependency package simple-git
91
+ - [#29170](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/29170) [`708957d360f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/708957d360f) - Upgrade a dependency package simple-git
73
92
 
74
93
  ## 0.11.3
75
94
 
76
95
  ### Patch Changes
77
96
 
78
- - [`b14dca751fa`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b14dca751fa) - Exclude the chart tokens from the list of tokens that we pass into the codemod.
97
+ - [#27875](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27875) [`b14dca751fa`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b14dca751fa) - Exclude the chart tokens from the list of tokens that we pass into the codemod.
79
98
 
80
99
  ## 0.11.2
81
100
 
@@ -93,13 +112,13 @@
93
112
 
94
113
  ### Minor Changes
95
114
 
96
- - [`00ea8db4763`](https://bitbucket.org/atlassian/atlassian-frontend/commits/00ea8db4763) - Upgrading the simple-git version
115
+ - [#28150](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28150) [`00ea8db4763`](https://bitbucket.org/atlassian/atlassian-frontend/commits/00ea8db4763) - Upgrading the simple-git version
97
116
 
98
117
  ## 0.10.5
99
118
 
100
119
  ### Patch Changes
101
120
 
102
- - [`7a958dda205`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7a958dda205) - Updates tokens codemods to only suggest active tokens
121
+ - [#27794](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27794) [`7a958dda205`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7a958dda205) - Updates tokens codemods to only suggest active tokens
103
122
 
104
123
  ## 0.10.4
105
124
 
@@ -111,25 +130,25 @@
111
130
 
112
131
  ### Patch Changes
113
132
 
114
- - [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
133
+ - [#24874](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24874) [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
115
134
 
116
135
  ## 0.10.2
117
136
 
118
137
  ### Patch Changes
119
138
 
120
- - [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
139
+ - [#24492](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24492) [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
121
140
 
122
141
  ## 0.10.1
123
142
 
124
143
  ### Patch Changes
125
144
 
126
- - [`6ec444547a9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6ec444547a9) - Applies various fixes to the tokens post-css codemod. Box shadows and border properties are respected syntactically
145
+ - [#23137](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/23137) [`6ec444547a9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6ec444547a9) - Applies various fixes to the tokens post-css codemod. Box shadows and border properties are respected syntactically
127
146
 
128
147
  ## 0.10.0
129
148
 
130
149
  ### Minor Changes
131
150
 
132
- - [`54c548f34ca`](https://bitbucket.org/atlassian/atlassian-frontend/commits/54c548f34ca) - Adds preset codemod for css-to-design-tokens. This codemod transforms css,scss,less color usage to design tokens.
151
+ - [#21570](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/21570) [`54c548f34ca`](https://bitbucket.org/atlassian/atlassian-frontend/commits/54c548f34ca) - Adds preset codemod for css-to-design-tokens. This codemod transforms css,scss,less color usage to design tokens.
133
152
 
134
153
  ## 0.9.7
135
154
 
@@ -141,7 +160,7 @@
141
160
 
142
161
  ### Patch Changes
143
162
 
144
- - [`a424e62b264`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a424e62b264) - Changes to support Node 16 Typescript definitions from `@types/node`.
163
+ - [#20650](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/20650) [`a424e62b264`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a424e62b264) - Changes to support Node 16 Typescript definitions from `@types/node`.
145
164
 
146
165
  ## 0.9.5
147
166
 
@@ -159,7 +178,7 @@
159
178
 
160
179
  ### Patch Changes
161
180
 
162
- - [`1977986ea86`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1977986ea86) - Bumping dependencies via Renovate:
181
+ - [#20310](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/20310) [`1977986ea86`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1977986ea86) - Bumping dependencies via Renovate:
163
182
 
164
183
  - simple-git
165
184
 
@@ -167,7 +186,7 @@
167
186
 
168
187
  ### Patch Changes
169
188
 
170
- - [`5c45b17200d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5c45b17200d) - Bumping dependencies via Renovate:
189
+ - [#19927](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/19927) [`5c45b17200d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5c45b17200d) - Bumping dependencies via Renovate:
171
190
 
172
191
  - simple-git
173
192
 
@@ -181,7 +200,7 @@
181
200
 
182
201
  ### Minor Changes
183
202
 
184
- - [`2b8c48b26ab`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2b8c48b26ab) - Instrumented `@atlaskit/codemod-cli` with none interaction support
203
+ - [#19516](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/19516) [`2b8c48b26ab`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2b8c48b26ab) - Instrumented `@atlaskit/codemod-cli` with none interaction support
185
204
 
186
205
  New argument for the codemod-cli has been added to support preselect transform in command line.
187
206
 
@@ -189,7 +208,7 @@
189
208
 
190
209
  ### Patch Changes
191
210
 
192
- - [`54a44d46e29`](https://bitbucket.org/atlassian/atlassian-frontend/commits/54a44d46e29) - Renovate Bot upgraded simple-git from ^1.130.0 to 2.48.0
211
+ - [#18960](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/18960) [`54a44d46e29`](https://bitbucket.org/atlassian/atlassian-frontend/commits/54a44d46e29) - Renovate Bot upgraded simple-git from ^1.130.0 to 2.48.0
193
212
 
194
213
  ## 0.8.6
195
214
 
@@ -201,13 +220,13 @@
201
220
 
202
221
  ### Patch Changes
203
222
 
204
- - [`e4dd80187f5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e4dd80187f5) - Refactors theme-to-tokens codemod with new token names + simplifies logic
223
+ - [#18965](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/18965) [`e4dd80187f5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e4dd80187f5) - Refactors theme-to-tokens codemod with new token names + simplifies logic
205
224
 
206
225
  ## 0.8.4
207
226
 
208
227
  ### Patch Changes
209
228
 
210
- - [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - Adds a new codemod preset `theme-to-design-tokens` that helps migrate from atlaskit theme to atlaskit tokens.
229
+ - [#16752](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/16752) [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - Adds a new codemod preset `theme-to-design-tokens` that helps migrate from atlaskit theme to atlaskit tokens.
211
230
  - [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - Theme preset is now picked up by the CLI.
212
231
  - Updated dependencies
213
232
 
@@ -215,37 +234,37 @@
215
234
 
216
235
  ### Patch Changes
217
236
 
218
- - [`f4d22b1c8af`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f4d22b1c8af) - Ignore directory filtering logic if filtering returns no paths
237
+ - [#17016](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/17016) [`f4d22b1c8af`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f4d22b1c8af) - Ignore directory filtering logic if filtering returns no paths
219
238
 
220
239
  ## 0.8.2
221
240
 
222
241
  ### Patch Changes
223
242
 
224
- - [`650aa20f6fe`](https://bitbucket.org/atlassian/atlassian-frontend/commits/650aa20f6fe) - Upgrade meow dependency
243
+ - [#16649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/16649) [`650aa20f6fe`](https://bitbucket.org/atlassian/atlassian-frontend/commits/650aa20f6fe) - Upgrade meow dependency
225
244
 
226
245
  ## 0.8.1
227
246
 
228
247
  ### Patch Changes
229
248
 
230
- - [`982e2f3d3d2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/982e2f3d3d2) - Directory filtering now defaults to true
249
+ - [#16252](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/16252) [`982e2f3d3d2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/982e2f3d3d2) - Directory filtering now defaults to true
231
250
 
232
251
  ## 0.8.0
233
252
 
234
253
  ### Minor Changes
235
254
 
236
- - [`f3d46c395b4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f3d46c395b4) - Add path filtering to codemod-cli
255
+ - [#15374](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/15374) [`f3d46c395b4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f3d46c395b4) - Add path filtering to codemod-cli
237
256
 
238
257
  ## 0.7.0
239
258
 
240
259
  ### Minor Changes
241
260
 
242
- - [`d3a285fdc82`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d3a285fdc82) - Add support for codemods authored as .tsx files
261
+ - [#13957](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/13957) [`d3a285fdc82`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d3a285fdc82) - Add support for codemods authored as .tsx files
243
262
 
244
263
  ## 0.6.7
245
264
 
246
265
  ### Patch Changes
247
266
 
248
- - [`4a67fb592c8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4a67fb592c8) - Bump jscodeshift to 0.13.0.
267
+ - [#12535](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/12535) [`4a67fb592c8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4a67fb592c8) - Bump jscodeshift to 0.13.0.
249
268
  [Commit Changelog](https://github.com/facebook/jscodeshift/commit/2fd5e11f469427d474983b2d1c47be9408677591).
250
269
 
251
270
  ### Added
@@ -261,43 +280,43 @@
261
280
 
262
281
  ### Patch Changes
263
282
 
264
- - [`d0ef46dee01`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d0ef46dee01) - Removes ts-node / cjs bundle switcher from main entrypoint of codemod-utils and updated codemod-cli scripts to support
283
+ - [#11911](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/11911) [`d0ef46dee01`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d0ef46dee01) - Removes ts-node / cjs bundle switcher from main entrypoint of codemod-utils and updated codemod-cli scripts to support
265
284
 
266
285
  ## 0.6.5
267
286
 
268
287
  ### Patch Changes
269
288
 
270
- - [`fdbd74cdb32`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fdbd74cdb32) - Remove --no-babel flag when parser flow is used
289
+ - [#10735](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/10735) [`fdbd74cdb32`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fdbd74cdb32) - Remove --no-babel flag when parser flow is used
271
290
 
272
291
  ## 0.6.4
273
292
 
274
293
  ### Patch Changes
275
294
 
276
- - [`6a0b92d2af9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6a0b92d2af9) - MONO-103 Fixed bug were codemod-cli would erronously run
295
+ - [#10705](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/10705) [`6a0b92d2af9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6a0b92d2af9) - MONO-103 Fixed bug were codemod-cli would erronously run
277
296
 
278
297
  ## 0.6.3
279
298
 
280
299
  ### Patch Changes
281
300
 
282
- - [`30c279f85eb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/30c279f85eb) - Bump atlassian-forks-jscodeshift to "^0.12.2-atlassian-6".
301
+ - [#10392](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/10392) [`30c279f85eb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/30c279f85eb) - Bump atlassian-forks-jscodeshift to "^0.12.2-atlassian-6".
283
302
 
284
303
  ## 0.6.2
285
304
 
286
305
  ### Patch Changes
287
306
 
288
- - [`6c420d1698d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c420d1698d) - Fix application of --no-babel flag
307
+ - [#10060](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/10060) [`6c420d1698d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c420d1698d) - Fix application of --no-babel flag
289
308
 
290
309
  ## 0.6.1
291
310
 
292
311
  ### Patch Changes
293
312
 
294
- - [`13d9c023e8d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/13d9c023e8d) - Log the package version when running codemod cli
313
+ - [#10014](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/10014) [`13d9c023e8d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/13d9c023e8d) - Log the package version when running codemod cli
295
314
 
296
315
  ## 0.6.0
297
316
 
298
317
  ### Minor Changes
299
318
 
300
- - [`cdd78d4ff38`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cdd78d4ff38) - The codemod-cli can fail on error when the flag `--fail-on-error` is passed, it will return a 1 exit code when errors were found during execution of codemods
319
+ - [#9924](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/9924) [`cdd78d4ff38`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cdd78d4ff38) - The codemod-cli can fail on error when the flag `--fail-on-error` is passed, it will return a 1 exit code when errors were found during execution of codemods
301
320
 
302
321
  This flag `--fail-on-error` was added as part of this [PR](https://github.com/facebook/jscodeshift/pull/416) that forked `jscodeshift`.
303
322
 
@@ -309,26 +328,26 @@
309
328
 
310
329
  ### Patch Changes
311
330
 
312
- - [`d72b572dfc2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d72b572dfc2) - bumped jscodeshift@^0.11.0
331
+ - [#9832](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/9832) [`d72b572dfc2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d72b572dfc2) - bumped jscodeshift@^0.11.0
313
332
  - [`d72b572dfc2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d72b572dfc2) - bumped @types/jscodeshift@^0.11.0
314
333
 
315
334
  ## 0.5.2
316
335
 
317
336
  ### Patch Changes
318
337
 
319
- - [`cfd7c0b5bcc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cfd7c0b5bcc) - Update the logic to properly check for the env var FAIL_CODEMODS_ON_ERROR and add `--no-babel` when running js file.
338
+ - [#9482](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/9482) [`cfd7c0b5bcc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cfd7c0b5bcc) - Update the logic to properly check for the env var FAIL_CODEMODS_ON_ERROR and add `--no-babel` when running js file.
320
339
 
321
340
  ## 0.5.1
322
341
 
323
342
  ### Patch Changes
324
343
 
325
- - [`6afd79db199`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6afd79db199) - Bump dependency "meow" to version ^6.0.0
344
+ - [#9018](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/9018) [`6afd79db199`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6afd79db199) - Bump dependency "meow" to version ^6.0.0
326
345
 
327
346
  ## 0.5.0
328
347
 
329
348
  ### Minor Changes
330
349
 
331
- - [`a9e359236b4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a9e359236b4) - The codemod-cli can fail on error when the flag `--fail-on-error` is passed, it will return a 1 exit code when errors were found during execution of codemods
350
+ - [#8789](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/8789) [`a9e359236b4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a9e359236b4) - The codemod-cli can fail on error when the flag `--fail-on-error` is passed, it will return a 1 exit code when errors were found during execution of codemods
332
351
  This flag `--fail-on-error` was added as part of this [PR](https://github.com/facebook/jscodeshift/pull/416) that forked `jscodeshift`.
333
352
  In Atlassian Frontend, we are now using the fork of `jscodeshift`, [atlassian-forks-jscodeshift](https://www.npmjs.com/package/atlassian-forks-jscodeshift) till we get this change back to the library.
334
353
 
@@ -338,13 +357,13 @@
338
357
 
339
358
  ### Patch Changes
340
359
 
341
- - [`d3265f19be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d3265f19be) - Transpile packages using babel rather than tsc
360
+ - [#5857](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5857) [`d3265f19be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d3265f19be) - Transpile packages using babel rather than tsc
342
361
 
343
362
  ## 0.4.3
344
363
 
345
364
  ### Patch Changes
346
365
 
347
- - [`5f58283e1f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f58283e1f) - Export types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules compiler option.
366
+ - [#5497](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5497) [`5f58283e1f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f58283e1f) - Export types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules compiler option.
348
367
  This requires version 3.8 of Typescript, read more about how we handle Typescript versions here: https://atlaskit.atlassian.com/get-started
349
368
  Also add `typescript` to `devDependencies` to denote version that the package was built with.
350
369
 
@@ -352,7 +371,7 @@
352
371
 
353
372
  ### Patch Changes
354
373
 
355
- - [`6c525a8229`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c525a8229) - Upgraded to TypeScript 3.9.6 and tslib to 2.0.0
374
+ - [#3885](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3885) [`6c525a8229`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c525a8229) - Upgraded to TypeScript 3.9.6 and tslib to 2.0.0
356
375
 
357
376
  Since tslib is a dependency for all our packages we recommend that products also follow this tslib upgrade
358
377
  to prevent duplicates of tslib being bundled.
@@ -361,13 +380,13 @@
361
380
 
362
381
  ### Patch Changes
363
382
 
364
- - [`88ceeac950`](https://bitbucket.org/atlassian/atlassian-frontend/commits/88ceeac950) - Fix CLI not working due to missing ts-node dependency
383
+ - [#3841](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3841) [`88ceeac950`](https://bitbucket.org/atlassian/atlassian-frontend/commits/88ceeac950) - Fix CLI not working due to missing ts-node dependency
365
384
 
366
385
  ## 0.4.0
367
386
 
368
387
  ### Minor Changes
369
388
 
370
- - [`d9f34d27e8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d9f34d27e8) - Add --packages flag to automatically run codemods for specific packages
389
+ - [#3197](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3197) [`d9f34d27e8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d9f34d27e8) - Add --packages flag to automatically run codemods for specific packages
371
390
  Add --sinceRef flag to automatically run codemods that have been upgraded since a certain git ref
372
391
  Add support for running over multiple filepaths
373
392
  Extend support to restricted scoped packages
@@ -382,31 +401,31 @@
382
401
 
383
402
  ### Patch Changes
384
403
 
385
- - [`f664568219`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f664568219) - Codemods are now presented with their module name prepended to make it easier to see which codemod belongs to which packages
404
+ - [#3093](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3093) [`f664568219`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f664568219) - Codemods are now presented with their module name prepended to make it easier to see which codemod belongs to which packages
386
405
 
387
406
  ## 0.3.3
388
407
 
389
408
  ### Patch Changes
390
409
 
391
- - [`4be3a868e1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4be3a868e1) - Ensure the library is running with the Node environment + adds ts-lib
410
+ - [#3062](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3062) [`4be3a868e1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4be3a868e1) - Ensure the library is running with the Node environment + adds ts-lib
392
411
 
393
412
  ## 0.3.2
394
413
 
395
414
  ### Patch Changes
396
415
 
397
- - [`78dde805ef`](https://bitbucket.org/atlassian/atlassian-frontend/commits/78dde805ef) - Fixes an issue with loading presets in javascript
416
+ - [#3002](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3002) [`78dde805ef`](https://bitbucket.org/atlassian/atlassian-frontend/commits/78dde805ef) - Fixes an issue with loading presets in javascript
398
417
 
399
418
  ## 0.3.1
400
419
 
401
420
  ### Patch Changes
402
421
 
403
- - [`b4e29ceda2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b4e29ceda2) - Fixed broken entrypoint
422
+ - [#2137](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/2137) [`b4e29ceda2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b4e29ceda2) - Fixed broken entrypoint
404
423
 
405
424
  ## 0.3.0
406
425
 
407
426
  ### Minor Changes
408
427
 
409
- - [`332a418dd1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/332a418dd1) - Adds the concept of presets to act as a library of codemods relevant to an entire library or repo rather than specific component codemods. Also introduces the styled-to-emotion codemod
428
+ - [#1868](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/1868) [`332a418dd1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/332a418dd1) - Adds the concept of presets to act as a library of codemods relevant to an entire library or repo rather than specific component codemods. Also introduces the styled-to-emotion codemod
410
429
 
411
430
  ## 0.2.0
412
431
 
package/dist/cjs/main.js CHANGED
@@ -22,8 +22,8 @@ var _filepath = require("./filepath");
22
22
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
23
23
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
24
24
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
25
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
26
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
25
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
26
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
27
27
  var jscodeshift = require.resolve('.bin/jscodeshift');
28
28
  var applyTransformMeta = function applyTransformMeta(transforms) {
29
29
  return transforms.map(function (transform) {
@@ -298,7 +298,7 @@ function _main() {
298
298
  case 4:
299
299
  _yield$parseArgs = _context5.sent;
300
300
  packages = _yield$parseArgs.packages;
301
- _process$env$_PACKAGE = "0.13.4", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
301
+ _process$env$_PACKAGE = "0.15.0", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
302
302
  logger.log(_chalk.default.bgBlue(_chalk.default.black("\uD83D\uDCDA Atlassian-Frontend codemod library @ ".concat(_PACKAGE_VERSION_, " \uD83D\uDCDA"))));
303
303
  if (packages && packages.length > 0) {
304
304
  logger.log(_chalk.default.gray("Searching for codemods for newer versions of the following packages: ".concat(packages.map(function (pkg) {