@atlaskit/codemod-cli 0.10.2 → 0.10.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 +12 -0
- package/README.md +2 -2
- package/cli/package.json +8 -1
- package/dist/cjs/main.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/main.js +1 -1
- package/dist/esm/version.json +1 -1
- package/filepath/package.json +8 -1
- package/main/package.json +8 -1
- package/package.json +4 -4
- package/report.api.md +31 -42
- package/sinceRef/package.json +8 -1
- package/tmp/api-report-tmp.d.ts +66 -0
- package/transforms/package.json +8 -1
- package/types/package.json +8 -1
- package/utils/package.json +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/codemod-cli
|
|
2
2
|
|
|
3
|
+
## 0.10.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 0.10.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
|
|
14
|
+
|
|
3
15
|
## 0.10.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Codemod CLI
|
|
2
2
|
|
|
3
|
-
Detailed docs and example usage can be found [here](../../../repo-docs/content/cloud/framework/atlassian-frontend/codemods/
|
|
3
|
+
Detailed docs and example usage can be found [here](../../../repo-docs/content/cloud/framework/atlassian-frontend/codemods/atlassian-codemods.md)
|
|
4
4
|
|
|
5
5
|
## Testing locally
|
|
6
6
|
|
|
@@ -10,4 +10,4 @@ When wanting to run the CLI before it has been published you can run the start c
|
|
|
10
10
|
yarn start [commands]
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
For a list of commands run it with `-h` or look at the [documentation](../../../repo-docs/content/cloud/framework/atlassian-frontend/codemods/
|
|
13
|
+
For a list of commands run it with `-h` or look at the [documentation](../../../repo-docs/content/cloud/framework/atlassian-frontend/codemods/atlassian-codemods.md).
|
package/cli/package.json
CHANGED
|
@@ -3,5 +3,12 @@
|
|
|
3
3
|
"main": "../dist/cjs/cli.js",
|
|
4
4
|
"module": "../dist/esm/cli.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/cli.js",
|
|
6
|
-
"types": "../dist/types/cli.d.ts"
|
|
6
|
+
"types": "../dist/types/cli.d.ts",
|
|
7
|
+
"typesVersions": {
|
|
8
|
+
">=4.0 <4.5": {
|
|
9
|
+
"*": [
|
|
10
|
+
"../dist/types-ts4.0/cli.d.ts"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
7
14
|
}
|
package/dist/cjs/main.js
CHANGED
|
@@ -387,7 +387,7 @@ function _main() {
|
|
|
387
387
|
case 4:
|
|
388
388
|
_yield$parseArgs = _context5.sent;
|
|
389
389
|
packages = _yield$parseArgs.packages;
|
|
390
|
-
_process$env$_PACKAGE = "0.10.
|
|
390
|
+
_process$env$_PACKAGE = "0.10.4", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
|
|
391
391
|
logger.log(_chalk.default.bgBlue(_chalk.default.black("\uD83D\uDCDA Atlassian-Frontend codemod library @ ".concat(_PACKAGE_VERSION_, " \uD83D\uDCDA"))));
|
|
392
392
|
|
|
393
393
|
if (packages && packages.length > 0) {
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/main.js
CHANGED
|
@@ -365,7 +365,7 @@ function _main() {
|
|
|
365
365
|
case 4:
|
|
366
366
|
_yield$parseArgs = _context5.sent;
|
|
367
367
|
packages = _yield$parseArgs.packages;
|
|
368
|
-
_process$env$_PACKAGE = "0.10.
|
|
368
|
+
_process$env$_PACKAGE = "0.10.4", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
|
|
369
369
|
logger.log(chalk.bgBlue(chalk.black("\uD83D\uDCDA Atlassian-Frontend codemod library @ ".concat(_PACKAGE_VERSION_, " \uD83D\uDCDA"))));
|
|
370
370
|
|
|
371
371
|
if (packages && packages.length > 0) {
|
package/dist/esm/version.json
CHANGED
package/filepath/package.json
CHANGED
|
@@ -3,5 +3,12 @@
|
|
|
3
3
|
"main": "../dist/cjs/filepath.js",
|
|
4
4
|
"module": "../dist/esm/filepath.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/filepath.js",
|
|
6
|
-
"types": "../dist/types/filepath.d.ts"
|
|
6
|
+
"types": "../dist/types/filepath.d.ts",
|
|
7
|
+
"typesVersions": {
|
|
8
|
+
">=4.0 <4.5": {
|
|
9
|
+
"*": [
|
|
10
|
+
"../dist/types-ts4.0/filepath.d.ts"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
7
14
|
}
|
package/main/package.json
CHANGED
|
@@ -3,5 +3,12 @@
|
|
|
3
3
|
"main": "../dist/cjs/main.js",
|
|
4
4
|
"module": "../dist/esm/main.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/main.js",
|
|
6
|
-
"types": "../dist/types/main.d.ts"
|
|
6
|
+
"types": "../dist/types/main.d.ts",
|
|
7
|
+
"typesVersions": {
|
|
8
|
+
">=4.0 <4.5": {
|
|
9
|
+
"*": [
|
|
10
|
+
"../dist/types-ts4.0/main.d.ts"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
7
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/codemod-cli",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
4
4
|
"description": "A cli for distributing codemods for atlassian-frontend components and services",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"codemod-cli": "./bin/codemod-cli.js"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atlaskit/tokens": "^0.
|
|
27
|
+
"@atlaskit/tokens": "^0.11.0",
|
|
28
28
|
"@babel/runtime": "^7.0.0",
|
|
29
29
|
"@types/jscodeshift": "^0.11.0",
|
|
30
30
|
"chalk": "^4.1.2",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@atlaskit/docs": "*",
|
|
43
43
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
44
|
-
"ts-node": "^10.
|
|
45
|
-
"typescript": "4.
|
|
44
|
+
"ts-node": "^10.9.1",
|
|
45
|
+
"typescript": "4.5.5"
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://atlaskit.atlassian.com/packages/monorepo-tooling/codemod-cli",
|
|
48
48
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
package/report.api.md
CHANGED
|
@@ -1,62 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- API Report Version: 2.3 -->
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## API Report File for "@atlaskit/codemod-cli"
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
|
|
6
|
+
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
|
+
|
|
8
|
+
### Table of contents
|
|
9
|
+
|
|
10
|
+
- [Main Entry Types](#main-entry-types)
|
|
11
|
+
|
|
12
|
+
### Main Entry Types
|
|
13
|
+
|
|
14
|
+
<!--SECTION START: Main Entry Types-->
|
|
6
15
|
|
|
7
16
|
```ts
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* The transform to run
|
|
11
|
-
*/
|
|
17
|
+
// @public (undocumented)
|
|
18
|
+
type CliFlags = {
|
|
12
19
|
transform?: string;
|
|
13
|
-
/**
|
|
14
|
-
* select which transform to run
|
|
15
|
-
*/
|
|
16
20
|
preset?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Comma separated list of packages to run transforms for, @scope/package[@version]. If version is supplied, will only run transforms above that version
|
|
19
|
-
*/
|
|
20
21
|
packages?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Parser to use for parsing the source files
|
|
23
|
-
*/
|
|
24
22
|
parser: 'babel' | 'babylon' | 'flow' | 'ts' | 'tsx';
|
|
25
|
-
/**
|
|
26
|
-
* Transform files with these file extensions (comma separated list)
|
|
27
|
-
*/
|
|
28
23
|
extensions: string;
|
|
29
|
-
/**
|
|
30
|
-
* Ignore files that match a provided glob expression
|
|
31
|
-
*/
|
|
32
24
|
ignorePattern: string;
|
|
33
|
-
/**
|
|
34
|
-
* Determines changed packages since the specified git ref and runs all codemods for them. The ref can be any valid git ref, e.g. a commit hash, HEAD etc.
|
|
35
|
-
*/
|
|
36
25
|
sinceRef?: string;
|
|
37
|
-
/**
|
|
38
|
-
* Return a 1 exit code when errors were found during execution of codemods
|
|
39
|
-
*/
|
|
40
26
|
failOnError?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Filters source paths to package directories that declare a dependency on the package being upgraded
|
|
43
|
-
*/
|
|
44
27
|
filterPaths?: boolean;
|
|
45
28
|
};
|
|
46
29
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*/
|
|
50
|
-
declare type Default<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
30
|
+
// @public
|
|
31
|
+
type Default<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
51
32
|
|
|
52
|
-
|
|
33
|
+
// @public (undocumented)
|
|
34
|
+
const defaultFlags: {
|
|
53
35
|
parser: 'babel';
|
|
54
36
|
extensions: string;
|
|
55
37
|
ignorePattern: string;
|
|
56
38
|
logger: Console;
|
|
57
39
|
};
|
|
58
40
|
|
|
59
|
-
|
|
41
|
+
// @public (undocumented)
|
|
42
|
+
type Flags_2 = CliFlags & {
|
|
60
43
|
logger: {
|
|
61
44
|
log: (...args: any) => void;
|
|
62
45
|
warn: (...args: any) => void;
|
|
@@ -64,7 +47,8 @@ declare type Flags_2 = CliFlags & {
|
|
|
64
47
|
};
|
|
65
48
|
export { Flags_2 as Flags };
|
|
66
49
|
|
|
67
|
-
|
|
50
|
+
// @public (undocumented)
|
|
51
|
+
function main(
|
|
68
52
|
input: string[],
|
|
69
53
|
userFlags: UserFlags,
|
|
70
54
|
): Promise<{
|
|
@@ -79,11 +63,16 @@ declare function main(
|
|
|
79
63
|
}>;
|
|
80
64
|
export default main;
|
|
81
65
|
|
|
82
|
-
|
|
66
|
+
// @public (undocumented)
|
|
67
|
+
export class NoTransformsExistError extends Error {}
|
|
83
68
|
|
|
84
|
-
|
|
69
|
+
// @public (undocumented)
|
|
70
|
+
export type UserFlags = Default<Flags_2, keyof typeof defaultFlags>;
|
|
85
71
|
|
|
86
|
-
|
|
72
|
+
// @public (undocumented)
|
|
73
|
+
export class ValidationError extends Error {}
|
|
87
74
|
|
|
88
|
-
|
|
75
|
+
// (No @packageDocumentation comment for this package)
|
|
89
76
|
```
|
|
77
|
+
|
|
78
|
+
<!--SECTION END: Main Entry Types-->
|
package/sinceRef/package.json
CHANGED
|
@@ -3,5 +3,12 @@
|
|
|
3
3
|
"main": "../dist/cjs/sinceRef.js",
|
|
4
4
|
"module": "../dist/esm/sinceRef.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/sinceRef.js",
|
|
6
|
-
"types": "../dist/types/sinceRef.d.ts"
|
|
6
|
+
"types": "../dist/types/sinceRef.d.ts",
|
|
7
|
+
"typesVersions": {
|
|
8
|
+
">=4.0 <4.5": {
|
|
9
|
+
"*": [
|
|
10
|
+
"../dist/types-ts4.0/sinceRef.d.ts"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
7
14
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/codemod-cli"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
// @public (undocumented)
|
|
8
|
+
type CliFlags = {
|
|
9
|
+
transform?: string;
|
|
10
|
+
preset?: string;
|
|
11
|
+
packages?: string;
|
|
12
|
+
parser: 'babel' | 'babylon' | 'flow' | 'ts' | 'tsx';
|
|
13
|
+
extensions: string;
|
|
14
|
+
ignorePattern: string;
|
|
15
|
+
sinceRef?: string;
|
|
16
|
+
failOnError?: boolean;
|
|
17
|
+
filterPaths?: boolean;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// @public
|
|
21
|
+
type Default<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
22
|
+
|
|
23
|
+
// @public (undocumented)
|
|
24
|
+
const defaultFlags: {
|
|
25
|
+
parser: "babel";
|
|
26
|
+
extensions: string;
|
|
27
|
+
ignorePattern: string;
|
|
28
|
+
logger: Console;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// @public (undocumented)
|
|
32
|
+
type Flags_2 = CliFlags & {
|
|
33
|
+
logger: {
|
|
34
|
+
log: (...args: any) => void;
|
|
35
|
+
warn: (...args: any) => void;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export { Flags_2 as Flags }
|
|
39
|
+
|
|
40
|
+
// @public (undocumented)
|
|
41
|
+
function main(input: string[], userFlags: UserFlags): Promise<{
|
|
42
|
+
transforms: {
|
|
43
|
+
module: string;
|
|
44
|
+
root: string;
|
|
45
|
+
dir: string;
|
|
46
|
+
base: string;
|
|
47
|
+
ext: string;
|
|
48
|
+
name: string;
|
|
49
|
+
}[];
|
|
50
|
+
}>;
|
|
51
|
+
export default main;
|
|
52
|
+
|
|
53
|
+
// @public (undocumented)
|
|
54
|
+
export class NoTransformsExistError extends Error {
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// @public (undocumented)
|
|
58
|
+
export type UserFlags = Default<Flags_2, keyof typeof defaultFlags>;
|
|
59
|
+
|
|
60
|
+
// @public (undocumented)
|
|
61
|
+
export class ValidationError extends Error {
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// (No @packageDocumentation comment for this package)
|
|
65
|
+
|
|
66
|
+
```
|
package/transforms/package.json
CHANGED
|
@@ -3,5 +3,12 @@
|
|
|
3
3
|
"main": "../dist/cjs/transforms.js",
|
|
4
4
|
"module": "../dist/esm/transforms.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/transforms.js",
|
|
6
|
-
"types": "../dist/types/transforms.d.ts"
|
|
6
|
+
"types": "../dist/types/transforms.d.ts",
|
|
7
|
+
"typesVersions": {
|
|
8
|
+
">=4.0 <4.5": {
|
|
9
|
+
"*": [
|
|
10
|
+
"../dist/types-ts4.0/transforms.d.ts"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
7
14
|
}
|
package/types/package.json
CHANGED
|
@@ -3,5 +3,12 @@
|
|
|
3
3
|
"main": "../dist/cjs/types.js",
|
|
4
4
|
"module": "../dist/esm/types.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/types.js",
|
|
6
|
-
"types": "../dist/types/types.d.ts"
|
|
6
|
+
"types": "../dist/types/types.d.ts",
|
|
7
|
+
"typesVersions": {
|
|
8
|
+
">=4.0 <4.5": {
|
|
9
|
+
"*": [
|
|
10
|
+
"../dist/types-ts4.0/types.d.ts"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
7
14
|
}
|
package/utils/package.json
CHANGED
|
@@ -3,5 +3,12 @@
|
|
|
3
3
|
"main": "../dist/cjs/utils.js",
|
|
4
4
|
"module": "../dist/esm/utils.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/utils.js",
|
|
6
|
-
"types": "../dist/types/utils.d.ts"
|
|
6
|
+
"types": "../dist/types/utils.d.ts",
|
|
7
|
+
"typesVersions": {
|
|
8
|
+
">=4.0 <4.5": {
|
|
9
|
+
"*": [
|
|
10
|
+
"../dist/types-ts4.0/utils.d.ts"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
7
14
|
}
|