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(deps): strict regex for package.json and yarn #822

Merged
merged 5 commits into from
Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ jobs:
yarn eslint --ext=json .
echo 'Use yarn fix:json to fix issues'

- name: Validate renovate.json
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The validator takes at least 30 seconds tu run, on each PR, either we cache the renovate file or remove this, wdyt ?

Copy link
Member

Choose a reason for hiding this comment

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

it's not something that should change regularly, we don't have to validate it imo

Copy link
Member

Choose a reason for hiding this comment

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

(alternatively, this could be in a if with a git diff on the renovate but maybe it's overkill)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep I agree, we already some form of validation with the schema anyway

uses: rinchsan/[email protected]
with:
pattern: renovate.json

outputs:
RUN_SCRIPTS: ${{ steps.setup.outputs.RUN_SCRIPTS }}

Expand Down
4 changes: 2 additions & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"package.mustache"
],
"matchStrings": [
"\\s\"(?<depName>.*?)\": \"(?<currentValue>.*?)\",?\\s"
"\\s\"(?<depName>.*?)\": \"(?<currentValue>\\d.*?)\",?\\s"
],
"datasourceTemplate": "npm"
},
Expand Down Expand Up @@ -75,7 +75,7 @@
"description": "Update yarn version (won't work because we need to download the script but gives an alert at least)",
"fileMatch": ".yarnrc.yml",
"matchStrings": [
"yarn/releases/yarn-(?<currentValue>.*?)"
"yarn/releases/yarn-(?<currentValue>.*?)\\.cjs"
],
"depNameTemplate": "yarnpkg/berry",
"datasourceTemplate": "github-releases"
Expand Down