@platformatic/db-core 3.0.0-alpha.5 → 3.0.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/eslint.config.js CHANGED
@@ -1,7 +1,3 @@
1
- 'use strict'
1
+ import neostandard from 'neostandard'
2
2
 
3
- const neostandard = require('neostandard')
4
-
5
- module.exports = neostandard({
6
- ts: true,
7
- })
3
+ export default neostandard({ ts: true })
package/index.js CHANGED
@@ -1,7 +1,6 @@
1
- 'use strict'
2
-
3
- const fp = require('fastify-plugin')
4
- const sqlMapper = require('@platformatic/sql-mapper')
1
+ import sqlMapper from '@platformatic/sql-mapper'
2
+ import fp from 'fastify-plugin'
3
+ import { createRequire } from 'node:module'
5
4
 
6
5
  const defaults = [
7
6
  {
@@ -18,7 +17,9 @@ const defaults = [
18
17
  }
19
18
  ]
20
19
 
21
- module.exports = fp(async function (app, opts) {
20
+ export default fp(async function (app, opts) {
21
+ const require = createRequire(import.meta.url)
22
+
22
23
  await app.register(sqlMapper, {
23
24
  ...opts
24
25
  })
@@ -84,4 +85,4 @@ function shouldRegister (opts, configKey) {
84
85
  return true
85
86
  }
86
87
 
87
- module.exports.connect = sqlMapper.connect
88
+ export { connect } from '@platformatic/sql-mapper'
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@platformatic/db-core",
3
- "version": "3.0.0-alpha.5",
3
+ "version": "3.0.0-alpha.8",
4
4
  "description": "",
5
5
  "main": "index.js",
6
+ "type": "module",
6
7
  "repository": {
7
8
  "type": "git",
8
9
  "url": "git+https://github.com/platformatic/platformatic.git"
@@ -14,7 +15,7 @@
14
15
  },
15
16
  "homepage": "https://github.com/platformatic/platformatic#readme",
16
17
  "devDependencies": {
17
- "borp": "^0.20.0",
18
+ "cleaner-spec-reporter": "^0.5.0",
18
19
  "eslint": "9",
19
20
  "fastify": "^5.0.0",
20
21
  "neostandard": "^0.12.0",
@@ -23,16 +24,16 @@
23
24
  },
24
25
  "dependencies": {
25
26
  "fastify-plugin": "^5.0.0",
26
- "@platformatic/sql-graphql": "3.0.0-alpha.5",
27
- "@platformatic/sql-events": "3.0.0-alpha.5",
28
- "@platformatic/sql-mapper": "3.0.0-alpha.5",
29
- "@platformatic/sql-openapi": "3.0.0-alpha.5"
27
+ "@platformatic/sql-events": "3.0.0-alpha.8",
28
+ "@platformatic/sql-mapper": "3.0.0-alpha.8",
29
+ "@platformatic/sql-openapi": "3.0.0-alpha.8",
30
+ "@platformatic/sql-graphql": "3.0.0-alpha.8"
30
31
  },
31
32
  "engines": {
32
33
  "node": ">=22.18.0"
33
34
  },
34
35
  "scripts": {
35
- "test": "pnpm run lint && borp",
36
+ "test": "node --test --test-reporter=cleaner-spec-reporter --test-concurrency=1 --test-timeout=2000000 test/*.test.js",
36
37
  "lint": "eslint"
37
38
  }
38
39
  }