Skip to content

Commit a3c06b8

Browse files
committed
Extract Express v4 integration from @apollo/server
Based on `@as-integrations/hapi`, with some updates (like moving from Circle to GH Actions).
0 parents  commit a3c06b8

28 files changed

Lines changed: 12639 additions & 0 deletions

.changeset/config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@1.6.3/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{ "repo": "apollo-server-integrations/apollo-server-integration-express4" }
6+
],
7+
"commit": false,
8+
"access": "public",
9+
"baseBranch": "main"
10+
}

.config/mise/config.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This is a config file for "mise-en-place": https://mise.jdx.dev/
2+
# It pins the version of Node and can be used to run other tools as well.
3+
# It's what we use to set up tools in CI.
4+
5+
[tools]
6+
node = "22.13.0"
7+
8+
[env]
9+
# Put binaries from npm-installed packages on PATH (eg `changeset`).
10+
_.path = ["{{config_root}}/node_modules/.bin"]

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
2+
3+
on:
4+
pull_request
5+
6+
jobs:
7+
build-and-test:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
node: [ 20, 22, 24 ]
12+
name: Build and test with Node ${{ matrix.node }}
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: jdx/mise-action@v2
16+
with:
17+
mise_toml: |
18+
[tools]
19+
node = "${{ matrix.node }}"
20+
- uses: actions/setup-node@v4
21+
with:
22+
cache: 'npm'
23+
- run: npm ci
24+
- run: npm test
25+
26+
prettier:
27+
runs-on: ubuntu-latest
28+
name: Prettier
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: jdx/mise-action@v2
32+
- uses: actions/setup-node@v4
33+
with:
34+
cache: 'npm'
35+
- run: npm ci
36+
- run: npm run prettier-check
37+
38+
lint:
39+
runs-on: ubuntu-latest
40+
name: Lint
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: jdx/mise-action@v2
44+
- uses: actions/setup-node@v4
45+
with:
46+
cache: 'npm'
47+
- run: npm ci
48+
- run: npm run lint
49+
50+
spell-check:
51+
runs-on: ubuntu-latest
52+
name: Spell Check
53+
steps:
54+
- uses: actions/checkout@v4
55+
- uses: jdx/mise-action@v2
56+
- uses: actions/setup-node@v4
57+
with:
58+
cache: 'npm'
59+
- run: npm ci
60+
- run: npm run spell-check

.github/workflows/release-pr.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@v4
15+
with:
16+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
17+
fetch-depth: 0
18+
19+
- name: Install Node with Mise
20+
uses: jdx/mise-action@v2
21+
22+
- name: Setup Node.js 16.x
23+
uses: actions/setup-node@v4
24+
with:
25+
cache: 'npm'
26+
27+
- name: Install Dependencies
28+
run: npm ci
29+
30+
- name: Create Release Pull Request / NPM Publish
31+
uses: changesets/action@v1
32+
with:
33+
publish: npm run publish-changeset
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Ignore the compiled output.
2+
dist/
3+
4+
# TypeScript incremental compilation cache
5+
*.tsbuildinfo
6+
7+
# Logs
8+
logs
9+
*.log
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
# Coverage (from Jest)
15+
coverage/
16+
17+
# JUnit Reports (used mainly in CircleCI)
18+
reports/
19+
junit.xml
20+
21+
# Node modules
22+
node_modules/
23+
24+
# Mac OS
25+
.DS_Store
26+
27+
.vscode

.npmignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*
2+
!src/**/*
3+
src/**/__tests__/**
4+
!dist/**/*
5+
dist/**/__tests__/**
6+
!package.json
7+
!README.md
8+
!tsconfig.base.json
9+
!tsconfig.json
10+
!tsconfig.build.json

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

.prettierignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*.json
2+
*.json5
3+
*.yml
4+
*.md
5+
6+
dist/
7+
8+
.volta

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"trailingComma": "all",
3+
"singleQuote": true
4+
}

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# @as-integrations/express4
2+

0 commit comments

Comments
 (0)