lukeed / lukeed/ley

Version 0.7 causes segmentation fault with jest

Open
#18 2 comments 1 reaction 0 assignees View on GitHub
needs more info
Dominant language
JavaScript
Stars
271
Forks
13
PR merge metrics
No merged PRs in 30d

Description

I have a setup test file where I create a new database and run the migrations within a `beforeAll` block. With `0.6.0` it runs fine but with `0.7.0` it throws `SIGSEGV`.

I'm running node version `15.11.0`

```typescript
import "dotenv/config";

import { execSync } from "child_process";
import { up as migrate } from "ley";
import { nanoid } from "nanoid";

const database = (process.env.PGDATABASE = `test_${nanoid()}`);

beforeAll(async () => {
execSync(`createdb ${database}`);
await migrate({
dir: "migrations",
driver: "postgres",
});
});

afterAll(() => {
execSync(`dropdb ${database}`);
});

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the shown Jest setup test with Node 15.11.0, comparing ley 0.6.0 and 0.7.0 while using the postgres driver and migrations directory. Inspect the migration execution path around the beforeAll callback and verify that migrations complete without SIGSEGV and the database can be removed afterward.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, postgresql, typescript
Domain
databases, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.