diff --git a/.release-plan.json b/.release-plan.json new file mode 100644 index 0000000..afc6d58 --- /dev/null +++ b/.release-plan.json @@ -0,0 +1,25 @@ +{ + "solution": { + "ember-no-implicit-this-codemod": { + "impact": "major", + "oldVersion": "2.1.0", + "newVersion": "3.0.0", + "constraints": [ + { + "impact": "major", + "reason": "Appears in changelog section :boom: Breaking Change" + }, + { + "impact": "minor", + "reason": "Appears in changelog section :rocket: Enhancement" + }, + { + "impact": "patch", + "reason": "Appears in changelog section :house: Internal" + } + ], + "pkgJSONPath": "./package.json" + } + }, + "description": "## Release (2024-01-19)\n\nember-no-implicit-this-codemod 3.0.0 (major)\n\n#### :boom: Breaking Change\n* `ember-no-implicit-this-codemod`\n * [#405](https://github.com/ember-codemods/ember-no-implicit-this-codemod/pull/405) drop support for Node < 16 ([@mansona](https://github.com/mansona))\n\n#### :rocket: Enhancement\n* `ember-no-implicit-this-codemod`\n * [#400](https://github.com/ember-codemods/ember-no-implicit-this-codemod/pull/400) Update ember-codemods-telemetry-helpers for Mac M support ([@Mikek2252](https://github.com/Mikek2252))\n\n#### :house: Internal\n* `ember-no-implicit-this-codemod`\n * [#418](https://github.com/ember-codemods/ember-no-implicit-this-codemod/pull/418) Typescript ([@mansona](https://github.com/mansona))\n * [#416](https://github.com/ember-codemods/ember-no-implicit-this-codemod/pull/416) setup release-plan ([@mansona](https://github.com/mansona))\n * [#401](https://github.com/ember-codemods/ember-no-implicit-this-codemod/pull/401) swap to pnpm ([@mansona](https://github.com/mansona))\n * [#409](https://github.com/ember-codemods/ember-no-implicit-this-codemod/pull/409) add grouping to dependabot config ([@mansona](https://github.com/mansona))\n\n#### Committers: 2\n- Chris Manson ([@mansona](https://github.com/mansona))\n- Michael Kerr ([@Mikek2252](https://github.com/Mikek2252))\n" +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ca9fe0..b2cd49f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,26 @@ # Changelog +## Release (2024-01-19) + +ember-no-implicit-this-codemod 3.0.0 (major) + +#### :boom: Breaking Change +* `ember-no-implicit-this-codemod` + * [#405](https://github.com/ember-codemods/ember-no-implicit-this-codemod/pull/405) drop support for Node < 16 ([@mansona](https://github.com/mansona)) + +#### :rocket: Enhancement +* `ember-no-implicit-this-codemod` + * [#400](https://github.com/ember-codemods/ember-no-implicit-this-codemod/pull/400) Update ember-codemods-telemetry-helpers for Mac M support ([@Mikek2252](https://github.com/Mikek2252)) + +#### :house: Internal +* `ember-no-implicit-this-codemod` + * [#418](https://github.com/ember-codemods/ember-no-implicit-this-codemod/pull/418) Typescript ([@mansona](https://github.com/mansona)) + * [#416](https://github.com/ember-codemods/ember-no-implicit-this-codemod/pull/416) setup release-plan ([@mansona](https://github.com/mansona)) + * [#401](https://github.com/ember-codemods/ember-no-implicit-this-codemod/pull/401) swap to pnpm ([@mansona](https://github.com/mansona)) + * [#409](https://github.com/ember-codemods/ember-no-implicit-this-codemod/pull/409) add grouping to dependabot config ([@mansona](https://github.com/mansona)) + +#### Committers: 2 +- Chris Manson ([@mansona](https://github.com/mansona)) +- Michael Kerr ([@Mikek2252](https://github.com/Mikek2252)) ## v2.1.0 (2022-01-11) diff --git a/package.json b/package.json index 4b72db6..1cbb063 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-no-implicit-this-codemod", - "version": "2.1.0", + "version": "3.0.0", "description": "Codemods for transforming variable usage to be prefixed with `this`, when appropriate", "keywords": [ "codemod-cli" diff --git a/transforms/no-implicit-this/README.md b/transforms/no-implicit-this/README.md index cdb6140..8e49814 100644 --- a/transforms/no-implicit-this/README.md +++ b/transforms/no-implicit-this/README.md @@ -28,6 +28,9 @@ ember-no-implicit-this-codemod no-implicit-this path/of/files/ or/some**/*glob.j * [handlebars-with-wall-street-syntax](#handlebars-with-wall-street-syntax) * [handlebars-without-params](#handlebars-without-params) * [has-block](#has-block) +* [paths](#paths) +* [tagged-templates-js](#tagged-templates-js) +* [tagged-templates-ts](#tagged-templates-ts) * [void-elements](#void-elements) @@ -424,6 +427,112 @@ ember-no-implicit-this-codemod no-implicit-this path/of/files/ or/some**/*glob.j {{if (has-block-params "main") "block"}} {{#if (has-block-params "main")}}block{{/if}} +``` +--- +**paths** + +**Input** ([paths.input.hbs](transforms/no-implicit-this/__testfixtures__/paths.input.hbs)): +```hbs +{{foo-bar-baz}} +{{baz}} + +``` + +**Output** ([paths.output.hbs](transforms/no-implicit-this/__testfixtures__/paths.output.hbs)): +```hbs +{{foo-bar-baz}} +{{this.baz}} + +``` +--- +**tagged-templates-js** + +**Input** ([tagged-templates-js.input.js](transforms/no-implicit-this/__testfixtures__/tagged-templates-js.input.js)): +```js +import { hbs as echHBS } from 'ember-cli-htmlbars'; +import hipHBS from 'htmlbars-inline-precompile'; +import echipHBS from 'ember-cli-htmlbars-inline-precompile'; +import { hbs } from 'unknown-tag-source'; + +echHBS` + Hello, + {{target}}! + \n +`; + +hipHBS`Hello, {{target}}!`; + +echipHBS`Hello, {{target}}!`; + +hbs`Hello, {{target}}!`; + +``` + +**Output** ([tagged-templates-js.output.js](transforms/no-implicit-this/__testfixtures__/tagged-templates-js.output.js)): +```js +import { hbs as echHBS } from 'ember-cli-htmlbars'; +import hipHBS from 'htmlbars-inline-precompile'; +import echipHBS from 'ember-cli-htmlbars-inline-precompile'; +import { hbs } from 'unknown-tag-source'; + +echHBS` + Hello, + {{this.target}}! + \n +`; + +hipHBS`Hello, {{this.target}}!`; + +echipHBS`Hello, {{this.target}}!`; + +hbs`Hello, {{target}}!`; + +``` +--- +**tagged-templates-ts** + +**Input** ([tagged-templates-ts.input.ts](transforms/no-implicit-this/__testfixtures__/tagged-templates-ts.input.ts)): +```ts +import { hbs as echHBS } from 'ember-cli-htmlbars'; +import hipHBS from 'htmlbars-inline-precompile'; +import echipHBS from 'ember-cli-htmlbars-inline-precompile'; + +declare const hbs: unknown; + +echHBS` + Hello, + {{target}}! + \n +`; + +hipHBS`Hello, {{target}}!`; + +echipHBS`Hello, {{target}}!`; + +hbs`Hello, {{target}}!`; + +``` + +**Output** ([tagged-templates-ts.output.ts](transforms/no-implicit-this/__testfixtures__/tagged-templates-ts.output.ts)): +```ts +import { hbs as echHBS } from 'ember-cli-htmlbars'; +import hipHBS from 'htmlbars-inline-precompile'; +import echipHBS from 'ember-cli-htmlbars-inline-precompile'; + +declare const hbs: unknown; + +echHBS` + Hello, + {{this.target}}! + \n +`; + +hipHBS`Hello, {{this.target}}!`; + +echipHBS`Hello, {{this.target}}!`; + +hbs`Hello, {{target}}!`; + ``` --- **void-elements**