Skip to content

Commit

Permalink
Merge pull request #60 from IQSS/59-dataset-info-use-cases
Browse files Browse the repository at this point in the history
59 - Add new Dataset use cases to support the Dataset page (SPA)
  • Loading branch information
kcondon authored Jun 13, 2023
2 parents 88d3743 + 28cea64 commit cc987f2
Show file tree
Hide file tree
Showing 26 changed files with 1,403 additions and 358 deletions.
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

0 comments on commit cc987f2

Please sign in to comment.