Skip to content

Commit 40e74cc

Browse files
authored
Merge pull request #326 from IQSS/release/1.0.0
Release 2.0.0
2 parents 5d7f81e + 8a9fd46 commit 40e74cc

File tree

438 files changed

+36933
-16704
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

438 files changed

+36933
-16704
lines changed

.eslintrc

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"plugins": ["@typescript-eslint", "simple-import-sort", "import", "unused-imports", "jest"],
4+
"extends": [
5+
"eslint:recommended",
6+
"plugin:@typescript-eslint/recommended",
7+
"plugin:@typescript-eslint/recommended",
8+
"plugin:prettier/recommended",
9+
"plugin:jest/recommended"
10+
],
11+
"settings": {
12+
"import/resolver": {
13+
"node": {
14+
"extensions": [".js", ".ts"]
15+
}
16+
}
17+
},
18+
"env": {
19+
"browser": true,
20+
"es2021": true,
21+
"jest": true,
22+
"node": true
23+
},
24+
"parserOptions": {
25+
"ecmaVersion": 2021,
26+
"sourceType": "module",
27+
"project": [
28+
"./tsconfig.json",
29+
"./tsconfig.tests.json"
30+
]
31+
},
32+
"rules": {
33+
"@typescript-eslint/no-unused-vars": "off",
34+
"unused-imports/no-unused-imports": "error",
35+
"unused-imports/no-unused-vars": [
36+
"warn",
37+
{
38+
"vars": "all",
39+
"varsIgnorePattern": "^_",
40+
"args": "after-used",
41+
"argsIgnorePattern": "^_"
42+
}
43+
],
44+
"@typescript-eslint/no-empty-function": [
45+
"error",
46+
{
47+
"allow": ["arrowFunctions"]
48+
}
49+
],
50+
"prettier/prettier": [
51+
"error",
52+
{
53+
"semi": false,
54+
"tabWidth": 2,
55+
"printWidth": 100,
56+
"singleQuote": true,
57+
"trailingComma": "none",
58+
"bracketSameLine": true
59+
}
60+
]
61+
}
62+
}

.eslintrc.js

Lines changed: 0 additions & 51 deletions
This file was deleted.

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## What steps does it take to reproduce the issue?
2+
3+
## When does this issue occur?
4+
5+
## What happens?
6+
7+
## What did you expect to happen?
8+
9+
## Which version of dataverse-client-javascript are you using?
10+
11+
## Any related open or closed issues to this bug report?
12+
13+
## Screenshots:
14+
15+
No matter the issue, screenshots are always welcome.
16+
17+
To add a screenshot, please use one of the following formats and/or methods described here:
18+
19+
- https://help.github.com/en/articles/file-attachments-on-issues-and-pull-requests
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Overview of the feature request
2+
3+
## What inspired the request?
4+
5+
## What existing behavior do you want changed?
6+
7+
## Any brand new behavior do you want to add to dataverse-client-javascript?
8+
9+
## Any open or closed issues related to this feature request?

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
## Description
2-
<Description of the pull request>
1+
## What this PR does / why we need it:
32

4-
## Changes
5-
<A list of the changes that have been made>
3+
## Which issue(s) this PR closes:
64

7-
## Tests
8-
<A brief description of how the functionality has been tested>
5+
- Closes #
96

10-
## Checklist
11-
[] The project builds
12-
[] The project passes lint checks
13-
[] The project passes format checks
14-
[] The project passes unit tests
15-
[] I've manually tested the functionality
7+
## Related Dataverse PRs:
168

17-
## Screenshots
18-
<Screenshots of new functionality if available>
9+
- Depends on #
1910

20-
## Additional information
11+
## Special notes for your reviewer:
2112

13+
## Suggestions on how to test this:
14+
15+
## Is there a release notes update needed for this change?:
16+
17+
## Additional documentation:

.github/workflows/copy_labels.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Copy labels from issue to pull request
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
jobs:
8+
copy-labels:
9+
runs-on: ubuntu-latest
10+
name: Copy labels from linked issues
11+
steps:
12+
- name: copy-labels
13+
uses: michalvankodev/[email protected]
14+
with:
15+
repo-token: ${{ secrets.GITHUB_TOKEN }}
16+
labels-to-exclude: |
17+
Size: 3
18+
Size: 10
19+
Size: 20
20+
Size: 33
21+
Size: 80
22+
Original size: 3
23+
Original size: 10
24+
Original size: 20
25+
Original size: 33
26+
Original size: 80

.github/workflows/deploy_alpha.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: 'deploy_alpha'
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
test-unit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: 19
16+
17+
- name: Install npm dependencies
18+
run: npm ci
19+
20+
- name: Run unit tests
21+
run: npm run test:unit
22+
23+
test-integration:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v3
27+
- uses: actions/setup-node@v3
28+
with:
29+
node-version: 19
30+
31+
- name: Install npm dependencies
32+
run: npm ci
33+
34+
- name: Run integration tests
35+
run: npm run test:integration
36+
37+
test-functional:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v3
41+
- uses: actions/setup-node@v3
42+
with:
43+
node-version: 19
44+
45+
- name: Install npm dependencies
46+
run: npm ci
47+
48+
- name: Run functional tests
49+
run: npm run test:functional
50+
51+
publish-gpr:
52+
needs: [test-unit, test-integration, test-functional]
53+
runs-on: ubuntu-latest
54+
permissions:
55+
packages: write
56+
steps:
57+
- uses: actions/checkout@v3
58+
- uses: actions/setup-node@v3
59+
with:
60+
node-version: 19
61+
registry-url: https://npm.pkg.github.com/
62+
63+
- name: Install npm dependencies
64+
run: npm ci
65+
66+
- name: Build package
67+
run: npm run build
68+
69+
- name: Update package version
70+
env:
71+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
run: |
73+
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
74+
75+
LATEST_VERSION=$(npm show @IQSS/dataverse-client-javascript versions --registry=https://npm.pkg.github.com/ --json | jq -r '.[]' | grep "^2.0.0-alpha." | sort -V | tail -n 1)
76+
77+
if [ -z "$LATEST_VERSION" ]; then
78+
NEW_INCREMENTAL_NUMBER=1
79+
else
80+
CURRENT_INCREMENTAL_NUMBER=$(echo $LATEST_VERSION | sed 's/2.0.0-alpha.//')
81+
NEW_INCREMENTAL_NUMBER=$((CURRENT_INCREMENTAL_NUMBER + 1))
82+
fi
83+
84+
NEW_VERSION="2.0.0-alpha.${NEW_INCREMENTAL_NUMBER}"
85+
86+
echo "Latest version: $LATEST_VERSION"
87+
echo "New version: $NEW_VERSION"
88+
89+
echo "Setting package version to: ${NEW_VERSION}"
90+
npm version "${NEW_VERSION}" --no-git-tag-version
91+
92+
- name: Publish package
93+
run: |
94+
echo "$(jq '.publishConfig.registry = "https://npm.pkg.github.com"' package.json)" > package.json
95+
echo "$( jq '.name = "@IQSS/dataverse-client-javascript"' package.json )" > package.json
96+
npm publish --@IQSS:registry=https://npm.pkg.github.com
97+
env:
98+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)