Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
strategy:
fail-fast: false
matrix:
deno-version: [v2.8.0]
deno-version: [v1.46.3, v2.8.0]
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}

Expand All @@ -58,5 +58,10 @@ jobs:
with:
deno-version: ${{ matrix.deno-version }}

- name: Run tests
- name: Run tests (Deno v1)
if: "contains(matrix.deno-version, 'v1')"
run: deno task test-v1

- name: Run tests (Deno v2)
if: "contains(matrix.deno-version, 'v2')"
run: deno task test
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ A Deno SDK for Switcher API

### Prerequisites

- **Deno**: Version 2.x or above
- **Deno**: Version 1.4x, 2.x or later
- **Permissions**:

| Permission | Required For |
Expand All @@ -75,6 +75,7 @@ A Deno SDK for Switcher API
| `--allow-write` | Writing snapshot files (if enabled) |
| `--allow-net` | Communicating with the Switcher API |
| `--allow-env` | Accessing environment variables for configuration |
| `--unstable-http` | Required for custom SSL certificates in Deno v1.4x (see [Advanced Options](#advanced-options)) |

### Installation

Expand Down
1 change: 1 addition & 0 deletions deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"fmt": "deno fmt mod.ts src/ --options-single-quote --options-line-width=120 --check",
"fmt:fix": "deno fmt mod.ts src/ --options-single-quote --options-line-width=120",
"test": "deno test --allow-read --allow-net --allow-write --allow-env --allow-import --coverage=coverage",
"test-v1": "deno test --allow-read --allow-net --allow-write --allow-env --unstable-http --coverage=coverage",
"clean": "rm -rf ./npm ./coverage ./generated-snapshots",
"lcov": "deno coverage coverage --lcov --output=coverage/report.lcov",
"cover": "deno task clean && deno task test && deno task lcov && genhtml -o coverage/html coverage/report.lcov",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/remoteAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as util from './utils/index.ts';
export class Auth {
private static context: SwitcherContext;
private static retryOptions: RetryOptions;
private static refreshTimer: NodeJS.Timeout | undefined;
private static refreshTimer: ReturnType<typeof setInterval> | undefined;

static init(context: SwitcherContext) {
this.context = context;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/snapshotWatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as util from './utils/index.ts';
*/
export class SnapshotWatcher {
private _watcher: Deno.FsWatcher | undefined;
private readonly _watchDebounce = new Map<string, NodeJS.Timeout>();
private readonly _watchDebounce = new Map<string, ReturnType<typeof setInterval>>();

async watchSnapshot(environment: string, callback: {
success?: () => void | Promise<void>;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/snapshotAutoUpdater.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default class SnapshotAutoUpdater {
private static _intervalId: NodeJS.Timeout | undefined;
private static _intervalId: ReturnType<typeof setInterval> | undefined;

static schedule(
interval: number,
Expand Down
Loading