Codemod utils
jscodeshift-compatible codemod utilities
yarn add @atlaskit/codemod-utils
jscodeshift-compatible codemod utilities
yarn add @atlaskit/codemod-utils
edc6fef0c8f
- Fix printf format specifier matching within matchesStringWithFormatSpecifier
for fuzzy matching interpolated placeholder valuese4624adcb2f
- ED-14608: Update codemod-utils to support type import entry point changes in changeImportEntryPoint, remove adf-utils from repo stricter lint exclusion lists9358d42eeaa
- NO-ISSUE: fixed codemod utils tryCreateImport() and addToImport() causing multiple insert in certain scenarios#20033 b29ce16dad8
- [ED-14606] Move bitbucket schema, confluence schema, jira schema, and default schema from @atlaskit/adf-schema to their own entry points. These new entry points are as follows
@atlaskit/adf-schema/schema-bitbucket for:
@atlaskit/adf-schema/schema-confluence for:
@atlaskit/adf-schema/schema-jira for:
@atlaskit/adf-schema/schema-default for:
This change also includes codemods in @atlaskit/adf-schema to update these entry points. It also introduces a new util function "changeImportEntryPoint" to @atlaskit/codemod-utils to handle this scenario.
cf853e39278
- Adds new util hasImportDeclarationFromAnyPackageEntrypoint
. It works just like hasImportDeclaration
, but instead of searching for an import declaration that has strict equality with a supplied import path (e.g. @atlaskit/theme
), it looks for an import declaration that starts with the supplied import path. With that same example, it will match both @atlaskit/theme
and @atlaskit/theme/typography
— making it easy to choose to run a codemod on a usage regardless of the way in which it was imported.9729143f07b
- Add support functions getDynamicImportName
, isCallExpressionCalleeImportType
, isCallExpressionArgumentStringLiteralType
, isCallExpressionArgumentValueMatches
and addDynamicImport
.d0ef46dee01
- Removes ts-node / cjs bundle switcher from main entrypoint of codemod-utils and updated codemod-cli scripts to support43412f2b0b1
- Added few helper functions200ebeada19
- Updated codemods to handle edge cases#10787 2ec9e608acc
- Update addCommentBefore
helper method to:
TODO: (from codemod)
for backwards compatibilityblock
for backwards compatibility#10179 284a374eed8
- Removed createSkipTest
& createSkipTestTransformer
transformer from the API. This is a breaking change!
If you rely on this transformer, you can now depend on it via a new package @af/skip-inconsistent-tests
.
1300c88e2cc
- Add shouldApplyTransform to createTransformer so there is a check before transforms are run.1b6bf93be84
- Migrate helper functions into codemod-utilsd72b572dfc2
- bumped jscodeshift@^0.11.0d72b572dfc2
- bumped @types/jscodeshift@^0.11.0#8169 7e295f4d9da
- Added more lower level helpers for writing codemod:
They are used quite frequently as basic build blocks, so export them to consumers.