Skip to content
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
12 changes: 5 additions & 7 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,16 @@ const baseConfig: ArrayElement<NonNullable<Config["projects"]>> = {
transform: {
...defaultPreset.transform,
// [\\\\/] expands to [\\/], which makes the regex Windows-compatible.
// jose v6 ships as ESM only, and may be nested in a dependency's own
// node_modules (e.g. @inrupt/internal-test-env), so match it anywhere.
"node_modules[\\\\/](uuid|.*jose).+\\.js$": [
// Some packages are ESM only, and may be nested in a dependency's own
// node_modules (e.g. @inrupt/internal-test-env), so match them anywhere.
"node_modules[\\\\/](uuid|.*jose|@rdfjs).+\\.js$": [
"ts-jest",
{ tsconfig: { allowJs: true } },
],
},
// Ignore everything under node_modules except uuid and jose (the latter
// possibly nested in another package's node_modules), which ship ESM that
// must be transpiled before Jest can parse it.
// Ignore everything under node_modules except native ESM packages.
transformIgnorePatterns: [
"node_modules[\\\\/](?!(.*[\\\\/])?(uuid|jose)[\\\\/])",
"node_modules[\\\\/](?!(.*[\\\\/])?(uuid|jose|@rdfjs)[\\\\/])",
],
};

Expand Down
48 changes: 27 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"@types/http-link-header": "^1.0.5",
"@types/jest": "^30.0.0",
"@types/n3": "^1.16.4",
"@types/rdfjs__dataset": "^1.0.5",
"@types/rdfjs__dataset": "^2.0.7",
"@types/uuid": "^11.0.0",
"eslint": "^9.28.0",
"eslint-config-prettier": "^10.1.8",
Expand All @@ -200,7 +200,7 @@
},
"dependencies": {
"@inrupt/solid-client-errors": "^0.0.4",
"@rdfjs/dataset": "^1.1.1",
"@rdfjs/dataset": "^2.0.3",
"buffer": "^6.0.3",
"http-link-header": "^1.1.1",
"jsonld-context-parser": "^3.0.0",
Expand Down
4 changes: 3 additions & 1 deletion src/rdf.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//

import { jest, describe, it, expect } from "@jest/globals";
import { dataset } from "@rdfjs/dataset";
import rdfjs from "@rdfjs/dataset";
import * as fc from "fast-check";
import { DataFactory as DF, Store } from "n3";
import type {
Expand All @@ -43,6 +43,8 @@ import { fromRdfJsDataset, toRdfJsDataset } from "./rdfjs";
import { asUrl, getThing, getThingAll } from "./thing/thing";
import { getTermAll } from "./thing/get";

const dataset = rdfjs.dataset;

describe("fromRdfJsDataset", () => {
const fcNamedNode = fc
.webUrl({ withFragments: true, withQueryParameters: true })
Expand Down
4 changes: 3 additions & 1 deletion src/thing/remove.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import { describe, it, expect } from "@jest/globals";

import { dataset } from "@rdfjs/dataset";
import rdfjs from "@rdfjs/dataset";
import { DataFactory } from "n3";
import type {
IriString,
Expand Down Expand Up @@ -50,6 +50,8 @@ import {
} from "./thing";
import { localNodeSkolemPrefix } from "../rdf.internal";

const dataset = rdfjs.dataset;

function getMockThingWithLiteralFor(
predicate: IriString,
literalValue: string,
Expand Down
4 changes: 3 additions & 1 deletion src/thing/thing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import { describe, it, expect } from "@jest/globals";

import { DataFactory } from "n3";
import { dataset } from "@rdfjs/dataset";
import rdfjs from "@rdfjs/dataset";
import {
getThing,
getThingAll,
Expand Down Expand Up @@ -62,6 +62,8 @@ import { internal_setAcl } from "../acl/acl.internal";
import type { BlankNodeId, LocalNodeIri } from "../rdf.internal";
import { localNodeSkolemPrefix } from "../rdf.internal";

const dataset = rdfjs.dataset;

describe("createThing", () => {
it("automatically generates a unique name for the Thing", () => {
const thing1: ThingLocal = createThing();
Expand Down
Loading