-
-
Notifications
You must be signed in to change notification settings - Fork 729
Fix prerelease script #1794
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
Fix prerelease script #1794
Conversation
|
WalkthroughThis pull request introduces new settings in configuration files and augments the project's build process. A new caching option is added in Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant Git as Git
participant LH as Lefthook
Dev->>Git: Attempt commit to main branch
Git->>LH: Trigger pre-commit hook
LH-->>Git: Exit with status 1 to block commit
Note over Git,Dev: Commit is prevented on the main branch
sequenceDiagram
participant Script as Publish Script
participant PNPM as PNPM CLI
participant Build as Build Process
Script->>Script: Check for unreleased changesets
Script->>Console: Output cleaning message
Script->>PNPM: Execute clean command for @trigger.dev/* and trigger.dev
PNPM-->>Script: Clean operation completes
Script->>Build: Run build command
Suggested reviewers
Poem
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
.npmrc (1)
4-5
: Clarify new configuration settings.
The additions ofupdate-notifier=false
andside-effects-cache=false
appear intended to streamline the package installation process. Verify that disabling update notifications and side-effects caching aligns with the team's workflow and is well-documented for contributors.scripts/publish-prerelease.sh (1)
51-52
: Introduce cleanup before build.
The added commands output a message and invokepnpm run clean
with explicit filters for@trigger.dev/*
andtrigger.dev
. This ensures that stale build artifacts are removed before initiating the build, which directly addresses the prerelease script issues. Please double-check that the filter patterns cover all intended modules and that the clean process does not remove any necessary files.package.json (1)
56-56
: New dependency for Lefthook integration.
The dependency"lefthook": "^1.11.3"
has been added todevDependencies
to support the new Git hook configurations. Ensure that its usage is documented, so contributors understand its role in enforcing branch policies.lefthook.yml (1)
1-7
: Implement pre-commit hook to prevent main branch commits.
This newly introducedpre-commit
configuration applies only to commits on themain
branch by running a job that immediately exits with a status of 1, effectively blocking such commits. Confirm that this behavior is clearly communicated in the contribution guidelines to avoid any surprises for contributors.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
.npmrc
(1 hunks)lefthook.yml
(1 hunks)package.json
(1 hunks)scripts/publish-prerelease.sh
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
- GitHub Check: units / 🧪 Unit Tests
- GitHub Check: typecheck / typecheck
- GitHub Check: Analyze (javascript-typescript)
Not cleaning up build artifacts before building for prerelease was causing trouble. For example, the build output could be missing newly added modules.
This PR also adds lefthook, a powerful git hook manager. For now it only adds a single pre-commit hook that prevents commits to main.
Summary by CodeRabbit