Skip to content

Commit 45f6416

Browse files
committed
chore: refactor project architecture
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
1 parent c239865 commit 45f6416

File tree

162 files changed

+1514
-1587
lines changed

Some content is hidden

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

162 files changed

+1514
-1587
lines changed

.codecov.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@
44
---
55
codecov:
66
notify:
7-
after_n_builds: 3
7+
after_n_builds: 2
88
wait_for_ci: true
99
require_ci_to_pass: true
1010

1111
comment:
12-
after_n_builds: 3
12+
after_n_builds: 2
1313
behavior: default
14-
layout: header,diff,files,components,footer
14+
layout: header,diff,flags,files,components,tree,footer
1515
require_base: false
1616
require_changes: false
1717
require_head: true
18+
show_carryforward_flags: true
1819
show_critical_paths: true
1920

2021
component_management:
@@ -26,11 +27,11 @@ component_management:
2627
- component_id: internal
2728
name: internal
2829
paths:
29-
- src/internal/*.ts
30+
- src/internal/*.mts
3031
- component_id: lib
3132
name: lib
3233
paths:
33-
- src/lib/*.ts
34+
- src/lib/*.mts
3435

3536
coverage:
3637
precision: 2
@@ -79,6 +80,10 @@ coverage:
7980
threshold: 0%
8081

8182
flags:
83+
node23:
84+
carryforward: false
85+
paths:
86+
- src/
8287
node22:
8388
carryforward: false
8489
paths:
@@ -88,14 +93,15 @@ github_checks:
8893
annotations: true
8994

9095
ignore:
96+
- '**/*.d.mts'
9197
- '**/__mocks__/**'
9298
- '**/__tests__/**'
93-
- '**/index.ts'
94-
- '!src/index.ts'
95-
- src/interfaces/
96-
- src/internal/*.browser.ts
97-
- src/types/
99+
- '**/index.mts'
100+
- '**/interfaces/**'
101+
- '**/types/**'
102+
- '!src/index.mts'
103+
- src/internal/*.browser.mts
98104

99105
profiling:
100106
critical_files_paths:
101-
- src/lib/*.ts
107+
- src/lib/*.mts

.cspell.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"failFast": false,
1414
"flagWords": [],
1515
"ignorePaths": [
16-
"!scratch.*",
1716
"**/*.patch",
1817
"**/*.snap",
1918
"**/*.wasm",

.dictionary.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
abar
22
attw
33
barx
4-
cbar
54
cefc
65
codecov
76
commitlintrc
@@ -20,11 +19,10 @@ ggshield
2019
gpgsign
2120
hmarr
2221
iife
23-
infile
2422
jchen
2523
kaisugi
24+
ksort
2625
lcov
27-
lintstagedrc
2826
mkbuild
2927
mlly
3028
nocheck

