diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e97caa4..c03d63e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,8 @@ on: jobs: release: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout repo uses: actions/checkout@v4 diff --git a/README.md b/README.md index 0cb56f2..a7ffff0 100644 --- a/README.md +++ b/README.md @@ -118,9 +118,13 @@ await getJson({ engine: "google", api_key: API_KEY_2, q: "coffee" }); // API_KEY ### Using a Proxy -You can use a proxy by passing `requestOptions` with an `HttpsProxyAgent` -instance. This can be done either globally through the config object or -per-request in the parameters. +> **Note:** SerpApi handles proxies on its end — you do **not** need to supply +> your own proxy to avoid blocks or CAPTCHAs. This option is only for users who +> need to route all outbound requests through a corporate or network proxy. + +You can route requests through your own proxy by passing `requestOptions` with +an `HttpsProxyAgent` instance. This can be done either globally through the +config object or per-request in the parameters. First, install the required package: diff --git a/scripts/build_npm.ts b/scripts/build_npm.ts index a88a0de..8e817cd 100644 --- a/scripts/build_npm.ts +++ b/scripts/build_npm.ts @@ -75,3 +75,13 @@ await build({ Deno.copyFileSync("LICENSE", "npm/LICENSE"); Deno.copyFileSync("README.md", "npm/README.md"); + +// Fix wrong .npmignore file +Deno.writeFileSync( + "npm/.npmignore", + new TextEncoder().encode( + new TextDecoder() + .decode(Deno.readFileSync("npm/.npmignore")) + .replace("src/", "/src/"), + ), +); diff --git a/version.ts b/version.ts index c640f4c..508b8ad 100644 --- a/version.ts +++ b/version.ts @@ -4,4 +4,4 @@ * * Changing this value creates a new release. */ -export const version = "2.1.0"; +export const version = "2.2.1";