Fix prettier pattern (#1554)

This commit is contained in:
Jonatan Kłosko 2022-11-30 00:26:28 +01:00 committed by GitHub
parent a9d455d377
commit 24f4d78cc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 25 deletions

View file

@ -21,7 +21,7 @@ jobs:
otp-version: ${{ env.otp }} otp-version: ${{ env.otp }}
elixir-version: ${{ env.elixir }} elixir-version: ${{ env.elixir }}
- name: Cache Mix - name: Cache Mix
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: | path: |
deps deps
@ -33,11 +33,11 @@ jobs:
- name: Install mix dependencies - name: Install mix dependencies
run: mix deps.get run: mix deps.get
- name: Install Node - name: Install Node
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: "14.x" node-version: "18.x"
- name: Cache npm dependencies - name: Cache npm dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ~/.npm path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

View file

@ -21,7 +21,7 @@ jobs:
otp-version: ${{ env.otp }} otp-version: ${{ env.otp }}
elixir-version: ${{ env.elixir }} elixir-version: ${{ env.elixir }}
- name: Cache Mix - name: Cache Mix
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: | path: |
deps deps
@ -38,11 +38,11 @@ jobs:
- name: Run tests - name: Run tests
run: mix test run: mix test
- name: Install Node - name: Install Node
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: "14.x" node-version: "18.x"
- name: Cache npm dependencies - name: Cache npm dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ~/.npm path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@ -77,7 +77,7 @@ jobs:
run: | run: |
"C:\Program Files\Git\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 "C:\Program Files\Git\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Cache Mix - name: Cache Mix
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: | path: |
deps deps
@ -98,12 +98,12 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Cache Mix Deps - name: Cache Mix Deps
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: deps path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
- name: Cache Bootstrap - name: Cache Bootstrap
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: tmp path: tmp
key: ${{ runner.os }}-app-${{ hashFiles('.github/scripts/app/bootstrap_mac.sh') }} key: ${{ runner.os }}-app-${{ hashFiles('.github/scripts/app/bootstrap_mac.sh') }}

View file

@ -21,17 +21,21 @@ const csrfToken = document
.querySelector("meta[name='csrf-token']") .querySelector("meta[name='csrf-token']")
.getAttribute("content"); .getAttribute("content");
const liveSocket = new LiveSocket(window.LIVEBOOK_BASE_URL_PATH + "/live", Socket, { const liveSocket = new LiveSocket(
params: (liveViewName) => { window.LIVEBOOK_BASE_URL_PATH + "/live",
return { Socket,
_csrf_token: csrfToken, {
// Pass the most recent user data to the LiveView in `connect_params` params: (liveViewName) => {
user_data: loadUserData(), return {
}; _csrf_token: csrfToken,
}, // Pass the most recent user data to the LiveView in `connect_params`
hooks: hooks, user_data: loadUserData(),
dom: morphdomOptions, };
}); },
hooks: hooks,
dom: morphdomOptions,
}
);
// Show progress bar on live navigation and form submits // Show progress bar on live navigation and form submits
registerTopbar(); registerTopbar();

View file

@ -4,7 +4,9 @@ const csrfToken = document
.querySelector("meta[name='csrf-token']") .querySelector("meta[name='csrf-token']")
.getAttribute("content"); .getAttribute("content");
const socket = new Socket(window.LIVEBOOK_BASE_URL_PATH + "/socket", { params: { _csrf_token: csrfToken } }); const socket = new Socket(window.LIVEBOOK_BASE_URL_PATH + "/socket", {
params: { _csrf_token: csrfToken },
});
let channel = null; let channel = null;

View file

@ -3,8 +3,8 @@
"scripts": { "scripts": {
"deploy": "NODE_ENV=production webpack --mode production", "deploy": "NODE_ENV=production webpack --mode production",
"watch": "webpack --mode development --watch", "watch": "webpack --mode development --watch",
"format": "prettier --trailing-comma es5 --write {js,test,css}/**/*.{js,json,css,scss,md} --no-error-on-unmatched-pattern", "format": "prettier --trailing-comma es5 --write '{js,test,css}/**/*.{js,json,css,scss,md}' --no-error-on-unmatched-pattern",
"format-check": "prettier --trailing-comma es5 --check {js,test,css}/**/*.{js,json,css,scss,md} --no-error-on-unmatched-pattern", "format-check": "prettier --trailing-comma es5 --check '{js,test,css}/**/*.{js,json,css,scss,md}' --no-error-on-unmatched-pattern",
"test": "jest", "test": "jest",
"test:watch": "jest --watch" "test:watch": "jest --watch"
}, },