.dprint.jsonc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515
"exec": {
1616
"commands": [
1717
{
18-
"command": "node ./dprint/prettier.mjs {{file_path}}",
18+
"command": "node --experimental-strip-types --experimental-transform-types ./dprint/prettier.mts {{file_path}}",
1919
"exts": ["css", "html", "json5", "scss", "yaml", "yml"],
2020
"stdin": true
2121
},
2222
{
23-
"command": "node ./dprint/remark.mjs {{file_path}}",
23+
"command": "node --experimental-strip-types --experimental-transform-types ./dprint/remark.mts {{file_path}}",
2424
"exts": ["md", "mdx"],
2525
"stdin": true
2626
},
2727
{
28-
"command": "node ./dprint/shfmt.mjs {{file_path}}",
28+
"command": "node --experimental-strip-types --experimental-transform-types ./dprint/shfmt.mts {{file_path}}",
2929
"exts": ["sh", "zsh"],
3030
"fileNames": [
3131
".editorconfig",

.env.zsh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# - https://homebrew-file.readthedocs.io/en/latest/usage.html
77

88
[ -f $PWD/.env.repo ] && source $PWD/.env.repo
9+
[ -f $PWD/.env.vars ] && source $PWD/.env.vars
910
HOMEBREW_BREWFILE=./Brewfile
1011
NODE_NO_WARNINGS=1
1112
NODE_OPTIONS='--experimental-strip-types --experimental-transform-types'

.github/infrastructure.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ branches:
3333
- context: lint
3434
- context: spelling
3535
- context: test (22)
36-
- context: typescript (5.0.4)
37-
- context: typescript (5.4.5)
38-
- context: typescript (5.5.4)
39-
- context: typescript (5.6.2)
36+
- context: test (23)
37+
- context: typescript (5.6.3)
38+
- context: typescript (5.7.1-rc)
4039
strict: true
4140
restrictions: null
4241
environments:

.github/workflows/ci.yml

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ jobs:
5858
runs-on: ubuntu-latest
5959
outputs:
6060
cache-key: ${{ steps.cache-key.outputs.result }}
61-
version: ${{ steps.version.outputs.result }}
61+
test-files: ${{ steps.test-files.outputs.files_exists }}
62+
typecheck-files: ${{ steps.typecheck-files.outputs.files_exists }}
6263
version-typescript: ${{ steps.version-typescript.outputs.result }}
64+
version: ${{ steps.version.outputs.result }}
6365
steps:
6466
- id: debug
6567
name: Print environment variables and event payload
@@ -97,6 +99,16 @@ jobs:
9799
- id: version-typescript
98100
name: Get TypeScript version
99101
run: echo "result=$(jq .devDependencies.typescript package.json -r)" >>$GITHUB_OUTPUT
102+
- id: test-files
103+
name: Check for test files
104+
uses: andstor/file-existence-action@v3.0.0
105+
with:
106+
files: '**/__tests__/*.spec.+(mts|tsx)'
107+
- id: typecheck-files
108+
name: Check for typecheck files
109+
uses: andstor/file-existence-action@v3.0.0
110+
with:
111+
files: '**/__tests__/*.spec-d.mts'
100112
commitlint:
101113
needs: preflight
102114
runs-on: ubuntu-latest
@@ -245,50 +257,47 @@ jobs:
245257
matrix:
246258
typescript-version:
247259
- ${{ needs.preflight.outputs.version-typescript }}
248-
- 5.5.4
249-
- 5.4.5
250-
- 5.0.4
260+
- 5.6.3
261+
env:
262+
TYPESCRIPT_VERSION: ${{ matrix.typescript-version }}
263+
VITEST_REPORT: ./.vitest-reports/typecheck.blob.json
264+
if: ${{ fromJson(needs.preflight.outputs.typecheck-files) }}
251265
steps:
252266
- id: checkout
253267
name: Checkout ${{ env.REF_NAME }}
254268
uses: actions/checkout@v4.2.2
255269
with:
256270
persist-credentials: false
257271
ref: ${{ env.REF }}
258-
- id: test-files-check
259-
name: Check for typecheck files
260-
uses: andstor/file-existence-action@v3.0.0
261-
with:
262-
files: '**/__tests__/*.spec-d.ts'
263272
- id: node
264-
if: steps.test-files-check.outputs.files_exists == 'true'
265273
name: Setup Node.js
266274
uses: actions/setup-node@v4.1.0
267275
with:
268276
cache: yarn
269277
cache-dependency-path: yarn.lock
270278
node-version-file: .nvmrc
271279
- id: cache
272-
if: steps.test-files-check.outputs.files_exists == 'true'
273280
name: Restore dependencies cache
274281
uses: actions/cache@v4.1.2
275282
with:
276283
key: ${{ needs.preflight.outputs.cache-key }}
277284
path: ${{ env.CACHE_PATH }}
278285
- id: typescript
279-
if: steps.test-files-check.outputs.files_exists == 'true'
280-
name: Install typescript@${{ matrix.typescript-version }}
281-
run: yarn add -D typescript@${{ matrix.typescript-version }}
286+
name: Install typescript@${{ env.TYPESCRIPT_VERSION }}
287+
run: yarn add -D typescript@${{ env.TYPESCRIPT_VERSION }}
282288
- id: print-typescript-version
283-
if: steps.test-files-check.outputs.files_exists == 'true'
284289
name: Print TypeScript version
285290
run: jq .devDependencies.typescript package.json -r
286291
- id: typecheck
287-
if: steps.test-files-check.outputs.files_exists == 'true'
288292
name: Run typecheck
289-
env:
290-
NODE_OPTIONS: --experimental-strip-types --experimental-transform-types
291293
run: yarn typecheck
294+
- id: report
295+
name: Upload report
296+
uses: actions/upload-artifact@v4.4.3
297+
with:
298+
name: |
299+
${{ format('typecheck-{0}-{1}-{2}.blob.json', env.TYPESCRIPT_VERSION, github.event.repository.name, env.SHA) }}
300+
path: ${{ env.VITEST_REPORT }}
292301
test:
293302
needs:
294303
- commitlint
@@ -299,25 +308,22 @@ jobs:
299308
fail-fast: false
300309
matrix:
301310
node-version:
311+
- 23
302312
- 22
303313
env:
304314
COVERAGE_SUMMARY: ./coverage/coverage-summary.json
315+
NODE_VERSION: ${{ matrix.node-version }}
305316
PCT: .total.branches.pct + .total.functions.pct + .total.lines.pct + .total.statements.pct
306317
VITEST_REPORT: ./.vitest-reports/test.blob.json
318+
if: ${{ fromJson(needs.preflight.outputs.test-files) }}
307319
steps:
308320
- id: checkout
309321
name: Checkout ${{ env.REF_NAME }}
310322
uses: actions/checkout@v4.2.2
311323
with:
312324
persist-credentials: false
313325
ref: ${{ env.REF }}
314-
- id: test-files-check
315-
name: Check for test files
316-
uses: andstor/file-existence-action@v3.0.0
317-
with:
318-
files: '**/__tests__/*.spec.+(ts|tsx)'
319326
- id: node
320-
if: steps.test-files-check.outputs.files_exists == 'true'
321327
name: Setup Node.js v${{ matrix.node-version }}
322328
uses: actions/setup-node@v4.1.0
323329
with:
@@ -326,37 +332,31 @@ jobs:
326332
check-latest: true
327333
node-version: ${{ matrix.node-version }}
328334
- id: cache
329-
if: steps.test-files-check.outputs.files_exists == 'true'
330335
name: Restore dependencies cache
331336
uses: actions/cache@v4.1.2
332337
with:
333338
key: ${{ needs.preflight.outputs.cache-key }}
334339
path: ${{ env.CACHE_PATH }}
335340
- id: test
336-
if: steps.test-files-check.outputs.files_exists == 'true'
337341
name: Run tests
338-
env:
339-
NODE_OPTIONS: --experimental-strip-types --experimental-transform-types
340342
run: |
341343
yarn test:cov --coverage.thresholds.100=false \
342344
&& echo "coverage=$(jq '${{ env.PCT }}' ${{ env.COVERAGE_SUMMARY }} -r)" >>$GITHUB_OUTPUT
343345
- id: report
344-
if: steps.test-files-check.outputs.files_exists == 'true'
345346
name: Upload report
346347
uses: actions/upload-artifact@v4.4.3
347348
with:
348-
name: ${{ format('vitest-report-{0}-{1}.json', github.event.repository.name, env.SHA) }}
349+
name: |
350+
${{ format('test-{0}-{1}-{2}.blob.json', env.NODE_VERSION, github.event.repository.name, env.SHA) }}
349351
path: ${{ env.VITEST_REPORT }}
350352
- id: coverage-summary
351-
if: steps.test-files-check.outputs.files_exists == 'true'
352353
name: Upload coverage summary
353354
uses: actions/upload-artifact@v4.4.3
354355
with:
355356
name: |
356-
${{ format('coverage-summary-{0}-{1}.json', github.event.repository.name, env.SHA) }}
357+
${{ format('coverage-summary-{0}-{1}-{2}.json', env.NODE_VERSION, github.event.repository.name, env.SHA) }}
357358
path: ${{ env.COVERAGE_SUMMARY }}
358359
- id: codecov
359-
if: steps.test-files-check.outputs.files_exists == 'true'
360360
name: Upload coverage report to Codecov
361361
uses: codecov/codecov-action@v4.6.0
362362
env:
@@ -377,12 +377,8 @@ jobs:
377377
token: ${{ secrets.CODECOV_TOKEN }}
378378
verbose: true
379379
- id: coverage-failure
380-
if: |
381-
steps.test-files-check.outputs.files_exists == 'true'
382-
&& ${{ toJson(steps.test.outputs.coverage) }} != 400
380+
if: ${{ toJson(steps.test.outputs.coverage) != 400 }}
383381
name: Coverage threshold failure (${{ steps.test.outputs.coverage }})
384-
env:
385-
NODE_OPTIONS: --experimental-strip-types --experimental-transform-types
386382
run: yarn test:cov:reports
387383
build:
388384
needs:
@@ -443,6 +439,8 @@ jobs:
443439
- test
444440
- typescript
445441
runs-on: ubuntu-latest
442+
env:
443+
NODE_NO_WARNINGS: 1
446444
steps:
447445
- id: checkout
448446
name: Checkout ${{ env.REF_NAME }}

.github/workflows/typescript-canary.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ jobs:
7373
run: yarn build
7474
- id: typecheck
7575
name: Run typecheck
76-
env:
77-
NODE_OPTIONS: --experimental-strip-types --experimental-transform-types
7876
run: yarn typecheck
7977
- id: typecheck-build
8078
name: Run typecheck-build

.husky/pre-commit

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

.lintstagedrc.json

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

0 commit comments

Comments
 (0)