@atlaskit/codemod-cli 0.17.7 → 0.17.9
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 +13 -0
- package/dist/cjs/main.js +1 -1
- package/dist/cjs/presets/migrate-to-new-buttons/utils/import-types-from-new-entry-point.js +5 -2
- package/dist/es2019/presets/migrate-to-new-buttons/utils/import-types-from-new-entry-point.js +5 -2
- package/dist/esm/main.js +1 -1
- package/dist/esm/presets/migrate-to-new-buttons/utils/import-types-from-new-entry-point.js +5 -2
- package/package.json +14 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/codemod-cli
|
|
2
2
|
|
|
3
|
+
## 0.17.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#67949](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67949) [`4ceb213f9313`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4ceb213f9313) - Migrate packages to use declarative entry points
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 0.17.8
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#62539](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/62539) [`4055341131ca`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4055341131ca) - Update button codemod to add type keywork for type imports
|
|
15
|
+
|
|
3
16
|
## 0.17.7
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/cjs/main.js
CHANGED
|
@@ -305,7 +305,7 @@ function _main() {
|
|
|
305
305
|
case 4:
|
|
306
306
|
_yield$parseArgs = _context5.sent;
|
|
307
307
|
packages = _yield$parseArgs.packages;
|
|
308
|
-
_process$env$_PACKAGE = "0.17.
|
|
308
|
+
_process$env$_PACKAGE = "0.17.9", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
|
|
309
309
|
logger.log(_chalk.default.bgBlue(_chalk.default.black("\uD83D\uDCDA Atlassian-Frontend codemod library @ ".concat(_PACKAGE_VERSION_, " \uD83D\uDCDA"))));
|
|
310
310
|
if (packages && packages.length > 0) {
|
|
311
311
|
logger.log(_chalk.default.gray("Searching for codemods for newer versions of the following packages: ".concat(packages.map(function (pkg) {
|
|
@@ -31,9 +31,12 @@ var importTypesFromNewEntryPoint = exports.importTypesFromNewEntryPoint = functi
|
|
|
31
31
|
});
|
|
32
32
|
if (appearanceAndSpacingTypeSpecifier.length) {
|
|
33
33
|
appearanceAndSpacingTypeSpecifier.forEach(function (specifier) {
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
specifier.node.importKind = 'type'; // make sure all type imports are prefixed with the `type` keyword
|
|
36
|
+
specifiers.push(specifier.node); // add new Appearance and Spacing types to the new entrypoint
|
|
37
|
+
j(specifier).remove(); // remove old one
|
|
36
38
|
});
|
|
37
39
|
}
|
|
40
|
+
|
|
38
41
|
return specifiers;
|
|
39
42
|
};
|
package/dist/es2019/presets/migrate-to-new-buttons/utils/import-types-from-new-entry-point.js
CHANGED
|
@@ -19,9 +19,12 @@ export const importTypesFromNewEntryPoint = (buttonImports, specifiers, j, fileS
|
|
|
19
19
|
const appearanceAndSpacingTypeSpecifier = fileSource.find(j.ImportDeclaration).filter(path => path.node.source.value === '@atlaskit/button' || path.node.source.value === '@atlaskit/button/types').find(j.ImportSpecifier).filter(path => path.node.imported.name === 'Appearance' || path.node.imported.name === 'Spacing');
|
|
20
20
|
if (appearanceAndSpacingTypeSpecifier.length) {
|
|
21
21
|
appearanceAndSpacingTypeSpecifier.forEach(specifier => {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
specifier.node.importKind = 'type'; // make sure all type imports are prefixed with the `type` keyword
|
|
24
|
+
specifiers.push(specifier.node); // add new Appearance and Spacing types to the new entrypoint
|
|
25
|
+
j(specifier).remove(); // remove old one
|
|
24
26
|
});
|
|
25
27
|
}
|
|
28
|
+
|
|
26
29
|
return specifiers;
|
|
27
30
|
};
|
package/dist/esm/main.js
CHANGED
|
@@ -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.17.
|
|
301
|
+
_process$env$_PACKAGE = "0.17.9", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
|
|
302
302
|
logger.log(chalk.bgBlue(chalk.black("\uD83D\uDCDA Atlassian-Frontend codemod library @ ".concat(_PACKAGE_VERSION_, " \uD83D\uDCDA"))));
|
|
303
303
|
if (packages && packages.length > 0) {
|
|
304
304
|
logger.log(chalk.gray("Searching for codemods for newer versions of the following packages: ".concat(packages.map(function (pkg) {
|
|
@@ -25,9 +25,12 @@ export var importTypesFromNewEntryPoint = function importTypesFromNewEntryPoint(
|
|
|
25
25
|
});
|
|
26
26
|
if (appearanceAndSpacingTypeSpecifier.length) {
|
|
27
27
|
appearanceAndSpacingTypeSpecifier.forEach(function (specifier) {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
specifier.node.importKind = 'type'; // make sure all type imports are prefixed with the `type` keyword
|
|
30
|
+
specifiers.push(specifier.node); // add new Appearance and Spacing types to the new entrypoint
|
|
31
|
+
j(specifier).remove(); // remove old one
|
|
30
32
|
});
|
|
31
33
|
}
|
|
34
|
+
|
|
32
35
|
return specifiers;
|
|
33
36
|
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/codemod-cli",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.9",
|
|
4
4
|
"description": "A cli for distributing codemods for atlassian-frontend components and services",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
7
7
|
},
|
|
8
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
9
|
"author": "Atlassian Pty Ltd",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "index.js",
|
|
@@ -19,9 +19,18 @@
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"atlaskit:src": "src/index.ts",
|
|
22
|
+
"af:exports": {
|
|
23
|
+
".": "./src/index.ts",
|
|
24
|
+
"./cli": "./src/cli.ts",
|
|
25
|
+
"./filepath": "./src/filepath.ts",
|
|
26
|
+
"./main": "./src/main.ts",
|
|
27
|
+
"./sinceRef": "./src/sinceRef.ts",
|
|
28
|
+
"./transforms": "./src/transforms.ts",
|
|
29
|
+
"./types": "./src/types.ts",
|
|
30
|
+
"./utils": "./src/utils.ts"
|
|
31
|
+
},
|
|
22
32
|
"atlassian": {
|
|
23
33
|
"team": "Design System Team",
|
|
24
|
-
"deprecatedAutoEntryPoints": true,
|
|
25
34
|
"releaseModel": "continuous"
|
|
26
35
|
},
|
|
27
36
|
"scripts": {
|
|
@@ -33,7 +42,7 @@
|
|
|
33
42
|
},
|
|
34
43
|
"dependencies": {
|
|
35
44
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
36
|
-
"@atlaskit/tokens": "^1.
|
|
45
|
+
"@atlaskit/tokens": "^1.34.0",
|
|
37
46
|
"@babel/runtime": "^7.0.0",
|
|
38
47
|
"@codeshift/utils": "^0.2.4",
|
|
39
48
|
"@types/jscodeshift": "^0.11.0",
|
|
@@ -56,4 +65,4 @@
|
|
|
56
65
|
},
|
|
57
66
|
"homepage": "https://atlaskit.atlassian.com/packages/monorepo-tooling/codemod-cli",
|
|
58
67
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
59
|
-
}
|
|
68
|
+
}
|