Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 25 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,42 @@ name: CI
on:
push:
branches: ["main"]
tags: ["*"]
pull_request:
branches: ["main"]

jobs:
oxlint:
name: Lint JS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npx --yes oxlint@latest
test:
name: Test
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
needs:
- oxlint
node-version: [18.x]
steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npm run lint
- run: npm test
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile

publish:
name: Publish
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs:
- test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish --access public --workspaces
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Typecheck
run: pnpm typecheck

- name: Oxlint
run: pnpm dlx oxlint@latest

- name: Lint
run: pnpm lint

- name: Build
run: pnpm build

- name: Test
run: pnpm test
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"source.organizeImports": "always"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ This repository is designed to host a collection of useful AWS Lambda Utilities
- [Lambda Server-Timing Middleware (ext)](https://github.com/NishuGoel/lambda-server-timing/tree/main/src): Enables Lambdas to return responses with Server-Timing Header allowing to to pass request-specific timings from the backend to the browser. Allows a server to communicate performance metrics about the request-response cycle to the user agent. It also standardizes a JavaScript interface to enable applications to collect, process, and act on these metrics to optimize application delivery.

## Contributing

The packages contained in this repository are free and open-source software. Pull requests are welcome!

## Packages releases

This repository requires manual releases of the packages for now. We will be including `changesets` (or similar) in the future to manage packages releases in the monorepo.

## Disclaimer

This library is currently in beta. Expect missing features, incomplete documentation, and potential breaking changes in the API.
37 changes: 37 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"files": {
"ignore": ["node_modules", "dist", "lib", "docs", "coverage", "tmp", "static"]
},
"formatter": {
"enabled": true,
"lineWidth": 120,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"formatWithErrors": false
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"useLiteralKeys": "off"
},
"style": {
"useTemplate": "off",
"noUnusedTemplateLiteral": "off"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "all",
"semicolons": "always"
}
}
}
Loading