0.3.8 • Published 10 months ago

@ciena-org/ember-codemods v0.3.8

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@ciena-org/ember-codemods

node

A collection of codemods that can be run to quickly refactor Ember code.

Usage

Replace TRANSFORM with one of the transforms listed below.

TRANSFORM="revert-computed-macro"; \
npx @ciena-org/ember-codemods $TRANSFORM path/of/files/ or/some**/*glob.js

Transforms

Deprecations

Introduced inDeprecationTransform
3.21ember-metal.get-with-defaultember-getWithDefault-to-lodash-get
3.24ember-string.prototype-extensionsember-string-codemod
3.25ember-string.htmlsafe-ishtmlsafeember-string-htmlsafe-ishtmlsafe
3.26ember-glimmer.link-to-positional-argumentslink-to-positional
3.26ember-glimmer.with-syntaxreplace-with-syntax
3.26has-block-and-has-block-paramshas-block
3.27deprecated-run-loop-and-computed-dot-accessremove-run-loop-and-computed-dot-access
3.27ember.built-in-components.importbuilt-in-components-import
3.27ember-globalremove-global-ember
4.0ember-polyfills.deprecate-assign / ember-polyfills.deprecate-mergedeprecate-ember-polyfills
4.1deprecate-auto-locationdeprecate-auto-location
4.10deprecate-ember-errorrevert-ember-error
4.10ember-string.from-ember-moduleember-string-codemod

Miscellaneous

TransformDescriptionPossible issues
revert-computed-macroReplace computed from ember-macro-helpers with @ember/object instead.Will add variable even if not used from function before. Can just remove as need be (or PR fix), was not a common occurence in my code to have unused dependency
ember-code-snippets-helperReplace CodeSnippet component with get-code-snippet helper when updating ember-code-snippet to v3.
replace-proxy-hack-with-decoratorReplace internal proxyAttr, proxyBelongsTo, and proxyHasMany macros with a expectationProxy class decorator.This only works with models that aren't native classes, but I think it should be okay since the only models using these macros are following the classic syntax.

Contributing

If you are interested in helping contribute to this project, please take a look at our Contributing Guide.

0.3.8

10 months ago

0.3.7

10 months ago

0.3.6

11 months ago

0.3.5

11 months ago

0.3.4

11 months ago

0.3.3

11 months ago

0.3.2

11 months ago

0.3.1

11 months ago

0.3.0

12 months ago

0.2.0

1 year ago

0.1.1

1 year ago