Skip to content

Commit

Permalink
initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
mvantellingen committed Jan 21, 2025
0 parents commit 4ccc0e0
Show file tree
Hide file tree
Showing 17 changed files with 4,573 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/silver-pants-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@labdigital/apollo-trusted-documents": patch
---

Initial version with support for trusted documents via Hive
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

# Set up tabs as indent style for a11y reasons
[*]
indent_style = tab
indent_size = 2

# Yaml does not support tabs
[*.{yml,yaml}]
indent_style = space
indent_size = 2
67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Release
on: [push]

env:
CI: true

jobs:
lint:
name: Lint codebase
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Node.js
uses: labd/gh-actions-typescript/pnpm-install@main

- name: Check formatting and typing
run: pnpm check

build:
name: Build, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: lint
strategy:
matrix:
node: ["20.x", "22.x"]
os: [ubuntu-latest]

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Node.js ${{ matrix.node }}
uses: labd/gh-actions-typescript/pnpm-install@main
with:
node-version: ${{ matrix.node }}

- name: Test
run: pnpm run test:ci

- name: Build
run: pnpm build

release:
timeout-minutes: 15
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: labd/gh-actions-typescript/pnpm-install@main

- name: Create and publish versions
uses: changesets/action@v1
with:
title: "Release new version"
commit: "update version"
publish: pnpm publish:ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/*
**/node_modules/*
**/dist/*
**/*.log
coverage/*
dist/*
.vscode/*
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Lab Digital

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
54 changes: 54 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"defaultBranch": "main"
},
"formatter": {
"enabled": true,
"lineWidth": 80
},
"files": {
"ignore": ["**/*.json"]
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noUselessTernary": "error",
"useDateNow": "error",
"useLiteralKeys": "off"
},
"correctness": {
"noUnusedFunctionParameters": "off",
"noUnusedImports": "error",
"noUnusedVariables": "off"
},
"suspicious": {
"noConsoleLog": "error",
"noEvolvingTypes": "error",
"noExplicitAny": "warn",
"useErrorMessage": "error"
},
"style": {
"noParameterAssign": "off",
"noUselessElse": "off",
"useConsistentBuiltinInstantiation": "error",
"useFilenamingConvention": {
"level": "error",
"options": {
"requireAscii": true,
"filenameCases": ["kebab-case"]
}
},
"useTemplate": "off",
"useThrowOnlyError": "error"
},
"nursery": {
"noNestedTernary": "warn"
}
}
}
}
45 changes: 45 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "@labdigital/apollo-trusted-documents",
"version": "0.0.0",
"license": "MIT",
"author": "Lab Digital",
"type": "module",
"module": "./dist/index.js",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsup",
"check": "pnpm lint && tsc",
"format": "biome check --fix",
"lint": "biome check",
"publish:ci": "pnpm build && pnpm changeset publish",
"test": "vitest run",
"test:ci": "vitest run --coverage"
},
"dependencies": {
"keyv": "^5.2.3",
"msw": "^2.7.0"
},
"devDependencies": {
"@apollo/server": "^4.11.0",
"@biomejs/biome": "^1.9.4",
"@changesets/cli": "^2.27.1",
"@types/node": "^20.12.7",
"@vitest/coverage-v8": "3.0.2",
"tsup": "8.3.5",
"typescript": "5.7.3",
"vitest": "3.0.2"
},
"peerDependencies": {
"@apollo/server": ">4.0.0",
"graphql": ">15.0.0"
},
"packageManager": "[email protected]",
"files": [
"dist",
"src"
],
"publishConfig": {
"access": "public"
}
}
Loading

0 comments on commit 4ccc0e0

Please sign in to comment.