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

chore: update build scripts to produce more reliable caching #1150

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

moldy530
Copy link
Collaborator

@moldy530 moldy530 commented Nov 13, 2024

Description

This PR updates the generate script for smart contracts to also lint the code generated because right now everytime you run build it produces unlinted code. This results in the cache being consistently busted for this package but also results in unlinted code being generated locally on each build which is a bit annoying.

Pull Request Checklist


PR-Codex overview

This PR focuses on enhancing the development configurations across various turbo.json files, introducing new tasks, and updating workflow configurations to integrate OPENAI_API_KEY. It also modifies package scripts to include linting for generated files and adds the dotenv-cli dependency.

Detailed summary

  • Added dev tasks in multiple turbo.json files with specific dependencies and settings.
  • Updated .github/workflows/on-pull-request.yml and .github/workflows/publish-package.yml to include OPENAI_API_KEY.
  • Modified package.json scripts to include linting for generated files.
  • Introduced dotenv-cli dependency in package.json.
  • Updated yarn.lock to reflect the new dependency.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Nov 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aa-sdk-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 6:49pm
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 6:49pm

Copy link

graphite-app bot commented Nov 13, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “graphite-merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Collaborator Author

moldy530 commented Nov 13, 2024

@@ -38,7 +38,6 @@
"prebuild": "npx tsx ./inject-version.ts",
"dev": "storybook dev",
"build": "yarn clean && yarn build:esm && yarn build:types",
"build:dev": "lerna watch --scope='@account-kit/react' --include-dependencies -- lerna run build --scope=@account-kit/react",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is now handled correctly by turbo

"extends": ["//"],
"tasks": {
"generate": {
"env": ["OPENAI_API_KEY"],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

used when linting the output of the generate

"dependsOn": ["^build"],
"persistent": true,
"cache": false,
"interruptible": true
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this doesn't get hot reloaded when packages change, so this one has to be restarted by turbo

Copy link

graphite-app bot commented Nov 14, 2024

Merge activity

# Description
This PR updates the generate script for smart contracts to also lint the code generated because right now everytime you run build it produces unlinted code. This results in the cache being consistently busted for this package but also results in unlinted code being generated locally on each build which is a bit annoying.

# Pull Request Checklist

- [ ] Did you add new tests and confirm existing tests pass? (`yarn test`)
- [ ] Did you update relevant docs? (docs are found in the `site` folder, and guidelines for updating/adding docs can be found in the [contribution guide](https://github.com/alchemyplatform/aa-sdk/blob/main/CONTRIBUTING.md))
- [ ] Do your commits follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard?
- [ ] Does your PR title also follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard?
- [ ] If you have a breaking change, is it [correctly reflected in your commit message](https://www.conventionalcommits.org/en/v1.0.0/#examples)? (e.g. `feat!: breaking change`)
- [ ] Did you run lint (`yarn lint:check`) and fix any issues? (`yarn lint:write`)
- [ ] Did you follow the [contribution guidelines](https://github.com/alchemyplatform/aa-sdk/blob/main/CONTRIBUTING.md)?

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the development environment by adding new `dev` tasks to various `turbo.json` files, updating GitHub workflows to include an `OPENAI_API_KEY`, and modifying scripts to improve the build and generation processes.

### Detailed summary
- Added `dev` tasks in `site/turbo.json`, `account-kit/react/turbo.json`, `examples/ui-demo/turbo.json`, and `account-kit/smart-contracts/turbo.json`.
- Updated GitHub workflows to include `OPENAI_API_KEY`.
- Modified `package.json` to add `dev:ui` and `dev:docs` scripts.
- Enhanced `generate` script in `account-kit/smart-contracts/package.json` to include linting.
- Updated `yarn.lock` to include `dotenv-cli` and its dependencies.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants