ember-native-class-codemod icon indicating copy to clipboard operation
ember-native-class-codemod copied to clipboard

A codemod-cli project for converting Ember objects to es6 native classes

Results 66 ember-native-class-codemod issues
Sort by recently updated
recently updated
newest added

Bumps [async](https://github.com/caolan/async) from 3.2.0 to 3.2.4. Changelog Sourced from async's changelog. v3.2.4 Fix a bug in priorityQueue where it didn't wait for the result. (#1725) Fix a bug where unshiftAsync...

dependencies

Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7. Release notes Sourced from node-fetch's releases. v2.6.7 Security patch release Recommended to upgrade, to not leak sensitive cookie and authentication header information to 3th...

dependencies

Bumps [tar](https://github.com/npm/node-tar) from 6.0.1 to 6.1.11. Commits e573aee 6.1.11 edb8e9a fix: perf regression on hot string munging path a9d9b05 chore(test): Avoid spurious failures packing node_modules/.cache 24b8bda fix(test): use posix path...

dependencies

Bumps [color-string](https://github.com/Qix-/color-string) from 1.5.3 to 1.9.1. Release notes Sourced from color-string's releases. 1.9.0 Minor Release 1.9.0 Add parsing of exponential alpha values for HWB and HSL (#66) Thanks to @​babycannotsay...

dependencies

Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 4.1.0 to 4.1.1. Commits 64735d2 v4.1.1 75a657d Fix potential ReDoS (#37) See full diff in compare view [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ansi-regex&package-manager=npm_and_yarn&previous-version=4.1.0&new-version=4.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this...

dependencies

--classic-decorator cli option isn't respected

[{"_id":"6366a368ea01ec786e8421a6","body":"I\u2019ve put together a potential fix for this here https:\/\/github.com\/ember-codemods\/ember-native-class-codemod\/pull\/212","issue_id":1662249800336,"origin_id":546587314,"user_origin_id":685034,"create_time":1572082625,"update_time":1572082625,"id":1667670888937,"updated_at":"2022-11-05T17:54:48.937000Z","created_at":"2022-11-05T17:54:48.937000Z"},{"_id":"6366a368ea01ec786e8421a7","body":"Any update on this? we have a lot of stuff and there's a lot of classic decorator annotations that aren't really needed with no way to prevent them.","issue_id":1662249800336,"origin_id":971816284,"user_origin_id":2532004,"create_time":1637171462,"update_time":1637171481,"id":1667670888941,"updated_at":"2022-11-05T17:54:48.941000Z","created_at":"2022-11-05T17:54:48.941000Z"},{"_id":"6366a368ea01ec786e8421a9","body":"This has not been solved yet. A workaround is using an empty string, which resolves to false\r\n`npx ember-native-class-codemod http:\/\/localhost:4200 --decorators=true --classic-decorator='' app\/...`\r\n","issue_id":1662249800336,"origin_id":1077473888,"user_origin_id":3207218,"create_time":1648117750,"update_time":1648117750,"id":1667670888947,"updated_at":"2022-11-05T17:54:48.947000Z","created_at":"2022-11-05T17:54:48.947000Z"}] comment

Running this codemod with `--classic-decorator=false` still replaces objects with classes wrapped with the `@classic` decorator: ``` npx ember-native-class-codemod http://intercom.test/app-store --type=route --classic-decorator=false app/routes ``` [Manually](https://github.com/22a/ember-native-class-codemod/commit/6d417d2d11624bd96b7ebf5d4599089009311bbf) inverting the default works as expected.

TypeError: Cannot read property 'process' of undefined

[{"_id":"6366a3558041c95dfb1e5a4c","body":"looks related: https:\/\/github.com\/reactjs\/react-codemod\/issues\/219, https:\/\/github.com\/facebook\/jscodeshift\/issues\/299","issue_id":1662249800340,"origin_id":736762609,"user_origin_id":1360552,"create_time":1606850264,"update_time":1606850286,"id":1667670869813,"updated_at":"2022-11-05T17:54:29.813000Z","created_at":"2022-11-05T17:54:29.813000Z"},{"_id":"6366a3558041c95dfb1e5a4d","body":"I tried the solutions in the related issues, but i am still getting this error. \r\n\r\nI tried different variations of the following command line.\r\n`npx ember-native-class-codemod http:\/\/localhost:4200 --no-babel app\/components`\r\n\r\nAm i missing something or does ember-native-class-codemod not support these flags?","issue_id":1662249800340,"origin_id":821200233,"user_origin_id":23332441,"create_time":1618581797,"update_time":1618581797,"id":1667670869817,"updated_at":"2022-11-05T17:54:29.817000Z","created_at":"2022-11-05T17:54:29.817000Z"},{"_id":"6366a3558041c95dfb1e5a4e","body":"@JoepHeijnen ya, flags not working","issue_id":1662249800340,"origin_id":821259080,"user_origin_id":1360552,"create_time":1618587139,"update_time":1618587139,"id":1667670869821,"updated_at":"2022-11-05T17:54:29.820000Z","created_at":"2022-11-05T17:54:29.820000Z"},{"_id":"6366a3558041c95dfb1e5a4f","body":"Is there any solution to this one? ","issue_id":1662249800340,"origin_id":1070784119,"user_origin_id":101803125,"create_time":1647514305,"update_time":1647514305,"id":1667670869824,"updated_at":"2022-11-05T17:54:29.824000Z","created_at":"2022-11-05T17:54:29.824000Z"}] comment

TypeError: Cannot read property 'process' of undefined at C:\Users\lifeart\AppData\Roaming\npm-cache\_npx\173988\node_modules\ember-es6-class-codemod\node_modules\flow-parser\/flow_parser.js:281:70 at Object. (C:\Users\lifeart\AppData\Roaming\npm-cache\_npx\173988\node_modules\ember-es6-class-codemod\node_modules\flow-parser\/flow_parser.js:2:2) at Module._compile (internal/modules/cjs/loader.js:778:30) at Module._compile (C:\Users\lifeart\AppData\Roaming\npm-cache\_npx\173988\node_modules\ember-es6-class-codemod\node_modules\pirates\lib\index.js:99:24) at Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Object.newLoader [as .js] (C:\Users\lifeart\AppData\Roaming\npm-cache\_npx\173988\node_modules\ember-es6-class-codemod\node_modules\pirates\lib\index.js:104:7) at Module.load (internal/modules/cjs/loader.js:653:32) at...

Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.10.0 to 6.12.6. Release notes Sourced from ajv's releases. v6.12.6 Fix performance issue of "url" format. v6.12.5 Fix uri scheme validation (@​ChALkeR). Fix boolean schemas with strictKeywords...

dependencies

need option '--decorators=true' thrown when transforming `action(function) {})`

[{"_id":"636697573056137e26667f15","body":"i also ran to the same issue, with\r\n```\r\nexport default Controller.extend({\r\n foo: new Date().getFullYear().toString()\r\n})\r\n```\r\n\r\nwhich seems result from the same line of logic https:\/\/github.com\/ember-codemods\/ember-native-class-codemod\/blob\/ebe7c883bb2771602ab37f6005f037e11bec7779\/transforms\/helpers\/validation-helper.js#L77,\r\n","issue_id":1662249800347,"origin_id":634953044,"user_origin_id":4575620,"create_time":1590615126,"update_time":1590615155,"id":1667667799382,"updated_at":"2022-11-05T17:03:19.382000Z","created_at":"2022-11-05T17:03:19.382000Z"},{"_id":"636697573056137e26667f16","body":"I just hit the same with:\r\n```\r\nexport default Controller.extend({\r\n endPeriodYear: new Date().getFullYear(),\r\n});\r\n```\r\n\r\n```\r\n2020-07-02T01:16:43.311Z [warn] [cup-client\/app\/controllers\/returns\/history\/list.js]: FAILURE \r\nValidation errors: \r\n\t[endPeriodYear]: Transform not supported - need option '--decorators=true' or the property type CallExpression can not be transformed\r\n```","issue_id":1662249800347,"origin_id":652724432,"user_origin_id":33635998,"create_time":1593652811,"update_time":1593652811,"id":1667667799386,"updated_at":"2022-11-05T17:03:19.386000Z","created_at":"2022-11-05T17:03:19.386000Z"},{"_id":"636697573056137e26667f17","body":"Was there every a resolution to this? It basically negates the usefulness of this codemod for me as I have properties like this on pretty much every route \/ controller","issue_id":1662249800347,"origin_id":953784721,"user_origin_id":37108569,"create_time":1635423068,"update_time":1635423068,"id":1667667799390,"updated_at":"2022-11-05T17:03:19.390000Z","created_at":"2022-11-05T17:03:19.390000Z"},{"_id":"636697573056137e26667f18","body":"I think it would be really helpful to know what \r\nhttps:\/\/github.com\/ember-codemods\/ember-native-class-codemod\/blob\/ebe7c883bb2771602ab37f6005f037e11bec7779\/transforms\/helpers\/validation-helper.js#L77 is checking for?\r\nRemoving that last check just does what I was originally expecting this codemod to do!","issue_id":1662249800347,"origin_id":954646736,"user_origin_id":37108569,"create_time":1635504742,"update_time":1635504742,"id":1667667799393,"updated_at":"2022-11-05T17:03:19.393000Z","created_at":"2022-11-05T17:03:19.393000Z"},{"_id":"636697573056137e26667f19","body":"Same issue here, even though the 'no-actions-hash' eslint rule dictates that this is the correct way of wiring up actions, any classic class that uses it gets skipped during the codemod. \r\n\r\n> Use the @action decorator or **foo: action(function() {}))** syntax instead of an actions hash.\r\n\r\nhttps:\/\/github.com\/ember-cli\/eslint-plugin-ember\/blob\/master\/docs\/rules\/no-actions-hash.md\r\n\r\n\r\n`2021-11-03T12:28:49.559Z [warn] [.\/app\/pods\/components\/animated-line\/component.js]: FAILURE \r\nValidation errors: \r\n\t[stage]: Transform not supported - need option '--decorators=true' or the property type CallExpression can not be transformed\r\n\t[points]: Transform not supported - need option '--decorators=true' or the property type CallExpression can not be transformed\r\n`\r\n","issue_id":1662249800347,"origin_id":958996835,"user_origin_id":738902,"create_time":1635943443,"update_time":1635943473,"id":1667667799398,"updated_at":"2022-11-05T17:03:19.398000Z","created_at":"2022-11-05T17:03:19.398000Z"},{"_id":"636697573056137e26667f1a","body":"Hmm I have almost 1000 of this style of action decorator in the codebase. Anyone here find a good way of leveraging this code mod for individual who used action decorators in the ember classic style?","issue_id":1662249800347,"origin_id":1024515327,"user_origin_id":697846,"create_time":1643396175,"update_time":1643396175,"id":1667667799402,"updated_at":"2022-11-05T17:03:19.401000Z","created_at":"2022-11-05T17:03:19.401000Z"}] comment

With a pretty vanilla run of this codemod, I saw these errors in the logs: ``` Transform not supported - need option '--decorators=true' or the property type CallExpression can not...

The error I receive for a lot of the `js` files I try to update is: `error evaluating 'app/components/power-up-tile': Ember is not defined` Any idea why this might happen? This...