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

59 - Add new Dataset use cases to support the Dataset page (SPA) #60

Merged
merged 31 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
cb2f644
Stash: GetDatasetSummaryFieldName use case added, pending repository
GPortas May 15, 2023
f25c7b0
Added: DatasetsRepository with getDatasetSummaryFieldNames support
GPortas May 15, 2023
26a1762
Added: GetDatasetSummaryFieldNames use case export
GPortas May 15, 2023
c3dbce0
Added: dataset models and GetDataset use case (pending repository logic)
GPortas May 16, 2023
f2106d2
Added: type tweaks and improved GetDataset use case testing
GPortas May 16, 2023
546bd9c
Added: getDataset repository logic
GPortas May 18, 2023
056e34f
Added: dataset models export
GPortas May 18, 2023
8f0a2de
Added: getDataset use case export
GPortas May 18, 2023
1801016
Added: DatasetRepository unit test missing error cases
GPortas May 18, 2023
3a80aac
Added: html to markdown translations
GPortas May 19, 2023
66775a0
Added: getPrivateUrlDataset use case
GPortas May 22, 2023
53a5bb5
Added: github action for gpr package deployment on PRs
GPortas May 23, 2023
3016ccf
Fixed: GitHub username / org name
GPortas May 23, 2023
8ac5f25
Added: enhanced versioning
GPortas May 23, 2023
2ae4602
Fixed: using undefined instead of null
GPortas May 25, 2023
051deaf
Merge branch 'github-package-registry' into 59-dataset-info-use-cases
GPortas May 25, 2023
e9b1261
Fixed: undefined param checks in repository and use case and reposito…
GPortas May 26, 2023
be914ac
Fixed: removed deleted error model from exports
GPortas May 26, 2023
e4fc3a1
Refactor: reduced code by using maps
GPortas May 26, 2023
7a539a1
Added: optional license iconUri
GPortas May 26, 2023
28fa696
Fixed: dataset response transformer
GPortas May 26, 2023
301cf3e
Changed: markdown translator dependency due to issues when consuming …
GPortas May 26, 2023
d4c69b0
Added: GetDatasetCitation use case
GPortas May 26, 2023
df1b9b0
Refactor: using same datasets endpoint for latest and specific versio…
GPortas May 26, 2023
1720346
Fixed: use case export and variables names
GPortas May 26, 2023
00ccd35
Removed: custom anonymized field value from getPrivateUrlDataset use …
GPortas May 27, 2023
d8d329c
Added: GetPrivateUrlDatasetCitation use case
GPortas May 27, 2023
d6e4287
Removed: anonymizedAccess optional param for getDatasetCitation use case
GPortas May 27, 2023
bb367b6
Changed: managing optional license dataset property
GPortas May 29, 2023
95b20ab
Fixed: test:coverage by ignoring node_modules
GPortas May 30, 2023
28cea64
Added: github registry mentioned in the README
GPortas May 30, 2023
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
54 changes: 54 additions & 0 deletions .github/workflows/deploy_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: deploy_pr

on:
pull_request:
branches:
- develop

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 19

- name: Install npm dependencies
run: npm ci

- name: Run unit tests
run: npm run test:unit

publish-gpr:
needs: test
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 19
registry-url: https://npm.pkg.github.com/

- name: Install npm dependencies
run: npm ci

- name: Build package
run: npm run build

- name: Update package version
run: |
SHORT_SHA=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")
CURRENT_PACKAGE_VERSION=$(cat package.json | jq -r '.version')
npm version "${CURRENT_PACKAGE_VERSION}-pr${{ github.event.number }}.${SHORT_SHA}" --no-git-tag-version

- name: Publish package
run: |
echo "$(jq '.publishConfig.registry = "https://npm.pkg.github.com"' package.json)" > package.json
echo "$( jq '.name = "@IQSS/dataverse-client-javascript"' package.json )" > package.json
npm publish --@IQSS:registry=https://npm.pkg.github.com
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ A JavaScript/TypeScript API wrapper for [Dataverse](http://guides.dataverse.org/

## NPM

Module available as `js-dataverse` at https://www.npmjs.com/package/js-dataverse
A stable 1.x version of this package is available as `js-dataverse` at https://www.npmjs.com/package/js-dataverse

An unstable 2.x version of this package with breaking changes is under development. Until a 2.0 version is officially released, it can be installed from https://github.com/IQSS/dataverse-client-javascript/pkgs/npm/dataverse-client-javascript

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ module.exports = {
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.ts$',
moduleFileExtensions: ['ts', 'js', 'json', 'node'],
coveragePathIgnorePatterns: ['testHelpers'],
coveragePathIgnorePatterns: ['node_modules', 'testHelpers'],
};
Loading