Auto: relative plugins from external config shared across packages breaks

Created on 13 Jan 2021  ·  5Comments  ·  Source: intuit/auto

Describe the bug

When you make an external config of auto to be shared across multiple packages and specify a plugin that is relative path, the plugin is not found.

To Reproduce

  1. make a repository to house auto's config
  2. make a custom plugin and define it relative in package.json
"auto": {
  "plugins": [
    "./plugins/some-plugin.js",
  ]
}
  1. publish this to an npm registry
  2. in another initialized npm project, install the auto config repo and extend the config:
"auto": {
  "extends": "@SCOPE",
}
  1. do a dry-run release of the project npx auto shipit --dry-run
  2. get below error:
⚠  warning   Could not find plugin from path: $PROJECT/plugins/some-plugin.js

Expected behavior

When using auto.extend, the relative path-ed plugins from the configuration should be relative to itself and not the project that the auto config is installed into and extended in.

Additional context

I think a viable solution is to publish the plugins to npm, but that requires setting it up the auto config project to be a monorepo, and alias-ing the plugins so I can use itself to release itself.

bug released

All 5 comments

This is a cool use of a shared config. gonna make this work!

Could you test out the canary version in #1717? @sethomas

@hipstersmoothie NIOCE, great success!

Confirmed:

  1. in my auto-config repo, I installed auto's canary release, and did a canary release of my auto-config
  2. in another repo, I installed my auto-config canary release, and tried a canary release of that
  3. my relative plugin worked successfully ^^

Really appreciate responses/iterations.

Awesome! Thanks for confirming


:rocket: Issue was released in v10.7.0 :rocket:

Was this page helpful?
0 / 5 - 0 ratings