@atlaskit/codemod-cli 0.9.7 → 0.10.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 +18 -0
- package/dist/cjs/main.js +3 -3
- package/dist/cjs/presets/css-to-design-tokens/css-to-design-tokens.js +237 -0
- package/dist/cjs/presets/css-to-design-tokens/utils/legacy-colors.js +343 -0
- package/dist/cjs/presets/css-to-design-tokens/utils/meta.js +63 -0
- package/dist/cjs/presets/index.js +3 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/presets/css-to-design-tokens/css-to-design-tokens.js +176 -0
- package/dist/es2019/presets/css-to-design-tokens/utils/legacy-colors.js +334 -0
- package/dist/es2019/presets/css-to-design-tokens/utils/meta.js +39 -0
- package/dist/es2019/presets/index.js +2 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/cli.js +1 -1
- package/dist/esm/filepath.js +1 -1
- package/dist/esm/main.js +3 -2
- package/dist/esm/presets/css-to-design-tokens/css-to-design-tokens.js +217 -0
- package/dist/esm/presets/css-to-design-tokens/utils/legacy-colors.js +334 -0
- package/dist/esm/presets/css-to-design-tokens/utils/meta.js +52 -0
- package/dist/esm/presets/index.js +2 -1
- package/dist/esm/sinceRef.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/presets/css-to-design-tokens/css-to-design-tokens.d.ts +2 -0
- package/dist/types/presets/css-to-design-tokens/utils/legacy-colors.d.ts +3 -0
- package/dist/types/presets/css-to-design-tokens/utils/meta.d.ts +1 -0
- package/dist/types/presets/index.d.ts +1 -0
- package/package.json +6 -4
- package/report.api.md +89 -0
package/report.api.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/codemod-cli".
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
declare type CliFlags = {
|
|
9
|
+
/**
|
|
10
|
+
* The transform to run
|
|
11
|
+
*/
|
|
12
|
+
transform?: string;
|
|
13
|
+
/**
|
|
14
|
+
* select which transform to run
|
|
15
|
+
*/
|
|
16
|
+
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
|
+
packages?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Parser to use for parsing the source files
|
|
23
|
+
*/
|
|
24
|
+
parser: 'babel' | 'babylon' | 'flow' | 'ts' | 'tsx';
|
|
25
|
+
/**
|
|
26
|
+
* Transform files with these file extensions (comma separated list)
|
|
27
|
+
*/
|
|
28
|
+
extensions: string;
|
|
29
|
+
/**
|
|
30
|
+
* Ignore files that match a provided glob expression
|
|
31
|
+
*/
|
|
32
|
+
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
|
+
sinceRef?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Return a 1 exit code when errors were found during execution of codemods
|
|
39
|
+
*/
|
|
40
|
+
failOnError?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Filters source paths to package directories that declare a dependency on the package being upgraded
|
|
43
|
+
*/
|
|
44
|
+
filterPaths?: boolean;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** Converts required args to optional if they have a default
|
|
48
|
+
* Example: export type UserFlags = Default<Flags, keyof typeof defaultFlags>;
|
|
49
|
+
*/
|
|
50
|
+
declare type Default<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
51
|
+
|
|
52
|
+
declare const defaultFlags: {
|
|
53
|
+
parser: 'babel';
|
|
54
|
+
extensions: string;
|
|
55
|
+
ignorePattern: string;
|
|
56
|
+
logger: Console;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
declare type Flags_2 = CliFlags & {
|
|
60
|
+
logger: {
|
|
61
|
+
log: (...args: any) => void;
|
|
62
|
+
warn: (...args: any) => void;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
export { Flags_2 as Flags };
|
|
66
|
+
|
|
67
|
+
declare function main(
|
|
68
|
+
input: string[],
|
|
69
|
+
userFlags: UserFlags,
|
|
70
|
+
): Promise<{
|
|
71
|
+
transforms: {
|
|
72
|
+
module: string;
|
|
73
|
+
root: string;
|
|
74
|
+
dir: string;
|
|
75
|
+
base: string;
|
|
76
|
+
ext: string;
|
|
77
|
+
name: string;
|
|
78
|
+
}[];
|
|
79
|
+
}>;
|
|
80
|
+
export default main;
|
|
81
|
+
|
|
82
|
+
export declare class NoTransformsExistError extends Error {}
|
|
83
|
+
|
|
84
|
+
export declare type UserFlags = Default<Flags_2, keyof typeof defaultFlags>;
|
|
85
|
+
|
|
86
|
+
export declare class ValidationError extends Error {}
|
|
87
|
+
|
|
88
|
+
export {};
|
|
89
|
+
```
|