Skip to content

Commit bb0fd74

Browse files
authored
chore: merge pull request #41
trigger release
2 parents 6c6f809 + 1099398 commit bb0fd74

Some content is hidden

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

53 files changed

+13277
-12796
lines changed

.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ module.exports = {
3232
'plugin:@typescript-eslint/recommended',
3333
'plugin:@typescript-eslint/recommended-requiring-type-checking',
3434
'plugin:jsdoc/recommended',
35+
'plugin:import/recommended',
36+
'plugin:import/typescript',
3537
],
3638
parser: '@typescript-eslint/parser',
3739
parserOptions: {
@@ -47,12 +49,17 @@ module.exports = {
4749
mustMatch: 'MIT License',
4850
},
4951
],
52+
'react/jsx-filename-extension': 'off',
5053
},
5154
overrides: [
5255
{
56+
// Disable doc rules for tests, we declare internal functions as helpers we don't need to doc them
5357
files: ['src/**/*.test.ts'],
5458
rules: {
5559
'@typescript-eslint/ban-ts-comment': 'off',
60+
'jsdoc/require-returns': 'off',
61+
'jsdoc/require-param-type': 'off',
62+
'jsdoc/require-param-description': 'off',
5663
},
5764
},
5865
],

.github/workflows/autoapprove.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Approve PRs with "pr/auto-approve". mergify takes care of the actual merge.
2+
3+
name: auto-approve
4+
on:
5+
pull_request_target:
6+
types: [ labeled, unlabeled, opened, synchronize, reopened, ready_for_review, review_requested ]
7+
8+
jobs:
9+
auto-approve:
10+
uses: xivstats/workflows/.github/workflows/autoapprove.yml@main

.github/workflows/automerge.yml

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

.github/workflows/build.yml

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -20,52 +20,10 @@ on:
2020
jobs:
2121
# This workflow contains a single job called "build"
2222
build:
23-
# The type of runner that the job will run on
24-
runs-on: ubuntu-latest
23+
uses: xivstats/workflows/.github/workflows/ts-npm-build.yml@main
24+
secrets:
25+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2526

26-
strategy:
27-
matrix:
28-
node-version: [ 14.x, 16.x]
29-
30-
# Steps represent a sequence of tasks that will be executed as part of the job
31-
steps:
32-
- uses: actions/checkout@v2
33-
- name: Set up Node.js ${{ matrix.node-version }}
34-
uses: actions/setup-node@v2
35-
with:
36-
node-version: ${{ matrix.node-version }}
37-
cache: 'npm'
38-
39-
- run: npm install
40-
- run: npm run test:ci:unit
41-
name: 'Execute unit tests'
42-
- run: npm run test:ci:integration
43-
name: 'Execute integration tests'
44-
45-
- name: Publish test report
46-
uses: dorny/test-reporter@v1
47-
if: github.actor != 'dependabot-bot' && (success() || failure()) # run this step even if previous step failed
48-
with:
49-
name: JEST Tests # Name of the check run which will be created
50-
path: reports/jest-*.xml # Path to test results
51-
reporter: jest-junit # Format of test results
52-
53-
- run: npm run lint
54-
name: Run linter
55-
if: success() || failure() # run this step even if previous step failed
56-
57-
- run: npm run format:check
58-
name: Check formatting
59-
if: success() || failure() # run this step even if previous step failed
60-
61-
- name: Upload
62-
uses: codecov/codecov-action@v2.1.0
63-
if: success() || failure() # run this step even if previous step failed
64-
with:
65-
token: ${{ secrets.CODECOV_TOKEN }}
66-
67-
- run: npm run build
68-
name: Execute TypeScript Build
6927

7028

7129

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
steps:
4141
- name: Checkout repository
42-
uses: actions/checkout@v2
42+
uses: actions/checkout@v3
4343

4444
# Initializes the CodeQL tools for scanning.
4545
- name: Initialize CodeQL

.github/workflows/release.yml

Lines changed: 7 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -12,74 +12,13 @@ on:
1212
jobs:
1313
# This workflow contains a single job called "build"
1414
build:
15-
# The type of runner that the job will run on
16-
runs-on: ubuntu-latest
17-
18-
# Skip release commits - prevents recursive builds
19-
if: "!contains(github.event.head_commit.message, 'chore(release)')"
20-
21-
# Steps represent a sequence of tasks that will be executed as part of the job
22-
steps:
23-
- uses: actions/checkout@v2
24-
- uses: actions/setup-node@v2
25-
with:
26-
node-version: '16'
27-
cache: 'npm'
28-
29-
- run: npm install
30-
- run: npm test
31-
- run: npm run build
32-
- run: npm run lint
15+
uses: xivstats/workflows/.github/workflows/ts-npm-build.yml@main
16+
secrets:
17+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3318

