From 82067b690db29da902471213a0e174b6be7a097f Mon Sep 17 00:00:00 2001 From: Fahad Heylaal Date: Sat, 25 Jul 2026 23:06:13 +0200 Subject: [PATCH] chore: upgrade to v3.2.0 --- .github/workflows/ci.yml | 8 ++++++-- .nvmrc | 2 +- README.md | 8 ++++---- package-lock.json | 16 ++++++++-------- package.json | 2 +- src/index.js | 11 +++++------ 6 files changed, 25 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ee3e91..b0d6c3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,17 +2,21 @@ name: Continuous Integration on: [push] +permissions: + contents: read + jobs: continuous-integration: name: Continuous Integration runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v7 with: node-version-file: .nvmrc + cache: npm - name: Install dependencies run: npm ci diff --git a/.nvmrc b/.nvmrc index 209e3ef..a45fd52 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20 +24 diff --git a/README.md b/README.md index 6240080..fb80df6 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,14 @@ See required Node.js version in [`.nvmrc`](./.nvmrc) file. ## Installation -``` -$ npm ci +```sh +npm ci ``` ## Running the app -``` -$ node ./src/index.js +```sh +npm start ``` ## License diff --git a/package-lock.json b/package-lock.json index 1e8e868..6c988f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,22 +9,22 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@featurevisor/sdk": "^3.0.1" + "@featurevisor/sdk": "^3.2.0" } }, "node_modules/@featurevisor/sdk": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@featurevisor/sdk/-/sdk-3.0.1.tgz", - "integrity": "sha512-kCsypa8fYJcks6L8t4pUfTDDpeXrCxE0JcJtSQgVRiYc07AGxPK++CKIAlqe6sWFbI8LHVa5KXNZ9uFvFZ9+cw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@featurevisor/sdk/-/sdk-3.2.0.tgz", + "integrity": "sha512-t3pwD2snAmbFPMq/m8mjxPLSv+1O2hSUrWX0kd8SqqSvb+7iEQDemFs7kN4kTXTBXJh7bbfY+6850rzpdTot9g==", "license": "MIT", "dependencies": { - "@featurevisor/types": "3.0.1" + "@featurevisor/types": "3.2.0" } }, "node_modules/@featurevisor/types": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@featurevisor/types/-/types-3.0.1.tgz", - "integrity": "sha512-aDinR7Llsiorpesfy8GczhVFvkl9cy5fMHDlRR9mA2uDMkLVA5LDk31v1h2ncp158E5QiZP5t1Gii58nM8C0bA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@featurevisor/types/-/types-3.2.0.tgz", + "integrity": "sha512-DV3H+aqDkMLvAKUCMfayt1Z52bYnmv+EK6L1dx+rmPoIblnEB719uqvSlbJyYyAgYJFstFUp4yGc1F1tnHkpDQ==", "license": "MIT" } } diff --git a/package.json b/package.json index a71cda3..67973ed 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,6 @@ "author": "", "license": "MIT", "dependencies": { - "@featurevisor/sdk": "^3.0.1" + "@featurevisor/sdk": "^3.2.0" } } diff --git a/src/index.js b/src/index.js index 8c7bb88..6eae30a 100644 --- a/src/index.js +++ b/src/index.js @@ -5,8 +5,8 @@ // If you are using `.mjs` files or have `type: module` in your `package.json`, you can use `import` syntax. import { createFeaturevisor } from "@featurevisor/sdk"; -// otherwise, use `require` syntax -// const { createInstance } = require("@featurevisor/sdk"); +// Otherwise, use `require` syntax: +// const { createFeaturevisor } = require("@featurevisor/sdk"); /** * Constants @@ -18,14 +18,13 @@ const DATAFILE_URL = * Main */ async function main() { - const datafileContent = await fetch(DATAFILE_URL) - .then((res) => res.json()); + const datafileContent = await fetch(DATAFILE_URL).then((res) => res.json()); const f = createFeaturevisor({ datafile: datafileContent, context: { - userId: "123" - } + userId: "123", + }, }); const featureKey = "my_feature";