Skip to content

Commit 2ff0259

Browse files
authored
Merge pull request #120 from solid-contrib/migrate-to-utils
Migrate to utils
2 parents d7e1df6 + 097a2d3 commit 2ff0259

File tree

73 files changed

+1008
-1757
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1008
-1757
lines changed

contacts/jest.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ const config: Config = {
1414
transform: {
1515
// '^.+\\.[tj]sx?$' to process js/ts with `ts-jest`
1616
// '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest`
17-
"^.+\\.ts$": [
17+
"^.+\\.[tj]s$": [
1818
"ts-jest",
1919
{
2020
useESM: true,
2121
},
2222
],
2323
},
24+
transformIgnorePatterns: ["node_modules/(?!(@solid-data-modules)/)"],
2425
};
2526

2627
export default config;

contacts/jest.e2e.config.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const config: Config = {
66
rootDir: "src/e2e-tests",
77
testTimeout: 60000,
88
detectOpenHandles: true,
9-
globalSetup: "<rootDir>/globalSetup.ts",
10-
globalTeardown: "<rootDir>/globalTeardown.ts",
9+
globalSetup: "<rootDir>/globalSetup.js",
10+
globalTeardown: "<rootDir>/globalTeardown.js",
1111
forceExit: true,
1212
extensionsToTreatAsEsm: [".ts"],
1313
moduleNameMapper: {
@@ -16,13 +16,14 @@ const config: Config = {
1616
transform: {
1717
// '^.+\\.[tj]sx?$' to process js/ts with `ts-jest`
1818
// '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest`
19-
"^.+\\.ts$": [
19+
"^.+\\.[tj]s$": [
2020
"ts-jest",
2121
{
2222
useESM: true,
2323
},
2424
],
2525
},
26+
transformIgnorePatterns: ["node_modules/(?!(@solid-data-modules)/)"],
2627
};
2728

2829
export default config;

contacts/package-lock.json

Lines changed: 538 additions & 436 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contacts/package.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,30 @@
3939
"dist"
4040
],
4141
"peerDependencies": {
42-
"rdflib": "2.x"
42+
"rdflib": "^2.2.35"
4343
},
4444
"devDependencies": {
4545
"@faker-js/faker": "^8.4.1",
46-
"@solid/community-server": "^7.0.5",
46+
"@solid/community-server": "^7.1.0",
4747
"@types/jest": "^29.5.12",
4848
"@types/jest-when": "^3.5.5",
49-
"@types/uuid": "^9.0.8",
50-
"@typescript-eslint/eslint-plugin": "^7.8.0",
51-
"@typescript-eslint/parser": "^7.8.0",
49+
"@typescript-eslint/eslint-plugin": "^7.16.0",
50+
"@typescript-eslint/parser": "^7.16.0",
5251
"eslint": "^8.57.0",
5352
"eslint-import-resolver-typescript": "^3.6.1",
5453
"eslint-plugin-import": "^2.29.1",
5554
"eslint-plugin-require-extensions": "^0.1.3",
5655
"jest": "^29.7.0",
5756
"jest-when": "^3.6.0",
5857
"mashlib": "^1.8.11",
59-
"prettier": "^3.2.5",
58+
"prettier": "^3.3.2",
6059
"serve": "^14.2.3",
61-
"ts-jest": "^29.1.2",
60+
"ts-jest": "^29.2.1",
6261
"ts-node": "^10.9.2",
63-
"typedoc": "^0.25.13",
64-
"typescript": "^5.4.5"
62+
"typedoc": "^0.26.4",
63+
"typescript": "^5.5.3"
6564
},
6665
"dependencies": {
67-
"short-unique-id": "^5.2.0"
66+
"@solid-data-modules/rdflib-utils": "^0.2.0"
6867
}
6968
}

contacts/src/e2e-tests/globalSetup.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { startServer } from "./start-server.js";
2+
import { generateId } from "@solid-data-modules/rdflib-utils/identifier";
3+
4+
export let server;
5+
6+
export default async function () {
7+
const testId = generateId();
8+
console.log("starting test server. Test ID is", testId);
9+
server = await startServer(testId);
10+
}

contacts/src/e2e-tests/globalSetup.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

contacts/src/e2e-tests/globalTeardown.ts renamed to contacts/src/e2e-tests/globalTeardown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { server } from "./globalSetup";
1+
import { server } from "./globalSetup.js";
22

33
export default async function () {
44
console.log("stopping test server...");

contacts/src/e2e-tests/start-server.ts renamed to contacts/src/e2e-tests/start-server.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ import { AppRunner, joinFilePath } from "@solid/community-server";
22

33
import { cp } from "fs/promises";
44

5-
export async function startServer(id: string) {
5+
import { fileURLToPath } from "url";
6+
import { dirname } from "path";
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = dirname(__filename);
10+
11+
export async function startServer(id) {
612
const testDataPath = joinFilePath(__dirname, "test-data");
713
const rootFilePath = joinFilePath(__dirname, ".test-data", id);
814
const app = await new AppRunner().create({

contacts/src/rdflib/ContactsModuleRdfLib.spec.ts

Lines changed: 0 additions & 110 deletions
This file was deleted.

0 commit comments

Comments
 (0)