Try using the pinned version of prettier

This commit is contained in:
cmdr2 2023-04-29 08:04:15 +05:30
parent 4dc2a96d41
commit 51e067b050
3 changed files with 41 additions and 11 deletions

View File

@ -10,18 +10,16 @@ jobs:
steps:
- name: Check out repo
uses: actions/checkout@v2
- uses: actions/cache@v2
name: Configure npm caching
- uses: actions/setup-node@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/prettier.yml') }}
restore-keys: |
${{ runner.os }}-npm-
node-version: 16
cache: 'npm'
- run: npm ci
- name: Run prettier
run: |-
npm run prettier-fix
- name: Print the diff
- name: Print the required changes
run: git diff; git reset --hard
- name: Run prettier
- name: Check prettier
run: |-
npm run prettier-check

32
package-lock.json generated Normal file
View File

@ -0,0 +1,32 @@
{
"name": "stable-diffusion-ui",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"devDependencies": {
"prettier": "1.19.1"
}
},
"node_modules/prettier": {
"version": "1.19.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
"integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
"dev": true,
"bin": {
"prettier": "bin-prettier.js"
},
"engines": {
"node": ">=4"
}
}
},
"dependencies": {
"prettier": {
"version": "1.19.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
"integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
"dev": true
}
}
}

View File

@ -1,9 +1,9 @@
{
"scripts": {
"prettier-fix": "npx prettier --write \"./**/*.js\" --config .prettierrc.json",
"prettier-check": "npx prettier --check \"./**/*.js\" --config .prettierrc.json"
"prettier-fix": "npx prettier --write \"./**/*.js\"",
"prettier-check": "npx prettier --check \"./**/*.js\""
},
"devDependencies": {
"prettier": "^1.19.1"
"prettier": "1.19.1"
}
}