Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop node 16 support #90

Merged
merged 4 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
30 changes: 0 additions & 30 deletions .eslintrc.cjs

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ jobs:
fail-fast: false
matrix:
include:
- node-version: 16
os: ubuntu-latest
- node-version: 18
os: ubuntu-latest
- node-version: 20
os: ubuntu-latest
- node-version: 22
os: ubuntu-latest
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x
cache: pnpm

- run: pnpm install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
engine-strict=true
link-workspace-packages = true
link-workspace-packages=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.12.1
20.15.1
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
"scripts": {
"test": "pnpm test -r --filter=./packages/*",
"release": "changeset publish",
"lint": "pnpm -r lint && eslint --cache --cache-location node_modules/.eslintcache 'packages/**/*.js'",
"lint:fix": "eslint --ignore-path .gitignore --fix --cache --cache-location node_modules/.eslintcache 'packages/**/*.js'",
"lint": "pnpm -r lint",
"lint:fix": "pnpm -r lint:fix",
"changeset:version": "changeset version && pnpm -r generate:version && git add --all",
"changeset:publish": "changeset publish"
},
"engines": {
"node": ">=16",
"pnpm": ">=8"
"node": ">=18",
"pnpm": "^9.6.0"
},
"packageManager": "pnpm@8.15.6",
"packageManager": "pnpm@9.6.0",
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@changesets/cli": "^2.27.7",
"@svitejs/changesets-changelog-github-compact": "^1.1.0"
}
}
43 changes: 43 additions & 0 deletions packages/prisma-extension-bark/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import globals from 'globals'
import js from '@eslint/js'
import { includeIgnoreFile } from '@eslint/compat'
import path from 'node:path'
import { fileURLToPath } from 'node:url'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const gitignorePath = path.resolve(__dirname, '.gitignore')

/** @type {import('eslint').Linter.Config[]} */
export default [
includeIgnoreFile(gitignorePath),
// add more generic rule sets here, such as:
js.configs.recommended,
{
ignores: ['**/*.ts'],
languageOptions: {
globals: {
...globals.node
}
},
rules: {

// Generic Rules
indent: ['error', 'tab'],
quotes: ['error', 'single'],
semi: ['warn', 'never'],
'no-case-declarations': 0,
'no-undef': 'error',
'no-unused-vars': [
'warn',
{
'vars': 'all',
'args': 'after-used',
'ignoreRestSiblings': true,
'argsIgnorePattern': '^_',
'destructuredArrayIgnorePattern': '^_'
}
]
}
}
]
14 changes: 9 additions & 5 deletions packages/prisma-extension-bark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,22 @@
"prepublishOnly": "pnpm build",
"test": "vitest",
"prisma:generate": "pnpx prisma generate --schema=./test/setup/schema.prisma",
"lint:fix": "eslint --ignore-path .gitignore . --fix",
"lint": "eslint --ignore-path .gitignore ."
"lint:fix": "eslint . --fix",
"lint": "eslint ."
},
"peerDependencies": {
"@prisma/client": ">=5.0.0"
},
"devDependencies": {
"@eslint/compat": "^1.1.1",
"@eslint/js": "^9.8.0",
"@types/node": "^22.1.0",
"esbuild": "^0.20.0",
"eslint": "^8.45.0",
"eslint": "^9.8.0",
"globals": "^15.9.0",
"prisma": "^5.0.0",
"typescript": "^5.1.6",
"vitest": "^0.34.0"
"typescript": "^5.5.4",
"vitest": "^2.0.5"
},
"prisma": {
"seed": "node ./test/utilities/seed.js"
Expand Down
13 changes: 9 additions & 4 deletions packages/prisma-extension-bark/test/setup/db-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@ function rimraf(path) {
rmSync(path, { force: true, recursive: true })
}

function cleanupArtifacts() {
const migrationsFolder = new URL('./migrations', import.meta.url).pathname
const dbFile = new URL('./test.db', import.meta.url).pathname
rimraf(migrationsFolder)
rimraf(dbFile)
}

let teardownHappened = false

/**
* Setup database, seed,client
*/
export async function setup() {
console.log('[Setup] Starting setup...')
cleanupArtifacts()

// Create prisma client
execSync('npx prisma migrate dev --schema ./test/setup/schema.prisma --name init')
Expand All @@ -28,10 +36,7 @@ export async function teardown() {

teardownHappened = true

const migrationsFolder = new URL('./migrations', import.meta.url).pathname
const dbFile = new URL('./test.db', import.meta.url).pathname
rimraf(migrationsFolder)
rimraf(dbFile)
cleanupArtifacts()

console.log('[Teardown] Deleted generated Prisma artifacts...')
}
7 changes: 6 additions & 1 deletion packages/prisma-extension-bark/vitest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import { defineConfig } from 'vitest/config'

export default defineConfig({
test: {
threads: false,
pool: 'threads',
poolOptions: {
threads: {
singleThread: true
}
},
globalSetup: [
'./test/setup/db-setup.js'
]
Expand Down
2 changes: 1 addition & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"prisma-extension-bark": "workspace:^"
},
"devDependencies": {
"eslint": "^8.45.0",
"eslint": "^9.8.0",
"prisma": "^5.0.0"
},
"prisma": {
Expand Down
Loading