Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: migrate to TSC, TS 5 and NodeNext (#126)
* feat: migrate to TSC, TS 5 and NodeNext * chore: changeset * chore: change action * chore: change build order * chore: change type test command * chore: change ci * chore: change linter * chore: revert change * chore: undo revert change * refactor(build, ci): setup * chore: enable exactOptionalPropertyTypes and noUncheckedIndexedAccess & fix test * revert test * ci: update verify * ci: pr * ci: remove duplicate cache code * ci: add codecov * chore: remove twoslash patch * chore: update changeset * ci: snapshot action * chore: debug size * chore: rename --------- Co-authored-by: Tom Meagher <tom@meagher.co>
- Loading branch information
1 parent
56228df
commit 7ccc347
Showing
107 changed files
with
1,433 additions
and
2,156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"abitype": patch | ||
--- | ||
|
||
Switched from `tsup` to `tsc`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: "Install dependencies" | ||
description: "Prepare repository and all dependencies" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: pnpm | ||
node-version: 18 | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: pnpm install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Pull request | ||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize, ready_for_review] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
verify: | ||
name: Verify | ||
uses: ./.github/workflows/verify.yml | ||
secrets: inherit | ||
|
||
bench: | ||
name: Benchmark | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
uses: ./.github/actions/install-dependencies | ||
|
||
- name: Bench | ||
run: pnpm bench | ||
|
||
size: | ||
name: Size | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
uses: ./.github/actions/install-dependencies | ||
|
||
- name: Report build size | ||
uses: preactjs/compressed-size-action@v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Main | ||
on: | ||
push: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
verify: | ||
name: Verify | ||
uses: ./.github/workflows/verify.yml | ||
secrets: inherit | ||
|
||
snapshot: | ||
name: Snapshot | ||
needs: verify | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
uses: ./.github/actions/install-dependencies | ||
|
||
- name: Publish snapshots | ||
uses: seek-oss/changesets-snapshot@v0 | ||
with: | ||
pre-publish: pnpm build | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
changesets: | ||
name: Changesets | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
with: | ||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | ||
fetch-depth: 0 | ||
|
||
- name: Install dependencies | ||
uses: ./.github/actions/install-dependencies | ||
|
||
- name: Create Release Pull Request or Publish to npm | ||
uses: changesets/action@v1 | ||
with: | ||
title: 'chore: version packages' | ||
commit: 'chore: version packages' | ||
publish: pnpm changeset:release | ||
version: pnpm changeset:version | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.