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

Update dependency rdf-parse to v4 - abandoned #63

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
key: ${{ runner.os }}-lint-modules-${{ hashFiles('**/yarn.lock') }}
- uses: actions/setup-node@v2
with:
node-version: 14.x
node-version: 18.x
- run: yarn install
- run: yarn run lint

Expand All @@ -22,8 +22,6 @@ jobs:
matrix:
os: [ubuntu-latest]
node-version:
- 14.x
- 16.x
- 18.x
- 20.x
- 22.x
Expand Down
10 changes: 6 additions & 4 deletions lib/ILdfManifest.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Resource } from "rdf-object";
import { RdfObjectLoader, Resource } from "rdf-object";
import { IFetchOptions, IManifest, ITestCase, ITestCaseHandler,
manifestFromSpecificationResource, Util } from "rdf-test-suite";
import { LdfResponseMockerFactory } from "./factory/LdfResponseMockerFactory";
Expand All @@ -10,10 +10,12 @@ import { ILdfTestSuiteConfig } from './LdfTestSuiteRunner';
* @param {{[uri: string]: ITestCaseHandler<ITestCase<any>>}} testCaseHandlers Handlers for constructing test cases.
* @param {IFetchOptions} options The fetch options.
* @param {Resource} resource A resource.
* @param objectLoader The RDF object loader.
* @return {Promise<IManifest>} A promise resolving to a manifest object.
*/
export async function ldfManifestFromResource(testCaseHandlers: {[uri: string]: ITestCaseHandler<ITestCase<any>>},
options: IFetchOptions & ILdfTestSuiteConfig, resource: Resource):
export async function ldfManifestFromResource(testCaseHandlers: { [p: string]: ITestCaseHandler<ITestCase<any>> },
options: IFetchOptions & ILdfTestSuiteConfig, resource: Resource,
objectLoader: RdfObjectLoader):
Promise<IManifest> {
// The factory will allow each ITestCase to setup a mocking server if needed
const factory: LdfResponseMockerFactory = new LdfResponseMockerFactory(options);
Expand All @@ -25,7 +27,7 @@ export async function ldfManifestFromResource(testCaseHandlers: {[uri: string]:
resource.property.specifications.list
.map((specificationResource: Resource) =>
({ [specificationResource.term.value]:
manifestFromSpecificationResource(testCaseHandlers, options, specificationResource) }))))) : null,
manifestFromSpecificationResource(testCaseHandlers, options, specificationResource, objectLoader) }))))) : null,
subManifests: await Promise.all<IManifest>([].concat.apply([],
resource.properties.include.map((includeList: Resource) => includeList.list
.map(ldfManifestFromResource.bind(null, factory, testCaseHandlers, options))))),
Expand Down
2 changes: 1 addition & 1 deletion lib/LdfManifestLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class LdfManifestLoader extends ManifestLoader {
const objectLoader = new RdfObjectLoader({ context: LdfManifestLoader.LOADER_CONTEXT });
logger.info(`Importing manifest `);
const manifest: Resource = await this.import(objectLoader, url, options);
return ldfManifestFromResource(this.ldfTestCaseHandlers, options, manifest);
return ldfManifestFromResource(this.ldfTestCaseHandlers, options, manifest, objectLoader);
}

}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"jest": "^29.0.0",
"jest-rdf": "^1.3.0",
"manual-git-changelog": "^1.0.1",
"nock": "^13.0.0",
"nock": "^14.0.0-beta.15",
"pre-commit": "^1.2.2",
"ts-jest": "^29.0.0",
"tslint": "^6.0.0",
Expand All @@ -94,9 +94,9 @@
"global": "^4.4.0",
"minimist": "^1.2.0",
"n3": "^1.6.3",
"rdf-parse": "^2.0.0",
"rdf-parse": "^4.0.0",
"rdf-store-stream": "^2.0.0",
"rdf-test-suite": "^1.18.0",
"rdf-test-suite": "^1.25.0",
"tcp-port-used": "^1.0.1",
"winston": "^3.2.1"
}
Expand Down
Loading
Loading