-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1225 from DarkGL/bun-support
Bun support and linting configuration refactor
- Loading branch information
Showing
27 changed files
with
548 additions
and
136 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
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 |
---|---|---|
@@ -1,9 +1,32 @@ | ||
{ | ||
"extends": "./node_modules/gts/", | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"project": "./tsconfig.json", | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"node/no-unpublished-import": "off" | ||
"node/no-unpublished-import": "off", | ||
"@typescript-eslint/consistent-type-imports": [ | ||
"error", | ||
{ | ||
"prefer": "type-imports", | ||
"fixStyle": "separate-type-imports" | ||
} | ||
], | ||
"@typescript-eslint/consistent-type-exports": "error", | ||
"@typescript-eslint/no-import-type-side-effects": "error" | ||
}, | ||
"env": { | ||
"jest": true | ||
} | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["docs/**/*.tsx"], | ||
"parserOptions": { | ||
"project": "./tsconfig.docs.json" | ||
} | ||
} | ||
] | ||
} |
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 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 |
---|---|---|
|
@@ -13,6 +13,7 @@ on: | |
- "*.ts" | ||
- package.json | ||
- package-lock.json | ||
- bun.lockb | ||
|
||
jobs: | ||
build: | ||
|
@@ -67,8 +68,8 @@ jobs: | |
- name: npm test | ||
run: npm t | ||
|
||
- name: generate benchmarks | ||
run: ./start.sh | ||
- name: generate benchmarks with node | ||
run: ./start.sh NODE | ||
|
||
## FIX: https://github.com/github-actions-x/commit/issues/16 | ||
- name: Expose git commit data | ||
|
@@ -85,3 +86,52 @@ jobs: | |
rebase: 'true' | ||
name: ${{ env.GIT_COMMIT_AUTHOR_NAME }} ## FIX: https://github.com/github-actions-x/commit/issues/16 | ||
email: ${{ env.GIT_COMMIT_AUTHOR_EMAIL }} ## FIX: https://github.com/github-actions-x/commit/issues/16 | ||
build-bun: | ||
name: "Bun ${{ matrix.bun-version }}" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
max-parallel: 1 | ||
matrix: | ||
bun-version: | ||
- 1.1.27 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Bun ${{ matrix.bun-version }} | ||
uses: oven-sh/setup-bun@v2 | ||
with: | ||
bun-version: ${{ matrix.bun-version }} | ||
|
||
- name: Install | ||
run: bun install | ||
|
||
- name: Lint | ||
run: bun run lint | ||
|
||
- name: Test build | ||
run: bun run test:build | ||
|
||
- name: Test | ||
run: bun run test | ||
|
||
- name: generate benchmarks with bun | ||
run: ./start.sh BUN | ||
|
||
## FIX: https://github.com/github-actions-x/commit/issues/16 | ||
- name: Expose git commit data | ||
uses: rlespinasse/git-commit-data-action@v1 ## https://github.com/rlespinasse/git-commit-data-action | ||
|
||
- name: push | ||
uses: github-actions-x/[email protected] | ||
## prevents forked repos from comitting results in PRs | ||
if: github.repository == 'moltar/typescript-runtime-type-benchmarks' | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
push-branch: master | ||
commit-message: 'feat: ${{ matrix.bun-version }} adds auto-generated benchmarks and bar graph' | ||
rebase: 'true' | ||
name: ${{ env.GIT_COMMIT_AUTHOR_NAME }} ## FIX: https://github.com/github-actions-x/commit/issues/16 | ||
email: ${{ env.GIT_COMMIT_AUTHOR_EMAIL }} ## FIX: https://github.com/github-actions-x/commit/issues/16 |
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 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 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 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 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 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
Oops, something went wrong.