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
15 changes: 10 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
caache: "npm"
node-version: "20"
cache: "npm"

- name: Install dependencies
run: make dev-dependencies
Expand All @@ -26,20 +26,25 @@ jobs:
run: make lint

test:
name: Test
name: Test (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest

needs:
- lint


strategy:
fail-fast: false
matrix:
node-version: ["20", "22"]

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/typescript-client-gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ jobs:
GH_TOKEN: ${{secrets.WORKFLOW_TOKEN}}

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: "20"

- name: Install Dependencies
run: npm install
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ DoTs is a generated client. This section will walk you through generating the cl

### Prerequisites

* NodeJs version: >= 18
* NodeJs version: >= 20.10
* [npm](https://www.npmjs.com/): To manage TypeScript/JavaScript dependencies
* [Kiota](https://github.com/microsoft/kiota): The tool that generates the client libraries for accessing RESTful web services.

Expand Down Expand Up @@ -68,7 +68,7 @@ DoTs is a generated client. This section will walk you through generating the cl
We use `jest` to define and run the tests.

**_Requirements_**
- [NodeJS 18 or above](https://nodejs.org/en/)
- [NodeJS 20.10 or above](https://nodejs.org/en/)
- [TypeScript 5 or above](https://www.typescriptlang.org/)
- [Jest 30 or above](https://www.npmjs.com/package/jest)
- A DigitalOcean account with an active subscription. Along with a DigitalOcean token with proper permissions to manage DigitalOcean resources (for integration testing).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## Getting Started
#### Prerequisites
- [NodeJS 18 or above](https://nodejs.org/en/)
- [NodeJS 20.10 or above](https://nodejs.org/en/)
- [TypeScript 5 or above](https://www.typescriptlang.org/)
- A DigitalOcean account with an active subscription. Along with a DigitalOcean token with proper permissions to manage DigitalOcean resources.
- `"type": "module"` in your package.json (for ES module support)
Expand Down
4 changes: 2 additions & 2 deletions docs/media/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ DoTs is a generated client. This section will walk you through generating the cl

### Prerequisites

* NodeJs version: >= 18
* NodeJs version: >= 20.10
* [npm](https://www.npmjs.com/): To manage TypeScript/JavaScript dependencies
* [Kiota](https://github.com/microsoft/kiota): The tool that generates the client libraries for accessing RESTful web services.

Expand Down Expand Up @@ -68,7 +68,7 @@ DoTs is a generated client. This section will walk you through generating the cl
We use `jest` to define and run the tests.

**_Requirements_**
- [NodeJS 18 or above](https://nodejs.org/en/)
- [NodeJS 20.10 or above](https://nodejs.org/en/)
- [TypeScript 5 or above](https://www.typescriptlang.org/)
- [Jest 30 or above](https://www.npmjs.com/package/jest)
- A DigitalOcean account with an active subscription. Along with a DigitalOcean token with proper permissions to manage DigitalOcean resources (for integration testing).
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
},
"author": "DigitalOcean",
"license": "Apache-2.0",
"engines": {
"node": ">=20.10.0"
},
"keywords": [
"digitalocean",
"typescript",
Expand Down
3 changes: 1 addition & 2 deletions src/dots/DigitalOceanApiKeyAuthenticationProvider.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// @ts-expect-error: Importing JSON for dynamic version in User-Agent header
import pkg from '../../package.json' assert { type: "json" };
import pkg from '../../package.json' with { type: "json" };
/** Authenticate a request by using an API Key */
export class DigitalOceanApiKeyAuthenticationProvider {
/**
Expand Down
3 changes: 1 addition & 2 deletions src/dots/DigitalOceanApiKeyAuthenticationProvider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { AuthenticationProvider, RequestInformation } from "@microsoft/kiota-abstractions";
// @ts-expect-error: Importing JSON for dynamic version in User-Agent header
import pkg from '../../package.json' assert { type: "json" };
import pkg from '../../package.json' with { type: "json" };

/** Authenticate a request by using an API Key */
export class DigitalOceanApiKeyAuthenticationProvider implements AuthenticationProvider {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

import { DigitalOceanApiKeyAuthenticationProvider } from "../../src/dots/DigitalOceanApiKeyAuthenticationProvider.js";
import { RequestInformation } from "@microsoft/kiota-abstractions";
// @ts-expect-error: Importing JSON for dynamic version in test
import pkg from '../../package.json' assert { type: "json" };
import pkg from '../../package.json' with { type: "json" };

describe("DigitalOceanApiKeyAuthenticationProvider", () => {
it("should add the User-Agent header to every request", async () => {
Expand Down
Loading