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

chore(deps): bump json2typescript to next version #371

Closed
wants to merge 3 commits into from
Closed
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
14 changes: 7 additions & 7 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"dependencies": {
"@babel/helper-compilation-targets": "^7.14.5",
"@types/jsonld": "^1.5.0",
"json2typescript": "1.4.1",
"json2typescript": "1.5.0-rc.0",
"jsonld": "^5.2.0"
},
"peerDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions src/api/endpoint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { JsonConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { Observable, throwError } from "rxjs";
import { ajax, AjaxError, AjaxRequest, AjaxResponse } from "rxjs/ajax";
import { KnoraApiConfig } from "../knora-api-config";
Expand Down
4 changes: 2 additions & 2 deletions src/api/v2/list/lists-endpoint-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class ListsEndpointV2 extends Endpoint {
return jsonld.compact(ajaxResponse.response, {});
}),
map(
res => {
(res: object) => {
return this.jsonConvert.deserialize(res, ListNodeV2) as ListNodeV2;
}
),
Expand All @@ -53,7 +53,7 @@ export class ListsEndpointV2 extends Endpoint {
return jsonld.compact(ajaxResponse.response, {});
}),
map(
res => {
(res: object) => {
return this.jsonConvert.deserialize(res, ListNodeV2) as ListNodeV2;
}
),
Expand Down
3 changes: 1 addition & 2 deletions src/cache/ListAdminCache.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { JsonConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { of } from "rxjs";
import { KnoraApiConfig } from "../knora-api-config";
import { KnoraApiConnection } from "../knora-api-connection";
Expand Down
4 changes: 1 addition & 3 deletions src/cache/ListNodeV2Cache.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { JsonConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { of } from "rxjs";
import { MockList } from "../../test/data/api/v2/mock-list";
import { KnoraApiConfig } from "../knora-api-config";
import { KnoraApiConnection } from "../knora-api-connection";
import { ListNodeV2 } from "../models/v2/lists/list-node-v2";
import { ListNodeV2Cache } from "./ListNodeV2Cache";

describe("ListNodeV2Cache", () => {

Expand Down
3 changes: 1 addition & 2 deletions src/cache/UserCache.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { JsonConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { of } from "rxjs";
import { KnoraApiConfig } from "../knora-api-config";
import { KnoraApiConnection } from "../knora-api-connection";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";

import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { Permission } from "../permission";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { StringLiteralV2 } from "../string-literal-v2";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { StringLiteralV2 } from "../string-literal-v2";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { IId } from "../../../interfaces/models/v2/project-metadata-interfaces";
import { Constants } from "../Constants";
import { DataManagementPlan } from "../project-metadata/data-management-plan";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { IId } from "../../../interfaces/models/v2/project-metadata-interfaces";
import { Constants } from "../Constants";
import { Attribution } from "../project-metadata/attribution";
Expand Down
3 changes: 1 addition & 2 deletions src/models/v2/custom-converters/union-metadata-converter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { Constants } from "../Constants";
import { DataManagementPlan } from "../project-metadata/data-management-plan";
import { Dataset } from "../project-metadata/dataset";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { IId } from "../../../interfaces/models/v2/project-metadata-interfaces";
import { Constants } from "../Constants";
import { Organization } from "../project-metadata/organization";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { IId } from "../../../interfaces/models/v2/project-metadata-interfaces";
import { Constants } from "../Constants";
import { Organization } from "../project-metadata/organization";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, JsonConverter, JsonCustomConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { IId } from "../../../interfaces/models/v2/project-metadata-interfaces";
import { Constants } from "../Constants";
import { SingleProject } from "../project-metadata/single-project";
Expand Down
2 changes: 1 addition & 1 deletion src/models/v2/lists/list-node-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
JsonObject,
JsonProperty,
OperationMode,
PropertyMatchingRule,
ValueCheckingMode
} from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { Constants } from "../Constants";
import { IdConverter } from "../custom-converters/id-converter";

Expand Down
3 changes: 1 addition & 2 deletions src/models/v2/resources/ResourcesConversionUtil.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { JsonConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { of } from "rxjs";
import { MockList } from "../../../../test/data/api/v2/mock-list";
import { MockOntology } from "../../../../test/data/api/v2/mock-ontology";
Expand Down
10 changes: 4 additions & 6 deletions test/data/api/admin/mock-projects.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { JsonConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { AjaxResponse } from "rxjs/ajax";
import { ApiResponseData } from "../../../../src/models/api-response-data";
import { ProjectsResponse } from "../../../../src/models/admin/projects-response";
import { ProjectResponse } from "../../../../src/models/admin/project-response";

import projects from "./projects/get-projects-response.json";
import { ProjectsResponse } from "../../../../src/models/admin/projects-response";
import { ApiResponseData } from "../../../../src/models/api-response-data";
import project from "./projects/get-project-response.json";
import projects from "./projects/get-projects-response.json";

export namespace MockProjects {

Expand Down
10 changes: 4 additions & 6 deletions test/data/api/admin/mock-users.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { JsonConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { AjaxResponse } from "rxjs/ajax";
import { ApiResponseData } from "../../../../src/models/api-response-data";
import { UsersResponse } from "../../../../src/models/admin/users-response";
import { UserResponse } from "../../../../src/models/admin/user-response";

import users from "./users/get-users-response.json";
import { UsersResponse } from "../../../../src/models/admin/users-response";
import { ApiResponseData } from "../../../../src/models/api-response-data";
import user from "./users/get-user-response.json";
import users from "./users/get-users-response.json";

export namespace MockUsers {

Expand Down
5 changes: 2 additions & 3 deletions test/data/api/v2/mock-list.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { JsonConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { ListConversionUtil } from "../../../../src/models/v2/lists/list-conversion-util";
import { ListNodeV2 } from "../../../../src/models/v2/lists/list-node-v2";
import othertreeListExpanded from "../v2/lists/othertreelist-expanded.json";
import treeListExpanded from "../v2/lists/treelist-expanded.json";
import othertreeListExpanded from "../v2/lists/othertreelist-expanded.json";

export namespace MockList {

Expand Down
7 changes: 3 additions & 4 deletions test/data/api/v2/mock-ontology.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { JsonConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { OntologiesMetadata } from "../../../../src/models/v2/ontologies/ontology-metadata";
import { JsonConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { ResourceClassAndPropertyDefinitions } from "../../../../src/cache/ontology-cache/resource-class-and-property-definitions";
import { ResourceClassDefinitionWithPropertyDefinition } from "../../../../src/cache/ontology-cache/resource-class-definition-with-property-definition";
import { Constants } from "../../../../src/models/v2/Constants";
import { IHasProperty } from "../../../../src/models/v2/ontologies/class-definition";
import { OntologiesMetadata } from "../../../../src/models/v2/ontologies/ontology-metadata";
import { OntologyConversionUtil } from "../../../../src/models/v2/ontologies/OntologyConversionUtil";
import { PropertyDefinition } from "../../../../src/models/v2/ontologies/property-definition";
import { ReadOntology } from "../../../../src/models/v2/ontologies/read/read-ontology";
Expand All @@ -14,9 +13,9 @@ import { StandoffClassDefinition } from "../../../../src/models/v2/ontologies/st
import { SystemPropertyDefinition } from "../../../../src/models/v2/ontologies/system-property-definition";
import ontologiesMetadata from "../v2/ontologies/all-ontology-metadata-response-expanded.json";
import anythingOntologyExpanded from "../v2/ontologies/anything-ontology-expanded.json";
import minimalOntologyExpanded from "../v2/ontologies/minimal-ontology-expanded.json";
import incunabulaOntologyExpanded from "../v2/ontologies/incunabula-ontology-expanded.json";
import knoraApiOntologyExpanded from "../v2/ontologies/knora-api-ontology-expanded.json";
import minimalOntologyExpanded from "../v2/ontologies/minimal-ontology-expanded.json";

export namespace MockOntology {

Expand Down
3 changes: 1 addition & 2 deletions test/data/api/v2/mock-resource.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { JsonConvert, OperationMode, ValueCheckingMode } from "json2typescript";
import { PropertyMatchingRule } from "json2typescript/src/json2typescript/json-convert-enums";
import { JsonConvert, OperationMode, PropertyMatchingRule, ValueCheckingMode } from "json2typescript";
import { forkJoin, Observable, of } from "rxjs";
import { map } from "rxjs/operators";
import { V2Endpoint } from "../../../../src/api/v2/v2-endpoint";
Expand Down