Skip to content

Commit

Permalink
chore: Replace rdf-js import with @rdfjs/types
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimvh committed Jan 15, 2024
1 parent 19f9ef7 commit c0cbff2
Show file tree
Hide file tree
Showing 27 changed files with 27 additions and 29 deletions.
2 changes: 1 addition & 1 deletion src/authorization/AcpUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/http/auxiliary/LinkMetadataGenerator.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/http/input/metadata/AuthorizationParser.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/http/input/metadata/CookieParser.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/http/ldp/PostOperationHandler.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/http/output/metadata/WacAllowMetadataWriter.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/http/representation/N3Patch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Quad } from 'rdf-js';
import type { Quad } from '@rdfjs/types';
import type { Patch } from './Patch';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/http/representation/RepresentationMetadata.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/server/notifications/BaseChannelType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 1 addition & 2 deletions src/storage/DataAccessorBasedStore.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/storage/accessors/FileDataAccessor.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/storage/accessors/SparqlDataAccessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/storage/conversion/ContainerToTemplateConverter.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/storage/conversion/DynamicJsonToTemplateConverter.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/storage/conversion/QuadToRdfConverter.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/storage/patch/ImmutableMetadataPatcher.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/storage/patch/N3Patcher.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 1 addition & 2 deletions src/util/QuadUtil.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/util/TermUtil.ts
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/util/Vocabularies.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/util/errors/HttpError.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/authorization/AcpReader.test.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/storage/accessors/SparqlDataAccessor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/storage/patch/RdfPatcher.test.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/storage/patch/SparqlUpdatePatcher.test.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down

0 comments on commit c0cbff2

Please sign in to comment.