Skip to content

Commit 688bca7

Browse files
committed
feat: typescript 5
1 parent d69eac1 commit 688bca7

36 files changed

+4148
-18047
lines changed

.editorconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#root = true
2-
31
[*]
42
indent_style = space
53
end_of_line = lf
@@ -8,6 +6,7 @@ trim_trailing_whitespace = true
86
insert_final_newline = true
97
max_line_length = 80
108
indent_size = 2
9+
quote_type = single
1110

1211
[*.md]
1312
trim_trailing_whitespace = false

.eslintrc.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{
2-
"plugins": ["@typescript-eslint", "no-null"],
32
"parserOptions": {
43
"warnOnUnsupportedTypeScriptVersion": false,
54
"project": "./tsconfig.json"
65
},
76
"extends": ["escapace"],
87
"rules": {
9-
"@typescript-eslint/no-explicit-any": 0
8+
"@typescript-eslint/no-explicit-any": 0,
9+
"@typescript-eslint/no-unsafe-assignment": 0,
10+
"@typescript-eslint/no-unsafe-argument": 0,
11+
"@typescript-eslint/no-unsafe-member-access": 0,
12+
"@typescript-eslint/no-unsafe-return": 0,
13+
"@typescript-eslint/method-signature-style": 0
1014
}
1115
}

codecov.yml renamed to .github/codecov.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ coverage:
1010
changes: false
1111

1212
comment:
13-
layout: "header, diff, tree"
14-
behavior: default # update if exists else create new
13+
layout: 'header, diff, tree'
14+
behavior: default # update if exists else create new
1515

1616
ignore:
17-
- "./coverage/tmp/"
18-
17+
- './coverage/tmp/'

.github/dependabot.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'github-actions'
4+
directory: '/'
5+
schedule:
6+
interval: weekly
7+
day: saturday
8+
time: '07:00'
9+
timezone: GMT
10+
labels:
11+
- 'dependencies'
12+
- 'github-actions'

.github/dependabot.yml

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

.github/labeler.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
github-actions:
2+
- .github/workflows/*.yml
3+
4+
test:
5+
- src/**/*.spec.ts

.github/renovate.json5

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
enabledManagers: ['npm'],
3+
extends: [
4+
'github>whitesource/merge-confidence:beta',
5+
'github>renovatebot/spring-remediations',
6+
'config:base',
7+
'schedule:weekly',
8+
':enableVulnerabilityAlerts',
9+
':rebaseStalePrs',
10+
':semanticCommits',
11+
':updateNotScheduled',
12+
'group:allNonMajor'
13+
],
14+
automerge: false,
15+
stabilityDays: 7,
16+
packageRules: [
17+
{
18+
matchDepTypes: ['devDependencies'],
19+
rangeStrategy: 'pin',
20+
semanticCommitType: 'chore'
21+
},
22+
{
23+
matchDepTypes: ['dependencies'],
24+
rangeStrategy: 'bump',
25+
semanticCommitType: 'fix'
26+
},
27+
{
28+
matchDepTypes: ['peerDependencies'],
29+
rangeStrategy: 'widen',
30+
semanticCommitType: 'fix'
31+
}
32+
],
33+
vulnerabilityAlerts: {
34+
stabilityDays: 0
35+
},
36+
lockFileMaintenance: {
37+
enabled: true
38+
},
39+
internalChecksFilter: 'strict',
40+
dependencyDashboard: true,
41+
ignorePresets: [':prHourlyLimit2'],
42+
labels: ['dependencies'],
43+
node: {
44+
enabled: false
45+
},
46+
prCreation: 'immediate',
47+
rebaseWhen: 'conflicted'
48+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: 'Dependency Review'
2+
on: [pull_request]
3+
permissions:
4+
contents: read
5+
jobs:
6+
dependency-review:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: checkout
10+
uses: actions/checkout@v3
11+
- name: dependency review
12+
uses: actions/dependency-review-action@v3
13+
with:
14+
# Possible values: "critical", "high", "moderate", "low"
15+
fail-on-severity: high
16+
#
17+
# You can only include one of these two options: `allow-licenses` and `deny-licences`
18+
#
19+
# Possible values: Any `spdx_id` value(s) from https://docs.github.com/en/rest/licenses
20+
# allow-licenses: GPL-3.0, BSD-3-Clause, MIT
21+
#
22+
# Possible values: Any `spdx_id` value(s) from https://docs.github.com/en/rest/licenses
23+
deny-licenses: GPL-3.0, AGPL-3.0

.github/workflows/labeler.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
on:
2+
- pull_request_target
3+
4+
jobs:
5+
triage:
6+
permissions:
7+
contents: read
8+
pull-requests: write
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/labeler@v4
12+
with:
13+
repo-token: '${{ secrets.GITHUB_TOKEN }}'
14+
configuration-path: '.github/labeler.yaml'
15+
sync-labels: true

.github/workflows/release.yaml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
branches:
8+
- trunk
9+
paths-ignore:
10+
- README.md
11+
- LICENSE
12+
pull_request:
13+
branches:
14+
- trunk
15+
paths-ignore:
16+
- README.md
17+
- LICENSE
18+
19+
jobs:
20+
context:
21+
uses: ./.github/workflows/workflow-call-context.yaml
22+
release:
23+
needs:
24+
- context
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: checkout
28+
uses: actions/checkout@v3
29+
with:
30+
ref: ${{ needs.context.outputs.ref }}
31+
fetch-depth: 0
32+
- name: setup node
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: ${{ needs.context.outputs.node-version }}
36+
- name: install pnpm
37+
uses: pnpm/action-setup@v2.2.4
38+
with:
39+
version: ${{ needs.context.outputs.pnpm-version }}
40+
run_install: false
41+
- name: get pnpm store directory
42+
id: pnpm-store-path
43+
run: echo "value=$(pnpm store path)" >> $GITHUB_OUTPUT
44+
- name: pnpm cache
45+
uses: actions/cache@v3
46+
with:
47+
path: ${{ steps.pnpm-store-path.outputs.value }}
48+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
49+
restore-keys: |
50+
${{ runner.os }}-pnpm-store
51+
- name: install dependencies
52+
run: pnpm install
53+
- name: typecheck
54+
run: pnpm run typecheck
55+
- name: test
56+
run: pnpm run test
57+
- name: code coverage
58+
uses: codecov/codecov-action@v3.1.1
59+
- name: build
60+
run: pnpm run build
61+
- name: write .npmrc
62+
if: needs.context.outputs.environment == 'production'
63+
run: |
64+
cat << EOF > "$HOME/.npmrc"
65+
//registry.npmjs.org/:_authToken=$NPM_TOKEN
66+
EOF
67+
env:
68+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
69+
- name: pnpm release
70+
if: needs.context.outputs.environment == 'production'
71+
run: |
72+
pnpm run release -- ${{ needs.context.outputs.version }}
73+
- name: github release
74+
if: needs.context.outputs.environment == 'production'
75+
run: |
76+
pnpm exec changelogithub
77+
# gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --generate-notes
78+
env:
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)