Skip to content

Test deprecate-router-events codemod#713

Merged
kellyselden merged 6 commits intoember-cli:masterfrom
rajasegar:deprecate-router-events
Oct 10, 2019
Merged

Test deprecate-router-events codemod#713
kellyselden merged 6 commits intoember-cli:masterfrom
rajasegar:deprecate-router-events

Conversation

@rajasegar
Copy link
Copy Markdown
Contributor

@rajasegar
Copy link
Copy Markdown
Contributor Author

@kellyselden Any idea how I can re-trigger the build for this PR?

@kellyselden
Copy link
Copy Markdown
Member

Looks like there's a failure with newlines with the codemod. https://travis-ci.org/ember-cli/ember-cli-update/jobs/593930566#L4994

@rajasegar
Copy link
Copy Markdown
Contributor Author

@kellyselden I think it's due to the quote difference single vs double , not because of newline character , I have fixed the same in the codemod, so need to trigger the build again and check. That's why I have asked.
ember-codemods/ember-3x-codemods#8

@kellyselden
Copy link
Copy Markdown
Member

Can you rebase master? I made some improvements to the test times.

Since the codemod doesn't change the function body,
changing the fixtures to reflect the same.
@kellyselden
Copy link
Copy Markdown
Member

kellyselden commented Oct 10, 2019

it's still a newline issue.

      -      "index.js": "import Router from '@ember/routing/router';\r\nimport { inject as service } from '@ember/service';\r\n\r\nexport default Router.extend({\r\n  currentUser: service('current-user'),\r\n\r\n  init() {\r\n    this._super(...arguments);\r\n\r\n    this.on('routeWillChange', transition => {\r\n      if (!this.currentUser.isLoggedIn) {\r\n        transition.abort();\r\n        this.transitionTo('login');\r\n      }\r\n    });\r\n\r\n    this.on('routeDidChange', transition => {\r\n      ga.send('pageView', {\r\n        pageName: privateInfos.name\r\n      });\r\n    });\r\n  }\r\n});\r\n"
      +      "index.js": "import Router from '@ember/routing/router';\r\nimport { inject as service } from '@ember/service';\r\n\r\nexport default Router.extend({\r\n  currentUser: service('current-user'),\r\n\r\n  init() {\r\n    this._super(...arguments);\r\n    this.on('routeWillChange', transition => {\r\n      if (!this.currentUser.isLoggedIn) {\r\n        transition.abort();\r\n        this.transitionTo('login');\r\n      }\r\n    });\r\n\r\n    this.on('routeDidChange', transition => {\r\n      ga.send('pageView', {\r\n        pageName: privateInfos.name\r\n      });\r\n    });\r\n  }\r\n});\r\n"

@rajasegar rajasegar changed the title WIP Test deprecate-router-events codemod Test deprecate-router-events codemod Oct 10, 2019
@rajasegar
Copy link
Copy Markdown
Contributor Author

@kellyselden Yes, from the beginning there was the new line issue, but apart from that we also had other issues within the transform. Finally, I figured out all of them. Thanks for reviewing.

@kellyselden kellyselden merged commit 9829f23 into ember-cli:master Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants