From 3e7399dec70b51c34ff9413928397bb54fbbbadf Mon Sep 17 00:00:00 2001 From: Cheng Shi Date: Thu, 19 Sep 2024 16:09:43 -0400 Subject: [PATCH] fix: remove the hardcoded value of isReleased field --- package-lock.json | 8 ++++---- package.json | 2 +- .../infrastructure/mappers/JSCollectionMapper.ts | 2 +- .../collection/CollectionJSDataverseRepository.spec.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6e6758dc4..94b01cf53 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0", "dependencies": { "@faker-js/faker": "7.6.0", - "@iqss/dataverse-client-javascript": "2.0.0-pr187.f29c0e6", + "@iqss/dataverse-client-javascript": "2.0.0-pr192.6406015", "@iqss/dataverse-design-system": "*", "@istanbuljs/nyc-config-typescript": "1.0.2", "@tanstack/react-table": "8.9.2", @@ -3674,9 +3674,9 @@ }, "node_modules/@iqss/dataverse-client-javascript": { "name": "@IQSS/dataverse-client-javascript", - "version": "2.0.0-pr187.f29c0e6", - "resolved": "https://npm.pkg.github.com/download/@IQSS/dataverse-client-javascript/2.0.0-pr187.f29c0e6/324f487a2b1437df668e34159404161888279638", - "integrity": "sha512-0OX9nmh7dY3Gg5euE7buCqTeyh+1B+GhFcDz2gJoND4oM3kIZalYS+bLsEoEekR2o25agP6b+ANyQ5kvZeFuig==", + "version": "2.0.0-pr192.6406015", + "resolved": "https://npm.pkg.github.com/download/@IQSS/dataverse-client-javascript/2.0.0-pr192.6406015/4d6562b1e287c872e92ef3a551ee8aa63c5262b5", + "integrity": "sha512-1DmypaaV1cXS4y+kbx33GLmRLwI/8Cwj82MLhpq9gdy7+racUOyzVs3MFKJmdLLWTy7pAWKtj6a+c8Pt6DmtzQ==", "license": "MIT", "dependencies": { "@types/node": "^18.15.11", diff --git a/package.json b/package.json index 6549c4e3f..0a0b77593 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@faker-js/faker": "7.6.0", - "@iqss/dataverse-client-javascript": "2.0.0-pr187.f29c0e6", + "@iqss/dataverse-client-javascript": "2.0.0-pr192.6406015", "@iqss/dataverse-design-system": "*", "@istanbuljs/nyc-config-typescript": "1.0.2", "@tanstack/react-table": "8.9.2", diff --git a/src/collection/infrastructure/mappers/JSCollectionMapper.ts b/src/collection/infrastructure/mappers/JSCollectionMapper.ts index 988946da7..0d8256d94 100644 --- a/src/collection/infrastructure/mappers/JSCollectionMapper.ts +++ b/src/collection/infrastructure/mappers/JSCollectionMapper.ts @@ -14,7 +14,7 @@ export class JSCollectionMapper { return { id: jsCollection.alias, name: jsCollection.name, - isReleased: true, // TODO: replace with real value, waiting for https://github.com/IQSS/dataverse-client-javascript/issues/139 + isReleased: jsCollection.isReleased, description: jsCollection.description, affiliation: jsCollection.affiliation, hierarchy: JSCollectionMapper.toHierarchy( diff --git a/tests/e2e-integration/integration/collection/CollectionJSDataverseRepository.spec.ts b/tests/e2e-integration/integration/collection/CollectionJSDataverseRepository.spec.ts index 7339fe403..b81b2ccb6 100644 --- a/tests/e2e-integration/integration/collection/CollectionJSDataverseRepository.spec.ts +++ b/tests/e2e-integration/integration/collection/CollectionJSDataverseRepository.spec.ts @@ -13,7 +13,7 @@ const collectionExpected: Collection = { id: 'new-collection', name: 'Scientific Research', description: 'We do all the science.', - isReleased: true, + isReleased: false, affiliation: 'Scientific Research University', hierarchy: new UpwardHierarchyNode( 'Scientific Research',