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

Migrate to create-plugin and support node 18 #286

Merged
merged 2 commits into from
Oct 24, 2023
Merged

Conversation

kevinwcyu
Copy link
Contributor

@kevinwcyu kevinwcyu commented Oct 17, 2023

  • Tested with Node v18.17.1 locally with the following rm -rf node_modules && yarn && yarn lint && yarn test:ci && yarn build then tested it with a simple query

Notes to reviewers:

I suggest checking the Hide whitespace checkbox in the diff view settings for this.

Why does this include migrating from @grafana/toolkit to @grafana/create-plugin? When updating to Node 18, we run into an error due to an incompatible version of node when running yarn install due to dependencies used in @grafana/toolkit, which is now deprecated.

What are the notable changes

  • Files created/modified by running npx @grafana/create-plugin@latest migrate
    • ./config/* all generated files with default configuration for tooling such as webpack, eslint, jest, etc. The following root level files were also modified automatically to use the configuration defined in the /.config dir
      • .eslintrc
      • .prettierrc.js
      • jest-setup.js
      • jest.config.js
      • tsconfig.json
    • package.json modified to include required dev deps and updates the scripts
    • docker-compose.yaml used by yarn server
  • .github/workflows/detect-breaking-changes.yml sets it to use the .nvmrc file to determine the version of node to use instead of hardcoding it
  • .nvmrc is used to determine which version of Node is used to build the app in Drone.
  • CONTRIBUTING.MD removes the yarn watch command which is no longer available, it is now just yarn dev
  • src/**/*.{ts,tsx} files: formatting changes (prettier), and typescript fixes

@kevinwcyu kevinwcyu marked this pull request as ready for review October 18, 2023 17:32
@kevinwcyu kevinwcyu requested a review from a team as a code owner October 18, 2023 17:32
@kevinwcyu kevinwcyu requested review from iwysiu and sarahzinger and removed request for a team October 18, 2023 17:32
Copy link
Member

@sarahzinger sarahzinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

holy moly what a journey! nice work!

@@ -0,0 +1,25 @@
// Due to the grafana/ui Icon component making fetch requests to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol this is so random

@kevinwcyu kevinwcyu merged commit 1467723 into main Oct 24, 2023
4 checks passed
@kevinwcyu kevinwcyu deleted the kevinwcyu/node-18 branch October 24, 2023 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants