-
-
Notifications
You must be signed in to change notification settings - Fork 8k
chore/6712: enhance pnpm lockfile and GitHub Actions config #6714
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
base: develop
Are you sure you want to change the base?
chore/6712: enhance pnpm lockfile and GitHub Actions config #6714
Conversation
|
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
mermaid
@mermaid-js/layout-elk
@mermaid-js/mermaid-zenuml
@mermaid-js/parser
@mermaid-js/tiny
commit: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #6714 +/- ##
=======================================
Coverage 3.82% 3.82%
=======================================
Files 430 430
Lines 44479 44479
Branches 683 683
=======================================
Hits 1701 1701
Misses 42778 42778
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
@shubham-mermaid can you please guide me through this ? |
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
|
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.
- Should not be using
latest
anywhere. - Any reason to move a lot of permissions to higher scope?
@@ -34,7 +34,7 @@ jobs: | |||
cache: | |||
runs-on: ubuntu-latest | |||
container: | |||
image: cypress/browsers:node-20.11.0-chrome-121.0.6167.85-1-ff-120.0-edge-121.0.2277.83-1 | |||
image: cypress/browsers:latest |
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.
Using latest for E2E tests that include rendering will introduce rendering inconsistencies. We should use a pinned version.
@@ -1 +1 @@ | |||
22.14.0 | |||
20.19.0 |
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.
Why is node downgraded?
# 1) No tarball references | ||
if grep -qF 'tarball:' pnpm-lock.yaml; then | ||
issues+=("• Tarball references found (forbidden)") | ||
fi | ||
|
||
# 2) No unwanted vitepress paths | ||
if grep -qF 'packages/mermaid/src/vitepress' pnpm-lock.yaml; then | ||
issues+=("• Disallowed path 'packages/mermaid/src/vitepress' present. Run `rm -rf packages/mermaid/src/vitepress && pnpm install` to regenerate.") | ||
fi | ||
|
||
# 3) Lockfile only changes when package.json changes | ||
git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} > changed.txt | ||
if grep -q '^pnpm-lock.yaml$' changed.txt && ! grep -q 'package.json' changed.txt; then | ||
issues+=("• pnpm-lock.yaml changed without any package.json modification") | ||
fi | ||
|
||
# If any issues, output them and fail | ||
if [ ${#issues[@]} -gt 0 ]; then | ||
# Use the new GITHUB_OUTPUT approach to set a multiline output |
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.
These comments are useful.
push: | ||
branches: [main, develop] |
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.
We don't want to run this on push to main/develop.
Resolves #6712
Summary
node-version: 20
, now uses.node-version
permissions
explicitly at the top level in workflows