NullVoxPopuli / ember-addon-migrator

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

extract-tests, dependencies #64

Closed nicolechung closed 1 year ago

nicolechung commented 1 year ago

Following is a bit of a long list. Can break up into separate issues if required.

Here goes...

test-app: Is there a way to opt into installing the following dependencies?

Otherwise it adds dependencies that aren't used by the consuming app.

  1. ember-data
  2. ember-fetch
  3. prettier
  4. stylelint and related plugins
  5. @typescript-eslint and related plugins
  6. ember-try and related config
  7. ember-cli-app-version
  8. @types/ember__test-helpers (I think this was removed already, but I was getting it when running the migrator still)
  9. ember-source-channel-url
  10. ember-try and related config
  11. ember-cli-sri

test-app: Is there a way to match dependencies to what already exists for the following?

I guess this is more complicated in a monorepo because then it needs to check the entire monorepo for versions, but here is the list:

ember-optional-features @ember/test-helpers @glimmer/component @glimmer/tracking": "1.1.2 @tsconfig/ember @embroider/test-setup version webpack version typescript all the @types/ember variations that are added @types/qunit @types/rsvp broccoli-asset-rev ember-auto-import ember-cli ember-cli-babel ember-cli-dependency-checker ember-cli-handlebars ember-cli-inject-live-reload ember-cli-terser ember-cli-typescript ember-load-initializers ember-modifier ember-page-title ember-qunit ember-resolver ember-source ember-template-lint loader.js qunit qunit-dom tracked-built-ins

NullVoxPopuli commented 1 year ago

The first is tricky, because the blueprint is used here: https://github.com/NullVoxPopuli/ember-addon-migrator/blob/main/cli/src/extract-tests/index.js#L156 And the blueprint includes all that stuff.

The second is possible, and i think probably worth while to implement as a flag or something.

nicolechung commented 1 year ago

Like a --match-dependencies flag?

nicolechung commented 1 year ago

I could add a note (should start that PR, at least a WIP version) in the documentation about the first item (adding unwanted dependencies)

NullVoxPopuli commented 1 year ago

yeah, that could be good.

I know both Kelly and I wrote a "defrag" script -- could be good to reuse that?

simonihmig commented 1 year ago

We can close this? (I cannot 😏)

nicolechung commented 1 year ago

Closed, fixed with: https://github.com/NullVoxPopuli/ember-addon-migrator/pull/72