@atlaskit/progress-indicator 12.0.0 → 12.0.2
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 +15 -0
- package/dist/cjs/components/progress-dots.js +1 -1
- package/dist/es2019/components/progress-dots.js +1 -1
- package/dist/esm/components/progress-dots.js +1 -1
- package/package.json +14 -10
- package/codemods/9.0.0-import-rename.tsx +0 -83
- package/codemods/__tests__/9.0.0-import-rename.tsx +0 -111
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/progress-indicator
|
|
2
2
|
|
|
3
|
+
## 12.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#129972](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/129972)
|
|
8
|
+
[`b2d69a39e6687`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b2d69a39e6687) -
|
|
9
|
+
Update `@compiled/react` dependency for improved type checking support.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 12.0.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 12.0.0
|
|
4
19
|
|
|
5
20
|
### Major Changes
|
|
@@ -16,7 +16,7 @@ var _indicator = require("./indicator");
|
|
|
16
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var packageName = "@atlaskit/progress-indicator";
|
|
19
|
-
var packageVersion = "12.0.
|
|
19
|
+
var packageVersion = "12.0.2";
|
|
20
20
|
var progressIndicatorGapMap = {
|
|
21
21
|
comfortable: {
|
|
22
22
|
default: 'space.100',
|
|
@@ -5,7 +5,7 @@ import noop from '@atlaskit/ds-lib/noop';
|
|
|
5
5
|
import { Box, Inline } from '@atlaskit/primitives/compiled';
|
|
6
6
|
import { ButtonIndicator, PresentationalIndicator } from './indicator';
|
|
7
7
|
const packageName = "@atlaskit/progress-indicator";
|
|
8
|
-
const packageVersion = "12.0.
|
|
8
|
+
const packageVersion = "12.0.2";
|
|
9
9
|
const progressIndicatorGapMap = {
|
|
10
10
|
comfortable: {
|
|
11
11
|
default: 'space.100',
|
|
@@ -6,7 +6,7 @@ import noop from '@atlaskit/ds-lib/noop';
|
|
|
6
6
|
import { Box, Inline } from '@atlaskit/primitives/compiled';
|
|
7
7
|
import { ButtonIndicator, PresentationalIndicator } from './indicator';
|
|
8
8
|
var packageName = "@atlaskit/progress-indicator";
|
|
9
|
-
var packageVersion = "12.0.
|
|
9
|
+
var packageVersion = "12.0.2";
|
|
10
10
|
var progressIndicatorGapMap = {
|
|
11
11
|
comfortable: {
|
|
12
12
|
default: 'space.100',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/progress-indicator",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.2",
|
|
4
4
|
"description": "A progress indicator shows the user where they are along the steps of a journey.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,22 +27,26 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
29
29
|
"@atlaskit/ds-lib": "^4.0.0",
|
|
30
|
-
"@atlaskit/primitives": "^14.
|
|
31
|
-
"@atlaskit/tokens": "^4.
|
|
32
|
-
"@atlaskit/visually-hidden": "^
|
|
30
|
+
"@atlaskit/primitives": "^14.2.0",
|
|
31
|
+
"@atlaskit/tokens": "^4.5.0",
|
|
32
|
+
"@atlaskit/visually-hidden": "^3.0.0",
|
|
33
33
|
"@babel/runtime": "^7.0.0",
|
|
34
|
-
"@compiled/react": "^0.18.
|
|
34
|
+
"@compiled/react": "^0.18.3",
|
|
35
35
|
"bind-event-listener": "^3.0.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"react": "^18.2.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@af/accessibility-testing": "
|
|
42
|
-
"@af/integration-testing": "
|
|
43
|
-
"@af/visual-regression": "
|
|
44
|
-
"@atlaskit/
|
|
45
|
-
"@atlaskit/
|
|
41
|
+
"@af/accessibility-testing": "^2.0.0",
|
|
42
|
+
"@af/integration-testing": "^0.5.0",
|
|
43
|
+
"@af/visual-regression": "^1.3.0",
|
|
44
|
+
"@atlaskit/button": "^21.1.0",
|
|
45
|
+
"@atlaskit/css": "^0.10.0",
|
|
46
|
+
"@atlaskit/docs": "^10.0.0",
|
|
47
|
+
"@atlaskit/link": "^3.0.0",
|
|
48
|
+
"@atlaskit/section-message": "^8.2.0",
|
|
49
|
+
"@atlaskit/ssr": "^0.4.0",
|
|
46
50
|
"@testing-library/react": "^13.4.0",
|
|
47
51
|
"@testing-library/user-event": "^14.4.3",
|
|
48
52
|
"@types/jscodeshift": "^0.11.0",
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { type API, type default as core, type FileInfo, type Options } from 'jscodeshift';
|
|
2
|
-
|
|
3
|
-
function hasImportDeclaration(
|
|
4
|
-
j: core.JSCodeshift,
|
|
5
|
-
source: ReturnType<typeof j>,
|
|
6
|
-
importPath: string,
|
|
7
|
-
) {
|
|
8
|
-
return !!source.find(j.ImportDeclaration).filter((path) => path.node.source.value === importPath)
|
|
9
|
-
.length;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function hasNameImport(j: core.JSCodeshift, source: ReturnType<typeof j>, importName: string) {
|
|
13
|
-
return !!source
|
|
14
|
-
.find(j.ImportDeclaration)
|
|
15
|
-
.find(j.ImportSpecifier)
|
|
16
|
-
.find(j.Identifier)
|
|
17
|
-
.filter((identifier) => identifier!.value!.name === importName).length;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function hasVariableAlreadyDeclared(
|
|
21
|
-
j: core.JSCodeshift,
|
|
22
|
-
source: ReturnType<typeof j>,
|
|
23
|
-
variableName: string,
|
|
24
|
-
) {
|
|
25
|
-
return !!source
|
|
26
|
-
.find(j.VariableDeclaration)
|
|
27
|
-
.find(j.VariableDeclarator)
|
|
28
|
-
.find(j.Identifier)
|
|
29
|
-
.filter((identifier) => identifier!.value!.name === variableName).length;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export default function transformer(fileInfo: FileInfo, { jscodeshift: j }: API, options: Options) {
|
|
33
|
-
const source = j(fileInfo.source);
|
|
34
|
-
|
|
35
|
-
if (hasImportDeclaration(j, source, '@atlaskit/progress-indicator')) {
|
|
36
|
-
if (hasNameImport(j, source, 'ProgressDots')) {
|
|
37
|
-
source
|
|
38
|
-
.find(j.ImportDeclaration)
|
|
39
|
-
.find(j.Identifier)
|
|
40
|
-
.filter((identifier) => identifier.value.name === 'ProgressDots')
|
|
41
|
-
.replaceWith(j.identifier('ProgressIndicator'));
|
|
42
|
-
|
|
43
|
-
if (hasVariableAlreadyDeclared(j, source, 'ProgressIndicator')) {
|
|
44
|
-
source
|
|
45
|
-
.find(j.ImportDeclaration)
|
|
46
|
-
.find(j.ImportSpecifier)
|
|
47
|
-
.filter((specifier) => specifier!.node!.local!.name === 'ProgressIndicator')
|
|
48
|
-
.find(j.Identifier)
|
|
49
|
-
.replaceWith(
|
|
50
|
-
j.importSpecifier(
|
|
51
|
-
j.identifier('ProgressIndicator'),
|
|
52
|
-
j.identifier('AKProgressIndicator'),
|
|
53
|
-
),
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
source
|
|
57
|
-
.find(j.VariableDeclarator)
|
|
58
|
-
.find(j.Identifier)
|
|
59
|
-
.filter((identifier) => identifier.value.name === 'ProgressDots')
|
|
60
|
-
.replaceWith(j.identifier('AKProgressIndicator'));
|
|
61
|
-
|
|
62
|
-
source
|
|
63
|
-
.find(j.JSXIdentifier)
|
|
64
|
-
.filter((identifier) => identifier.value.name === 'ProgressDots')
|
|
65
|
-
.replaceWith(j.identifier('AKProgressIndicator'));
|
|
66
|
-
} else {
|
|
67
|
-
source
|
|
68
|
-
.find(j.VariableDeclarator)
|
|
69
|
-
.find(j.Identifier)
|
|
70
|
-
.filter((identifier) => identifier.value.name === 'ProgressDots')
|
|
71
|
-
.replaceWith(j.identifier('ProgressIndicator'));
|
|
72
|
-
source
|
|
73
|
-
.find(j.JSXIdentifier)
|
|
74
|
-
.filter((identifier) => identifier.value.name === 'ProgressDots')
|
|
75
|
-
.replaceWith(j.identifier('ProgressIndicator'));
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
return source.toSource(options.printOptions || { quote: 'single' });
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return fileInfo.source;
|
|
83
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
jest.autoMockOff();
|
|
2
|
-
|
|
3
|
-
import transformer from '../9.0.0-import-rename';
|
|
4
|
-
|
|
5
|
-
const defineInlineTest = require('jscodeshift/dist/testUtils').defineInlineTest;
|
|
6
|
-
|
|
7
|
-
describe('Update Avatar props', () => {
|
|
8
|
-
defineInlineTest(
|
|
9
|
-
{ default: transformer, parser: 'tsx' },
|
|
10
|
-
{},
|
|
11
|
-
`import React from 'react';`,
|
|
12
|
-
`import React from 'react';`,
|
|
13
|
-
'should not transform if imports are not present',
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
defineInlineTest(
|
|
17
|
-
{ default: transformer, parser: 'tsx' },
|
|
18
|
-
{},
|
|
19
|
-
`import {ProgressDots} from '@atlaskit/progress-indicator';`,
|
|
20
|
-
`import {ProgressIndicator} from '@atlaskit/progress-indicator';`,
|
|
21
|
-
'transforms import name `ProgressDots` to `ProgressIndicator`',
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
defineInlineTest(
|
|
25
|
-
{ default: transformer, parser: 'tsx' },
|
|
26
|
-
{},
|
|
27
|
-
`import { ProgressDots as CodeComponent } from '@atlaskit/progress-indicator';`,
|
|
28
|
-
`import { ProgressIndicator as CodeComponent } from '@atlaskit/progress-indicator';`,
|
|
29
|
-
'transforms import name `ProgressDots` with some other name to `ProgressIndicator`',
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
defineInlineTest(
|
|
33
|
-
{ default: transformer, parser: 'tsx' },
|
|
34
|
-
{},
|
|
35
|
-
`
|
|
36
|
-
import { ProgressDots } from '@atlaskit/progress-indicator';
|
|
37
|
-
const Component = () => <ProgressDots />;
|
|
38
|
-
const x = <ProgressDots />
|
|
39
|
-
const y = <ProgressDots ></ProgressDots>
|
|
40
|
-
const z = ProgressDots
|
|
41
|
-
`,
|
|
42
|
-
`
|
|
43
|
-
import { ProgressIndicator } from '@atlaskit/progress-indicator';
|
|
44
|
-
const Component = () => <ProgressIndicator />;
|
|
45
|
-
const x = <ProgressIndicator />
|
|
46
|
-
const y = <ProgressIndicator ></ProgressIndicator>
|
|
47
|
-
const z = ProgressIndicator
|
|
48
|
-
`,
|
|
49
|
-
'transforms import name `ProgressDots` to `ProgressIndicator` along with its usage',
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
defineInlineTest(
|
|
53
|
-
{ default: transformer, parser: 'tsx' },
|
|
54
|
-
{},
|
|
55
|
-
`
|
|
56
|
-
import { ProgressDots } from '@atlaskit/progress-indicator';
|
|
57
|
-
|
|
58
|
-
const Component = () =>{
|
|
59
|
-
return (
|
|
60
|
-
<div>
|
|
61
|
-
<ProgressDots />
|
|
62
|
-
<ProgressDots x={10} />
|
|
63
|
-
<ProgressDots></ProgressDots>
|
|
64
|
-
</div>
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
`,
|
|
68
|
-
`
|
|
69
|
-
import { ProgressIndicator } from '@atlaskit/progress-indicator';
|
|
70
|
-
|
|
71
|
-
const Component = () =>{
|
|
72
|
-
return (
|
|
73
|
-
<div>
|
|
74
|
-
<ProgressIndicator />
|
|
75
|
-
<ProgressIndicator x={10} />
|
|
76
|
-
<ProgressIndicator></ProgressIndicator>
|
|
77
|
-
</div>
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
`,
|
|
81
|
-
'transforms import name `ProgressDots` to `ProgressIndicator` along with its usage inside component',
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
defineInlineTest(
|
|
85
|
-
{ default: transformer, parser: 'tsx' },
|
|
86
|
-
{},
|
|
87
|
-
`
|
|
88
|
-
import { ProgressDots as CodeComponent } from '@atlaskit/progress-indicator';
|
|
89
|
-
const Component = () => <CodeComponent />;
|
|
90
|
-
`,
|
|
91
|
-
`
|
|
92
|
-
import { ProgressIndicator as CodeComponent } from '@atlaskit/progress-indicator';
|
|
93
|
-
const Component = () => <CodeComponent />;
|
|
94
|
-
`,
|
|
95
|
-
'transforms import name `ProgressDots` to `ProgressIndicator` with some other name along with its usage',
|
|
96
|
-
);
|
|
97
|
-
|
|
98
|
-
defineInlineTest(
|
|
99
|
-
{ default: transformer, parser: 'tsx' },
|
|
100
|
-
{},
|
|
101
|
-
`
|
|
102
|
-
import { ProgressDots } from '@atlaskit/progress-indicator';
|
|
103
|
-
const ProgressIndicator = () => <ProgressDots />;
|
|
104
|
-
`,
|
|
105
|
-
`
|
|
106
|
-
import { ProgressIndicator as AKProgressIndicator } from '@atlaskit/progress-indicator';
|
|
107
|
-
const ProgressIndicator = () => <AKProgressIndicator />;
|
|
108
|
-
`,
|
|
109
|
-
'transforms import name `ProgressDots` to `AKProgressIndicator` by renaming its imported name when `ProgressIndicator` variable is already declared',
|
|
110
|
-
);
|
|
111
|
-
});
|