-
Notifications
You must be signed in to change notification settings - Fork 305
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
Development
: Make environment variables in npm commands platform-independent
#10322
Conversation
Warning Rate limit exceeded@krusche has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 59 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
WalkthroughThe pull request modifies the Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant NPM as npm
participant CrossEnv as cross-env
participant NG as Angular CLI (ng)
Dev->>NPM: Execute "npm run webapp:prod"
NPM->>NPM: Run "clean-www"
NPM->>NPM: Run "prebuild"
NPM->>CrossEnv: Set NG_BUILD_OPTIMIZE_CHUNKS=1 and trigger build
CrossEnv->>NG: Run "ng build --configuration production"
Suggested labels
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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
Documentation and Community
|
Development
: Make Environment variables in npm commands platform-independentDevelopment
: Make environment variables in npm commands platform-independent
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: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
package.json
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: client-tests-selected
- GitHub Check: client-tests
- GitHub Check: client-style
- GitHub Check: server-style
- GitHub Check: server-tests
- GitHub Check: Call Build Workflow / Build and Push Docker Image
- GitHub Check: Call Build Workflow / Build .war artifact
- GitHub Check: Analyse
🔇 Additional comments (1)
package.json (1)
220-220
: LGTM! The environment variable is now platform-independent.The
webapp:prod
script has been correctly modified to usecross-env
, which will ensure that theNG_BUILD_OPTIMIZE_CHUNKS
environment variable works consistently across different operating systems, including Windows.
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.
tested locally and worked as expected. Windows
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.
code
900d6d7
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: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.json
is excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json
(2 hunks)
🔇 Additional comments (1)
package.json (1)
224-225
: Enhance Platform Compatibility with cross-env
The"webapp:prod"
script has been correctly updated to usecross-env
for setting theNG_BUILD_OPTIMIZE_CHUNKS
environment variable. This change will allow the command to execute properly on Windows as well as Unix-based systems.
Checklist
General
Motivation and Context
Some npm commands such as
webapp:prod
cannot be executed on Windows because Powershell doesn't recognize the environment variables contained in the command.We should aim for platform-independent commands.
Description
Added the cross-env npm package.
Preceded the env variable in
webapp:prod
with cross-env to make it platform-independent.Steps for Testing
webapp:prod
Review Progress
Code Review
Manual Tests
Summary by CodeRabbit