NullVoxPopuli / ember-addon-migrator

ember addon v1 to v2 migrator
19 stars 4 forks source link

Fix references in addon's package.json/tsconfig.json after moving #74

Closed simonihmig closed 1 year ago

simonihmig commented 1 year ago

Closes #65, #66, #71

/cc @nicolechung

stackblitz[bot] commented 1 year ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 7cf1d8d88fecbb0283d53a7d6f210108758bc90d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | -------------------- | ----- | | ember-addon-migrator | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

simonihmig commented 1 year ago

I tested this locally, and it seemed to work fine, but something seems to fail in CI. Will look into this tomorrow!

simonihmig commented 1 year ago

Oh, so this is weird! I spent quite some time today debugging some test failures with the linting test. Then found out that it was giving me the same failures on the main branch as well, when testing locally. Pushed my updates nevertheless, and here in CI they pass!

Any idea how that could be?

One example, that is weird by itself, as the error says something is "not under 'rootDir'", while the paths actually match perfectly:

image

Do I have to understand this? 🤯

simonihmig commented 1 year ago

Anyway, to give you an update of what I did today (after your initial review):

The 2nd commit adds a fix to the globby call looking for tsconfigs, to not traverse into node_modules by ignoring git-ignored files. (this was failing CI before, as it would transform any node_modules/**/tsconfig.json, including blueprint files from ember-cli that are not even valid json! 😅)

But this alone was not enough, as it seems both the migration tools itself as well as the test harness would not copy (hidden) dotfiles (including the newly added .gitignore fixtures). Seems fs.cp does not do this, while fse.copy does! That has been updated in the 3rd commit. Which then was failing locally, but apparently CI seems happy with this...

How to proceed? Do you want to give this a try yourself?

NullVoxPopuli commented 1 year ago

Do I have to understand this? exploding_head

I think it depends on what the project looks like on the file system -- but the error does look like it contradicts itself!!