From 7c72fafed80b317418fa5d9a81d1f887143c07f3 Mon Sep 17 00:00:00 2001 From: Raghd Hamzeh Date: Wed, 15 Jan 2025 11:20:10 -0500 Subject: [PATCH] chore!: require node 16.15.0+ in accordance with our JS SDK --- .github/workflows/main.yaml | 11 +++++++---- package-lock.json | 3 +++ package.json | 3 +++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index f7e7653..c67b722 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -9,13 +9,16 @@ on: permissions: contents: read +env: + NODE_VERSION: 22 + jobs: build: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x, 16.x, 18.x, 20.x] + node-version: [16.x, 18.x, 20.x, 22.x] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -31,7 +34,7 @@ jobs: cache: 'npm' - name: Update npm - if: startsWith(matrix.node-version, '18.') || startsWith(matrix.node-version, '20.') + if: startsWith(matrix.node-version, '18.') || startsWith(matrix.node-version, '20.') || startsWith(matrix.node-version, '22.') run: npm i -g npm - name: Install dependencies @@ -51,7 +54,7 @@ jobs: - name: Set up node uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: - node-version: '20' + node-version: "$NODE_VERSION" cache: 'npm' - name: Update npm @@ -93,7 +96,7 @@ jobs: - name: Set up node uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: - node-version: '20' + node-version: "$NODE_VERSION" registry-url: 'https://registry.npmjs.org' scope: '@openfga' always-auth: false diff --git a/package-lock.json b/package-lock.json index c50555b..bfa672b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,6 +26,9 @@ "prettier": "^3.3.3", "ts-jest": "^29.2.5", "typescript": "^5.5.4" + }, + "engines": { + "node": ">=16.15.0" } }, "node_modules/@ampproject/remapping": { diff --git a/package.json b/package.json index 4cbf821..bcdeb8f 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,9 @@ "bugs": { "url": "https://github.com/openfga/frontend-utils/issues" }, + "engines": { + "node": ">=16.15.0" + }, "homepage": "https://github.com/openfga/frontend-utils#readme", "publishConfig": { "access": "public",