From bf0a814b7a423187004d136358bdc562e4c4e20e Mon Sep 17 00:00:00 2001 From: MatiasG19 Date: Sun, 21 Apr 2024 19:12:07 +0200 Subject: [PATCH 1/5] Update ci.yml --- .github/workflows/ci.yml | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8d5341..bf2cccd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,12 +35,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v4 with: - python-version: '3.x' + python-version: "3.x" - name: Setup Clang Formatter uses: actions/checkout@v3 @@ -56,33 +56,17 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: 18.x - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "YARN_CACHE_DIR_PATH=$(yarn cache dir)" >> $GITHUB_OUTPUT - - - name: Cache yarn dependencies - uses: actions/cache@v3 - id: yarn-cache + uses: actions/setup-node@v4 with: - path: | - ${{ steps.yarn-cache-dir-path.outputs.YARN_CACHE_DIR_PATH }} - **/node_modules - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + node-version: 20.x - name: Install dependecies working-directory: ${{ env.WEB_PATH }} - if: steps.yarn-cache.outputs.cache-hit != 'true' - run: yarn --frozen-lockfile + run: npm ci - name: Check format working-directory: ${{ env.WEB_PATH }} - run: yarn check-format + run: npm run check-format From 2594fde3119f3fab26bb17ce91555739594bd3aa Mon Sep 17 00:00:00 2001 From: MatiasG19 Date: Sun, 21 Apr 2024 19:19:48 +0200 Subject: [PATCH 2/5] Move to npm, fix prettier path --- web/package-lock.json | 35 +++++++++++++++++++++++++++++++++++ web/package.json | 6 +++++- web/yarn.lock | 8 -------- 3 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 web/package-lock.json delete mode 100644 web/yarn.lock diff --git a/web/package-lock.json b/web/package-lock.json new file mode 100644 index 0000000..069eba6 --- /dev/null +++ b/web/package-lock.json @@ -0,0 +1,35 @@ +{ + "name": "arduino-remote-switch", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "arduino-remote-switch", + "version": "1.0.0", + "license": "GNU GPL V3", + "devDependencies": { + "prettier": "2.8.8" + }, + "engines": { + "node": "^20", + "npm": ">= 10.2.4" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + } + } +} diff --git a/web/package.json b/web/package.json index aa783f0..576228c 100644 --- a/web/package.json +++ b/web/package.json @@ -7,9 +7,13 @@ "license": "GNU GPL V3", "private": true, "scripts": { - "check-format": "yarn prettier --check ." + "check-format": "npx prettier --check ./src" }, "devDependencies": { "prettier": "2.8.8" + }, + "engines": { + "node": "^20", + "npm": ">= 10.2.4" } } diff --git a/web/yarn.lock b/web/yarn.lock deleted file mode 100644 index 7c65ca6..0000000 --- a/web/yarn.lock +++ /dev/null @@ -1,8 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -prettier@2.8.8: - version "2.8.8" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== From bb0e2b74b2a09141f1808b1ba5bcf8e1dd7356a2 Mon Sep 17 00:00:00 2001 From: MatiasG19 Date: Sun, 21 Apr 2024 19:22:05 +0200 Subject: [PATCH 3/5] Update ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf2cccd..936ae7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - arduino:avr:uno steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Arduino CLI uses: arduino/compile-sketches@v1 @@ -43,7 +43,7 @@ jobs: python-version: "3.x" - name: Setup Clang Formatter - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: adafruit/ci-arduino path: ci From 1d75ea3162c8b1421662b79342898f7834a9a727 Mon Sep 17 00:00:00 2001 From: MatiasG19 Date: Sun, 21 Apr 2024 19:27:22 +0200 Subject: [PATCH 4/5] Update ci.yml --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 936ae7b..f28f4bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,6 @@ jobs: Server-Format-Check: needs: [Server-Compile] - runs-on: ubuntu-latest steps: @@ -38,7 +37,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.x" From a9680bcae36cb4ca2855b42391d8d4184f6f8e2f Mon Sep 17 00:00:00 2001 From: MatiasG19 Date: Sun, 21 Apr 2024 19:34:46 +0200 Subject: [PATCH 5/5] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f28f4bd..58a58a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: ci -on: [push, pull_request] +on: [push] env: SERVER_PATH: server/src/