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

Bug: create plugin update clobbers overridden build/build:dev/dev scripts #820

Open
1 of 3 tasks
sd2k opened this issue Mar 14, 2024 · 2 comments
Open
1 of 3 tasks

Comments

@sd2k
Copy link
Contributor

sd2k commented Mar 14, 2024

Which package(s) does this bug affect?

  • Create Plugin
  • Sign Plugin
  • Plugin E2E

Package versions

@grafana/create-plugin@4.2.2

What happened?

I have a custom webpack.config.ts so modified the scripts in my package.json to point to ./webpack.config.ts instead of ./.config/webpack/webpack.config.ts. When I run yarn create @grafana/plugin update, it always overrides the scripts back to using the original webpack config file.

What you expected to happen

If the scripts have been customised, they should be ignored by the update process.

How to reproduce it (as minimally and precisely as possible)

  1. Create a plugin
  2. Modify the build script to point to a different webpack config
  3. Run yarn create @grafana/plugin update
  4. Notice that the build script has been modified

Environment

❯ npx envinfo --system --binaries --browsers --npmPackages="@grafana/*"

  System:
    OS: macOS 14.4
    CPU: (8) arm64 Apple M1
    Memory: 474.27 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.0 - ~/Library/Caches/fnm_multishells/30971_1710406991088/bin/node
    Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/30971_1710406991088/bin/yarn
    npm: 10.2.4 - ~/Library/Caches/fnm_multishells/30971_1710406991088/bin/npm
  Browsers:
    Chrome: 122.0.6261.129
    Firefox: 123.0.1
    Safari: 17.4
  npmPackages:
    @grafana/eslint-config: ^6.0.1 => 6.0.1


### Additional context

_No response_
@sympatheticmoose
Copy link
Contributor

@jackw mind taking a quick look? If just needs putting on the backlog as a bug feel free to do so and remove yourself as assignee if not able to look at in the near term

@leventebalogh leventebalogh self-assigned this Mar 25, 2024
@jackw
Copy link
Collaborator

jackw commented May 29, 2024

This is a known issue that we're gonna need to put some thought into to help devs selectively update the various parts of their project when running the command. I'm gonna remove myself for the time being and try to get a proposal together on how that could look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📅 Planned
Development

No branches or pull requests

4 participants