Skip to content

Commit

Permalink
chore: merge pull request #41
Browse files Browse the repository at this point in the history
trigger release
  • Loading branch information
ReidWeb authored Mar 26, 2022
2 parents 6c6f809 + 1099398 commit bb0fd74
Show file tree
Hide file tree
Showing 53 changed files with 13,277 additions and 12,796 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:jsdoc/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
],
parser: '@typescript-eslint/parser',
parserOptions: {
Expand All @@ -47,12 +49,17 @@ module.exports = {
mustMatch: 'MIT License',
},
],
'react/jsx-filename-extension': 'off',
},
overrides: [
{
// Disable doc rules for tests, we declare internal functions as helpers we don't need to doc them
files: ['src/**/*.test.ts'],
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'jsdoc/require-returns': 'off',
'jsdoc/require-param-type': 'off',
'jsdoc/require-param-description': 'off',
},
},
],
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/autoapprove.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Approve PRs with "pr/auto-approve". mergify takes care of the actual merge.

name: auto-approve
on:
pull_request_target:
types: [ labeled, unlabeled, opened, synchronize, reopened, ready_for_review, review_requested ]

jobs:
auto-approve:
uses: xivstats/workflows/.github/workflows/autoapprove.yml@main
22 changes: 0 additions & 22 deletions .github/workflows/automerge.yml

This file was deleted.

48 changes: 3 additions & 45 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,52 +20,10 @@ on:
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
uses: xivstats/workflows/.github/workflows/ts-npm-build.yml@main
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

strategy:
matrix:
node-version: [ 14.x, 16.x]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- run: npm install
- run: npm run test:ci:unit
name: 'Execute unit tests'
- run: npm run test:ci:integration
name: 'Execute integration tests'

- name: Publish test report
uses: dorny/test-reporter@v1
if: github.actor != 'dependabot-bot' && (success() || failure()) # run this step even if previous step failed
with:
name: JEST Tests # Name of the check run which will be created
path: reports/jest-*.xml # Path to test results
reporter: jest-junit # Format of test results

- run: npm run lint
name: Run linter
if: success() || failure() # run this step even if previous step failed

- run: npm run format:check
name: Check formatting
if: success() || failure() # run this step even if previous step failed

- name: Upload
uses: codecov/[email protected]
if: success() || failure() # run this step even if previous step failed
with:
token: ${{ secrets.CODECOV_TOKEN }}

- run: npm run build
name: Execute TypeScript Build



Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
75 changes: 7 additions & 68 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,74 +12,13 @@ on:
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Skip release commits - prevents recursive builds
if: "!contains(github.event.head_commit.message, 'chore(release)')"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'

- run: npm install
- run: npm test
- run: npm run build
- run: npm run lint
uses: xivstats/workflows/.github/workflows/ts-npm-build.yml@main
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

publish:
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run build
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "GitHub Actions"
- run: git rev-parse --abbrev-ref HEAD
- name: Release new version to NPM & GitHub, generate changelog
env:
GH_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_REGISTRY: https://registry.npmjs.org:8443/ # https://github.com/semantic-release/npm/issues/277#issuecomment-723431906
run: npm run release
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@master
- run: git checkout -b release/${{ steps.package-version.outputs.current-version }}
- uses: actions/setup-node@v2
name: Publish new version to GitHub packages
with:
registry-url: 'https://npm.pkg.github.com'
# Defaults to the user or organization that owns the workflow file
scope: '@xivstats'
- run: git add CHANGELOG.md package.json package-lock.json
- run: 'git commit -m "chore(release): ${{ steps.package-version.outputs.current-version }}" -m "[skip ci]"'
- name: Push changes
# Publish to GitHub Packages
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_PUSH_TOKEN }}
branch: 'release/${{ steps.package-version.outputs.current-version }}'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: pull-request
uses: repo-sync/pull-request@v2
with:
source_branch: 'release/${{ steps.package-version.outputs.current-version }}'
destination_branch: main
pr_title: 'chore(release): ${{ steps.package-version.outputs.current-version }}'
pr_body: 'Auto-compile changelog, increment package, then auto-merge changes made for v${{ steps.package-version.outputs.current-version }} into main. [skip ci]'
pr_label: 'pr/auto-approve'
github_token: ${{ secrets.GH_PUSH_TOKEN }}
uses: xivstats/workflows/.github/workflows/ts-npm-release.yml@main
secrets:
GH_PUSH_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
16
33 changes: 27 additions & 6 deletions docs/api/classes/client_LodestoneClient.default.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
# Class: default
# Class: default<IdentifierType, TypeOfInterface, TypeOfParsingConfig, TypeOfValue\>

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

Client for interfacing with the Final Fantasy XIV Lodestone.

## Implements
**`param`**

- `IClientProps`
**`param`**

**`param`**

## Type parameters

| Name | Type |
| :------ | :------ |
| `IdentifierType` | `IdentifierType` |
| `TypeOfInterface` | `TypeOfInterface` |
| `TypeOfParsingConfig` | `TypeOfParsingConfig` |
| `TypeOfValue` | extends `ParsableEntity`<`IdentifierType`, `TypeOfInterface`, `TypeOfParsingConfig`\> |

## Table of contents

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

### constructor

**new default**(`props?`)
`Protected` **new default**<`IdentifierType`, `TypeOfInterface`, `TypeOfParsingConfig`, `TypeOfValue`\>(`factory`, `props?`)

#### Type parameters

| Name | Type |
| :------ | :------ |
| `IdentifierType` | `IdentifierType` |
| `TypeOfInterface` | `TypeOfInterface` |
| `TypeOfParsingConfig` | `TypeOfParsingConfig` |
| `TypeOfValue` | extends `default`<`IdentifierType`, `TypeOfInterface`, `TypeOfParsingConfig`, `TypeOfValue`\> |

#### Parameters

| Name | Type |
| :------ | :------ |
| `props?` | `default` |
| `factory` | `default`<`IdentifierType`, `TypeOfInterface`, `TypeOfParsingConfig`, `TypeOfValue`\> |
| `props?` | `ClientProps`<`IdentifierType`, `TypeOfValue`, `TypeOfParsingConfig`\> |

#### Defined in

[client/LodestoneClient.ts:50](https://github.com/XIVStats/lodestone/blob/2e97830/src/client/LodestoneClient.ts#L50)
[client/LodestoneClient.ts:93](https://github.com/XIVStats/lodestone/blob/3c76f1a/src/client/LodestoneClient.ts#L93)
4 changes: 2 additions & 2 deletions docs/api/modules/locale.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

### OptionalPerLanguageMapping

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

Supported languages for localized text.

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

#### Defined in

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

0 comments on commit bb0fd74

Please sign in to comment.