├── transforms ├── .gitkeep └── no-implicit-this │ ├── __testfixtures__ │ ├── paths.input.hbs │ ├── custom-helpers.input.hbs │ ├── custom-helpers.output.hbs │ ├── paths.output.hbs │ ├── -helpers.json │ ├── custom-helpers.options.json │ ├── angle-brackets-without-params.input.hbs │ ├── angle-brackets-without-params.output.hbs │ ├── comments.input.hbs │ ├── comments.output.hbs │ ├── handlebars-without-params.input.hbs │ ├── handlebars-without-params.output.hbs │ ├── batman.input.hbs │ ├── batman.output.hbs │ ├── -mock-telemetry.d.json.ts │ ├── void-elements.input.hbs │ ├── void-elements.output.hbs │ ├── angle-brackets-with-block-params.input.hbs │ ├── angle-brackets-with-block-params.output.hbs │ ├── has-block.input.hbs │ ├── has-block.output.hbs │ ├── handlebars-with-wall-street-syntax.input.hbs │ ├── handlebars-with-positional-params.input.hbs │ ├── handlebars-with-positional-params.output.hbs │ ├── handlebars-with-wall-street-syntax.output.hbs │ ├── handlebars-with-hash-params.input.hbs │ ├── handlebars-with-block-params.input.hbs │ ├── handlebars-with-block-params.output.hbs │ ├── tagged-templates-ts.input.ts │ ├── handlebars-with-hash-params.output.hbs │ ├── tagged-templates-js.input.js │ ├── tagged-templates-ts.output.ts │ ├── tagged-templates-js.output.js │ ├── -mock-telemetry.json │ ├── built-in-helpers.input.hbs │ ├── built-in-helpers.output.hbs │ ├── angle-brackets-with-hash-params.input.hbs │ └── angle-brackets-with-hash-params.output.hbs │ ├── test.ts │ ├── test-helpers.ts │ ├── helpers │ ├── known-helpers.ts │ ├── parse.ts │ ├── telemetry.ts │ ├── tagged-templates.ts │ ├── options.ts │ └── plugin.ts │ ├── index.ts │ └── README.md ├── test ├── fixtures │ ├── 3.10 │ │ ├── input │ │ │ ├── app │ │ │ │ ├── styles │ │ │ │ │ └── app.css │ │ │ │ ├── components │ │ │ │ │ └── .gitkeep │ │ │ │ ├── helpers │ │ │ │ │ └── .gitkeep │ │ │ │ ├── models │ │ │ │ │ └── .gitkeep │ │ │ │ ├── routes │ │ │ │ │ └── .gitkeep │ │ │ │ ├── controllers │ │ │ │ │ └── .gitkeep │ │ │ │ ├── templates │ │ │ │ │ ├── components │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ └── application.hbs │ │ │ │ ├── resolver.js │ │ │ │ ├── router.js │ │ │ │ ├── app.js │ │ │ │ └── index.html │ │ │ ├── vendor │ │ │ │ └── .gitkeep │ │ │ ├── tests │ │ │ │ ├── helpers │ │ │ │ │ └── .gitkeep │ │ │ │ ├── unit │ │ │ │ │ └── .gitkeep │ │ │ │ ├── integration │ │ │ │ │ └── .gitkeep │ │ │ │ ├── test-helper.js │ │ │ │ └── index.html │ │ │ ├── .watchmanconfig │ │ │ ├── config │ │ │ │ ├── optional-features.json │ │ │ │ ├── targets.js │ │ │ │ └── environment.js │ │ │ ├── public │ │ │ │ └── robots.txt │ │ │ ├── .template-lintrc.js │ │ │ ├── .ember-cli │ │ │ ├── .eslintignore │ │ │ ├── .travis.yml │ │ │ ├── .editorconfig │ │ │ ├── .gitignore │ │ │ ├── testem.js │ │ │ ├── ember-cli-build.js │ │ │ ├── .eslintrc.js │ │ │ ├── README.md │ │ │ └── package.json │ │ └── output │ │ │ ├── vendor │ │ │ └── .gitkeep │ │ │ ├── app │ │ │ ├── helpers │ │ │ │ └── .gitkeep │ │ │ ├── models │ │ │ │ └── .gitkeep │ │ │ ├── routes │ │ │ │ └── .gitkeep │ │ │ ├── styles │ │ │ │ └── app.css │ │ │ ├── components │ │ │ │ └── .gitkeep │ │ │ ├── controllers │ │ │ │ └── .gitkeep │ │ │ ├── templates │ │ │ │ ├── components │ │ │ │ │ └── .gitkeep │ │ │ │ └── application.hbs │ │ │ ├── resolver.js │ │ │ ├── router.js │ │ │ ├── app.js │ │ │ └── index.html │ │ │ ├── tests │ │ │ ├── helpers │ │ │ │ └── .gitkeep │ │ │ ├── unit │ │ │ │ └── .gitkeep │ │ │ ├── integration │ │ │ │ └── .gitkeep │ │ │ ├── test-helper.js │ │ │ └── index.html │ │ │ ├── .watchmanconfig │ │ │ ├── config │ │ │ ├── optional-features.json │ │ │ ├── targets.js │ │ │ └── environment.js │ │ │ ├── public │ │ │ └── robots.txt │ │ │ ├── .template-lintrc.js │ │ │ ├── .ember-cli │ │ │ ├── .eslintignore │ │ │ ├── .travis.yml │ │ │ ├── .editorconfig │ │ │ ├── .gitignore │ │ │ ├── testem.js │ │ │ ├── ember-cli-build.js │ │ │ ├── .eslintrc.js │ │ │ ├── README.md │ │ │ └── package.json │ └── 3.13 │ │ ├── input │ │ ├── app │ │ │ ├── styles │ │ │ │ └── app.css │ │ │ ├── components │ │ │ │ └── .gitkeep │ │ │ ├── helpers │ │ │ │ └── .gitkeep │ │ │ ├── models │ │ │ │ └── .gitkeep │ │ │ ├── routes │ │ │ │ └── .gitkeep │ │ │ ├── controllers │ │ │ │ ├── .gitkeep │ │ │ │ └── application.js │ │ │ ├── templates │ │ │ │ ├── components │ │ │ │ │ └── .gitkeep │ │ │ │ └── application.hbs │ │ │ ├── resolver.js │ │ │ ├── router.js │ │ │ ├── app.js │ │ │ └── index.html │ │ ├── vendor │ │ │ └── .gitkeep │ │ ├── tests │ │ │ ├── helpers │ │ │ │ └── .gitkeep │ │ │ ├── unit │ │ │ │ ├── .gitkeep │ │ │ │ └── controllers │ │ │ │ │ └── application-test.js │ │ │ ├── integration │ │ │ │ └── .gitkeep │ │ │ ├── test-helper.js │ │ │ └── index.html │ │ ├── .watchmanconfig │ │ ├── config │ │ │ ├── optional-features.json │ │ │ ├── targets.js │ │ │ └── environment.js │ │ ├── public │ │ │ └── robots.txt │ │ ├── .template-lintrc.js │ │ ├── .ember-cli │ │ ├── .eslintignore │ │ ├── .travis.yml │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── testem.js │ │ ├── ember-cli-build.js │ │ ├── .eslintrc.js │ │ ├── README.md │ │ └── package.json │ │ └── output │ │ ├── vendor │ │ └── .gitkeep │ │ ├── app │ │ ├── helpers │ │ │ └── .gitkeep │ │ ├── models │ │ │ └── .gitkeep │ │ ├── routes │ │ │ └── .gitkeep │ │ ├── styles │ │ │ └── app.css │ │ ├── components │ │ │ └── .gitkeep │ │ ├── controllers │ │ │ ├── .gitkeep │ │ │ └── application.js │ │ ├── templates │ │ │ ├── components │ │ │ │ └── .gitkeep │ │ │ └── application.hbs │ │ ├── resolver.js │ │ ├── router.js │ │ ├── app.js │ │ └── index.html │ │ ├── tests │ │ ├── helpers │ │ │ └── .gitkeep │ │ ├── unit │ │ │ ├── .gitkeep │ │ │ └── controllers │ │ │ │ └── application-test.js │ │ ├── integration │ │ │ └── .gitkeep │ │ ├── test-helper.js │ │ └── index.html │ │ ├── .watchmanconfig │ │ ├── config │ │ ├── optional-features.json │ │ ├── targets.js │ │ └── environment.js │ │ ├── public │ │ └── robots.txt │ │ ├── .template-lintrc.js │ │ ├── .ember-cli │ │ ├── .eslintignore │ │ ├── .travis.yml │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── testem.js │ │ ├── ember-cli-build.js │ │ ├── .eslintrc.js │ │ ├── README.md │ │ └── package.json ├── helpers │ ├── sequence.ts │ ├── utils.ts │ └── test-runner.ts └── run-test.ts ├── .eslintignore ├── .editorconfig ├── .prettierrc.js ├── bin ├── telemetry.js └── cli.js ├── types ├── codemod-cli.d.ts └── ember-codemods-telemetry-helpers.d.ts ├── .gitignore ├── helpers └── types.ts ├── .github ├── dependabot.yml └── workflows │ ├── tests.yml │ ├── publish.yml │ └── plan-release.yml ├── tsconfig.json ├── .eslintrc.js ├── tsconfig.node16-strictest.json ├── README.md ├── LICENSE ├── RELEASE.md ├── .release-plan.json ├── package.json └── CHANGELOG.md /transforms/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/app/styles/app.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/app/styles/app.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/app/components/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/app/helpers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/app/models/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/app/routes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/tests/helpers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/tests/unit/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/app/helpers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/app/models/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/app/routes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/app/styles/app.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/tests/helpers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/tests/unit/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/app/components/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/app/helpers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/app/models/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/app/routes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/tests/helpers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/tests/unit/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/app/helpers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/app/models/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/app/routes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/app/styles/app.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/tests/helpers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/tests/unit/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/app/controllers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/tests/integration/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/app/components/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/app/controllers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/tests/integration/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/app/controllers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/tests/integration/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/app/components/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/app/controllers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/tests/integration/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/app/templates/components/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/app/templates/components/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | **/__testfixtures__/**/*.js 2 | **/fixtures/** -------------------------------------------------------------------------------- /test/fixtures/3.10/output/app/templates/components/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/app/templates/components/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["tmp", "dist"] 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["tmp", "dist"] 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["tmp", "dist"] 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["tmp", "dist"] 3 | } 4 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/paths.input.hbs: -------------------------------------------------------------------------------- 1 | {{foo-bar-baz}} 2 | {{baz}} 3 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/custom-helpers.input.hbs: -------------------------------------------------------------------------------- 1 | {{biz}} 2 | {{bang}} 3 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/custom-helpers.output.hbs: -------------------------------------------------------------------------------- 1 | {{biz}} 2 | {{bang}} 3 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/paths.output.hbs: -------------------------------------------------------------------------------- 1 | {{foo-bar-baz}} 2 | {{this.baz}} 3 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | indent_size = 2 6 | indent_style = space -------------------------------------------------------------------------------- /test/fixtures/3.10/input/config/optional-features.json: -------------------------------------------------------------------------------- 1 | { 2 | "jquery-integration": true 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/config/optional-features.json: -------------------------------------------------------------------------------- 1 | { 2 | "jquery-integration": true 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/config/optional-features.json: -------------------------------------------------------------------------------- 1 | { 2 | "jquery-integration": true 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/config/optional-features.json: -------------------------------------------------------------------------------- 1 | { 2 | "jquery-integration": true 3 | } 4 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/-helpers.json: -------------------------------------------------------------------------------- 1 | { 2 | "helpers": ["biz", "bang"] 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/app/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from 'ember-resolver'; 2 | 3 | export default Resolver; 4 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/app/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from 'ember-resolver'; 2 | 3 | export default Resolver; 4 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/app/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from 'ember-resolver'; 2 | 3 | export default Resolver; 4 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/app/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from 'ember-resolver'; 2 | 3 | export default Resolver; 4 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/.template-lintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | extends: 'recommended' 5 | }; 6 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/.template-lintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | extends: 'recommended' 5 | }; 6 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/.template-lintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | extends: 'recommended' 5 | }; 6 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/.template-lintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | extends: 'recommended' 5 | }; 6 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | singleQuote: true, 5 | trailingComma: 'es5', 6 | printWidth: 100, 7 | }; -------------------------------------------------------------------------------- /test/fixtures/3.13/input/app/templates/application.hbs: -------------------------------------------------------------------------------- 1 | {{not false}} 2 | 3 | {{#if (not foo)}} 4 | {{foo}} 5 | {{/if}} 6 | 7 | {{outlet}} -------------------------------------------------------------------------------- /test/fixtures/3.13/output/app/templates/application.hbs: -------------------------------------------------------------------------------- 1 | {{not false}} 2 | 3 | {{#if (not this.foo)}} 4 | {{this.foo}} 5 | {{/if}} 6 | 7 | {{outlet}} -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/custom-helpers.options.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": "./transforms/no-implicit-this/__testfixtures__/-helpers.json" 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/app/controllers/application.js: -------------------------------------------------------------------------------- 1 | import Controller from '@ember/controller'; 2 | 3 | export default Controller.extend({ 4 | foo: 'foo', 5 | }); 6 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/angle-brackets-without-params.input.hbs: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/angle-brackets-without-params.output.hbs: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/app/controllers/application.js: -------------------------------------------------------------------------------- 1 | import Controller from '@ember/controller'; 2 | 3 | export default Controller.extend({ 4 | foo: 'foo', 5 | }); 6 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/comments.input.hbs: -------------------------------------------------------------------------------- 1 | 2 |
3 |
{{!-- foo bar --}}
4 | {{!-- {{foo-bar}} --}} 5 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/comments.output.hbs: -------------------------------------------------------------------------------- 1 | 2 |
3 |
{{!-- foo bar --}}
4 | {{!-- {{foo-bar}} --}} 5 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/handlebars-without-params.input.hbs: -------------------------------------------------------------------------------- 1 | {{my-component}} 2 | {{a-helper}} 3 | {{foo}} 4 | {{property}} 5 | {{namespace/foo}} 6 | {{someGetter}} 7 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/handlebars-without-params.output.hbs: -------------------------------------------------------------------------------- 1 | {{my-component}} 2 | {{a-helper}} 3 | {{foo}} 4 | {{this.property}} 5 | {{namespace/foo}} 6 | {{this.someGetter}} 7 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/batman.input.hbs: -------------------------------------------------------------------------------- 1 | {{addon-name$helper-name}} 2 | {{addon-name$component-name}} 3 | 4 | 5 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/batman.output.hbs: -------------------------------------------------------------------------------- 1 | {{addon-name$helper-name}} 2 | {{addon-name$component-name}} 3 | 4 | 5 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/app/templates/application.hbs: -------------------------------------------------------------------------------- 1 | {{!-- The following component displays Ember's default welcome message. --}} 2 | 3 | {{!-- Feel free to remove this! --}} 4 | 5 | {{outlet}} -------------------------------------------------------------------------------- /test/fixtures/3.10/output/app/templates/application.hbs: -------------------------------------------------------------------------------- 1 | {{!-- The following component displays Ember's default welcome message. --}} 2 | 3 | {{!-- Feel free to remove this! --}} 4 | 5 | {{outlet}} -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/-mock-telemetry.d.json.ts: -------------------------------------------------------------------------------- 1 | export type Telemetry = Record>; 2 | 3 | declare const telemetry: Telemetry; 4 | 5 | export default telemetry; -------------------------------------------------------------------------------- /bin/telemetry.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 'use strict'; 3 | 4 | const { gatherTelemetryForUrl, analyzeEmberObject } = require('ember-codemods-telemetry-helpers'); 5 | 6 | gatherTelemetryForUrl(process.argv[2], analyzeEmberObject); 7 | -------------------------------------------------------------------------------- /types/codemod-cli.d.ts: -------------------------------------------------------------------------------- 1 | import { JSCodeshift } from 'jscodeshift'; 2 | 3 | declare module 'codemod-cli' { 4 | export function getOptions(): unknown; 5 | export function runTransformTest(options: Record): unknown; 6 | } 7 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/void-elements.input.hbs: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | coverage/ 2 | node_modules 3 | tmp 4 | *.log 5 | test/**/yarn.lock 6 | test/**/*.js 7 | test/**/*.js.map 8 | transforms/**/*.js 9 | transforms/**/*.js.map 10 | helpers/**/*.js 11 | helpers/**/*.js.map 12 | !**/__testfixtures__/**/* -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/void-elements.output.hbs: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /helpers/types.ts: -------------------------------------------------------------------------------- 1 | /** Type predicate. Checks if the given value is a `Record`. */ 2 | export function isRecord>( 3 | value: unknown 4 | ): value is R { 5 | return value !== null && typeof value === 'object'; 6 | } -------------------------------------------------------------------------------- /types/ember-codemods-telemetry-helpers.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'ember-codemods-telemetry-helpers' { 2 | export function getTelemetry(): unknown; 3 | export function getTelemetryFor(filePath: string): unknown; 4 | export function setTelemetry(telemetry: unknown): void; 5 | } 6 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/test.ts: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import { runTransformTest } from 'codemod-cli'; 4 | import { setupTelemetry } from './test-helpers'; 5 | 6 | setupTelemetry(); 7 | 8 | runTransformTest({ 9 | type: 'jscodeshift', 10 | name: 'no-implicit-this', 11 | }); 12 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/tests/test-helper.js: -------------------------------------------------------------------------------- 1 | import Application from '../app'; 2 | import config from '../config/environment'; 3 | import { setApplication } from '@ember/test-helpers'; 4 | import { start } from 'ember-qunit'; 5 | 6 | setApplication(Application.create(config.APP)); 7 | 8 | start(); 9 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/tests/test-helper.js: -------------------------------------------------------------------------------- 1 | import Application from '../app'; 2 | import config from '../config/environment'; 3 | import { setApplication } from '@ember/test-helpers'; 4 | import { start } from 'ember-qunit'; 5 | 6 | setApplication(Application.create(config.APP)); 7 | 8 | start(); 9 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/tests/test-helper.js: -------------------------------------------------------------------------------- 1 | import Application from '../app'; 2 | import config from '../config/environment'; 3 | import { setApplication } from '@ember/test-helpers'; 4 | import { start } from 'ember-qunit'; 5 | 6 | setApplication(Application.create(config.APP)); 7 | 8 | start(); 9 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/tests/test-helper.js: -------------------------------------------------------------------------------- 1 | import Application from '../app'; 2 | import config from '../config/environment'; 3 | import { setApplication } from '@ember/test-helpers'; 4 | import { start } from 'ember-qunit'; 5 | 6 | setApplication(Application.create(config.APP)); 7 | 8 | start(); 9 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/angle-brackets-with-block-params.input.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{foo}} 3 | {{hash.property}} 4 | 5 | 6 | {{property}} 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/angle-brackets-with-block-params.output.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{foo}} 3 | {{hash.property}} 4 | 5 | 6 | {{property}} 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/app/router.js: -------------------------------------------------------------------------------- 1 | import EmberRouter from '@ember/routing/router'; 2 | import config from './config/environment'; 3 | 4 | const Router = EmberRouter.extend({ 5 | location: config.locationType, 6 | rootURL: config.rootURL 7 | }); 8 | 9 | Router.map(function() { 10 | }); 11 | 12 | export default Router; 13 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/app/router.js: -------------------------------------------------------------------------------- 1 | import EmberRouter from '@ember/routing/router'; 2 | import config from './config/environment'; 3 | 4 | const Router = EmberRouter.extend({ 5 | location: config.locationType, 6 | rootURL: config.rootURL 7 | }); 8 | 9 | Router.map(function() { 10 | }); 11 | 12 | export default Router; 13 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/app/router.js: -------------------------------------------------------------------------------- 1 | import EmberRouter from '@ember/routing/router'; 2 | import config from './config/environment'; 3 | 4 | const Router = EmberRouter.extend({ 5 | location: config.locationType, 6 | rootURL: config.rootURL 7 | }); 8 | 9 | Router.map(function() { 10 | }); 11 | 12 | export default Router; 13 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/app/router.js: -------------------------------------------------------------------------------- 1 | import EmberRouter from '@ember/routing/router'; 2 | import config from './config/environment'; 3 | 4 | const Router = EmberRouter.extend({ 5 | location: config.locationType, 6 | rootURL: config.rootURL 7 | }); 8 | 9 | Router.map(function() { 10 | }); 11 | 12 | export default Router; 13 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Ember CLI sends analytics information by default. The data is completely 4 | anonymous, but there are times when you might want to disable this behavior. 5 | 6 | Setting `disableAnalytics` to true will prevent any data from being sent. 7 | */ 8 | "disableAnalytics": false 9 | } 10 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Ember CLI sends analytics information by default. The data is completely 4 | anonymous, but there are times when you might want to disable this behavior. 5 | 6 | Setting `disableAnalytics` to true will prevent any data from being sent. 7 | */ 8 | "disableAnalytics": false 9 | } 10 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Ember CLI sends analytics information by default. The data is completely 4 | anonymous, but there are times when you might want to disable this behavior. 5 | 6 | Setting `disableAnalytics` to true will prevent any data from being sent. 7 | */ 8 | "disableAnalytics": false 9 | } 10 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Ember CLI sends analytics information by default. The data is completely 4 | anonymous, but there are times when you might want to disable this behavior. 5 | 6 | Setting `disableAnalytics` to true will prevent any data from being sent. 7 | */ 8 | "disableAnalytics": false 9 | } 10 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/has-block.input.hbs: -------------------------------------------------------------------------------- 1 | {{if hasBlock "block"}} 2 | {{#if hasBlock}}block{{/if}} 3 | {{if (has-block) "block"}} 4 | {{#if (has-block)}}block{{/if}} 5 | {{if (has-block "main") "block"}} 6 | {{#if (has-block "main")}}block{{/if}} 7 | {{if (has-block-params "main") "block"}} 8 | {{#if (has-block-params "main")}}block{{/if}} 9 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/has-block.output.hbs: -------------------------------------------------------------------------------- 1 | {{if hasBlock "block"}} 2 | {{#if hasBlock}}block{{/if}} 3 | {{if (has-block) "block"}} 4 | {{#if (has-block)}}block{{/if}} 5 | {{if (has-block "main") "block"}} 6 | {{#if (has-block "main")}}block{{/if}} 7 | {{if (has-block-params "main") "block"}} 8 | {{#if (has-block-params "main")}}block{{/if}} 9 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/.eslintignore: -------------------------------------------------------------------------------- 1 | # unconventional js 2 | /blueprints/*/files/ 3 | /vendor/ 4 | 5 | # compiled app 6 | /dist/ 7 | /tmp/ 8 | 9 | # dependencies 10 | /bower_components/ 11 | /node_modules/ 12 | 13 | # misc 14 | /coverage/ 15 | !.* 16 | 17 | # ember-try 18 | /.node_modules.ember-try/ 19 | /bower.json.ember-try 20 | /package.json.ember-try 21 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/.eslintignore: -------------------------------------------------------------------------------- 1 | # unconventional js 2 | /blueprints/*/files/ 3 | /vendor/ 4 | 5 | # compiled app 6 | /dist/ 7 | /tmp/ 8 | 9 | # dependencies 10 | /bower_components/ 11 | /node_modules/ 12 | 13 | # misc 14 | /coverage/ 15 | !.* 16 | 17 | # ember-try 18 | /.node_modules.ember-try/ 19 | /bower.json.ember-try 20 | /package.json.ember-try 21 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/handlebars-with-wall-street-syntax.input.hbs: -------------------------------------------------------------------------------- 1 | {{my-addon$my-component foo}} 2 | {{my-addon$namespace::my-component @foo}} 3 | {{my-addon$namespace::my-component property}} 4 | {{my-addon$my-component (my-helper property)}} 5 | {{my-addon$my-component (my-helper "string")}} 6 | {{my-addon$namespace::my-component (my-helper 1)}} 7 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/.eslintignore: -------------------------------------------------------------------------------- 1 | # unconventional js 2 | /blueprints/*/files/ 3 | /vendor/ 4 | 5 | # compiled output 6 | /dist/ 7 | /tmp/ 8 | 9 | # dependencies 10 | /bower_components/ 11 | /node_modules/ 12 | 13 | # misc 14 | /coverage/ 15 | !.* 16 | 17 | # ember-try 18 | /.node_modules.ember-try/ 19 | /bower.json.ember-try 20 | /package.json.ember-try 21 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/.eslintignore: -------------------------------------------------------------------------------- 1 | # unconventional js 2 | /blueprints/*/files/ 3 | /vendor/ 4 | 5 | # compiled output 6 | /dist/ 7 | /tmp/ 8 | 9 | # dependencies 10 | /bower_components/ 11 | /node_modules/ 12 | 13 | # misc 14 | /coverage/ 15 | !.* 16 | 17 | # ember-try 18 | /.node_modules.ember-try/ 19 | /bower.json.ember-try 20 | /package.json.ember-try 21 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/handlebars-with-positional-params.input.hbs: -------------------------------------------------------------------------------- 1 | {{my-component "string"}} 2 | {{my-component 1}} 3 | {{my-component foo}} 4 | {{my-component @foo}} 5 | {{my-component property}} 6 | {{my-component (my-helper property)}} 7 | {{my-component (my-helper "string")}} 8 | {{my-component (my-helper 1)}} 9 | {{get this 'key'}} 10 | 11 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/handlebars-with-positional-params.output.hbs: -------------------------------------------------------------------------------- 1 | {{my-component "string"}} 2 | {{my-component 1}} 3 | {{my-component this.foo}} 4 | {{my-component @foo}} 5 | {{my-component this.property}} 6 | {{my-component (my-helper this.property)}} 7 | {{my-component (my-helper "string")}} 8 | {{my-component (my-helper 1)}} 9 | {{get this 'key'}} 10 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/handlebars-with-wall-street-syntax.output.hbs: -------------------------------------------------------------------------------- 1 | {{my-addon$my-component this.foo}} 2 | {{my-addon$namespace::my-component @foo}} 3 | {{my-addon$namespace::my-component this.property}} 4 | {{my-addon$my-component (my-helper this.property)}} 5 | {{my-addon$my-component (my-helper "string")}} 6 | {{my-addon$namespace::my-component (my-helper 1)}} 7 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: node_js 3 | node_js: 4 | - "8" 5 | 6 | sudo: false 7 | dist: trusty 8 | 9 | addons: 10 | chrome: stable 11 | 12 | cache: 13 | directories: 14 | - $HOME/.npm 15 | 16 | env: 17 | global: 18 | # See https://git.io/vdao3 for details. 19 | - JOBS=1 20 | 21 | script: 22 | - npm run lint:hbs 23 | - npm run lint:js 24 | - npm test 25 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: node_js 3 | node_js: 4 | - "8" 5 | 6 | sudo: false 7 | dist: trusty 8 | 9 | addons: 10 | chrome: stable 11 | 12 | cache: 13 | directories: 14 | - $HOME/.npm 15 | 16 | env: 17 | global: 18 | # See https://git.io/vdao3 for details. 19 | - JOBS=1 20 | 21 | script: 22 | - npm run lint:hbs 23 | - npm run lint:js 24 | - npm test 25 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: node_js 3 | node_js: 4 | - "8" 5 | 6 | sudo: false 7 | dist: trusty 8 | 9 | addons: 10 | chrome: stable 11 | 12 | cache: 13 | directories: 14 | - $HOME/.npm 15 | 16 | env: 17 | global: 18 | # See https://git.io/vdao3 for details. 19 | - JOBS=1 20 | 21 | script: 22 | - npm run lint:hbs 23 | - npm run lint:js 24 | - npm test 25 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: node_js 3 | node_js: 4 | - "8" 5 | 6 | sudo: false 7 | dist: trusty 8 | 9 | addons: 10 | chrome: stable 11 | 12 | cache: 13 | directories: 14 | - $HOME/.npm 15 | 16 | env: 17 | global: 18 | # See https://git.io/vdao3 for details. 19 | - JOBS=1 20 | 21 | script: 22 | - npm run lint:hbs 23 | - npm run lint:js 24 | - npm test 25 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/handlebars-with-hash-params.input.hbs: -------------------------------------------------------------------------------- 1 | {{my-component arg="string"}} 2 | {{my-component arg=2}} 3 | {{my-component arg=foo}} 4 | {{my-component arg=property}} 5 | {{my-component arg=(my-helper property)}} 6 | {{my-component arg=(my-helper (fn myAction property) foo)}} 7 | {{my-component arg=property arg2=foo}} 8 | {{my-component arg=property arg2=(fn myAction foo)}} 9 | 10 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/config/targets.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const browsers = [ 4 | 'last 1 Chrome versions', 5 | 'last 1 Firefox versions', 6 | 'last 1 Safari versions' 7 | ]; 8 | 9 | const isCI = !!process.env.CI; 10 | const isProduction = process.env.EMBER_ENV === 'production'; 11 | 12 | if (isCI || isProduction) { 13 | browsers.push('ie 11'); 14 | } 15 | 16 | module.exports = { 17 | browsers 18 | }; 19 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/config/targets.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const browsers = [ 4 | 'last 1 Chrome versions', 5 | 'last 1 Firefox versions', 6 | 'last 1 Safari versions' 7 | ]; 8 | 9 | const isCI = !!process.env.CI; 10 | const isProduction = process.env.EMBER_ENV === 'production'; 11 | 12 | if (isCI || isProduction) { 13 | browsers.push('ie 11'); 14 | } 15 | 16 | module.exports = { 17 | browsers 18 | }; 19 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/config/targets.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const browsers = [ 4 | 'last 1 Chrome versions', 5 | 'last 1 Firefox versions', 6 | 'last 1 Safari versions' 7 | ]; 8 | 9 | const isCI = !!process.env.CI; 10 | const isProduction = process.env.EMBER_ENV === 'production'; 11 | 12 | if (isCI || isProduction) { 13 | browsers.push('ie 11'); 14 | } 15 | 16 | module.exports = { 17 | browsers 18 | }; 19 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/config/targets.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const browsers = [ 4 | 'last 1 Chrome versions', 5 | 'last 1 Firefox versions', 6 | 'last 1 Safari versions' 7 | ]; 8 | 9 | const isCI = !!process.env.CI; 10 | const isProduction = process.env.EMBER_ENV === 'production'; 11 | 12 | if (isCI || isProduction) { 13 | browsers.push('ie 11'); 14 | } 15 | 16 | module.exports = { 17 | browsers 18 | }; 19 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/handlebars-with-block-params.input.hbs: -------------------------------------------------------------------------------- 1 | {{#my-component as |foo myAction hash components|}} 2 | {{foo}} {{myAction}} 3 | {{hash.property}} {{hash.foo}} 4 | 5 | {{components.foo}} 6 | 7 | {{#components.my-component}} 8 | 9 | {{/components.my-component}} 10 | 11 | {{#components.block as |block|}} 12 | {{block}} 13 | {{/components.block}} 14 | {{/my-component}} 15 | 16 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/handlebars-with-block-params.output.hbs: -------------------------------------------------------------------------------- 1 | {{#my-component as |foo myAction hash components|}} 2 | {{foo}} {{myAction}} 3 | {{hash.property}} {{hash.foo}} 4 | 5 | {{components.foo}} 6 | 7 | {{#components.my-component}} 8 | 9 | {{/components.my-component}} 10 | 11 | {{#components.block as |block|}} 12 | {{block}} 13 | {{/components.block}} 14 | {{/my-component}} 15 | 16 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/tests/unit/controllers/application-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from 'qunit'; 2 | import { setupTest } from 'ember-qunit'; 3 | 4 | module('Unit | Controller | application', function(hooks) { 5 | setupTest(hooks); 6 | 7 | // Replace this with your real tests. 8 | test('it exists', function(assert) { 9 | let controller = this.owner.lookup('controller:application'); 10 | assert.ok(controller); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/tests/unit/controllers/application-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from 'qunit'; 2 | import { setupTest } from 'ember-qunit'; 3 | 4 | module('Unit | Controller | application', function(hooks) { 5 | setupTest(hooks); 6 | 7 | // Replace this with your real tests. 8 | test('it exists', function(assert) { 9 | let controller = this.owner.lookup('controller:application'); 10 | assert.ok(controller); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/tagged-templates-ts.input.ts: -------------------------------------------------------------------------------- 1 | import { hbs as echHBS } from 'ember-cli-htmlbars'; 2 | import hipHBS from 'htmlbars-inline-precompile'; 3 | import echipHBS from 'ember-cli-htmlbars-inline-precompile'; 4 | 5 | declare const hbs: unknown; 6 | 7 | echHBS` 8 | Hello, 9 | {{target}}! 10 | \n 11 | `; 12 | 13 | hipHBS`Hello, {{target}}!`; 14 | 15 | echipHBS`Hello, {{target}}!`; 16 | 17 | hbs`Hello, {{target}}!`; 18 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/app/app.js: -------------------------------------------------------------------------------- 1 | import Application from '@ember/application'; 2 | import Resolver from './resolver'; 3 | import loadInitializers from 'ember-load-initializers'; 4 | import config from './config/environment'; 5 | 6 | const App = Application.extend({ 7 | modulePrefix: config.modulePrefix, 8 | podModulePrefix: config.podModulePrefix, 9 | Resolver 10 | }); 11 | 12 | loadInitializers(App, config.modulePrefix); 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/app/app.js: -------------------------------------------------------------------------------- 1 | import Application from '@ember/application'; 2 | import Resolver from './resolver'; 3 | import loadInitializers from 'ember-load-initializers'; 4 | import config from './config/environment'; 5 | 6 | const App = Application.extend({ 7 | modulePrefix: config.modulePrefix, 8 | podModulePrefix: config.podModulePrefix, 9 | Resolver 10 | }); 11 | 12 | loadInitializers(App, config.modulePrefix); 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/app/app.js: -------------------------------------------------------------------------------- 1 | import Application from '@ember/application'; 2 | import Resolver from './resolver'; 3 | import loadInitializers from 'ember-load-initializers'; 4 | import config from './config/environment'; 5 | 6 | const App = Application.extend({ 7 | modulePrefix: config.modulePrefix, 8 | podModulePrefix: config.podModulePrefix, 9 | Resolver 10 | }); 11 | 12 | loadInitializers(App, config.modulePrefix); 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/app/app.js: -------------------------------------------------------------------------------- 1 | import Application from '@ember/application'; 2 | import Resolver from './resolver'; 3 | import loadInitializers from 'ember-load-initializers'; 4 | import config from './config/environment'; 5 | 6 | const App = Application.extend({ 7 | modulePrefix: config.modulePrefix, 8 | podModulePrefix: config.podModulePrefix, 9 | Resolver 10 | }); 11 | 12 | loadInitializers(App, config.modulePrefix); 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/handlebars-with-hash-params.output.hbs: -------------------------------------------------------------------------------- 1 | {{my-component arg="string"}} 2 | {{my-component arg=2}} 3 | {{my-component arg=this.foo}} 4 | {{my-component arg=this.property}} 5 | {{my-component arg=(my-helper this.property)}} 6 | {{my-component arg=(my-helper (fn this.myAction this.property) this.foo)}} 7 | {{my-component arg=this.property arg2=this.foo}} 8 | {{my-component arg=this.property arg2=(fn this.myAction this.foo)}} 9 | 10 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/tagged-templates-js.input.js: -------------------------------------------------------------------------------- 1 | import { hbs as echHBS } from 'ember-cli-htmlbars'; 2 | import hipHBS from 'htmlbars-inline-precompile'; 3 | import echipHBS from 'ember-cli-htmlbars-inline-precompile'; 4 | import { hbs } from 'unknown-tag-source'; 5 | 6 | echHBS` 7 | Hello, 8 | {{target}}! 9 | \n 10 | `; 11 | 12 | hipHBS`Hello, {{target}}!`; 13 | 14 | echipHBS`Hello, {{target}}!`; 15 | 16 | hbs`Hello, {{target}}!`; 17 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/tagged-templates-ts.output.ts: -------------------------------------------------------------------------------- 1 | import { hbs as echHBS } from 'ember-cli-htmlbars'; 2 | import hipHBS from 'htmlbars-inline-precompile'; 3 | import echipHBS from 'ember-cli-htmlbars-inline-precompile'; 4 | 5 | declare const hbs: unknown; 6 | 7 | echHBS` 8 | Hello, 9 | {{this.target}}! 10 | \n 11 | `; 12 | 13 | hipHBS`Hello, {{this.target}}!`; 14 | 15 | echipHBS`Hello, {{this.target}}!`; 16 | 17 | hbs`Hello, {{target}}!`; 18 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/tagged-templates-js.output.js: -------------------------------------------------------------------------------- 1 | import { hbs as echHBS } from 'ember-cli-htmlbars'; 2 | import hipHBS from 'htmlbars-inline-precompile'; 3 | import echipHBS from 'ember-cli-htmlbars-inline-precompile'; 4 | import { hbs } from 'unknown-tag-source'; 5 | 6 | echHBS` 7 | Hello, 8 | {{this.target}}! 9 | \n 10 | `; 11 | 12 | hipHBS`Hello, {{this.target}}!`; 13 | 14 | echipHBS`Hello, {{this.target}}!`; 15 | 16 | hbs`Hello, {{target}}!`; 17 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.hbs] 17 | insert_final_newline = false 18 | 19 | [*.{diff,md}] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.hbs] 17 | insert_final_newline = false 18 | 19 | [*.{diff,md}] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.hbs] 17 | insert_final_newline = false 18 | 19 | [*.{diff,md}] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.hbs] 17 | insert_final_newline = false 18 | 19 | [*.{diff,md}] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/-mock-telemetry.json: -------------------------------------------------------------------------------- 1 | { 2 | "some-component": { "type": "Component" }, 3 | "my-component": { "type": "Component" }, 4 | "namespace/my-component": { "type": "Component" }, 5 | "block-component": { "type": "Component" }, 6 | "foo": { "type": "Component" }, 7 | "namespace/foo": { "type": "Component" }, 8 | "my-helper": { "type": "Helper" }, 9 | "a-helper": { "type": "Helper" }, 10 | "foo-bar-baz": { "type": "Component" } 11 | } 12 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | groups: 6 | dev-dependencies: 7 | dependency-type: "development" 8 | update-types: 9 | - "minor" 10 | - "patch" 11 | schedule: 12 | interval: weekly 13 | open-pull-requests-limit: 10 14 | versioning-strategy: increase 15 | - package-ecosystem: github-actions 16 | directory: "/" 17 | schedule: 18 | interval: weekly 19 | open-pull-requests-limit: 10 -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/built-in-helpers.input.hbs: -------------------------------------------------------------------------------- 1 | {{debugger}} 2 | {{has-block}} 3 | {{hasBlock}} 4 | {{input}} 5 | {{outlet}} 6 | {{textarea}} 7 | {{yield}} 8 | 9 | {{#let (concat "a" "b") as |ab|}} 10 | {{ab}} 11 | {{/let}} 12 | 13 | {{#each records as |record|}} 14 | {{record.property}} 15 | {{/each}} 16 | 17 | 18 | 19 | 20 | 21 | {{link-to 'name' 'route'}} 22 | -------------------------------------------------------------------------------- /test/fixtures/3.10/output/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled app 4 | /dist/ 5 | /tmp/ 6 | 7 | # dependencies 8 | /bower_components/ 9 | /node_modules/ 10 | 11 | # misc 12 | /.env* 13 | /.pnp* 14 | /.sass-cache 15 | /connect.lock 16 | /coverage/ 17 | /libpeerconnection.log 18 | /npm-debug.log* 19 | /testem.log 20 | /yarn-error.log 21 | 22 | # ember-try 23 | /.node_modules.ember-try/ 24 | /bower.json.ember-try 25 | /package.json.ember-try 26 | -------------------------------------------------------------------------------- /test/fixtures/3.13/output/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled app 4 | /dist/ 5 | /tmp/ 6 | 7 | # dependencies 8 | /bower_components/ 9 | /node_modules/ 10 | 11 | # misc 12 | /.env* 13 | /.pnp* 14 | /.sass-cache 15 | /connect.lock 16 | /coverage/ 17 | /libpeerconnection.log 18 | /npm-debug.log* 19 | /testem.log 20 | /yarn-error.log 21 | 22 | # ember-try 23 | /.node_modules.ember-try/ 24 | /bower.json.ember-try 25 | /package.json.ember-try 26 | -------------------------------------------------------------------------------- /test/fixtures/3.10/input/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist/ 5 | /tmp/ 6 | 7 | # dependencies 8 | /bower_components/ 9 | /node_modules/ 10 | 11 | # misc 12 | /.env* 13 | /.pnp* 14 | /.sass-cache 15 | /connect.lock 16 | /coverage/ 17 | /libpeerconnection.log 18 | /npm-debug.log* 19 | /testem.log 20 | /yarn-error.log 21 | 22 | # ember-try 23 | /.node_modules.ember-try/ 24 | /bower.json.ember-try 25 | /package.json.ember-try 26 | -------------------------------------------------------------------------------- /test/fixtures/3.13/input/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist/ 5 | /tmp/ 6 | 7 | # dependencies 8 | /bower_components/ 9 | /node_modules/ 10 | 11 | # misc 12 | /.env* 13 | /.pnp* 14 | /.sass-cache 15 | /connect.lock 16 | /coverage/ 17 | /libpeerconnection.log 18 | /npm-debug.log* 19 | /testem.log 20 | /yarn-error.log 21 | 22 | # ember-try 23 | /.node_modules.ember-try/ 24 | /bower.json.ember-try 25 | /package.json.ember-try 26 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/built-in-helpers.output.hbs: -------------------------------------------------------------------------------- 1 | {{debugger}} 2 | {{has-block}} 3 | {{hasBlock}} 4 | {{input}} 5 | {{outlet}} 6 | {{textarea}} 7 | {{yield}} 8 | 9 | {{#let (concat "a" "b") as |ab|}} 10 | {{ab}} 11 | {{/let}} 12 | 13 | {{#each this.records as |record|}} 14 | {{record.property}} 15 | {{/each}} 16 | 17 | 18 | 19 | 20 | 21 | {{link-to 'name' 'route'}} 22 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/test-helpers.ts: -------------------------------------------------------------------------------- 1 | import { setTelemetry } from 'ember-codemods-telemetry-helpers'; 2 | import path from 'node:path'; 3 | import mockTelemetryData, { type Telemetry } from './__testfixtures__/-mock-telemetry.json'; 4 | 5 | export function setupTelemetry() { 6 | let mockTelemetry: Telemetry = {}; 7 | 8 | Object.keys(mockTelemetryData).forEach(key => { 9 | let value = mockTelemetryData[key] || {}; 10 | let mockPath = path.resolve(__dirname, `./__testfixtures__/${key}`); 11 | 12 | mockTelemetry[mockPath] = value; 13 | }); 14 | 15 | setTelemetry(mockTelemetry); 16 | } 17 | -------------------------------------------------------------------------------- /transforms/no-implicit-this/__testfixtures__/angle-brackets-with-hash-params.input.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 |