Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps-dev): Bump gts from 5.3.1 to 6.0.0 #1018

Merged
merged 2 commits into from
Oct 21, 2024
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ENV NODE_ENV=production
WORKDIR /app/
COPY package*.json ./
RUN npm ci --ignore-scripts
COPY --from=build /app/build /app/build
COPY --from=build /app/build/src /app/build/src
COPY --from=build /app/shacl /app/shacl
COPY --from=build /app/assets /app/assets
USER node
Expand Down
5 changes: 3 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default {
preset: 'ts-jest/presets/default-esm',
extensionsToTreatAsEsm: ['.ts'],
testTimeout: 10000,
testPathIgnorePatterns: ['build/test'],
collectCoverage: true,
collectCoverageFrom: [
'**/src/**/*.ts', // Include files that are not covered by tests.
Expand All @@ -10,8 +11,8 @@ export default {
coverageReporters: ['json-summary', 'text'],
coverageThreshold: {
global: {
lines: 69.73,
statements: 69.97,
lines: 69.31,
statements: 69.55,
branches: 60.52,
functions: 67.01,
},
Expand Down
73 changes: 38 additions & 35 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"node": ">=16"
},
"scripts": {
"start": "node --experimental-specifier-resolution=node build/main.js",
"start": "node --experimental-specifier-resolution=node build/src/main.js",
"dev": "tsc-watch --onSuccess 'npm run start'",
"test": "NODE_OPTIONS='--experimental-vm-modules --no-experimental-fetch' jest ${1}",
"lint": "gts lint",
Expand All @@ -23,7 +23,7 @@
"author": "",
"license": "ISC",
"files": [
"build/",
"build/src",
"shacl/"
],
"dependencies": {
Expand Down Expand Up @@ -63,7 +63,7 @@
"@types/rdf-dataset-ext": "^1.0.1",
"@types/rdf-ext": "^2.0.1",
"chokidar": "^4.0.0",
"gts": "^5.2.0",
"gts": "^6.0.0",
"husky": "^9.0.11",
"jest": "^29.5.0",
"jest-coverage-thresholds-bumper": "^1.1.0",
Expand Down
6 changes: 3 additions & 3 deletions src/crawler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class Crawler {
private datasetStore: DatasetStore,
private ratingStore: RatingStore,
private validator: Validator,
private logger: Pino.Logger
private logger: Pino.Logger,
) {}

/**
Expand Down Expand Up @@ -47,7 +47,7 @@ export class Crawler {
if (e instanceof HttpError) {
statusCode = e.statusCode;
this.logger.info(
`${registration.url} returned HTTP error ${statusCode}`
`${registration.url} returned HTTP error ${statusCode}`,
);
}

Expand All @@ -65,7 +65,7 @@ export class Crawler {
const updatedRegistration = registration.read(
datasetIris,
statusCode,
isValid
isValid,
);
await this.registrationStore.store(updatedRegistration);
}
Expand Down
8 changes: 4 additions & 4 deletions src/dataset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ export function extractIri(dataset: DatasetCore): URL {
...dataset.match(
null,
DataFactory.namedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'),
datasetType
datasetType,
),
][0];
return new URL(quad.subject.value);
}

export async function load(
stream: Readable,
contentType: 'application/ld+json' | string
contentType: 'application/ld+json' | string,
) {
const parser =
contentType === 'application/ld+json'
Expand All @@ -45,8 +45,8 @@ export async function load(
stream
.pipe(parser)
.on('error', error => reject(error))
.pipe(new StandardizeSchemaOrgPrefixToHttps())
.pipe(new StandardizeSchemaOrgPrefixToHttps()),
)
.then(data => resolve(data))
.then(data => resolve(data)),
);
}
4 changes: 2 additions & 2 deletions src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {rdfDereferencer} from 'rdf-dereference';
export class HttpError extends Error {
constructor(
message: string,
public readonly statusCode: number
public readonly statusCode: number,
) {
super(message);
}
Expand Down Expand Up @@ -39,7 +39,7 @@ export async function dereference(url: URL): Promise<DatasetExt> {
const stream = pipeline(
data,
new StandardizeSchemaOrgPrefixToHttps(),
() => {} // Noop because errors are caught below.
() => {}, // Noop because errors are caught below.
);
return await factory.dataset().import(stream);
} catch (e) {
Expand Down
Loading