diff --git a/packages/connected-nextgraph/babel.config.js b/packages/connected-nextgraph/babel.config.js
deleted file mode 100644
index 721e8b8..0000000
--- a/packages/connected-nextgraph/babel.config.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = { presets: ["@babel/preset-env"] };
diff --git a/packages/connected-nextgraph/jest.config.js b/packages/connected-nextgraph/jest.config.js
deleted file mode 100644
index 9bfe763..0000000
--- a/packages/connected-nextgraph/jest.config.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// eslint-disable-next-line @typescript-eslint/no-var-requires
-const sharedConfig = require("../../jest.config.js");
-module.exports = {
- ...sharedConfig,
- rootDir: "./",
- transform: {
- "^.+\\.(ts|tsx)?$": "ts-jest",
- "^.+\\.(js|jsx)$": "babel-jest",
- },
-};
diff --git a/packages/connected-nextgraph/package.json b/packages/connected-nextgraph/package.json
index 2199233..002a24a 100644
--- a/packages/connected-nextgraph/package.json
+++ b/packages/connected-nextgraph/package.json
@@ -2,16 +2,28 @@
"name": "@ldo/connected-nextgraph",
"version": "1.0.0-alpha.9",
"description": "A plugin for @ldo/connected to work with the Solid ecosystem.",
- "main": "dist/index.js",
+ "type": "module",
+ "main": "./dist/cjs/index.js",
+ "module": "./dist/esm/index.js",
+ "types": "./dist/types/index.d.ts",
+ "exports": {
+ ".": {
+ "types": "./dist/types/index.d.ts",
+ "import": "./dist/esm/index.js",
+ "require": "./dist/cjs/index.js"
+ },
+ "./package.json": "./package.json"
+ },
"scripts": {
- "build": "tsc --project tsconfig.build.json",
- "watch": "tsc --watch",
+ "build": "rimraf dist && npm run build:cjs && npm run build:esm",
+ "build:cjs": "tsc --project tsconfig.cjs.json",
+ "build:esm": "tsc --project tsconfig.esm.json",
"test": "npm run test:integration",
"prepublishOnly": "npm run test && npm run build",
"lint": "eslint src/** --fix --no-error-on-unmatched-pattern",
"docs": "typedoc --plugin typedoc-plugin-markdown",
"start-test-server": "./test/ngd -vv --save-key -l 14400 --base ./test/nextgraph-data",
- "start-integration-test": "jest --coverage",
+ "start-integration-test": "vitest run --coverage",
"test:integration": "start-server-and-test start-test-server http-get://localhost:14400 start-integration-test"
},
"repository": {
diff --git a/packages/connected-nextgraph/test/integration.test.ts b/packages/connected-nextgraph/test/integration.test.ts
index 6198813..c330cee 100644
--- a/packages/connected-nextgraph/test/integration.test.ts
+++ b/packages/connected-nextgraph/test/integration.test.ts
@@ -11,6 +11,7 @@ import { namedNode } from "@rdfjs/data-model";
import type { NextGraphReadSuccess } from "../src/results/NextGraphReadSuccess.js";
import { rm, cp } from "fs/promises";
import path from "path";
+import { describe, it, expect, beforeEach, afterAll } from "vitest";
const SAMPLE_TTL = `@base .
@prefix rdf: .
diff --git a/packages/connected-nextgraph/tsconfig.build.json b/packages/connected-nextgraph/tsconfig.build.json
deleted file mode 100644
index 4bd5a5e..0000000
--- a/packages/connected-nextgraph/tsconfig.build.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "../../tsconfig.base.json",
- "compilerOptions": {
- "outDir": "./dist",
- },
- "include": ["./src"]
-}
\ No newline at end of file
diff --git a/packages/connected-nextgraph/tsconfig.cjs.json b/packages/connected-nextgraph/tsconfig.cjs.json
new file mode 100644
index 0000000..affce40
--- /dev/null
+++ b/packages/connected-nextgraph/tsconfig.cjs.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../tsconfig.cjs.json",
+ "compilerOptions": {
+ "outDir": "./dist/cjs",
+ "rootDir": "./src"
+ },
+ "include": [
+ "src"
+ ]
+}
\ No newline at end of file
diff --git a/packages/connected-nextgraph/tsconfig.esm.json b/packages/connected-nextgraph/tsconfig.esm.json
new file mode 100644
index 0000000..09f99c2
--- /dev/null
+++ b/packages/connected-nextgraph/tsconfig.esm.json
@@ -0,0 +1,11 @@
+{
+ "extends": "../../tsconfig.esm.json",
+ "compilerOptions": {
+ "outDir": "./dist/esm",
+ "rootDir": "./src",
+ "declarationDir": "./dist/types"
+ },
+ "include": [
+ "src"
+ ]
+}
\ No newline at end of file
diff --git a/packages/connected-nextgraph/vitest.config.js b/packages/connected-nextgraph/vitest.config.js
new file mode 100644
index 0000000..9713f14
--- /dev/null
+++ b/packages/connected-nextgraph/vitest.config.js
@@ -0,0 +1,9 @@
+import { defineConfig } from "vitest/config";
+
+export default defineConfig({
+ test: {
+ coverage: {
+ provider: "istanbul",
+ },
+ },
+});