@atlaskit/primitives 14.8.3 → 14.8.4
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.
- package/CHANGELOG.md +8 -0
- package/codemods/compiled-fork-stage1/transform.tsx +16 -3
- package/dist/cjs/compiled/components/anchor.js +1 -1
- package/dist/cjs/compiled/components/pressable.js +1 -1
- package/dist/cjs/components/anchor.js +1 -1
- package/dist/cjs/components/pressable.js +1 -1
- package/dist/es2019/compiled/components/anchor.js +1 -1
- package/dist/es2019/compiled/components/pressable.js +1 -1
- package/dist/es2019/components/anchor.js +1 -1
- package/dist/es2019/components/pressable.js +1 -1
- package/dist/esm/compiled/components/anchor.js +1 -1
- package/dist/esm/compiled/components/pressable.js +1 -1
- package/dist/esm/components/anchor.js +1 -1
- package/dist/esm/components/pressable.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/primitives
|
|
2
2
|
|
|
3
|
+
## 14.8.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#165533](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/165533)
|
|
8
|
+
[`7c5aef443de8b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7c5aef443de8b) -
|
|
9
|
+
Updates codemod logic for the stage1 migration to account for various edge-cases
|
|
10
|
+
|
|
3
11
|
## 14.8.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -18,7 +18,7 @@ function transform(file: FileInfo, { jscodeshift: j }: API) {
|
|
|
18
18
|
let needsCssMapImport = false;
|
|
19
19
|
|
|
20
20
|
// Check if any import from '@atlaskit/primitives' contains 'xcss'
|
|
21
|
-
const
|
|
21
|
+
const hasDescopedImport = root
|
|
22
22
|
.find(j.ImportDeclaration, { source: { value: '@atlaskit/primitives' } })
|
|
23
23
|
.some((path) => {
|
|
24
24
|
return path.node.specifiers!.some((specifier) => {
|
|
@@ -26,12 +26,25 @@ function transform(file: FileInfo, { jscodeshift: j }: API) {
|
|
|
26
26
|
return false;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
return specifier.imported.name
|
|
29
|
+
return ['xcss', 'media', 'XCSS'].includes(specifier.imported.name);
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
// If 'xcss' is imported, return the original source without transformations
|
|
34
|
-
if (
|
|
34
|
+
if (hasDescopedImport) {
|
|
35
|
+
return file.source;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// If Box primitive is used with spread props, return the original source without transformations
|
|
39
|
+
const hasBoxPrimitiveWithSpreadProps = root
|
|
40
|
+
.find(j.JSXElement, { openingElement: { name: { name: 'Box' } } })
|
|
41
|
+
.some(
|
|
42
|
+
(path) =>
|
|
43
|
+
path.node.openingElement.attributes?.some((attr) => j.JSXSpreadAttribute.check(attr)) ??
|
|
44
|
+
false,
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
if (hasBoxPrimitiveWithSpreadProps) {
|
|
35
48
|
return file.source;
|
|
36
49
|
}
|
|
37
50
|
|
|
@@ -69,7 +69,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
69
69
|
action: 'clicked',
|
|
70
70
|
componentName: componentName || 'Anchor',
|
|
71
71
|
packageName: "@atlaskit/primitives",
|
|
72
|
-
packageVersion: "14.8.
|
|
72
|
+
packageVersion: "14.8.4",
|
|
73
73
|
analyticsData: analyticsContext,
|
|
74
74
|
actionSubject: 'link'
|
|
75
75
|
});
|
|
@@ -61,7 +61,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
61
61
|
action: 'clicked',
|
|
62
62
|
componentName: componentName || 'Pressable',
|
|
63
63
|
packageName: "@atlaskit/primitives",
|
|
64
|
-
packageVersion: "14.8.
|
|
64
|
+
packageVersion: "14.8.4",
|
|
65
65
|
analyticsData: analyticsContext,
|
|
66
66
|
actionSubject: 'button'
|
|
67
67
|
});
|
|
@@ -100,7 +100,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
100
100
|
action: 'clicked',
|
|
101
101
|
componentName: componentName || 'Anchor',
|
|
102
102
|
packageName: "@atlaskit/primitives",
|
|
103
|
-
packageVersion: "14.8.
|
|
103
|
+
packageVersion: "14.8.4",
|
|
104
104
|
analyticsData: analyticsContext,
|
|
105
105
|
actionSubject: 'link'
|
|
106
106
|
});
|
|
@@ -95,7 +95,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
95
95
|
action: 'clicked',
|
|
96
96
|
componentName: componentName || 'Pressable',
|
|
97
97
|
packageName: "@atlaskit/primitives",
|
|
98
|
-
packageVersion: "14.8.
|
|
98
|
+
packageVersion: "14.8.4",
|
|
99
99
|
analyticsData: analyticsContext,
|
|
100
100
|
actionSubject: 'button'
|
|
101
101
|
});
|
|
@@ -48,7 +48,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
|
|
|
48
48
|
action: 'clicked',
|
|
49
49
|
componentName: componentName || 'Pressable',
|
|
50
50
|
packageName: "@atlaskit/primitives",
|
|
51
|
-
packageVersion: "14.8.
|
|
51
|
+
packageVersion: "14.8.4",
|
|
52
52
|
analyticsData: analyticsContext,
|
|
53
53
|
actionSubject: 'button'
|
|
54
54
|
});
|
|
@@ -85,7 +85,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
|
|
|
85
85
|
action: 'clicked',
|
|
86
86
|
componentName: componentName || 'Pressable',
|
|
87
87
|
packageName: "@atlaskit/primitives",
|
|
88
|
-
packageVersion: "14.8.
|
|
88
|
+
packageVersion: "14.8.4",
|
|
89
89
|
analyticsData: analyticsContext,
|
|
90
90
|
actionSubject: 'button'
|
|
91
91
|
});
|
|
@@ -60,7 +60,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
60
60
|
action: 'clicked',
|
|
61
61
|
componentName: componentName || 'Anchor',
|
|
62
62
|
packageName: "@atlaskit/primitives",
|
|
63
|
-
packageVersion: "14.8.
|
|
63
|
+
packageVersion: "14.8.4",
|
|
64
64
|
analyticsData: analyticsContext,
|
|
65
65
|
actionSubject: 'link'
|
|
66
66
|
});
|
|
@@ -52,7 +52,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
52
52
|
action: 'clicked',
|
|
53
53
|
componentName: componentName || 'Pressable',
|
|
54
54
|
packageName: "@atlaskit/primitives",
|
|
55
|
-
packageVersion: "14.8.
|
|
55
|
+
packageVersion: "14.8.4",
|
|
56
56
|
analyticsData: analyticsContext,
|
|
57
57
|
actionSubject: 'button'
|
|
58
58
|
});
|
|
@@ -94,7 +94,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
94
94
|
action: 'clicked',
|
|
95
95
|
componentName: componentName || 'Anchor',
|
|
96
96
|
packageName: "@atlaskit/primitives",
|
|
97
|
-
packageVersion: "14.8.
|
|
97
|
+
packageVersion: "14.8.4",
|
|
98
98
|
analyticsData: analyticsContext,
|
|
99
99
|
actionSubject: 'link'
|
|
100
100
|
});
|
|
@@ -89,7 +89,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
89
89
|
action: 'clicked',
|
|
90
90
|
componentName: componentName || 'Pressable',
|
|
91
91
|
packageName: "@atlaskit/primitives",
|
|
92
|
-
packageVersion: "14.8.
|
|
92
|
+
packageVersion: "14.8.4",
|
|
93
93
|
analyticsData: analyticsContext,
|
|
94
94
|
actionSubject: 'button'
|
|
95
95
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "14.8.
|
|
3
|
+
"version": "14.8.4",
|
|
4
4
|
"description": "Primitives are token-backed low-level building blocks.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
"@atlaskit/section-message": "^8.2.0",
|
|
167
167
|
"@atlaskit/textfield": "^8.0.0",
|
|
168
168
|
"@atlaskit/toggle": "^15.0.0",
|
|
169
|
-
"@atlaskit/tooltip": "^20.
|
|
169
|
+
"@atlaskit/tooltip": "^20.3.0",
|
|
170
170
|
"@atlaskit/visual-regression": "workspace:^",
|
|
171
171
|
"@atlassian/analytics-bridge": "^0.7.0",
|
|
172
172
|
"@atlassian/codegen": "^0.1.0",
|