Skip to content

Commit

Permalink
Update dependencies and fix linting issues (#68)
Browse files Browse the repository at this point in the history
* chore(deps): actions bump

* chore(cleanup): linting

* chore(deps): fixing old deps

* tests: fixing tests with ts definition

* chore: fixing spell checker
  • Loading branch information
aaronpowell authored May 30, 2024
1 parent 8a5b3d0 commit 1a54061
Show file tree
Hide file tree
Showing 9 changed files with 240 additions and 417 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ on:
pull_request:

env:
NODE_VERSION: 16.x
NODE_VERSION: 18.x

jobs:
build:
name: 🛠️ Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Checkout

- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

Expand All @@ -29,11 +29,11 @@ jobs:
name: 🧪 Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Checkout

- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

Expand All @@ -47,11 +47,11 @@ jobs:
name: 🔗 Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Checkout

- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ on:
- main

env:
NODE_VERSION: 16.x
NODE_VERSION: 18.x

jobs:
build:
name: 🛠️ Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Checkout

- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

Expand All @@ -31,11 +31,11 @@ jobs:
name: 🧪 Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Checkout

- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

Expand All @@ -49,11 +49,11 @@ jobs:
name: 🔗 Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Checkout

- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

Expand All @@ -72,13 +72,13 @@ jobs:
needs: [build, test, lint]
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ npm install @as-integrations/azure-functions @apollo/server graphql @azure/funct

## **Usage**


1. Setup an [Azure Function with TypeScript](https://learn.microsoft.com/azure/azure-functions/create-first-function-vs-code-typescript) (or [JavaScript](https://learn.microsoft.com/azure/azure-functions/create-first-function-vs-code-node)) as per normal.
2. Create a new [HTTP Trigger](https://learn.microsoft.com/azure/azure-functions/functions-bindings-http-webhook-trigger?tabs=in-process%2Cfunctionsv2&pivots=programming-language-javascript)
3. Update the `index.ts` to use the Apollo integration:

**v3**

```ts
import { ApolloServer } from '@apollo/server';
import { startServerAndCreateHandler } from '@as-integrations/azure-functions';
Expand Down Expand Up @@ -57,6 +57,7 @@ export default startServerAndCreateHandler(server);
```

**v4**

```ts
import { ApolloServer } from '@apollo/server';
import { v4 } from '@as-integrations/azure-functions';
Expand Down
1 change: 1 addition & 0 deletions cspell-dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ traceparent
tracestate
withrequired
aaronpowell
undici
Loading

0 comments on commit 1a54061

Please sign in to comment.