Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relative plugins from external config shared across packages breaks #1712

Closed
sethomas opened this issue Jan 13, 2021 · 5 comments · Fixed by #1717
Closed

relative plugins from external config shared across packages breaks #1712

sethomas opened this issue Jan 13, 2021 · 5 comments · Fixed by #1717
Labels
bug Something isn't working released This issue/pull request has been released.

Comments

@sethomas
Copy link
Contributor

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.

@sethomas sethomas added the bug Something isn't working label Jan 13, 2021
@hipstersmoothie
Copy link
Collaborator

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

@hipstersmoothie
Copy link
Collaborator

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

@sethomas
Copy link
Contributor Author

@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.

@hipstersmoothie
Copy link
Collaborator

Awesome! Thanks for confirming

@adierkens
Copy link
Collaborator

🚀 Issue was released in v10.7.0 🚀

@adierkens adierkens added the released This issue/pull request has been released. label Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants