Skip to content

Commit 830fdbb

Browse files
v9.0.0 [skip-ci] (#1476)
2 parents 7bacecb + f1d73fd commit 830fdbb

File tree

161 files changed

+28121
-8599
lines changed

Some content is hidden

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

161 files changed

+28121
-8599
lines changed

.babelrc

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

.commitlintrc.js

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

.commitlintrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json.schemastore.org/commitlintrc.json",
3+
"extends": ["@commitlint/config-conventional"]
4+
}

.eslintignore

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

.eslintrc.json

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

.github/actions/setup-node/action.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
name: Setup
2-
description: Sets up Node and Build SDK
2+
description: Sets up Node and installs dependencies
33

44
inputs:
55
node-version:
6+
description: 'Specify Node version'
67
required: false
7-
default: '16'
8+
default: '22'
89

910
runs:
1011
using: 'composite'
1112
steps:
1213
- name: Setup Node
13-
uses: actions/setup-node@v3
14+
uses: actions/setup-node@v4
1415
with:
1516
node-version: ${{ inputs.node-version }}
16-
registry-url: https://registry.npmjs.org
1717

18-
- name: Cache Dependencies
19-
uses: actions/cache@v3
18+
- name: Set NODE_VERSION env
19+
shell: bash
20+
run: echo "NODE_VERSION=$(node --version)" >> $GITHUB_ENV
21+
22+
- name: Cache dependencies
23+
uses: actions/cache@v4
2024
with:
2125
path: ./node_modules
22-
key: ${{ runner.os }}-${{ inputs.node-version }}-modules-${{ hashFiles('**/yarn.lock') }}
23-
restore-keys: ${{ runner.os }}-${{ inputs.node-version }}-modules-
26+
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-modules-${{ hashFiles('./yarn.lock') }}
2427

25-
- name: Install Dependencies & Build
26-
run: yarn install --frozen-lockfile --ignore-engines
28+
- name: Install dependencies
29+
run: yarn install --frozen-lockfile
2730
shell: bash

.github/workflows/initiate_release.yml

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

.github/workflows/lint.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,17 @@ on:
33
pull_request:
44
types: [opened, synchronize, reopened, edited]
55

6-
concurrency:
6+
concurrency:
77
group: ${{ github.workflow }}-${{ github.head_ref }}
88
cancel-in-progress: true
99

1010
jobs:
1111
lint:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515

1616
- uses: ./.github/actions/setup-node
1717

18-
- name: Commit message lint
19-
run: echo "${{ github.event.pull_request.title }}" | yarn commitlinter
20-
2118
- name: Lint
2219
run: yarn lint

.github/workflows/pr-check.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Check PR title
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize, reopened]
6+
7+
jobs:
8+
pr-title:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: ./.github/actions/setup-node
14+
15+
- name: commitlint
16+
run: echo "${{ github.event.pull_request.title }}" | npx commitlint --verbose

.github/workflows/release.yml

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,33 @@
11
name: Release
2-
32
on:
4-
pull_request:
5-
types: [closed]
6-
branches:
7-
- master
3+
workflow_dispatch:
4+
inputs:
5+
dry_run:
6+
description: Run package release in "dry run" mode (does not publish)
7+
default: false
8+
type: boolean
89

910
jobs:
10-
Release:
11-
name: 🚀 Release
12-
if: github.event.pull_request.merged && startsWith(github.head_ref, 'release-')
11+
package_release:
12+
name: Release from "${{ github.ref_name }}" branch
1313
runs-on: ubuntu-latest
14+
# GH does not allow to limit branches in the workflow_dispatch settings so this here is a safety measure
15+
if: ${{ inputs.dry_run || github.ref_name == 'rc' || startsWith(github.ref_name, 'release') || startsWith(github.ref_name, 'master') }}
16+
env:
17+
HUSKY: 0
1418
steps:
15-
- uses: actions/checkout@v3
19+
- name: Checkout
20+
uses: actions/checkout@v4
1621
with:
1722
fetch-depth: 0
18-
19-
- uses: actions/github-script@v6
20-
with:
21-
script: |
22-
const get_change_log_diff = require('./scripts/get_changelog_diff.js')
23-
core.exportVariable('CHANGELOG', get_change_log_diff())
24-
25-
// Getting the release version from the PR source branch
26-
// Source branch looks like this: release-1.0.0
27-
const version = context.payload.pull_request.head.ref.split('-')[1]
28-
core.exportVariable('VERSION', version)
2923

3024
- uses: ./.github/actions/setup-node
3125

32-
- name: Publish package
33-
run: npm publish
26+
- name: Release
3427
env:
35-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36-
37-
- name: Create release on GitHub
38-
uses: ncipollo/release-action@v1
39-
with:
40-
body: ${{ env.CHANGELOG }}
41-
tag: ${{ env.VERSION }}
42-
token: ${{ secrets.GITHUB_TOKEN }}
28+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
29+
# https://github.com/stream-ci-bot
30+
GITHUB_TOKEN: ${{ secrets.DOCUSAURUS_GH_TOKEN }}
31+
run: >
32+
yarn semantic-release
33+
${{ inputs.dry_run && '--dry-run' || '' }}

.github/workflows/scheduled_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ on:
44
workflow_dispatch:
55
schedule:
66
# Monday at 9:00 UTC
7-
- cron: "0 9 * * 1"
7+
- cron: '0 9 * * 1'
88

99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414

1515
- uses: ./.github/actions/setup-node
1616

.github/workflows/size.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
name: Compressed Size
1+
name: Compressed size
22

33
on:
44
pull_request:
55
paths-ignore:
66
- 'test/**'
77
- '**.md'
88

9-
concurrency:
9+
concurrency:
1010
group: ${{ github.workflow }}-${{ github.head_ref }}
1111
cancel-in-progress: true
1212

1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818

1919
- uses: preactjs/compressed-size-action@v2
2020
with:

.github/workflows/type.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Type Test
1+
name: Type test
22
on: [pull_request]
33

44
concurrency:

.github/workflows/unit.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Unit Test
1+
name: Unit test
22
on: [pull_request]
33

44
concurrency:
@@ -8,15 +8,10 @@ concurrency:
88
jobs:
99
test:
1010
runs-on: ubuntu-latest
11-
strategy:
12-
matrix:
13-
node: [16, 17, 18]
1411
steps:
15-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1613

1714
- uses: ./.github/actions/setup-node
18-
with:
19-
node-version: ${{ matrix.node }}
2015

21-
- name: Unit tests
16+
- name: Unit tests with Node ${{ env.NODE_VERSION }}
2217
run: yarn run test-coverage

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ typings/
6868
/.idea
6969
.envrc
7070

71-
test/typescript/data.*
71+
test/typescript/data.*

.husky/commit-msg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env sh
2+
3+
npx commitlint --edit $1

0 commit comments

Comments
 (0)