From a8d9e709f9c550f1e53c15539ba467d5f07e8c6f Mon Sep 17 00:00:00 2001 From: Ulad Kasach Date: Fri, 16 Jan 2026 05:52:25 -0600 Subject: [PATCH] fix(practs): repair to latest best --- .claude/settings.json | 10 +- .github/actions/test-shards-setup/action.yml | 68 +++++ .github/workflows/.test.yml | 292 +++++++++++++------ package.json | 14 +- pnpm-lock.yaml | 189 ++---------- src/index.ts | 3 +- 6 files changed, 309 insertions(+), 267 deletions(-) create mode 100644 .github/actions/test-shards-setup/action.yml diff --git a/.claude/settings.json b/.claude/settings.json index 008433d..48f71cc 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -6,20 +6,20 @@ "hooks": [ { "type": "command", - "command": "./node_modules/.bin/rhachet run --repo ehmpathy --role mechanic --init claude.hooks/sessionstart.notify-permissions", - "timeout": 5, + "command": "./node_modules/.bin/rhachet roles boot --repo .this --role any --if-present", + "timeout": 60, "author": "repo=ehmpathy/role=mechanic" }, { "type": "command", - "command": "./node_modules/.bin/rhachet roles boot --repo .this --role any --if-present", + "command": "./node_modules/.bin/rhachet roles boot --repo ehmpathy --role mechanic", "timeout": 60, "author": "repo=ehmpathy/role=mechanic" }, { "type": "command", - "command": "./node_modules/.bin/rhachet roles boot --repo ehmpathy --role mechanic", - "timeout": 60, + "command": "./node_modules/.bin/rhachet run --repo ehmpathy --role mechanic --init claude.hooks/sessionstart.notify-permissions", + "timeout": 5, "author": "repo=ehmpathy/role=mechanic" } ] diff --git a/.github/actions/test-shards-setup/action.yml b/.github/actions/test-shards-setup/action.yml new file mode 100644 index 0000000..ce467e7 --- /dev/null +++ b/.github/actions/test-shards-setup/action.yml @@ -0,0 +1,68 @@ +name: test-shards-setup +description: generate shard matrix from jest.*.shards.jsonc config + +inputs: + config-file: + description: path to the shards config file (e.g., jest.integration.shards.jsonc) + required: true + test-type: + description: label for notices (e.g., integration, acceptance) + required: true + +outputs: + matrix: + description: "JSON array of shard configs for matrix strategy" + value: ${{ steps.generate.outputs.matrix }} + patterns: + description: "pipe-delimited patterns for --testPathIgnorePatterns" + value: ${{ steps.generate.outputs.patterns }} + +runs: + using: composite + steps: + - name: generate matrix from ${{ inputs.config-file }} + id: generate + shell: bash + run: | + config_file="${{ inputs.config-file }}" + test_type="${{ inputs.test-type }}" + + # no config = single dynamic shard (backwards compat) + if [[ ! -f "$config_file" ]]; then + echo "$test_type: no config, default to single shard" + echo 'matrix=[{"type":"dynamic","shard":1,"total":1}]' >> $GITHUB_OUTPUT + echo 'patterns=' >> $GITHUB_OUTPUT + exit 0 + fi + + # read config (strip comments for jq) + config=$(grep -v '^\s*//' "$config_file" | jq -c '.') + + # extract explicit shards + explicit=$(echo "$config" | jq -c '.explicit // []') + explicit_count=$(echo "$explicit" | jq 'length') + + # extract dynamic shard count + dynamic_count=$(echo "$config" | jq '.dynamic.shards // 0') + + # build matrix + matrix="[]" + + # add explicit shards + for i in $(seq 0 $((explicit_count - 1))); do + patterns=$(echo "$explicit" | jq -c ".[$i].patterns") + matrix=$(echo "$matrix" | jq -c ". + [{\"type\": \"explicit\", \"index\": $i, \"patterns\": $patterns}]") + done + + # add dynamic shards + for i in $(seq 1 $dynamic_count); do + matrix=$(echo "$matrix" | jq -c ". + [{\"type\": \"dynamic\", \"shard\": $i, \"total\": $dynamic_count}]") + done + + # collect all explicit patterns for exclusion + explicit_patterns=$(echo "$explicit" | jq -r '.[].patterns[]' 2>/dev/null | paste -sd '|' || echo '') + + echo "matrix=$matrix" >> $GITHUB_OUTPUT + echo "patterns=$explicit_patterns" >> $GITHUB_OUTPUT + + echo "$test_type: $(echo "$matrix" | jq 'length') shards" diff --git a/.github/workflows/.test.yml b/.github/workflows/.test.yml index fbb08a9..38a812b 100644 --- a/.github/workflows/.test.yml +++ b/.github/workflows/.test.yml @@ -3,21 +3,19 @@ name: .test on: workflow_call: inputs: - aws-region: - type: string - description: the aws region within which we should run the tests + creds-aws-role-arn: + description: "creds for aws, specifies the role to assume via oidc. if not provided, aws auth is skipped" required: false - aws-account-id: type: string - description: the id of the account the credentials are expected to access - required: false - secrets: - aws-access-key-id: - required: false - description: required credentials to authenticate with aws the aws account against which to run the tests - aws-secret-access-key: + creds-aws-region: + description: "creds for aws, specifies the region. defaults to us-east-1" required: false - description: required credentials to authenticate with aws the aws account against which to run the tests + type: string + default: "us-east-1" + +permissions: + id-token: write # required for oidc + contents: read jobs: # install the dependencies @@ -26,18 +24,18 @@ jobs: # run tests in parallel test-commits: - runs-on: ubuntu-20.04 - needs: [install] + runs-on: ubuntu-24.04 + needs: [install, test-shards-omit] steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 # we need all commits to test:commits - name: set node-version - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version-file: ".nvmrc" - name: get node-modules from cache uses: actions/cache/restore@v4 @@ -49,16 +47,16 @@ jobs: run: npm run test:commits test-types: - runs-on: ubuntu-20.04 - needs: [install] + runs-on: ubuntu-24.04 + needs: [install, test-shards-omit] steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: set node-version - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version-file: ".nvmrc" - name: get node-modules from cache uses: actions/cache/restore@v4 @@ -70,16 +68,19 @@ jobs: run: npm run test:types test-format: - runs-on: ubuntu-20.04 - needs: [install] + runs-on: ubuntu-24.04 + needs: [install, test-shards-omit] steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: set node-version - uses: actions/setup-node@v3 + - name: set node version + uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version-file: ".nvmrc" + + - name: set terraform version + uses: hashicorp/setup-terraform@v3 - name: get node-modules from cache uses: actions/cache/restore@v4 @@ -91,16 +92,16 @@ jobs: run: npm run test:format test-lint: - runs-on: ubuntu-20.04 - needs: [install] + runs-on: ubuntu-24.04 + needs: [install, test-shards-omit] steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: set node-version - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version-file: ".nvmrc" - name: get node-modules from cache uses: actions/cache/restore@v4 @@ -112,16 +113,16 @@ jobs: run: npm run test:lint test-unit: - runs-on: ubuntu-20.04 - needs: [install] + runs-on: ubuntu-24.04 + needs: [install, test-shards-omit] steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: set node-version - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version-file: ".nvmrc" - name: get node-modules from cache uses: actions/cache/restore@v4 @@ -132,17 +133,64 @@ jobs: - name: test:unit run: THOROUGH=true npm run test:unit - test-integration: - runs-on: ubuntu-20.04 + # shard setup job + enshard: + name: enshard + runs-on: ubuntu-24.04 + outputs: + integration-matrix: ${{ steps.integration.outputs.matrix }} + integration-patterns: ${{ steps.integration.outputs.patterns }} + acceptance-matrix: ${{ steps.acceptance.outputs.matrix }} + acceptance-patterns: ${{ steps.acceptance.outputs.patterns }} + steps: + - name: checkout + uses: actions/checkout@v4 + with: + sparse-checkout: | + jest.integration.shards.jsonc + jest.acceptance.shards.jsonc + .github/actions/test-shards-setup + sparse-checkout-cone-mode: false + + - name: setup integration shards + id: integration + uses: ./.github/actions/test-shards-setup + with: + config-file: jest.integration.shards.jsonc + test-type: integration + + - name: setup acceptance shards + id: acceptance + uses: ./.github/actions/test-shards-setup + with: + config-file: jest.acceptance.shards.jsonc + test-type: acceptance + + # placeholder job for github actions visualization alignment + # note: github actions has no column position controls; + # this job pushes test-* jobs one column right to align with test-shards-* column + test-shards-omit: + runs-on: ubuntu-24.04 needs: [install] + steps: + - run: echo "👌 placeholder for column alignment" + + # shard runner jobs + test-shards-integration: + runs-on: ubuntu-24.04 + needs: [install, enshard] + strategy: + fail-fast: false + matrix: + shard: ${{ fromJson(needs.enshard.outputs.integration-matrix) }} steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: set node-version - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version-file: ".nvmrc" - name: get node-modules from cache uses: actions/cache/restore@v4 @@ -150,39 +198,65 @@ jobs: path: ./node_modules key: ${{ needs.install.outputs.node-modules-cache-key }} - - name: configure aws credentials - if: "${{ inputs.aws-account-id != '' }}" - uses: aws-actions/configure-aws-credentials@v1 - id: credentials + - name: get aws auth, if creds supplied + if: ${{ inputs.creds-aws-role-arn }} + uses: aws-actions/configure-aws-credentials@v4 with: - aws-access-key-id: ${{ secrets.aws-access-key-id }} - aws-secret-access-key: ${{ secrets.aws-secret-access-key }} - aws-region: ${{ inputs.aws-region }} + role-to-assume: ${{ inputs.creds-aws-role-arn }} + aws-region: ${{ inputs.creds-aws-region }} - - name: confirm aws credentials - if: "${{ inputs.aws-account-id != '' }}" - run: | - [[ ${{steps.credentials.outputs.aws-account-id}} != ${{ inputs.aws-account-id }} ]] \ - && echo 'wrong aws account' && exit 1 \ - || echo 'correct aws account'; + - name: start:testdb + run: npm run start:testdb --if-present - - name: provision:integration-test-db - run: npm run provision:integration-test-db --if-present + - name: start:livedb:dev + run: npm run start:livedb:dev --if-present - - name: test:integration - run: THOROUGH=true npm run test:integration + - name: build + run: npm run build - test-acceptance-locally: - runs-on: ubuntu-20.04 - needs: [install] + - name: test:integration (explicit ${{ matrix.shard.index }}) + if: matrix.shard.type == 'explicit' + run: | + patterns='${{ join(matrix.shard.patterns, '|') }}' + THOROUGH=true npm run test:integration -- --testPathPattern="$patterns" --json --outputFile=jest-results.json + + - name: test:integration (dynamic ${{ matrix.shard.shard }}/${{ matrix.shard.total }}) + if: matrix.shard.type == 'dynamic' + run: | + exclude='${{ needs.enshard.outputs.integration-patterns }}' + if [[ -n "$exclude" ]]; then + THOROUGH=true npm run test:integration -- --testPathIgnorePatterns="$exclude" --shard=${{ matrix.shard.shard }}/${{ matrix.shard.total }} --json --outputFile=jest-results.json + else + THOROUGH=true npm run test:integration -- --shard=${{ matrix.shard.shard }}/${{ matrix.shard.total }} --json --outputFile=jest-results.json + fi + + - name: report slow tests + if: always() && hashFiles('jest-results.json') != '' + run: | + jq -r '.testResults[] | "\(.name):\(.perfStats.runtime)"' jest-results.json | while IFS=: read -r name runtime; do + seconds=$((runtime / 1000)) + if [[ $seconds -ge 30 ]]; then + echo "::warning file=${name}::slow test: ${seconds}s" + elif [[ $seconds -ge 10 ]]; then + echo "::notice file=${name}::test duration: ${seconds}s" + fi + done + + test-shards-acceptance: + runs-on: ubuntu-24.04 + needs: [install, enshard] + strategy: + fail-fast: false + matrix: + shard: ${{ fromJson(needs.enshard.outputs.acceptance-matrix) }} steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: set node-version - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version-file: ".nvmrc" - name: get node-modules from cache uses: actions/cache/restore@v4 @@ -190,24 +264,76 @@ jobs: path: ./node_modules key: ${{ needs.install.outputs.node-modules-cache-key }} - - name: configure aws credentials - if: "${{ inputs.aws-account-id != '' }}" - uses: aws-actions/configure-aws-credentials@v1 - id: credentials + - name: get aws auth, if creds supplied + if: ${{ inputs.creds-aws-role-arn }} + uses: aws-actions/configure-aws-credentials@v4 with: - aws-access-key-id: ${{ secrets.aws-access-key-id }} - aws-secret-access-key: ${{ secrets.aws-secret-access-key }} - aws-region: ${{ inputs.aws-region }} + role-to-assume: ${{ inputs.creds-aws-role-arn }} + aws-region: ${{ inputs.creds-aws-region }} - - name: confirm aws credentials - if: "${{ inputs.aws-account-id != '' }}" - run: | - [[ ${{steps.credentials.outputs.aws-account-id}} != ${{ inputs.aws-account-id }} ]] \ - && echo 'wrong aws account' && exit 1 \ - || echo 'correct aws account'; + - name: start:testdb + run: npm run start:testdb --if-present - - name: provision:integration-test-db - run: npm run provision:integration-test-db --if-present + - name: start:livedb:dev + run: npm run start:livedb:dev --if-present - - name: test:acceptance:locally - run: npm run test:acceptance:locally + - name: build + run: npm run build + + - name: test:acceptance (explicit ${{ matrix.shard.index }}) + if: matrix.shard.type == 'explicit' + run: | + patterns='${{ join(matrix.shard.patterns, '|') }}' + THOROUGH=true npm run test:acceptance -- --testPathPattern="$patterns" --json --outputFile=jest-results.json + + - name: test:acceptance (dynamic ${{ matrix.shard.shard }}/${{ matrix.shard.total }}) + if: matrix.shard.type == 'dynamic' + run: | + exclude='${{ needs.enshard.outputs.acceptance-patterns }}' + if [[ -n "$exclude" ]]; then + THOROUGH=true npm run test:acceptance -- --testPathIgnorePatterns="$exclude" --shard=${{ matrix.shard.shard }}/${{ matrix.shard.total }} --json --outputFile=jest-results.json + else + THOROUGH=true npm run test:acceptance -- --shard=${{ matrix.shard.shard }}/${{ matrix.shard.total }} --json --outputFile=jest-results.json + fi + + - name: report slow tests + if: always() && hashFiles('jest-results.json') != '' + run: | + jq -r '.testResults[] | "\(.name):\(.perfStats.runtime)"' jest-results.json | while IFS=: read -r name runtime; do + seconds=$((runtime / 1000)) + if [[ $seconds -ge 30 ]]; then + echo "::warning file=${name}::slow test: ${seconds}s" + elif [[ $seconds -ge 10 ]]; then + echo "::notice file=${name}::test duration: ${seconds}s" + fi + done + + # union job: aggregates shard results into single status for pr merge constraints + test-integration: + runs-on: ubuntu-24.04 + needs: [install, enshard, test-shards-integration] + if: always() && needs.install.result == 'success' && needs.enshard.result == 'success' + steps: + - name: report shard results + run: | + if [[ "${{ needs.test-shards-integration.result }}" == "success" ]]; then + echo "👌 all integration test shards passed" + else + echo "::error::some integration test shards failed" + exit 1 + fi + + # union job: aggregates shard results into single status for pr merge constraints + test-acceptance-locally: + runs-on: ubuntu-24.04 + needs: [install, enshard, test-shards-acceptance] + if: always() && needs.install.result == 'success' && needs.enshard.result == 'success' + steps: + - name: report shard results + run: | + if [[ "${{ needs.test-shards-acceptance.result }}" == "success" ]]; then + echo "👌 all acceptance test shards passed" + else + echo "::error::some acceptance test shards failed" + exit 1 + fi diff --git a/package.json b/package.json index 3908300..a4291f9 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "build:compile:tsc": "tsc -p ./tsconfig.build.json && tsc-alias -p ./tsconfig.build.json", "build:compile": "npm run build:compile:tsc && npm run build:compile:bun --if-present", "build": "npm run build:clean && npm run build:compile && npm run build:complete --if-present", + "test:auth": "[ \"$ECHO\" = 'true' ] && echo 'source .agent/repo=.this/role=any/skills/use.apikeys.sh' || bash -c 'source .agent/repo=.this/role=any/skills/use.apikeys.sh'", "test:commits": "LAST_TAG=$(git describe --tags --abbrev=0 @^ 2> /dev/null || git rev-list --max-parents=0 HEAD) && npx commitlint --from $LAST_TAG --to HEAD --verbose", "test:types": "tsc -p ./tsconfig.json --noEmit", "test:format:biome": "biome format", @@ -52,7 +53,7 @@ "test:unit": "jest -c ./jest.unit.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main') $([ -n $RESNAP ] && echo '--updateSnapshot')", "test:integration": "jest -c ./jest.integration.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main') $([ -n $RESNAP ] && echo '--updateSnapshot')", "test:acceptance:locally": "npm run build && LOCALLY=true jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --passWithNoTests $([ -n $RESNAP ] && echo '--updateSnapshot')", - "test": "npm run test:commits && npm run test:types && npm run test:format && npm run test:lint && npm run test:unit && npm run test:integration && npm run test:acceptance:locally", + "test": "eval $(ECHO=true npm run --silent test:auth) && npm run test:commits && npm run test:types && npm run test:format && npm run test:lint && npm run test:unit && npm run test:integration && npm run test:acceptance:locally", "test:acceptance": "npm run build && jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --passWithNoTests $([ -n $RESNAP ] && echo '--updateSnapshot')", "prepush": "npm run test && npm run build", "prepublish": "npm run build", @@ -65,9 +66,7 @@ "dependencies": { "domain-objects": "0.31.9", "helpful-errors": "1.5.3", - "iso-time": "^1.11.1", - "joi": "17.4.0", - "type-fns": "1.21.0" + "iso-time": "^1.11.1" }, "devDependencies": { "@biomejs/biome": "2.3.8", @@ -75,16 +74,14 @@ "@commitlint/config-conventional": "19.5.0", "@swc/core": "1.15.3", "@swc/jest": "0.2.39", - "@tsconfig/node-lts-strictest": "18.12.1", "@tsconfig/node20": "20.1.5", "@tsconfig/strictest": "2.0.5", "@types/jest": "30.0.0", "@types/node": "22.15.21", "commitlint": "^17.6.7", - "core-js": "3.26.1", "cz-conventional-changelog": "3.3.0", "declapract": "^0.13.14", - "declapract-typescript-ehmpathy": "^0.47.24", + "declapract-typescript-ehmpathy": "^0.47.27", "declastruct": "1.7.3", "declastruct-github": "1.3.0", "depcheck": "1.4.3", @@ -95,9 +92,6 @@ "rhachet-roles-bhrain": "0.5.11", "rhachet-roles-bhuild": "0.6.6", "rhachet-roles-ehmpathy": "1.17.20", - "test-fns": "1.4.2", - "ts-jest": "29.2.5", - "ts-node": "10.9.2", "tsc-alias": "1.8.10", "tsx": "4.20.6", "typescript": "5.4.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ec8b37b..b2f1bfd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,12 +17,6 @@ importers: iso-time: specifier: ^1.11.1 version: 1.11.1 - joi: - specifier: 17.4.0 - version: 17.4.0 - type-fns: - specifier: 1.21.0 - version: 1.21.0 devDependencies: '@biomejs/biome': specifier: 2.3.8 @@ -39,9 +33,6 @@ importers: '@swc/jest': specifier: 0.2.39 version: 0.2.39(@swc/core@1.15.3) - '@tsconfig/node-lts-strictest': - specifier: 18.12.1 - version: 18.12.1 '@tsconfig/node20': specifier: 20.1.5 version: 20.1.5 @@ -57,9 +48,6 @@ importers: commitlint: specifier: ^17.6.7 version: 17.8.1(@swc/core@1.15.3) - core-js: - specifier: 3.26.1 - version: 3.26.1 cz-conventional-changelog: specifier: 3.3.0 version: 3.3.0(@types/node@22.15.21)(typescript@5.4.5) @@ -67,8 +55,8 @@ importers: specifier: ^0.13.14 version: 0.13.14 declapract-typescript-ehmpathy: - specifier: ^0.47.24 - version: 0.47.24(declapract@0.13.14) + specifier: ^0.47.27 + version: 0.47.27(declapract@0.13.14) declastruct: specifier: 1.7.3 version: 1.7.3(domain-objects@0.31.9) @@ -86,7 +74,7 @@ importers: version: 8.0.3 jest: specifier: 30.2.0 - version: 30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5)) + version: 30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@20.5.1)(typescript@5.4.5)) rhachet: specifier: 1.22.7 version: 1.22.7(zod@3.25.76) @@ -99,15 +87,6 @@ importers: rhachet-roles-ehmpathy: specifier: 1.17.20 version: 1.17.20(@anthropic-ai/sdk@0.51.0)(@types/node@22.15.21)(hono@4.11.4)(zod@3.25.76) - test-fns: - specifier: 1.4.2 - version: 1.4.2 - ts-jest: - specifier: 29.2.5 - version: 29.2.5(@babel/core@7.28.6)(@jest/types@29.6.3)(esbuild@0.25.12)(jest@30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5)))(typescript@5.4.5) - ts-node: - specifier: 10.9.2 - version: 10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5) tsc-alias: specifier: 1.8.10 version: 1.8.10 @@ -1714,10 +1693,6 @@ packages: '@swc/types@0.1.25': resolution: {integrity: sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g==} - '@tsconfig/node-lts-strictest@18.12.1': - resolution: {integrity: sha512-pn6cefRFlBVSEo5lO82bJnGmaptr90Wu8zCROkMUYXEz0f4AgCD65Guhq4u3PIuIlsYImaOmdoiHajx1gVTiQw==} - deprecated: TypeScript 5.0 supports combining TSConfigs using array syntax in extends - '@tsconfig/node10@1.0.12': resolution: {integrity: sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==} @@ -2041,9 +2016,6 @@ packages: async-lock@1.4.1: resolution: {integrity: sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==} - async@3.2.6: - resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} - asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -2128,10 +2100,6 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true - bs-logger@0.2.6: - resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} - engines: {node: '>= 6'} - bser@2.1.1: resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} @@ -2373,9 +2341,6 @@ packages: resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} engines: {node: '>= 0.6'} - core-js@3.26.1: - resolution: {integrity: sha512-21491RRQVzUn0GGM9Z1Jrpr6PNPxPi+Za8OM9q4tksTSnlbXXGKK1nXNg/QvwFYettXvSX6zWKCtHHfjN4puyA==} - cors@2.8.5: resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} engines: {node: '>= 0.10'} @@ -2470,8 +2435,8 @@ packages: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} - declapract-typescript-ehmpathy@0.47.24: - resolution: {integrity: sha512-paIqAMhmwob5bSp9sYxP+V0oYYD1fpDPn8Kxb6ermAET0LCXdjde9J3oFyjfOqto/8wkOwfDFQIsIetqWAnkuQ==} + declapract-typescript-ehmpathy@0.47.27: + resolution: {integrity: sha512-I3AbEez8I8YVyY3dVTH2s0IT0xnCO8pY0DR45FvWgyp1d/Eqm1REYqq0o6Ub5zdRdpdYn4Ni7xo+jqnCPFKVaw==} peerDependencies: declapract: '>=0.13.3' @@ -2617,11 +2582,6 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - ejs@3.1.10: - resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} - engines: {node: '>=0.10.0'} - hasBin: true - electron-to-chromium@1.5.267: resolution: {integrity: sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==} @@ -2802,9 +2762,6 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - filelist@1.0.4: - resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} - fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -3253,11 +3210,6 @@ packages: jackspeak@3.4.3: resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - jake@10.9.4: - resolution: {integrity: sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==} - engines: {node: '>=10'} - hasBin: true - jest-changed-files@30.2.0: resolution: {integrity: sha512-L8lR1ChrRnSdfeOvTrwZMlnWV8G/LLjQ0nG9MBclwWZidA2N5FviRki0Bvh20WRMOX31/JYvzdqTJrk5oBdydQ==} engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} @@ -3514,9 +3466,6 @@ packages: lodash.map@4.6.0: resolution: {integrity: sha512-worNHGKLDetmcEYDvh2stPCrrQRkP20E4l0iIS7F8EvzMqBBi7ltvFN5m1HvTf1P7Jk1txKhvFcmYsCr8O2F1Q==} - lodash.memoize@4.1.2: - resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} - lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} @@ -3656,10 +3605,6 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - minimatch@5.1.6: - resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} - engines: {node: '>=10'} - minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} @@ -4454,30 +4399,6 @@ packages: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} engines: {node: '>=8'} - ts-jest@29.2.5: - resolution: {integrity: sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==} - engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@babel/core': '>=7.0.0-beta.0 <8' - '@jest/transform': ^29.0.0 - '@jest/types': ^29.0.0 - babel-jest: ^29.0.0 - esbuild: '*' - jest: ^29.0.0 - typescript: '>=4.3 <6' - peerDependenciesMeta: - '@babel/core': - optional: true - '@jest/transform': - optional: true - '@jest/types': - optional: true - babel-jest: - optional: true - esbuild: - optional: true - ts-node@10.9.2: resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true @@ -5638,7 +5559,7 @@ snapshots: '@types/node': 20.5.1 chalk: 4.1.2 cosmiconfig: 8.3.6(typescript@5.4.5) - cosmiconfig-typescript-loader: 4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.4.5))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5))(typescript@5.4.5) + cosmiconfig-typescript-loader: 4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.4.5))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@20.5.1)(typescript@5.4.5))(typescript@5.4.5) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -6112,7 +6033,7 @@ snapshots: jest-util: 30.2.0 slash: 3.0.0 - '@jest/core@30.2.0(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5))': + '@jest/core@30.2.0(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@20.5.1)(typescript@5.4.5))': dependencies: '@jest/console': 30.2.0 '@jest/pattern': 30.0.1 @@ -6127,7 +6048,7 @@ snapshots: exit-x: 0.2.2 graceful-fs: 4.2.11 jest-changed-files: 30.2.0 - jest-config: 30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5)) + jest-config: 30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@20.5.1)(typescript@5.4.5)) jest-haste-map: 30.2.0 jest-message-util: 30.2.0 jest-regex-util: 30.0.1 @@ -6968,8 +6889,6 @@ snapshots: dependencies: '@swc/counter': 0.1.3 - '@tsconfig/node-lts-strictest@18.12.1': {} - '@tsconfig/node10@1.0.12': {} '@tsconfig/node12@1.0.11': {} @@ -7279,8 +7198,6 @@ snapshots: async-lock@1.4.1: {} - async@3.2.6: {} - asynckit@0.4.0: {} at-least-node@1.0.0: {} @@ -7404,10 +7321,6 @@ snapshots: node-releases: 2.0.27 update-browserslist-db: 1.2.3(browserslist@4.28.1) - bs-logger@0.2.6: - dependencies: - fast-json-stable-stringify: 2.1.0 - bser@2.1.1: dependencies: node-int64: 0.4.0 @@ -7663,18 +7576,16 @@ snapshots: cookie@0.7.2: {} - core-js@3.26.1: {} - cors@2.8.5: dependencies: object-assign: 4.1.1 vary: 1.1.2 - cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.4.5))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5))(typescript@5.4.5): + cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.4.5))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@20.5.1)(typescript@5.4.5))(typescript@5.4.5): dependencies: '@types/node': 20.5.1 cosmiconfig: 8.3.6(typescript@5.4.5) - ts-node: 10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5) + ts-node: 10.9.2(@swc/core@1.15.3)(@types/node@20.5.1)(typescript@5.4.5) typescript: 5.4.5 cosmiconfig-typescript-loader@6.2.0(@types/node@22.15.21)(cosmiconfig@9.0.0(typescript@5.4.5))(typescript@5.4.5): @@ -7757,7 +7668,7 @@ snapshots: decamelize@1.2.0: {} - declapract-typescript-ehmpathy@0.47.24(declapract@0.13.14): + declapract-typescript-ehmpathy@0.47.27(declapract@0.13.14): dependencies: declapract: 0.13.14 domain-objects: 0.31.9 @@ -7981,10 +7892,6 @@ snapshots: ee-first@1.1.1: {} - ejs@3.1.10: - dependencies: - jake: 10.9.4 - electron-to-chromium@1.5.267: {} emittery@0.13.1: {} @@ -8226,10 +8133,6 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - filelist@1.0.4: - dependencies: - minimatch: 5.1.6 - fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -8709,12 +8612,6 @@ snapshots: optionalDependencies: '@pkgjs/parseargs': 0.11.0 - jake@10.9.4: - dependencies: - async: 3.2.6 - filelist: 1.0.4 - picocolors: 1.1.1 - jest-changed-files@30.2.0: dependencies: execa: 5.1.1 @@ -8747,15 +8644,15 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5)): + jest-cli@30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@20.5.1)(typescript@5.4.5)): dependencies: - '@jest/core': 30.2.0(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5)) + '@jest/core': 30.2.0(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@20.5.1)(typescript@5.4.5)) '@jest/test-result': 30.2.0 '@jest/types': 30.2.0 chalk: 4.1.2 exit-x: 0.2.2 import-local: 3.2.0 - jest-config: 30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5)) + jest-config: 30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@20.5.1)(typescript@5.4.5)) jest-util: 30.2.0 jest-validate: 30.2.0 yargs: 17.7.2 @@ -8766,7 +8663,7 @@ snapshots: - supports-color - ts-node - jest-config@30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5)): + jest-config@30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@20.5.1)(typescript@5.4.5)): dependencies: '@babel/core': 7.28.6 '@jest/get-type': 30.1.0 @@ -8795,7 +8692,7 @@ snapshots: optionalDependencies: '@types/node': 22.15.21 esbuild-register: 3.6.0(esbuild@0.25.12) - ts-node: 10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5) + ts-node: 10.9.2(@swc/core@1.15.3)(@types/node@20.5.1)(typescript@5.4.5) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -9066,12 +8963,12 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jest@30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5)): + jest@30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@20.5.1)(typescript@5.4.5)): dependencies: - '@jest/core': 30.2.0(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5)) + '@jest/core': 30.2.0(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@20.5.1)(typescript@5.4.5)) '@jest/types': 30.2.0 import-local: 3.2.0 - jest-cli: 30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5)) + jest-cli: 30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@20.5.1)(typescript@5.4.5)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -9162,8 +9059,6 @@ snapshots: lodash.map@4.6.0: {} - lodash.memoize@4.1.2: {} - lodash.merge@4.6.2: {} lodash.mergewith@4.6.2: {} @@ -9282,10 +9177,6 @@ snapshots: dependencies: brace-expansion: 1.1.12 - minimatch@5.1.6: - dependencies: - brace-expansion: 2.0.2 - minimatch@9.0.5: dependencies: brace-expansion: 2.0.2 @@ -10063,7 +9954,7 @@ snapshots: simple-in-memory-cache@0.4.0: dependencies: - '@ehmpathy/uni-time': 1.7.4 + '@ehmpathy/uni-time': 1.10.0 simple-log-methods@0.6.1: dependencies: @@ -10261,24 +10152,6 @@ snapshots: trim-newlines@3.0.1: {} - ts-jest@29.2.5(@babel/core@7.28.6)(@jest/types@29.6.3)(esbuild@0.25.12)(jest@30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5)))(typescript@5.4.5): - dependencies: - bs-logger: 0.2.6 - ejs: 3.1.10 - fast-json-stable-stringify: 2.1.0 - jest: 30.2.0(@types/node@22.15.21)(esbuild-register@3.6.0(esbuild@0.25.12))(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5)) - jest-util: 29.7.0 - json5: 2.2.3 - lodash.memoize: 4.1.2 - make-error: 1.3.6 - semver: 7.7.3 - typescript: 5.4.5 - yargs-parser: 21.1.1 - optionalDependencies: - '@babel/core': 7.28.6 - '@jest/types': 29.6.3 - esbuild: 0.25.12 - ts-node@10.9.2(@swc/core@1.15.3)(@types/node@20.5.1)(typescript@5.4.5): dependencies: '@cspotcode/source-map-support': 0.8.1 @@ -10299,26 +10172,6 @@ snapshots: optionalDependencies: '@swc/core': 1.15.3 - ts-node@10.9.2(@swc/core@1.15.3)(@types/node@22.15.21)(typescript@5.4.5): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.12 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 22.15.21 - acorn: 8.15.0 - acorn-walk: 8.3.4 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.4.5 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - optionalDependencies: - '@swc/core': 1.15.3 - tsc-alias@1.8.10: dependencies: chokidar: 3.6.0 @@ -10520,7 +10373,7 @@ snapshots: with-simple-cache@0.15.1: dependencies: - '@ehmpathy/uni-time': 1.7.4 + '@ehmpathy/uni-time': 1.10.0 procedure-fns: 1.0.1 serde-fns: 1.3.1 simple-in-memory-cache: 0.4.0 diff --git a/src/index.ts b/src/index.ts index ec46c5e..88826db 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1 +1,2 @@ -export { createCache, SimpleInMemoryCache } from './cache'; +export type { SimpleInMemoryCache } from './cache'; +export { createCache } from './cache';