chore: Replace rdf-js import with @rdfjs/types

This commit is contained in:
Joachim Van Herwegen 2024-01-15 09:31:17 +01:00
parent 19f9ef7882
commit e09b53b20d
27 changed files with 27 additions and 29 deletions

View File

@ -7,7 +7,7 @@ import type {
IPolicy,
} from '@solid/access-control-policy';
import type { Store } from 'n3';
import type { NamedNode, Term } from 'rdf-js';
import type { NamedNode, Term } from '@rdfjs/types';
import { ACP } from '../util/Vocabularies';
/**

View File

@ -1,5 +1,5 @@
import { DataFactory } from 'n3';
import type { NamedNode } from 'rdf-js';
import type { NamedNode } from '@rdfjs/types';
import { SOLID_META } from '../../util/Vocabularies';
import type { RepresentationMetadata } from '../representation/RepresentationMetadata';
import type { AuxiliaryIdentifierStrategy } from './AuxiliaryIdentifierStrategy';

View File

@ -1,5 +1,5 @@
import { DataFactory } from 'n3';
import type { NamedNode } from 'rdf-js';
import type { NamedNode } from '@rdfjs/types';
import type { HttpRequest } from '../../../server/HttpRequest';
import { matchesAuthorizationScheme } from '../../../util/HeaderUtil';
import { SOLID_META } from '../../../util/Vocabularies';

View File

@ -1,6 +1,6 @@
import { parse } from 'cookie';
import { DataFactory } from 'n3';
import type { NamedNode } from 'rdf-js';
import type { NamedNode } from '@rdfjs/types';
import type { HttpRequest } from '../../../server/HttpRequest';
import { SOLID_META } from '../../../util/Vocabularies';
import type { RepresentationMetadata } from '../../representation/RepresentationMetadata';

View File

@ -1,4 +1,4 @@
import type { Term } from 'rdf-js';
import type { Term } from '@rdfjs/types';
import { getLoggerFor } from '../../logging/LogUtil';
import type { ResourceStore } from '../../storage/ResourceStore';
import { BadRequestHttpError } from '../../util/errors/BadRequestHttpError';

View File

@ -1,4 +1,4 @@
import type { Term } from 'rdf-js';
import type { Term } from '@rdfjs/types';
import type { HttpResponse } from '../../../server/HttpResponse';
import { addHeader } from '../../../util/HeaderUtil';
import { ACL, AUTH } from '../../../util/Vocabularies';

View File

@ -1,4 +1,4 @@
import type { Quad } from 'rdf-js';
import type { Quad } from '@rdfjs/types';
import type { Patch } from './Patch';
/**

View File

@ -1,5 +1,5 @@
import { DataFactory, Store } from 'n3';
import type { BlankNode, DefaultGraph, Literal, NamedNode, Quad, Term } from 'rdf-js';
import type { BlankNode, DefaultGraph, Literal, NamedNode, Quad, Term } from '@rdfjs/types';
import { getLoggerFor } from '../../logging/LogUtil';
import { ContentType, SIMPLE_MEDIA_RANGE } from '../../util/Header';
import { isTerm, toLiteral, toNamedTerm, toObjectTerm } from '../../util/TermUtil';

View File

@ -3,7 +3,7 @@ import { KeysRdfParseJsonLd } from '@comunica/context-entries';
import { parse, toSeconds } from 'iso8601-duration';
import { DataFactory } from 'n3';
import type { Store } from 'n3';
import type { NamedNode, Term } from 'rdf-js';
import type { NamedNode, Term } from '@rdfjs/types';
import rdfParser from 'rdf-parse';
import SHACLValidator from 'rdf-validate-shacl';
import { v4 } from 'uuid';

View File

@ -1,7 +1,6 @@
import type { Quad } from '@rdfjs/types';
import type { NamedNode, Quad, Term } from '@rdfjs/types';
import arrayifyStream from 'arrayify-stream';
import { DataFactory } from 'n3';
import type { NamedNode, Term } from 'rdf-js';
import { v4 as uuid } from 'uuid';
import type { AuxiliaryStrategy } from '../http/auxiliary/AuxiliaryStrategy';
import { BasicRepresentation } from '../http/representation/BasicRepresentation';

View File

@ -1,7 +1,7 @@
import type { Readable } from 'node:stream';
import type { Stats } from 'fs-extra';
import { createReadStream, createWriteStream, ensureDir, lstat, opendir, remove, stat } from 'fs-extra';
import type { Quad } from 'rdf-js';
import type { Quad } from '@rdfjs/types';
import type { Representation } from '../../http/representation/Representation';
import { RepresentationMetadata } from '../../http/representation/RepresentationMetadata';
import type { ResourceIdentifier } from '../../http/representation/ResourceIdentifier';

View File

@ -2,7 +2,7 @@ import type { Readable } from 'node:stream';
import arrayifyStream from 'arrayify-stream';
import { SparqlEndpointFetcher } from 'fetch-sparql-endpoint';
import { DataFactory } from 'n3';
import type { NamedNode, Quad } from 'rdf-js';
import type { NamedNode, Quad } from '@rdfjs/types';
import type {
ConstructQuery,
GraphPattern,

View File

@ -1,6 +1,6 @@
import type { Readable } from 'node:stream';
import orderBy from 'lodash.orderby';
import type { Quad } from 'rdf-js';
import type { Quad } from '@rdfjs/types';
import { BasicRepresentation } from '../../http/representation/BasicRepresentation';
import type { Representation } from '../../http/representation/Representation';
import type { ResourceIdentifier } from '../../http/representation/ResourceIdentifier';

View File

@ -1,4 +1,4 @@
import type { NamedNode, Term } from 'rdf-js';
import type { NamedNode, Term } from '@rdfjs/types';
import { BasicRepresentation } from '../../http/representation/BasicRepresentation';
import type { Representation } from '../../http/representation/Representation';
import { RepresentationMetadata } from '../../http/representation/RepresentationMetadata';

View File

@ -1,6 +1,6 @@
import type { Readable } from 'node:stream';
import { DataFactory, StreamWriter } from 'n3';
import type { Quad } from 'rdf-js';
import type { Quad } from '@rdfjs/types';
import rdfSerializer from 'rdf-serialize';
import { BasicRepresentation } from '../../http/representation/BasicRepresentation';
import type { Representation } from '../../http/representation/Representation';

View File

@ -1,5 +1,5 @@
import { DataFactory } from 'n3';
import type { Quad } from 'rdf-js';
import type { Quad } from '@rdfjs/types';
import type { AuxiliaryStrategy } from '../../http/auxiliary/AuxiliaryStrategy';
import type { RdfDatasetRepresentation } from '../../http/representation/RdfDatasetRepresentation';
import { getLoggerFor } from '../../logging/LogUtil';

View File

@ -1,7 +1,7 @@
import { QueryEngine } from '@comunica/query-sparql';
import arrayifyStream from 'arrayify-stream';
import type { Store } from 'n3';
import type { Bindings, Quad, Term } from 'rdf-js';
import type { Bindings, Quad, Term } from '@rdfjs/types';
import { mapTerms } from 'rdf-terms';
import { Generator, Wildcard } from 'sparqljs';
import type { SparqlGenerator } from 'sparqljs';

View File

@ -1,9 +1,8 @@
import type { Readable } from 'node:stream';
import type { NamedNode } from '@rdfjs/types';
import type { NamedNode, Quad, Term } from '@rdfjs/types';
import arrayifyStream from 'arrayify-stream';
import type { ParserOptions } from 'n3';
import { StreamParser, StreamWriter } from 'n3';
import type { Quad, Term } from 'rdf-js';
import type { Guarded } from './GuardedStream';
import { guardedStreamFrom, pipeSafely } from './StreamUtil';
import { toNamedTerm } from './TermUtil';

View File

@ -1,5 +1,5 @@
import { DataFactory } from 'n3';
import type { Literal, NamedNode, Term } from 'rdf-js';
import type { Literal, NamedNode, Term } from '@rdfjs/types';
const { namedNode, literal } = DataFactory;

View File

@ -1,5 +1,5 @@
import { DataFactory } from 'n3';
import type { NamedNode } from 'rdf-js';
import type { NamedNode } from '@rdfjs/types';
/**
* A `Record` in which each value is a concatenation of the baseUrl and its key.

View File

@ -1,4 +1,4 @@
import type { NamedNode } from 'rdf-js';
import type { NamedNode } from '@rdfjs/types';
import { RepresentationMetadata } from '../../http/representation/RepresentationMetadata';
import { toLiteral, toNamedTerm } from '../TermUtil';
import { HTTP, SOLID_ERROR, XSD } from '../Vocabularies';

View File

@ -1,5 +1,5 @@
import { Parser } from 'n3';
import type { Quad } from 'rdf-js';
import type { Quad } from '@rdfjs/types';
import type { Credentials } from '../../../src/authentication/Credentials';
import { AcpReader } from '../../../src/authorization/AcpReader';
import { AccessMode } from '../../../src/authorization/permissions/Permissions';

View File

@ -1,5 +1,5 @@
import { DataFactory } from 'n3';
import type { Quad } from 'rdf-js';
import type { Quad } from '@rdfjs/types';
import { N3PatchModesExtractor } from '../../../../src/authorization/permissions/N3PatchModesExtractor';
import type { AccessMap } from '../../../../src/authorization/permissions/Permissions';
import { AccessMode } from '../../../../src/authorization/permissions/Permissions';

View File

@ -1,7 +1,7 @@
import 'jest-rdf';
import type { BlankNode } from 'n3';
import { DataFactory } from 'n3';
import type { NamedNode, Quad } from 'rdf-js';
import type { NamedNode, Quad } from '@rdfjs/types';
import { RepresentationMetadata } from '../../../../src/http/representation/RepresentationMetadata';
import { ContentType } from '../../../../src/util/Header';
import { CONTENT_TYPE_TERM, RDFS, SOLID_META } from '../../../../src/util/Vocabularies';

View File

@ -3,7 +3,7 @@ import { Readable } from 'node:stream';
import arrayifyStream from 'arrayify-stream';
import { SparqlEndpointFetcher } from 'fetch-sparql-endpoint';
import { DataFactory } from 'n3';
import type { Quad } from 'rdf-js';
import type { Quad } from '@rdfjs/types';
import { BasicRepresentation } from '../../../../src/http/representation/BasicRepresentation';
import { RepresentationMetadata } from '../../../../src/http/representation/RepresentationMetadata';
import { SparqlDataAccessor } from '../../../../src/storage/accessors/SparqlDataAccessor';

View File

@ -1,6 +1,6 @@
import 'jest-rdf';
import { DataFactory } from 'n3';
import type { Quad } from 'rdf-js';
import type { Quad } from '@rdfjs/types';
import { BasicRepresentation } from '../../../../src/http/representation/BasicRepresentation';
import type { Patch } from '../../../../src/http/representation/Patch';
import type { RdfDatasetRepresentation } from '../../../../src/http/representation/RdfDatasetRepresentation';

View File

@ -1,6 +1,6 @@
import 'jest-rdf';
import { DataFactory, Store } from 'n3';
import type { Quad } from 'rdf-js';
import type { Quad } from '@rdfjs/types';
import type { Algebra } from 'sparqlalgebrajs';
import { translate } from 'sparqlalgebrajs';
import { BasicRepresentation } from '../../../../src/http/representation/BasicRepresentation';