diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b387c07..b4545dd 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM denoland/deno:2.4.1 +FROM denoland/deno:2.4.5 # Install tools RUN apt-get update && \ diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 74d4b6d..72ecc3a 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -17,10 +17,10 @@ jobs: with: fetch-depth: 0 - - name: Setup Deno v2.4.2 + - name: Setup Deno v2.4.5 uses: denoland/setup-deno@v2 with: - deno-version: v2.4.2 + deno-version: v2.4.5 - name: Setup LCOV run: sudo apt install -y lcov @@ -35,7 +35,7 @@ jobs: run: deno task cover - name: SonarCloud Scan - uses: sonarsource/sonarqube-scan-action@v5.2.0 + uses: sonarsource/sonarqube-scan-action@v5.3.1 env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} if: env.SONAR_TOKEN != '' @@ -45,7 +45,7 @@ jobs: strategy: fail-fast: false matrix: - deno-version: [v1.46.3, v2.4.2] + deno-version: [v1.46.3, v2.4.5] os: [ ubuntu-latest, windows-latest ] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 1577d14..f5c946b 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -33,10 +33,10 @@ jobs: ref: ${{ steps.pr.outputs.head_sha }} fetch-depth: 0 - - name: Setup Deno v2.4.2 + - name: Setup Deno v2.4.5 uses: denoland/setup-deno@v2 with: - deno-version: v2.4.2 + deno-version: v2.4.5 - name: Setup LCOV run: sudo apt install -y lcov @@ -51,7 +51,7 @@ jobs: run: deno task cover - name: SonarCloud Scan - uses: sonarsource/sonarqube-scan-action@v5.2.0 + uses: sonarsource/sonarqube-scan-action@v5.3.1 env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} if: env.SONAR_TOKEN != '' diff --git a/deno.jsonc b/deno.jsonc index 2617681..38b608d 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -1,6 +1,6 @@ { "name": "@switcherapi/switcher-client-deno", - "version": "2.3.1", + "version": "2.3.2", "description": "Switcher4Deno is a Feature Flag Deno Client SDK for Switcher API", "tasks": { "cache-reload": "deno cache --reload --lock=deno.lock mod.ts", diff --git a/deno.lock b/deno.lock index bff00ae..3007fa7 100644 --- a/deno.lock +++ b/deno.lock @@ -1,116 +1,26 @@ { "version": "5", "specifiers": { - "jsr:@std/fs@1.0.13": "1.0.13", - "jsr:@std/fs@1.0.14": "1.0.14", - "jsr:@std/fs@1.0.15": "1.0.15", - "jsr:@std/fs@1.0.16": "1.0.16", - "jsr:@std/fs@1.0.17": "1.0.17", - "jsr:@std/fs@1.0.18": "1.0.18", "jsr:@std/fs@1.0.19": "1.0.19", - "jsr:@std/fs@1.0.2": "1.0.2", - "jsr:@std/fs@1.0.4": "1.0.4", - "jsr:@std/fs@1.0.5": "1.0.5", - "jsr:@std/fs@1.0.6": "1.0.6", - "jsr:@std/internal@^1.0.9": "1.0.9", - "jsr:@std/path@^1.0.3": "1.0.3", - "jsr:@std/path@^1.0.6": "1.0.6", - "jsr:@std/path@^1.0.7": "1.0.8", - "jsr:@std/path@^1.0.8": "1.0.8", - "jsr:@std/path@^1.0.9": "1.0.9", - "jsr:@std/path@^1.1.0": "1.1.0", - "jsr:@std/path@^1.1.1": "1.1.1" + "jsr:@std/internal@^1.0.10": "1.0.10", + "jsr:@std/internal@^1.0.9": "1.0.10", + "jsr:@std/path@^1.1.1": "1.1.2" }, "jsr": { - "@std/fs@1.0.2": { - "integrity": "af57555c7a224a6f147d5cced5404692974f7a628ced8eda67e0d22d92d474ec", - "dependencies": [ - "jsr:@std/path@^1.0.3" - ] - }, - "@std/fs@1.0.4": { - "integrity": "2907d32d8d1d9e540588fd5fe0ec21ee638134bd51df327ad4e443aaef07123c", - "dependencies": [ - "jsr:@std/path@^1.0.6" - ] - }, - "@std/fs@1.0.5": { - "integrity": "41806ad6823d0b5f275f9849a2640d87e4ef67c51ee1b8fb02426f55e02fd44e", - "dependencies": [ - "jsr:@std/path@^1.0.7" - ] - }, - "@std/fs@1.0.6": { - "integrity": "42b56e1e41b75583a21d5a37f6a6a27de9f510bcd36c0c85791d685ca0b85fa2", - "dependencies": [ - "jsr:@std/path@^1.0.8" - ] - }, - "@std/fs@1.0.13": { - "integrity": "756d3ff0ade91c9e72b228e8012b6ff00c3d4a4ac9c642c4dac083536bf6c605", - "dependencies": [ - "jsr:@std/path@^1.0.8" - ] - }, - "@std/fs@1.0.14": { - "integrity": "1e84bf0b95fe08f41f1f4aea9717bbf29f45408a56ce073b0114474ce1c9fccf", - "dependencies": [ - "jsr:@std/path@^1.0.8" - ] - }, - "@std/fs@1.0.15": { - "integrity": "c083fb479889d6440d768e498195c3fc499d426fbf9a6592f98f53884d1d3f41", - "dependencies": [ - "jsr:@std/path@^1.0.8" - ] - }, - "@std/fs@1.0.16": { - "integrity": "81878f62b6eeda0bf546197fc3daa5327c132fee1273f6113f940784a468b036", - "dependencies": [ - "jsr:@std/path@^1.0.8" - ] - }, - "@std/fs@1.0.17": { - "integrity": "1c00c632677c1158988ef7a004cb16137f870aafdb8163b9dce86ec652f3952b", - "dependencies": [ - "jsr:@std/path@^1.0.9" - ] - }, - "@std/fs@1.0.18": { - "integrity": "24bcad99eab1af4fde75e05da6e9ed0e0dce5edb71b7e34baacf86ffe3969f3a", - "dependencies": [ - "jsr:@std/path@^1.1.0" - ] - }, "@std/fs@1.0.19": { "integrity": "051968c2b1eae4d2ea9f79a08a3845740ef6af10356aff43d3e2ef11ed09fb06", "dependencies": [ - "jsr:@std/internal", - "jsr:@std/path@^1.1.1" + "jsr:@std/internal@^1.0.9", + "jsr:@std/path" ] }, - "@std/internal@1.0.9": { - "integrity": "bdfb97f83e4db7a13e8faab26fb1958d1b80cc64366501af78a0aee151696eb8" - }, - "@std/path@1.0.3": { - "integrity": "cd89d014ce7eb3742f2147b990f6753ee51d95276bfc211bc50c860c1bc7df6f" - }, - "@std/path@1.0.6": { - "integrity": "ab2c55f902b380cf28e0eec501b4906e4c1960d13f00e11cfbcd21de15f18fed" - }, - "@std/path@1.0.8": { - "integrity": "548fa456bb6a04d3c1a1e7477986b6cffbce95102d0bb447c67c4ee70e0364be" - }, - "@std/path@1.0.9": { - "integrity": "260a49f11edd3db93dd38350bf9cd1b4d1366afa98e81b86167b4e3dd750129e" - }, - "@std/path@1.1.0": { - "integrity": "ddc94f8e3c275627281cbc23341df6b8bcc874d70374f75fec2533521e3d6886" + "@std/internal@1.0.10": { + "integrity": "e3be62ce42cab0e177c27698e5d9800122f67b766a0bea6ca4867886cbde8cf7" }, - "@std/path@1.1.1": { - "integrity": "fe00026bd3a7e6a27f73709b83c607798be40e20c81dde655ce34052fd82ec76", + "@std/path@1.1.2": { + "integrity": "c0b13b97dfe06546d5e16bf3966b1cadf92e1cc83e56ba5476ad8b498d9e3038", "dependencies": [ - "jsr:@std/internal" + "jsr:@std/internal@^1.0.10" ] } } diff --git a/sonar-project.properties b/sonar-project.properties index 221525c..f2c88be 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,7 +1,7 @@ sonar.projectKey=switcherapi_switcher-client-deno sonar.projectName=switcher-client-deno sonar.organization=switcherapi -sonar.projectVersion=2.3.1 +sonar.projectVersion=2.3.2 sonar.javascript.lcov.reportPaths=coverage/report.lcov diff --git a/src/client.ts b/src/client.ts index 543da86..442a4ee 100644 --- a/src/client.ts +++ b/src/client.ts @@ -193,7 +193,7 @@ export class Client { Client.watchSnapshot(); } - return GlobalSnapshot.snapshot?.data.domain.version || 0; + return Client.snapshotVersion; } /** diff --git a/tests/deps.ts b/tests/deps.ts index e8a0d5d..cf77edc 100644 --- a/tests/deps.ts +++ b/tests/deps.ts @@ -12,8 +12,8 @@ export { assertNotEquals, assertGreater, assertArrayIncludes -} from 'jsr:@std/assert@1.0.13'; -export { assertSpyCalls, spy } from 'jsr:@std/testing@1.0.14/mock'; +} from 'jsr:@std/assert@1.0.14'; +export { assertSpyCalls, spy } from 'jsr:@std/testing@1.0.15/mock'; export { describe, it, @@ -21,7 +21,7 @@ export { beforeEach, beforeAll, afterEach -} from 'jsr:@std/testing@1.0.14/bdd'; -export { delay } from 'jsr:@std/async@1.0.13/delay'; +} from 'jsr:@std/testing@1.0.15/bdd'; +export { delay } from 'jsr:@std/async@1.0.14/delay'; export { load } from 'jsr:@std/dotenv@0.225.5'; export * as mf from 'https://deno.land/x/mock_fetch@0.3.0/mod.ts'; \ No newline at end of file