@atlaskit/codemod-cli 0.28.1 → 0.28.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 +6 -0
- package/dist/types/presets/remove-token-fallbacks/remove-token-fallbacks.d.ts +1 -1
- package/dist/types/presets/remove-token-fallbacks/types.d.ts +1 -1
- package/dist/types/presets/remove-token-fallbacks/utils/normalize-values.d.ts +1 -1
- package/dist/types/presets/remove-token-fallbacks/utils/remove-unused-imports.d.ts +1 -1
- package/dist/types/presets/remove-token-fallbacks/utils/remove-unused-variables.d.ts +1 -1
- package/dist/types/presets/remove-token-fallbacks/utils/reporter.d.ts +1 -1
- package/dist/types/presets/remove-token-fallbacks/utils/token-processor.d.ts +1 -1
- package/dist/types-ts4.5/presets/remove-token-fallbacks/remove-token-fallbacks.d.ts +1 -1
- package/dist/types-ts4.5/presets/remove-token-fallbacks/types.d.ts +1 -1
- package/dist/types-ts4.5/presets/remove-token-fallbacks/utils/normalize-values.d.ts +1 -1
- package/dist/types-ts4.5/presets/remove-token-fallbacks/utils/remove-unused-imports.d.ts +1 -1
- package/dist/types-ts4.5/presets/remove-token-fallbacks/utils/remove-unused-variables.d.ts +1 -1
- package/dist/types-ts4.5/presets/remove-token-fallbacks/utils/reporter.d.ts +1 -1
- package/dist/types-ts4.5/presets/remove-token-fallbacks/utils/token-processor.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { API, FileInfo } from 'jscodeshift';
|
|
2
|
-
import { RemoveTokenFallbackOptions } from './types';
|
|
2
|
+
import { type RemoveTokenFallbackOptions } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Transforms the source code of a file by removing fallback values from the @atlaskit/tokens/token functions.
|
|
5
5
|
* By default removes only the fallbacks that have the same values as the tokens.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ASTPath, ImportDeclaration, Options, VariableDeclarator } from 'jscodeshift';
|
|
1
|
+
import { type ASTPath, type ImportDeclaration, type Options, type VariableDeclarator } from 'jscodeshift';
|
|
2
2
|
export interface ReplacementDetail {
|
|
3
3
|
teamInfo: TeamInfo;
|
|
4
4
|
filePath: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RemoveTokenFallbackOptions } from '../types';
|
|
1
|
+
import { type RemoveTokenFallbackOptions } from '../types';
|
|
2
2
|
export declare function normalizeValues(tokenKey: string, tokenValue: string | undefined, fallbackValue: string | undefined, options?: RemoveTokenFallbackOptions): {
|
|
3
3
|
difference?: number;
|
|
4
4
|
isAcceptableDifference?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ASTPath, ImportDeclaration, JSCodeshift } from 'jscodeshift';
|
|
1
|
+
import { type ASTPath, type ImportDeclaration, type JSCodeshift } from 'jscodeshift';
|
|
2
2
|
export declare function removeUnusedImports(importDeclarations: ASTPath<ImportDeclaration>[], j: JSCodeshift): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ASTPath, JSCodeshift, VariableDeclarator } from 'jscodeshift';
|
|
1
|
+
import { type ASTPath, type JSCodeshift, type VariableDeclarator } from 'jscodeshift';
|
|
2
2
|
export declare function removeUnusedVariables(variableDeclarations: ASTPath<VariableDeclarator>[], j: JSCodeshift): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransformationDetails } from '../types';
|
|
1
|
+
import { type TransformationDetails } from '../types';
|
|
2
2
|
export declare function clearFolder(reportFolder: string): Promise<void>;
|
|
3
3
|
export declare function combineReports(reportFolder: string): Promise<void>;
|
|
4
4
|
export declare function writeReports(details: TransformationDetails, reportFolder: string): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ASTPath, CallExpression, Collection, FileInfo, JSCodeshift } from 'jscodeshift';
|
|
2
|
-
import { RemoveTokenFallbackOptions, TeamInfo, TokenProcessingResult, TransformationDetails } from '../types';
|
|
2
|
+
import { type RemoveTokenFallbackOptions, type TeamInfo, type TokenProcessingResult, type TransformationDetails } from '../types';
|
|
3
3
|
export declare class TokenProcessor {
|
|
4
4
|
private j;
|
|
5
5
|
private options;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { API, FileInfo } from 'jscodeshift';
|
|
2
|
-
import { RemoveTokenFallbackOptions } from './types';
|
|
2
|
+
import { type RemoveTokenFallbackOptions } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Transforms the source code of a file by removing fallback values from the @atlaskit/tokens/token functions.
|
|
5
5
|
* By default removes only the fallbacks that have the same values as the tokens.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ASTPath, ImportDeclaration, Options, VariableDeclarator } from 'jscodeshift';
|
|
1
|
+
import { type ASTPath, type ImportDeclaration, type Options, type VariableDeclarator } from 'jscodeshift';
|
|
2
2
|
export interface ReplacementDetail {
|
|
3
3
|
teamInfo: TeamInfo;
|
|
4
4
|
filePath: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RemoveTokenFallbackOptions } from '../types';
|
|
1
|
+
import { type RemoveTokenFallbackOptions } from '../types';
|
|
2
2
|
export declare function normalizeValues(tokenKey: string, tokenValue: string | undefined, fallbackValue: string | undefined, options?: RemoveTokenFallbackOptions): {
|
|
3
3
|
difference?: number;
|
|
4
4
|
isAcceptableDifference?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ASTPath, ImportDeclaration, JSCodeshift } from 'jscodeshift';
|
|
1
|
+
import { type ASTPath, type ImportDeclaration, type JSCodeshift } from 'jscodeshift';
|
|
2
2
|
export declare function removeUnusedImports(importDeclarations: ASTPath<ImportDeclaration>[], j: JSCodeshift): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ASTPath, JSCodeshift, VariableDeclarator } from 'jscodeshift';
|
|
1
|
+
import { type ASTPath, type JSCodeshift, type VariableDeclarator } from 'jscodeshift';
|
|
2
2
|
export declare function removeUnusedVariables(variableDeclarations: ASTPath<VariableDeclarator>[], j: JSCodeshift): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransformationDetails } from '../types';
|
|
1
|
+
import { type TransformationDetails } from '../types';
|
|
2
2
|
export declare function clearFolder(reportFolder: string): Promise<void>;
|
|
3
3
|
export declare function combineReports(reportFolder: string): Promise<void>;
|
|
4
4
|
export declare function writeReports(details: TransformationDetails, reportFolder: string): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ASTPath, CallExpression, Collection, FileInfo, JSCodeshift } from 'jscodeshift';
|
|
2
|
-
import { RemoveTokenFallbackOptions, TeamInfo, TokenProcessingResult, TransformationDetails } from '../types';
|
|
2
|
+
import { type RemoveTokenFallbackOptions, type TeamInfo, type TokenProcessingResult, type TransformationDetails } from '../types';
|
|
3
3
|
export declare class TokenProcessor {
|
|
4
4
|
private j;
|
|
5
5
|
private options;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/codemod-cli",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.2",
|
|
4
4
|
"description": "A cli for distributing codemods for atlassian-frontend components and services",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"bin": "./bin/codemod-cli.js",
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
42
|
-
"@atlaskit/tokens": "^
|
|
42
|
+
"@atlaskit/tokens": "^6.0.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"@codeshift/utils": "^0.2.4",
|
|
45
45
|
"@hypermod/utils": "^0.4.2",
|