Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps-dev): Bump typescript from 5.5.4 to 5.6.2 #326

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .dprint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
"**/*config.*.timestamp*",
"**/.temp/",
"**/.vercel/",
"**/.vitest-reports/",
"**/__fixtures__/git/**/*.txt",
"**/__tests__/benchmark.json",
"**/__tests__/report.json",
"**/__tests__/typecheck.json",
"**/__tests__/reports/",
"**/coverage/",
"**/dist/",
"**/node_modules",
Expand Down
10 changes: 0 additions & 10 deletions .github/infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ branches:
- context: auto-review
- context: build
- context: changelog
- context: codecov/changes
app_id: 254
- context: codecov/patch
app_id: 254
- context: codecov/project
app_id: 254
- context: codecov/project/internal
app_id: 254
- context: codecov/project/lib
app_id: 254
- context: commitlint
- context: dependabot-dedupe
- context: format
Expand Down
33 changes: 30 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ env:
HUSKY: 0
REF: ${{ github.head_ref || github.ref }}
REF_NAME: ${{ github.head_ref || github.ref_name }}
SHA: ${{ github.event.pull_request.head.sha || github.sha }}
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -299,6 +298,11 @@ jobs:
matrix:
node-version:
- 22
env:
COVERAGE_SUMMARY: ./coverage/coverage-summary.json
PCT: .total.branches.pct + .total.functions.pct + .total.lines.pct + .total.statements.pct
SHA: ${{ github.event.pull_request.head.sha || github.sha }}
VITEST_REPORT: ./.vitest-reports/blob.json
steps:
- id: checkout
name: Checkout ${{ env.REF_NAME }}
Expand Down Expand Up @@ -330,10 +334,27 @@ jobs:
- id: test
if: steps.test-files-check.outputs.files_exists == 'true'
name: Run tests
run: yarn test:cov
run: |
yarn test:cov --coverage.thresholds.100=false \
&& echo "coverage=$(jq '${{ env.PCT }}' ${{ env.COVERAGE_SUMMARY }} -r)" >>$GITHUB_OUTPUT
- id: report
if: steps.test-files-check.outputs.files_exists == 'true'
name: Upload report
uses: actions/[email protected]
with:
name: ${{ format('vitest-report-{0}-{1}.json', github.event.repository.name, env.SHA) }}
path: ${{ env.VITEST_REPORT }}
- id: coverage-summary
if: steps.test-files-check.outputs.files_exists == 'true'
name: Upload coverage summary
uses: actions/[email protected]
with:
name: |
${{ format('coverage-summary-{0}-{1}.json', github.event.repository.name, env.SHA) }}
path: ${{ env.COVERAGE_SUMMARY }}
- id: codecov
name: Upload coverage report to Codecov
if: steps.test-files-check.outputs.files_exists == 'true'
name: Upload coverage report to Codecov
uses: codecov/[email protected]
env:
GITHUB_JOB: ${{ github.job }}
Expand All @@ -352,6 +373,12 @@ jobs:
override_commit: ${{ env.SHA }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
- id: coverage-failure
if: |
steps.test-files-check.outputs.files_exists == 'true'
&& ${{ toJson(steps.test.outputs.coverage) }} != 100
name: Coverage threshold failure (${{ steps.test.outputs.coverage }})
run: yarn test:cov:reports
build:
needs:
- commitlint
Expand Down
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ yarn-error.log*
# Testing
# ------------------------------------------------------------------------------
**/*config.*.timestamp*
**/__tests__/benchmark.json
**/__tests__/report.*
**/__tests__/typecheck.json
**/__tests__/reports/*
**/coverage/
**/tsconfig*temp.json
*.lcov
.vitest-reports/
codecov

# ESLint
Expand Down
4 changes: 2 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ export default [
'!**/__fixtures__/**/node_modules/',
'!**/typings/**/dist/',
'**/*config.*.timestamp*',
'**/.vitest-reports/',
'**/.yarn/',
'**/CHANGELOG.md',
'**/LICENSE.md',
'**/RELEASE_NOTES.md',
'**/__tests__/benchmark.json',
'**/__tests__/report.*',
'**/__tests__/reports/',
'**/coverage/',
'**/dist/',
'**/tsconfig*temp.json'
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,9 @@
"check:types:build": "tsc -p tsconfig.build.json",
"check:upgrades": "yarn upgrade-interactive",
"clean:build": "trash ./{dist,*.tgz}",
"clean:coverage": "trash ./coverage",
"clean:modules": "trash ./.yarn/{cache,*.gz} ./node_modules",
"clean:pack": "trash ./*.tgz",
"clean:test": "yarn clean:coverage && trash ./__tests__/report.json",
"clean:test": "trash ./coverage && trash __tests__/reports",
"codecov": "yarn test:cov && yarn test:cov:upload",
"codecov:validate": "cat .codecov.yml | curl --data-binary @- https://codecov.io/validate",
"commitlint": "commitlint -V",
Expand All @@ -115,9 +114,11 @@
"remark": "remark .",
"test": "vitest run",
"test:bench": "vitest bench --run",
"test:cov": "yarn clean:coverage; yarn test --coverage",
"test:cov": "yarn test --coverage",
"test:cov:reports": "yarn test:cov --merge-reports --mode=reports",
"test:cov:serve": "vite preview --outDir ./coverage",
"test:cov:upload": "./codecov -t $CODECOV_TOKEN -f ./coverage/lcov.info",
"test:reports": "yarn test --merge-reports --mode=reports",
"test:watch": "vitest",
"typecheck": "vitest run --typecheck --mode=typecheck",
"typecheck:watch": "vitest --typecheck --mode=typecheck"
Expand Down Expand Up @@ -255,7 +256,7 @@
"tinyrainbow": "1.2.0",
"trash-cli": "6.0.0",
"ts-dedent": "2.2.0",
"typescript": "5.5.4",
"typescript": "5.6.2",
"typescript-eslint": "8.6.1-alpha.5",
"unified": "11.0.5",
"vfile": "6.0.3",
Expand Down
20 changes: 12 additions & 8 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* @see https://vitest.dev/config/
*/

import { ifelse, includes, sift } from '@flex-development/tutils'
import ci from 'is-ci'
import path from 'node:path'
import tsconfigPaths from 'vite-tsconfig-paths'
Expand Down Expand Up @@ -77,9 +76,13 @@ const config: UserConfigExport = defineConfig((env: ConfigEnv): UserConfig => {
extension: ['.ts'],
include: ['src'],
provider: 'v8',
reporter: [ci ? 'lcovonly' : 'html', 'text'],
reportOnFailure: !ci,
reporter: env.mode === 'reports'
? ['text']
: [ci ? 'lcovonly' : 'html', 'json-summary', 'text'],
reportsDirectory: './coverage',
skipFull: false
skipFull: false,
thresholds: { 100: true, perFile: true }
},
environment: 'node',
environmentOptions: {},
Expand All @@ -95,16 +98,17 @@ const config: UserConfigExport = defineConfig((env: ConfigEnv): UserConfig => {
globals: true,
hookTimeout: 10 * 1000,
include: [
`**/__tests__/*.${ifelse(LINT_STAGED, '{spec,spec-d}', 'spec')}.ts?(x)`
`**/__tests__/*.${LINT_STAGED ? '{spec,spec-d}' : 'spec'}.ts?(x)`
],
mockReset: true,
outputFile: {
json: includes(['benchmark', 'typecheck'], env.mode)
? path.join('__tests__', env.mode + '.json')
: '__tests__/report.json'
blob: '.vitest-reports/blob.json',
json: path.join('__tests__', 'reports', env.mode + '.json')
},
passWithNoTests: true,
reporters: sift([ifelse(ci, null, new Notifier()), 'json', 'verbose']),
reporters: env.mode === 'reports'
? ['verbose']
: [ci ? 'github-actions' : new Notifier(), 'blob', 'json', 'verbose'],
/**
* Stores snapshots next to `file`'s directory.
*
Expand Down
30 changes: 15 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1866,7 +1866,7 @@ __metadata:
tinyrainbow: "npm:1.2.0"
trash-cli: "npm:6.0.0"
ts-dedent: "npm:2.2.0"
typescript: "npm:5.5.4"
typescript: "npm:5.6.2"
typescript-eslint: "npm:8.6.1-alpha.5"
unified: "npm:11.0.5"
vfile: "npm:6.0.3"
Expand Down Expand Up @@ -11278,16 +11278,6 @@ __metadata:
languageName: node
linkType: hard

"typescript@npm:5.5.4":
version: 5.5.4
resolution: "typescript@npm:5.5.4"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10/1689ccafef894825481fc3d856b4834ba3cc185a9c2878f3c76a9a1ef81af04194849840f3c69e7961e2312771471bb3b460ca92561e1d87599b26c37d0ffb6f
languageName: node
linkType: hard

"typescript@npm:5.6.1-rc":
version: 5.6.1-rc
resolution: "typescript@npm:5.6.1-rc"
Expand All @@ -11298,13 +11288,13 @@ __metadata:
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A5.5.4#optional!builtin<compat/typescript>":
version: 5.5.4
resolution: "typescript@patch:typescript@npm%3A5.5.4#optional!builtin<compat/typescript>::version=5.5.4&hash=379a07"
"typescript@npm:5.6.2":
version: 5.6.2
resolution: "typescript@npm:5.6.2"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10/746fdd0865c5ce4f15e494c57ede03a9e12ede59cfdb40da3a281807853fe63b00ef1c912d7222143499aa82f18b8b472baa1830df8804746d09b55f6cf5b1cc
checksum: 10/f95365d4898f357823e93d334ecda9fcade54f009b397c7d05b7621cd9e865981033cf89ccde0f3e3a7b73b1fdbae18e92bc77db237b43e912f053fef0f9a53b
languageName: node
linkType: hard

Expand All @@ -11318,6 +11308,16 @@ __metadata:
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A5.6.2#optional!builtin<compat/typescript>":
version: 5.6.2
resolution: "typescript@patch:typescript@npm%3A5.6.2#optional!builtin<compat/typescript>::version=5.6.2&hash=8c6c40"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10/8bfc7ca0d9feca4c3fcbd6c70741abfcd714197d6448e68225ae71e462447d904d3bfba49759a8fbe4956d87f054e2d346833c8349c222daa594a2626d4e1be8
languageName: node
linkType: hard

"uid@npm:2.0.2":
version: 2.0.2
resolution: "uid@npm:2.0.2"
Expand Down
Loading