@workday/canvas-kit-codemod
Advanced tools
Comparing version 5.0.0-beta.2 to 5.0.0-beta.0-next.0
@@ -43,2 +43,3 @@ import { getImportRenameMap } from './getImportRenameMap'; | ||
var children = nodePath.value.children; | ||
var depth = attributes.find(findAttribute('depth')); | ||
nodePath.value.openingElement.attributes = attributes.filter(function (item) { | ||
@@ -52,2 +53,10 @@ if (item.type === 'JSXAttribute' && | ||
}); | ||
if (depth && | ||
depth.value && | ||
depth.value.type === 'JSXExpressionContainer' && | ||
depth.value.expression.type === 'MemberExpression' && | ||
depth.value.expression.object.type === 'Identifier' && | ||
depth.value.expression.property.type === 'NumericLiteral') { | ||
depth.value.expression = depth.value.expression.property; | ||
} | ||
var CardHeadingJSX = j.jsxMemberExpression(j.jsxIdentifier(importMap.Card), j.jsxIdentifier('Heading')); | ||
@@ -54,0 +63,0 @@ var CardBodyJSX = j.jsxMemberExpression(j.jsxIdentifier(importMap.Card), j.jsxIdentifier('Body')); |
@@ -16,5 +16,10 @@ var __assign = (this && this.__assign) || function () { | ||
import renameButtonRefs from './renameButtonRefs'; | ||
import recategorizeButtons from './recategorizeButtons'; | ||
import renameSpacing from './renameSpacing'; | ||
import renameCoreImports from './renameCoreImports'; | ||
import compoundCard from './compoundCard'; | ||
import moveInputProvider from './moveInputProvider'; | ||
import renameInputRefs from './renameInputRefs'; | ||
import mapTypeTokensToNewHierarchy from './mapTypeTokensToNewHierarchy'; | ||
import renamePreviewTokenImports from './renamePreviewTokenImports'; | ||
export default function transformer(file, api, options) { | ||
@@ -28,5 +33,10 @@ var fixes = [ | ||
renameCoreImports, | ||
recategorizeButtons, | ||
compoundCard, | ||
moveInputProvider, | ||
renameInputRefs, | ||
mapTypeTokensToNewHierarchy, | ||
renamePreviewTokenImports, | ||
]; | ||
return fixes.reduce(function (source, fix) { return fix(__assign(__assign({}, file), { source: source }), api, options); }, file.source); | ||
} |
@@ -5,3 +5,3 @@ { | ||
"license": "Apache-2.0", | ||
"version": "5.0.0-beta.2", | ||
"version": "5.0.0-beta.0-next.0+45cb8da2", | ||
"description": "A collection of codemods for use on Workday Canvas Kit packages.", | ||
@@ -42,3 +42,3 @@ "main": "dist/es6/index.js", | ||
}, | ||
"gitHead": "d56ea749b56f8b571c39d5ab82230cf7ef1a5d2d" | ||
"gitHead": "45cb8da223cb8f41786b1c00ee58e5cdccb73486" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
88082
52
1468
2