-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add test for adapter * feat: improve package
- Loading branch information
1 parent
804e7ae
commit 36b5fcc
Showing
14 changed files
with
904 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: CI | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
paths-ignore: | ||
- '.github/**' | ||
- '!.github/workflows/ci.yaml' | ||
- '.gitignore' | ||
- '**.md' | ||
|
||
push: | ||
branches: | ||
- main | ||
- release@* | ||
paths-ignore: | ||
- '.github/**' | ||
- '!.github/workflows/ci.yaml' | ||
- '.gitignore' | ||
- '**.md' | ||
|
||
concurrency: | ||
# Documentation suggests ${{ github.head_ref }}, but that's only available on pull_request/pull_request_target triggers, so using ${{ github.ref }}. | ||
# On main, we want all builds to complete even if merging happens faster to make it easier to discover at which point something broke. | ||
group: ci-${{ github.ref_name == 'main' && format('ci-main-{0}', github.sha) || format('ci-{0}', github.ref) }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
jobs: | ||
code-style: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Check Out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js 20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Enable corepack | ||
run: | | ||
corepack enable | ||
corepack prepare pnpm@latest --activate | ||
- name: Install deps | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run Code Style Check | ||
run: pnpm run lint | ||
|
||
tests: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 25 | ||
steps: | ||
- name: Check Out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js 20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Enable corepack | ||
run: | | ||
corepack enable | ||
corepack prepare pnpm@latest --activate | ||
- name: Install deps | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Start Docker Compose Services | ||
shell: bash | ||
run: | | ||
docker compose up -d --no-build --no-deps --quiet-pull --wait | ||
- name: Run Test Suite | ||
run: pnpm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ node_modules | |
|
||
# dist | ||
/dist | ||
|
||
**/*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
services: | ||
database: | ||
image: postgres | ||
restart: always | ||
environment: | ||
POSTGRES_USER: ${DATABASE_USER:-lucia} | ||
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-lucia} | ||
POSTGRES_DB: ${DATABASE_NAME:-lucia} | ||
ports: | ||
- "5432:5432" | ||
volumes: | ||
- database:/var/lib/postgresql/data - | ||
volumes: | ||
database: | ||
driver: local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,33 @@ | ||
{ | ||
"name": "@tony-stark-eth/lucia-mikro-orm-adapter", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "mikro-orm adapter for lucia auth", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"module": "dist/index.js", | ||
"type": "module", | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
"node": "^20.0.0", | ||
"pnpm": "^9.0.0" | ||
}, | ||
"exports": { | ||
".": "./dist/index.js" | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.js" | ||
}, | ||
"./*": { | ||
"types": "./dist/*.d.ts", | ||
"import": "./dist/*.js" | ||
}, | ||
"./**/*": { | ||
"types": "./dist/**/*.d.ts", | ||
"import": "./dist/**/*.js" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "pnpm run lint:fix && tsc && tsc-alias", | ||
"test": "tsx tests/mikro-orm-postgres.ts", | ||
"build": "pnpm run lint:fix && tsc -p tsconfig.json", | ||
"release": "pnpm run lint:fix && release-it", | ||
"lint": "pnpm run lint:base -- .", | ||
"lint:base": "eslint --cache --cache-location='node_modules/.cache/eslint/'", | ||
|
@@ -44,16 +56,19 @@ | |
}, | ||
"devDependencies": { | ||
"@eslint/js": "^9.11.1", | ||
"@mikro-orm/core": "^6.3.10", | ||
"@mikro-orm/core": "^6.3.11", | ||
"@mikro-orm/postgresql": "^6.3.11", | ||
"@stylistic/eslint-plugin": "^2.8.0", | ||
"@types/eslint__js": "^8.42.3", | ||
"@types/node": "^22.7.1", | ||
"@types/node": "^20.0.0", | ||
"@types/uuid": "^10.0.0", | ||
"eslint": "^9.11.1", | ||
"lucia": "^3.2.0", | ||
"npm-pkg-lint": "^3.9.0", | ||
"release-it": "^17.6.0", | ||
"release-it-pnpm": "^4.6.3", | ||
"tsc-alias": "^1.8.10", | ||
"tsx": "^4.19.1", | ||
"typescript": "^5.6.2", | ||
"typescript-eslint": "^8.7.0" | ||
}, | ||
|
@@ -62,5 +77,11 @@ | |
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
}, | ||
"files": [ | ||
"dist", | ||
"src", | ||
"README.md", | ||
"LICENSE" | ||
] | ||
} |
Oops, something went wrong.