Skip to content

Commit

Permalink
use browser friendly crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
angusfretwell committed Feb 28, 2024
1 parent 4eaf4f6 commit e5da233
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
node-version: 20.x
cache: "npm"
- run: npm ci
- run: npm run build --if-present
Expand Down
3 changes: 1 addition & 2 deletions src/request.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { randomUUID } from "crypto";
import { isEmpty } from "lodash-es";

import { RequestParams } from "./types";
Expand All @@ -11,7 +10,7 @@ export async function request(
[entity, action, params, index]: RequestParams,
{ headers, ...requestInit }: RequestInit = {},
) {
const requestId = randomUUID();
const requestId = crypto.randomUUID();

const url = new URL(`civicrm/ajax/api4/${entity}/${action}`, this.baseUrl);

Expand Down

0 comments on commit e5da233

Please sign in to comment.