Skip to content

Releases: ijlee2/ember-codemod-v1-to-v2

Introduced TypeScript

12 Jun 14:23

Choose a tag to compare

I added types to improve documentation and learn how we can write codemods in TypeScript.

A bug may be possible when running npx [email protected]. I'll update the release notes after testing the release on my local machine.

Separated validation concerns

10 Jun 14:00

Choose a tag to compare

@codemod-utils/[email protected] allows us to opt in to validating the name and version.

Updated dependencies and latestVersions

10 Jun 11:32

Choose a tag to compare

Updated latestVersions and babel.config.json

31 May 12:21

Choose a tag to compare

A couple of changes to the blueprint files. In effect, I downstreamed the changes in @embroider/[email protected].

You can update your addon's babel.config.json as shown below:

/* Before: babel.config.json (TS projects) */
{
  "presets": [["@babel/preset-typescript"]],
  "plugins": [
    "@embroider/addon-dev/template-colocation-plugin",
    ["@babel/plugin-transform-typescript", { "allowDeclareFields": true }],
    ["@babel/plugin-proposal-decorators", { "legacy": true }],
    "@babel/plugin-proposal-class-properties"
  ]
}
/* After: babel.config.json (TS projects) */
{
  "presets": [["@babel/preset-typescript"]],
  "plugins": [
    "@embroider/addon-dev/template-colocation-plugin",
    ["@babel/plugin-transform-typescript", { "allowDeclareFields": true }],
    ["@babel/plugin-proposal-decorators", { "version": "legacy" }],
    "@babel/plugin-proposal-class-properties"
  ]
}

Downstreamed changes from @embroider/addon-blueprint

23 May 06:28

Choose a tag to compare

Features

  • Set allowDeclareFields for TS projects to true by default1

1. See #32 to learn how to keep your v2 addon up-to-date.

Refactored utilities

17 May 12:18

Choose a tag to compare

Some of the utilities have been replaced with those from @codemod-utils. This should help reduce the maintenance cost.

Downstreamed changes from @embroider/addon-blueprint

03 May 05:54

Choose a tag to compare

Bug fixes

  • Added @babel/runtime to the addon's package.json1

1. See #29 to learn how to keep your v2 addon up-to-date.

Updated blueprints for the workspace root

27 Apr 13:10

Choose a tag to compare

In addition to updating the dependencies, I simplified the codemod by not allowing the blueprints to add prettier to the workspace root (not necessary).

Removed useRelativePaths. Refactored code.

10 Mar 08:58

Choose a tag to compare

Based on feedback from the Ember community as well as myself, I decided to remove the useRelativePaths step. The removal has a few benefits:

  • There's less code to maintain.
  • The end-developer's code is preserved better.
  • The end-developer can have an easier time getting the scripts for the addon and test-app packages to run.

If you did want to have relative paths, I recommend doing so in a separate pull request (i.e. separately from migrating to v2 format). ✨

Accounted for public assets

06 Mar 22:20

Choose a tag to compare

Thanks to @pragatheeswarans and @phndiaye.

Features

Bug fixes

1. See #23 to learn how to keep your v2 addon up-to-date.
2. See #22 to learn how to keep your v2 addon up-to-date.