3419
publish:
3520
needs: build
36-
runs-on: ubuntu-latest
37-
38-
steps:
39-
- uses: actions/checkout@v2
40-
- uses: actions/setup-node@v2
41-
with:
42-
node-version: '16'
43-
cache: 'npm'
44-
registry-url: 'https://registry.npmjs.org'
45-
- run: npm install
46-
- run: npm run build
47-
- run: git config --global user.email "automation@reidweb.com"
48-
- run: git config --global user.name "GitHub Actions"
49-
- run: git rev-parse --abbrev-ref HEAD
50-
- name: Release new version to NPM & GitHub, generate changelog
51-
env:
52-
GH_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
53-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
54-
NPM_CONFIG_REGISTRY: https://registry.npmjs.org:8443/ # https://github.com/semantic-release/npm/issues/277#issuecomment-723431906
55-
run: npm run release
56-
- name: get-npm-version
57-
id: package-version
58-
uses: martinbeentjes/npm-get-version-action@master
59-
- run: git checkout -b release/${{ steps.package-version.outputs.current-version }}
60-
- uses: actions/setup-node@v2
61-
name: Publish new version to GitHub packages
62-
with:
63-
registry-url: 'https://npm.pkg.github.com'
64-
# Defaults to the user or organization that owns the workflow file
65-
scope: '@xivstats'
66-
- run: git add CHANGELOG.md package.json package-lock.json
67-
- run: 'git commit -m "chore(release): ${{ steps.package-version.outputs.current-version }}" -m "[skip ci]"'
68-
- name: Push changes
69-
# Publish to GitHub Packages
70-
uses: ad-m/github-push-action@master
71-
with:
72-
github_token: ${{ secrets.GH_PUSH_TOKEN }}
73-
branch: 'release/${{ steps.package-version.outputs.current-version }}'
74-
- run: npm publish
75-
env:
76-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77-
- name: pull-request
78-
uses: repo-sync/pull-request@v2
79-
with:
80-
source_branch: 'release/${{ steps.package-version.outputs.current-version }}'
81-
destination_branch: main
82-
pr_title: 'chore(release): ${{ steps.package-version.outputs.current-version }}'
83-
pr_body: 'Auto-compile changelog, increment package, then auto-merge changes made for v${{ steps.package-version.outputs.current-version }} into main. [skip ci]'
84-
pr_label: 'pr/auto-approve'
85-
github_token: ${{ secrets.GH_PUSH_TOKEN }}
21+
uses: xivstats/workflows/.github/workflows/ts-npm-release.yml@main
22+
secrets:
23+
GH_PUSH_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
24+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14
1+
16
Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
1-
# Class: default
1+
# Class: default<IdentifierType, TypeOfInterface, TypeOfParsingConfig, TypeOfValue\>
22

33
[client/LodestoneClient](../modules/client_LodestoneClient.md).default
44

55
Client for interfacing with the Final Fantasy XIV Lodestone.
66

7-
## Implements
7+
**`param`**
88

9-
- `IClientProps`
9+
**`param`**
10+
11+
**`param`**
12+
13+
## Type parameters
14+
15+
| Name | Type |
16+
| :------ | :------ |
17+
| `IdentifierType` | `IdentifierType` |
18+
| `TypeOfInterface` | `TypeOfInterface` |
19+
| `TypeOfParsingConfig` | `TypeOfParsingConfig` |
20+
| `TypeOfValue` | extends `ParsableEntity`<`IdentifierType`, `TypeOfInterface`, `TypeOfParsingConfig`\> |
1021

1122
## Table of contents
1223

@@ -18,14 +29,24 @@ Client for interfacing with the Final Fantasy XIV Lodestone.
1829

1930
### constructor
2031

21-
**new default**(`props?`)
32+
`Protected` **new default**<`IdentifierType`, `TypeOfInterface`, `TypeOfParsingConfig`, `TypeOfValue`\>(`factory`, `props?`)
33+
34+
#### Type parameters
35+
36+
| Name | Type |
37+
| :------ | :------ |
38+
| `IdentifierType` | `IdentifierType` |
39+
| `TypeOfInterface` | `TypeOfInterface` |
40+
| `TypeOfParsingConfig` | `TypeOfParsingConfig` |
41+
| `TypeOfValue` | extends `default`<`IdentifierType`, `TypeOfInterface`, `TypeOfParsingConfig`, `TypeOfValue`\> |
2242

2343
#### Parameters
2444

2545
| Name | Type |
2646
| :------ | :------ |
27-
| `props?` | `default` |
47+
| `factory` | `default`<`IdentifierType`, `TypeOfInterface`, `TypeOfParsingConfig`, `TypeOfValue`\> |
48+
| `props?` | `ClientProps`<`IdentifierType`, `TypeOfValue`, `TypeOfParsingConfig`\> |
2849

2950
#### Defined in
3051

31-
[client/LodestoneClient.ts:50](https://github.com/XIVStats/lodestone/blob/2e97830/src/client/LodestoneClient.ts#L50)
52+
[client/LodestoneClient.ts:93](https://github.com/XIVStats/lodestone/blob/3c76f1a/src/client/LodestoneClient.ts#L93)

docs/api/modules/locale.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
### OptionalPerLanguageMapping
1212

13-
Ƭ **OptionalPerLanguageMapping**<`Type`\>: { [key in Language]?: Type}
13+
Ƭ **OptionalPerLanguageMapping**<`Type`\>: { [key in Language]?: Type }
1414

1515
Supported languages for localized text.
1616

@@ -28,4 +28,4 @@ Square Enix labelling - eu=en, na=enUs, de=de, fr=fr, jp=ja
2828

2929
#### Defined in
3030

31-
[locale/type/OptionalPerLanguageMapping.ts:37](https://github.com/XIVStats/lodestone/blob/2e97830/src/locale/type/OptionalPerLanguageMapping.ts#L37)
31+
[locale/type/OptionalPerLanguageMapping.ts:37](https://github.com/XIVStats/lodestone/blob/3c76f1a/src/locale/type/OptionalPerLanguageMapping.ts#L37)

0 commit comments

Comments
 (0)