diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 0000000..e43fd64 --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,27 @@ +name: Setup Node.js (v20) with Yarn v2 ๐Ÿš€ +description: 'Set up Node.js version 20 and enable Yarn v2 using Corepack' + +inputs: + node-version: + description: 'The version of Node.js to set up.' + required: true + default: '20' + +outputs: + node-version: + description: 'The version of Node.js that was installed.' + +runs: + using: composite + steps: + - name: Set up Node.js v${{ inputs.node-version }} ๐Ÿ’ป + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node-version }} + + - name: Enable Yarn v2 โšก๏ธ + run: | + corepack enable + yarn --version + node --version + shell: bash \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c263729..d91cdb1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,52 +1,102 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy static content to Pages +name: ๐Ÿš€ Test & Deploy Static Content to GitHub Pages -on: - # Runs on pushes targeting the default branch - push: - branches: ['main'] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: +on: push # Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages permissions: - contents: read - pages: write - id-token: write + contents: read # Read access to repository contents + pages: write # Write access for deployment to GitHub Pages + id-token: write # Allow GitHub to issue an ID token for authentication -# Allow one concurrent deployment +# Allow only one concurrent deployment at a time concurrency: - group: 'pages' - cancel-in-progress: true + group: 'pages' # Group deployments by name for concurrency control + cancel-in-progress: true # Cancel any in-progress deployments if a new one starts jobs: - # Single deploy job since we're just deploying + # Setup environment and dependencies + setup: + name: ๐Ÿ› ๏ธ Setup Development Environment + runs-on: ubuntu-latest + outputs: + node-modules-path: ${{ steps.cache-dependencies.outputs.cache-hit }} + + steps: + - name: Checkout Repository ๐Ÿ“ฅ + uses: actions/checkout@v4 + + - name: Cache Dependencies ๐Ÿ“ฆ + uses: actions/cache@v4 + id: cache-dependencies + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Setup Node.js Environment โš™๏ธ + uses: ./.github/actions/setup + with: + node-version: 20 + + - name: Install Dependencies ๐Ÿ› ๏ธ + run: yarn install --immutable + if: steps.cache-dependencies.outputs.cache-hit != 'true' # Only install if cache miss + + tests: + name: ๐Ÿ” Execute Unit Tests + needs: setup + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository ๐Ÿ“ฅ + uses: actions/checkout@v4 + + - name: Setup Node.js Environment โš™๏ธ + uses: ./.github/actions/setup + with: + node-version: 20 + + - name: Install Dependencies ๐Ÿ› ๏ธ + run: yarn install --immutable + + - name: Run Tests ๐Ÿงช + run: yarn test + deploy: + name: ๐Ÿš€ Deploy to GitHub Pages + needs: [setup, tests] + if: github.ref == 'refs/heads/main' # Only deploy from the main branch + environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + name: github-pages # Set deployment environment to GitHub Pages + url: ${{ steps.deployment.outputs.page_url }} # Output page URL + runs-on: ubuntu-latest + steps: - - name: Checkout + - name: Checkout Repository ๐Ÿ“ฅ uses: actions/checkout@v4 - - run: corepack enable - - name: Set up Node - uses: actions/setup-node@v4 + + - name: Setup Node.js Environment โš™๏ธ + uses: ./.github/actions/setup with: node-version: 20 - cache: 'yarn' - - name: Install dependencies - run: yarn install - - name: Build - run: yarn build:demo - - name: Setup Pages + + - name: Install Dependencies ๐Ÿ› ๏ธ + run: yarn install --immutable + + - name: Build Static Content ๐Ÿ—๏ธ + run: yarn build:demo # Build the static site with Vite + + - name: Setup GitHub Pages โš™๏ธ uses: actions/configure-pages@v4 - - name: Upload artifact + + - name: Upload Build Artifacts ๐Ÿ“ฆ uses: actions/upload-pages-artifact@v3 with: - # Upload dist folder - path: './dist' - - name: Deploy to GitHub Pages + path: './dist' # Path to the build output directory + + - name: Deploy to GitHub Pages ๐ŸŒ id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v4 # Deploy the build to GitHub Pages diff --git a/.gitignore b/.gitignore index 2d55d61..f51070b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ node_modules dist +coverage/ # Yarn v2 .pnp.* diff --git a/package.json b/package.json index 028b4f8..e0141b0 100644 --- a/package.json +++ b/package.json @@ -16,11 +16,13 @@ } }, "scripts": { - "dev": "vite", "build": "tsc && vite build", "build:demo": "vite build --mode development", + "coverage": "vitest run --coverage", + "dev": "vite", + "preversion": "yarn build", "preview": "vite preview", - "preversion": "yarn build" + "test": "vitest" }, "repository": { "type": "git", @@ -33,8 +35,10 @@ }, "homepage": "https://github.com/teritorio/maplibre-gl-teritorio-cluster#readme", "devDependencies": { + "@vitest/coverage-v8": "2.1.5", "typescript": "^5.6.2", - "vite": "^5.4.4" + "vite": "^5.4.4", + "vitest": "^2.1.5" }, "dependencies": { "@turf/bbox": "^7.1.0", diff --git a/tests/mocks/maplibre-gl.mock.ts b/tests/mocks/maplibre-gl.mock.ts new file mode 100644 index 0000000..80e0805 --- /dev/null +++ b/tests/mocks/maplibre-gl.mock.ts @@ -0,0 +1,14 @@ +import { vi } from 'vitest' + +vi.mock('maplibre-gl', () => { + return { + Map: vi.fn().mockImplementation(() => ({ + on: vi.fn(), + querySourceFeatures: vi.fn().mockReturnValue([]), + getSource: vi.fn().mockReturnValue({ + getClusterLeaves: vi.fn(), + }), + fitBounds: vi.fn(), + })) + } +}) diff --git a/tests/teritorio-cluster.test.ts b/tests/teritorio-cluster.test.ts new file mode 100644 index 0000000..6303452 --- /dev/null +++ b/tests/teritorio-cluster.test.ts @@ -0,0 +1,53 @@ +import { describe, it, expect, beforeEach } from 'vitest' +import { TeritorioCluster } from '../src/teritorio-cluster' +import { Map as MapGL } from 'maplibre-gl' + +describe('TeritorioCluster', () => { + let map: MapGL + let teritorioCluster: TeritorioCluster + + beforeEach(() => { + // Create a mock map + map = new MapGL({ container: 'map'}) + + // Initialize the cluster + teritorioCluster = new TeritorioCluster(map, 'sourceId') + }) + + it('should initialize with default values', () => { + expect(teritorioCluster.map).toMatchObject(map) + expect(teritorioCluster.clusterLeaves).toBeInstanceOf(Map) + expect(teritorioCluster.clusterLeaves.size).toBe(0) + expect(teritorioCluster.clusterMaxZoom).toBe(17) + expect(teritorioCluster.clusterMinZoom).toBe(0) + + // Should have the default render function + expect(teritorioCluster.clusterRender).toBeUndefined() + + expect(teritorioCluster.featuresMap).toBeInstanceOf(Map) + expect(teritorioCluster.featuresMap.size).toBe(0) + expect(teritorioCluster.fitBoundsOptions).toMatchObject({ padding: 20 }) + expect(teritorioCluster.initialFeature).toBeUndefined() + + // Should have the default render function + expect(teritorioCluster.markerRender).toBeUndefined() + + expect(teritorioCluster.markerSize).toBe(24) + expect(teritorioCluster.markersOnScreen).toBeInstanceOf(Map) + expect(teritorioCluster.markersOnScreen.size).toBe(0) + expect(teritorioCluster.pinMarker).toBeNull() + + // Should have the default render function + expect(teritorioCluster.pinMarkerRender).toBeUndefined() + + expect(teritorioCluster.selectedClusterId).toBeNull() + expect(teritorioCluster.selectedFeatureId).toBeNull() + expect(teritorioCluster.sourceId).toBe('sourceId') + expect(teritorioCluster.ticking).toBeFalsy() + + // Should have the default render function + expect(teritorioCluster.unfoldedClusterRender).toBeUndefined() + + expect(teritorioCluster.unfoldedClusterMaxLeaves).toBe(7) + }) +}) \ No newline at end of file diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000..e16953f --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: { + coverage: { + reporter: ['text', 'json', 'html'], + }, + setupFiles: './tests/mocks/maplibre-gl.mock.ts', + }, +}) diff --git a/yarn.lock b/yarn.lock index a7855c3..3bcab65 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,6 +5,58 @@ __metadata: version: 8 cacheKey: 10c0 +"@ampproject/remapping@npm:^2.3.0": + version: 2.3.0 + resolution: "@ampproject/remapping@npm:2.3.0" + dependencies: + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10c0/81d63cca5443e0f0c72ae18b544cc28c7c0ec2cea46e7cb888bb0e0f411a1191d0d6b7af798d54e30777d8d1488b2ec0732aac2be342d3d7d3ffd271c6f489ed + languageName: node + linkType: hard + +"@babel/helper-string-parser@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-string-parser@npm:7.25.9" + checksum: 10c0/7244b45d8e65f6b4338a6a68a8556f2cb161b782343e97281a5f2b9b93e420cad0d9f5773a59d79f61d0c448913d06f6a2358a87f2e203cf112e3c5b53522ee6 + languageName: node + linkType: hard + +"@babel/helper-validator-identifier@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-validator-identifier@npm:7.25.9" + checksum: 10c0/4fc6f830177b7b7e887ad3277ddb3b91d81e6c4a24151540d9d1023e8dc6b1c0505f0f0628ae653601eb4388a8db45c1c14b2c07a9173837aef7e4116456259d + languageName: node + linkType: hard + +"@babel/parser@npm:^7.25.4": + version: 7.26.2 + resolution: "@babel/parser@npm:7.26.2" + dependencies: + "@babel/types": "npm:^7.26.0" + bin: + parser: ./bin/babel-parser.js + checksum: 10c0/751a743087b3a9172a7599f1421830d44c38f065ef781588d2bfb1c98f9b461719a226feb13c868d7a284783eee120c88ea522593118f2668f46ebfb1105c4d7 + languageName: node + linkType: hard + +"@babel/types@npm:^7.25.4, @babel/types@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/types@npm:7.26.0" + dependencies: + "@babel/helper-string-parser": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.25.9" + checksum: 10c0/b694f41ad1597127e16024d766c33a641508aad037abd08d0d1f73af753e1119fa03b4a107d04b5f92cc19c095a594660547ae9bead1db2299212d644b0a5cb8 + languageName: node + linkType: hard + +"@bcoe/v8-coverage@npm:^0.2.3": + version: 0.2.3 + resolution: "@bcoe/v8-coverage@npm:0.2.3" + checksum: 10c0/6b80ae4cb3db53f486da2dc63b6e190a74c8c3cca16bb2733f234a0b6a9382b09b146488ae08e2b22cf00f6c83e20f3e040a2f7894f05c045c946d6a090b1d52 + languageName: node + linkType: hard + "@esbuild/aix-ppc64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/aix-ppc64@npm:0.21.5" @@ -180,6 +232,55 @@ __metadata: languageName: node linkType: hard +"@istanbuljs/schema@npm:^0.1.2": + version: 0.1.3 + resolution: "@istanbuljs/schema@npm:0.1.3" + checksum: 10c0/61c5286771676c9ca3eb2bd8a7310a9c063fb6e0e9712225c8471c582d157392c88f5353581c8c9adbe0dff98892317d2fdfc56c3499aa42e0194405206a963a + languageName: node + linkType: hard + +"@jridgewell/gen-mapping@npm:^0.3.5": + version: 0.3.5 + resolution: "@jridgewell/gen-mapping@npm:0.3.5" + dependencies: + "@jridgewell/set-array": "npm:^1.2.1" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10c0/1be4fd4a6b0f41337c4f5fdf4afc3bd19e39c3691924817108b82ffcb9c9e609c273f936932b9fba4b3a298ce2eb06d9bff4eb1cc3bd81c4f4ee1b4917e25feb + languageName: node + linkType: hard + +"@jridgewell/resolve-uri@npm:^3.1.0": + version: 3.1.2 + resolution: "@jridgewell/resolve-uri@npm:3.1.2" + checksum: 10c0/d502e6fb516b35032331406d4e962c21fe77cdf1cbdb49c6142bcbd9e30507094b18972778a6e27cbad756209cfe34b1a27729e6fa08a2eb92b33943f680cf1e + languageName: node + linkType: hard + +"@jridgewell/set-array@npm:^1.2.1": + version: 1.2.1 + resolution: "@jridgewell/set-array@npm:1.2.1" + checksum: 10c0/2a5aa7b4b5c3464c895c802d8ae3f3d2b92fcbe84ad12f8d0bfbb1f5ad006717e7577ee1fd2eac00c088abe486c7adb27976f45d2941ff6b0b92b2c3302c60f4 + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.5.0": + version: 1.5.0 + resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" + checksum: 10c0/2eb864f276eb1096c3c11da3e9bb518f6d9fc0023c78344cdc037abadc725172c70314bdb360f2d4b7bffec7f5d657ce006816bc5d4ecb35e61b66132db00c18 + languageName: node + linkType: hard + +"@jridgewell/trace-mapping@npm:^0.3.23, @jridgewell/trace-mapping@npm:^0.3.24": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.1.0" + "@jridgewell/sourcemap-codec": "npm:^1.4.14" + checksum: 10c0/3d1ce6ebc69df9682a5a8896b414c6537e428a1d68b02fcc8363b04284a8ca0df04d0ee3013132252ab14f2527bc13bea6526a912ecb5658f0e39fd2860b4df4 + languageName: node + linkType: hard + "@mapbox/geojson-rewind@npm:^0.5.2": version: 0.5.2 resolution: "@mapbox/geojson-rewind@npm:0.5.2" @@ -403,9 +504,11 @@ __metadata: dependencies: "@turf/bbox": "npm:^7.1.0" "@turf/helpers": "npm:^7.1.0" + "@vitest/coverage-v8": "npm:2.1.5" maplibre-gl: "npm:^4.7.0" typescript: "npm:^5.6.2" vite: "npm:^5.4.4" + vitest: "npm:^2.1.5" languageName: unknown linkType: soft @@ -448,6 +551,13 @@ __metadata: languageName: node linkType: hard +"@types/estree@npm:^1.0.0": + version: 1.0.6 + resolution: "@types/estree@npm:1.0.6" + checksum: 10c0/cdfd751f6f9065442cd40957c07fd80361c962869aa853c1c2fd03e101af8b9389d8ff4955a43a6fcfa223dd387a089937f95be0f3eec21ca527039fd2d9859a + languageName: node + linkType: hard + "@types/geojson-vt@npm:3.2.5": version: 3.2.5 resolution: "@types/geojson-vt@npm:3.2.5" @@ -498,6 +608,113 @@ __metadata: languageName: node linkType: hard +"@vitest/coverage-v8@npm:2.1.5": + version: 2.1.5 + resolution: "@vitest/coverage-v8@npm:2.1.5" + dependencies: + "@ampproject/remapping": "npm:^2.3.0" + "@bcoe/v8-coverage": "npm:^0.2.3" + debug: "npm:^4.3.7" + istanbul-lib-coverage: "npm:^3.2.2" + istanbul-lib-report: "npm:^3.0.1" + istanbul-lib-source-maps: "npm:^5.0.6" + istanbul-reports: "npm:^3.1.7" + magic-string: "npm:^0.30.12" + magicast: "npm:^0.3.5" + std-env: "npm:^3.8.0" + test-exclude: "npm:^7.0.1" + tinyrainbow: "npm:^1.2.0" + peerDependencies: + "@vitest/browser": 2.1.5 + vitest: 2.1.5 + peerDependenciesMeta: + "@vitest/browser": + optional: true + checksum: 10c0/c6870a8714861fafa5114711d9c2ea56525e6a5e2ebf464e0aea1cb8b79a2fe742e239c0ee210c3e8e916646f799b07707c8bf2a7fd33e0d7f2bc9bd9d938d77 + languageName: node + linkType: hard + +"@vitest/expect@npm:2.1.5": + version: 2.1.5 + resolution: "@vitest/expect@npm:2.1.5" + dependencies: + "@vitest/spy": "npm:2.1.5" + "@vitest/utils": "npm:2.1.5" + chai: "npm:^5.1.2" + tinyrainbow: "npm:^1.2.0" + checksum: 10c0/68f7011e7883dea1d1974fa05d30d7a1eff72f08741312e84f1b138f474e75e9db7ff7ced23a50fc16605baa123a2f10ef9a834b418e03dbeed23d1e0043fc90 + languageName: node + linkType: hard + +"@vitest/mocker@npm:2.1.5": + version: 2.1.5 + resolution: "@vitest/mocker@npm:2.1.5" + dependencies: + "@vitest/spy": "npm:2.1.5" + estree-walker: "npm:^3.0.3" + magic-string: "npm:^0.30.12" + peerDependencies: + msw: ^2.4.9 + vite: ^5.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + checksum: 10c0/57034aa3476768133042c6b4193d71dbd4ace98c39241ae2c1fa21c33d5afd6d469de86511cdc59a0d7dd5585c05ac605406c60b0ae3cfbf3f650326642d4aca + languageName: node + linkType: hard + +"@vitest/pretty-format@npm:2.1.5, @vitest/pretty-format@npm:^2.1.5": + version: 2.1.5 + resolution: "@vitest/pretty-format@npm:2.1.5" + dependencies: + tinyrainbow: "npm:^1.2.0" + checksum: 10c0/d6667f1e5d272f557f8cca440af65645346b5aa74a04041466859087f14a78a296e3f1928caa05de0cc558880cc8a49ce14696fef7b8f5dbc3eb856d672b0abf + languageName: node + linkType: hard + +"@vitest/runner@npm:2.1.5": + version: 2.1.5 + resolution: "@vitest/runner@npm:2.1.5" + dependencies: + "@vitest/utils": "npm:2.1.5" + pathe: "npm:^1.1.2" + checksum: 10c0/d39ea4c6f8805aa3e52130ac0a3d325506a4d4bb97d0d7ac80734beb21d9a496ee50586de9801f4b66f2dc8ff38f27a75065a258fd3633bc1cfe68bd9c1dd73e + languageName: node + linkType: hard + +"@vitest/snapshot@npm:2.1.5": + version: 2.1.5 + resolution: "@vitest/snapshot@npm:2.1.5" + dependencies: + "@vitest/pretty-format": "npm:2.1.5" + magic-string: "npm:^0.30.12" + pathe: "npm:^1.1.2" + checksum: 10c0/3dc44b5a043acbbd15e08c3c0519ef5a344d06ade10ee9522b4e4305f4826f2be8353b58d0b6e11aa272078ba42ff0d2ffa62368b6e0cf996ad0d7977df9f22f + languageName: node + linkType: hard + +"@vitest/spy@npm:2.1.5": + version: 2.1.5 + resolution: "@vitest/spy@npm:2.1.5" + dependencies: + tinyspy: "npm:^3.0.2" + checksum: 10c0/c5222cc7074db5705573e5da674b8488f9e46d61a2bd64e992f5f5819feff35f015e8d0236c7e07d1870bddf5d36dc0622f674c071ab4ca8fa4f4f5d02172315 + languageName: node + linkType: hard + +"@vitest/utils@npm:2.1.5": + version: 2.1.5 + resolution: "@vitest/utils@npm:2.1.5" + dependencies: + "@vitest/pretty-format": "npm:2.1.5" + loupe: "npm:^3.1.2" + tinyrainbow: "npm:^1.2.0" + checksum: 10c0/3d1e65025e418948b215b8856548a91856522660d898b872485a91acf397e085e90968ee9c3f521589b5274717da32e954ef8a549aa60cc1c3338224fdfb4c5e + languageName: node + linkType: hard + "abbrev@npm:^2.0.0": version: 2.0.0 resolution: "abbrev@npm:2.0.0" @@ -561,6 +778,13 @@ __metadata: languageName: node linkType: hard +"assertion-error@npm:^2.0.1": + version: 2.0.1 + resolution: "assertion-error@npm:2.0.1" + checksum: 10c0/bbbcb117ac6480138f8c93cf7f535614282dea9dc828f540cdece85e3c665e8f78958b96afac52f29ff883c72638e6a87d469ecc9fe5bc902df03ed24a55dba8 + languageName: node + linkType: hard + "assign-symbols@npm:^1.0.0": version: 1.0.0 resolution: "assign-symbols@npm:1.0.0" @@ -603,6 +827,13 @@ __metadata: languageName: node linkType: hard +"cac@npm:^6.7.14": + version: 6.7.14 + resolution: "cac@npm:6.7.14" + checksum: 10c0/4ee06aaa7bab8981f0d54e5f5f9d4adcd64058e9697563ce336d8a3878ed018ee18ebe5359b2430eceae87e0758e62ea2019c3f52ae6e211b1bd2e133856cd10 + languageName: node + linkType: hard + "cacache@npm:^18.0.0": version: 18.0.4 resolution: "cacache@npm:18.0.4" @@ -623,6 +854,26 @@ __metadata: languageName: node linkType: hard +"chai@npm:^5.1.2": + version: 5.1.2 + resolution: "chai@npm:5.1.2" + dependencies: + assertion-error: "npm:^2.0.1" + check-error: "npm:^2.1.1" + deep-eql: "npm:^5.0.1" + loupe: "npm:^3.1.0" + pathval: "npm:^2.0.0" + checksum: 10c0/6c04ff8495b6e535df9c1b062b6b094828454e9a3c9493393e55b2f4dbff7aa2a29a4645133cad160fb00a16196c4dc03dc9bb37e1f4ba9df3b5f50d7533a736 + languageName: node + linkType: hard + +"check-error@npm:^2.1.1": + version: 2.1.1 + resolution: "check-error@npm:2.1.1" + checksum: 10c0/979f13eccab306cf1785fa10941a590b4e7ea9916ea2a4f8c87f0316fc3eab07eabefb6e587424ef0f88cbcd3805791f172ea739863ca3d7ce2afc54641c7f0e + languageName: node + linkType: hard + "chownr@npm:^2.0.0": version: 2.0.0 resolution: "chownr@npm:2.0.0" @@ -664,7 +915,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.3.4": +"debug@npm:4, debug@npm:^4.1.1, debug@npm:^4.3.4, debug@npm:^4.3.7": version: 4.3.7 resolution: "debug@npm:4.3.7" dependencies: @@ -676,6 +927,13 @@ __metadata: languageName: node linkType: hard +"deep-eql@npm:^5.0.1": + version: 5.0.2 + resolution: "deep-eql@npm:5.0.2" + checksum: 10c0/7102cf3b7bb719c6b9c0db2e19bf0aa9318d141581befe8c7ce8ccd39af9eaa4346e5e05adef7f9bd7015da0f13a3a25dcfe306ef79dc8668aedbecb658dd247 + languageName: node + linkType: hard + "earcut@npm:^3.0.0": version: 3.0.0 resolution: "earcut@npm:3.0.0" @@ -727,6 +985,13 @@ __metadata: languageName: node linkType: hard +"es-module-lexer@npm:^1.5.4": + version: 1.5.4 + resolution: "es-module-lexer@npm:1.5.4" + checksum: 10c0/300a469488c2f22081df1e4c8398c78db92358496e639b0df7f89ac6455462aaf5d8893939087c1a1cbcbf20eed4610c70e0bcb8f3e4b0d80a5d2611c539408c + languageName: node + linkType: hard + "esbuild@npm:^0.21.3": version: 0.21.5 resolution: "esbuild@npm:0.21.5" @@ -807,6 +1072,22 @@ __metadata: languageName: node linkType: hard +"estree-walker@npm:^3.0.3": + version: 3.0.3 + resolution: "estree-walker@npm:3.0.3" + dependencies: + "@types/estree": "npm:^1.0.0" + checksum: 10c0/c12e3c2b2642d2bcae7d5aa495c60fa2f299160946535763969a1c83fc74518ffa9c2cd3a8b69ac56aea547df6a8aac25f729a342992ef0bbac5f1c73e78995d + languageName: node + linkType: hard + +"expect-type@npm:^1.1.0": + version: 1.1.0 + resolution: "expect-type@npm:1.1.0" + checksum: 10c0/5af0febbe8fe18da05a6d51e3677adafd75213512285408156b368ca471252565d5ca6e59e4bddab25121f3cfcbbebc6a5489f8cc9db131cc29e69dcdcc7ae15 + languageName: node + linkType: hard + "exponential-backoff@npm:^3.1.1": version: 3.1.1 resolution: "exponential-backoff@npm:3.1.1" @@ -908,7 +1189,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.2.2, glob@npm:^10.3.10": +"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.4.1": version: 10.4.5 resolution: "glob@npm:10.4.5" dependencies: @@ -942,6 +1223,20 @@ __metadata: languageName: node linkType: hard +"has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 10c0/2e789c61b7888d66993e14e8331449e525ef42aac53c627cc53d1c3334e768bcb6abdc4f5f0de1478a25beec6f0bd62c7549058b7ac53e924040d4f301f02fd1 + languageName: node + linkType: hard + +"html-escaper@npm:^2.0.0": + version: 2.0.2 + resolution: "html-escaper@npm:2.0.2" + checksum: 10c0/208e8a12de1a6569edbb14544f4567e6ce8ecc30b9394fcaa4e7bb1e60c12a7c9a1ed27e31290817157e8626f3a4f29e76c8747030822eb84a6abb15c255f0a0 + languageName: node + linkType: hard + "http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" @@ -1076,6 +1371,45 @@ __metadata: languageName: node linkType: hard +"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.2": + version: 3.2.2 + resolution: "istanbul-lib-coverage@npm:3.2.2" + checksum: 10c0/6c7ff2106769e5f592ded1fb418f9f73b4411fd5a084387a5410538332b6567cd1763ff6b6cadca9b9eb2c443cce2f7ea7d7f1b8d315f9ce58539793b1e0922b + languageName: node + linkType: hard + +"istanbul-lib-report@npm:^3.0.0, istanbul-lib-report@npm:^3.0.1": + version: 3.0.1 + resolution: "istanbul-lib-report@npm:3.0.1" + dependencies: + istanbul-lib-coverage: "npm:^3.0.0" + make-dir: "npm:^4.0.0" + supports-color: "npm:^7.1.0" + checksum: 10c0/84323afb14392de8b6a5714bd7e9af845cfbd56cfe71ed276cda2f5f1201aea673c7111901227ee33e68e4364e288d73861eb2ed48f6679d1e69a43b6d9b3ba7 + languageName: node + linkType: hard + +"istanbul-lib-source-maps@npm:^5.0.6": + version: 5.0.6 + resolution: "istanbul-lib-source-maps@npm:5.0.6" + dependencies: + "@jridgewell/trace-mapping": "npm:^0.3.23" + debug: "npm:^4.1.1" + istanbul-lib-coverage: "npm:^3.0.0" + checksum: 10c0/ffe75d70b303a3621ee4671554f306e0831b16f39ab7f4ab52e54d356a5d33e534d97563e318f1333a6aae1d42f91ec49c76b6cd3f3fb378addcb5c81da0255f + languageName: node + linkType: hard + +"istanbul-reports@npm:^3.1.7": + version: 3.1.7 + resolution: "istanbul-reports@npm:3.1.7" + dependencies: + html-escaper: "npm:^2.0.0" + istanbul-lib-report: "npm:^3.0.0" + checksum: 10c0/a379fadf9cf8dc5dfe25568115721d4a7eb82fbd50b005a6672aff9c6989b20cc9312d7865814e0859cd8df58cbf664482e1d3604be0afde1f7fc3ccc1394a51 + languageName: node + linkType: hard + "jackspeak@npm:^3.1.2": version: 3.4.3 resolution: "jackspeak@npm:3.4.3" @@ -1117,6 +1451,13 @@ __metadata: languageName: node linkType: hard +"loupe@npm:^3.1.0, loupe@npm:^3.1.2": + version: 3.1.2 + resolution: "loupe@npm:3.1.2" + checksum: 10c0/b13c02e3ddd6a9d5f8bf84133b3242de556512d824dddeea71cce2dbd6579c8f4d672381c4e742d45cf4423d0701765b4a6e5fbc24701def16bc2b40f8daa96a + languageName: node + linkType: hard + "lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": version: 10.4.3 resolution: "lru-cache@npm:10.4.3" @@ -1124,6 +1465,35 @@ __metadata: languageName: node linkType: hard +"magic-string@npm:^0.30.12": + version: 0.30.13 + resolution: "magic-string@npm:0.30.13" + dependencies: + "@jridgewell/sourcemap-codec": "npm:^1.5.0" + checksum: 10c0/a275faeca1564c545019b4742c38a42ca80226c8c9e0805c32d1a1cc58b0e6ff7bbd914ed885fd10043858a7da0f732cb8f49c8975c3ecebde9cad4b57db5115 + languageName: node + linkType: hard + +"magicast@npm:^0.3.5": + version: 0.3.5 + resolution: "magicast@npm:0.3.5" + dependencies: + "@babel/parser": "npm:^7.25.4" + "@babel/types": "npm:^7.25.4" + source-map-js: "npm:^1.2.0" + checksum: 10c0/a6cacc0a848af84f03e3f5bda7b0de75e4d0aa9ddce5517fd23ed0f31b5ddd51b2d0ff0b7e09b51f7de0f4053c7a1107117edda6b0732dca3e9e39e6c5a68c64 + languageName: node + linkType: hard + +"make-dir@npm:^4.0.0": + version: 4.0.0 + resolution: "make-dir@npm:4.0.0" + dependencies: + semver: "npm:^7.5.3" + checksum: 10c0/69b98a6c0b8e5c4fe9acb61608a9fbcfca1756d910f51e5dbe7a9e5cfb74fca9b8a0c8a0ffdf1294a740826c1ab4871d5bf3f62f72a3049e5eac6541ddffed68 + languageName: node + linkType: hard + "make-fetch-happen@npm:^13.0.0": version: 13.0.1 resolution: "make-fetch-happen@npm:13.0.1" @@ -1381,6 +1751,20 @@ __metadata: languageName: node linkType: hard +"pathe@npm:^1.1.2": + version: 1.1.2 + resolution: "pathe@npm:1.1.2" + checksum: 10c0/64ee0a4e587fb0f208d9777a6c56e4f9050039268faaaaecd50e959ef01bf847b7872785c36483fa5cdcdbdfdb31fef2ff222684d4fc21c330ab60395c681897 + languageName: node + linkType: hard + +"pathval@npm:^2.0.0": + version: 2.0.0 + resolution: "pathval@npm:2.0.0" + checksum: 10c0/602e4ee347fba8a599115af2ccd8179836a63c925c23e04bd056d0674a64b39e3a081b643cc7bc0b84390517df2d800a46fcc5598d42c155fe4977095c2f77c5 + languageName: node + linkType: hard + "pbf@npm:^3.2.1, pbf@npm:^3.3.0": version: 3.3.0 resolution: "pbf@npm:3.3.0" @@ -1549,7 +1933,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.5": +"semver@npm:^7.3.5, semver@npm:^7.5.3": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: @@ -1586,6 +1970,13 @@ __metadata: languageName: node linkType: hard +"siginfo@npm:^2.0.0": + version: 2.0.0 + resolution: "siginfo@npm:2.0.0" + checksum: 10c0/3def8f8e516fbb34cb6ae415b07ccc5d9c018d85b4b8611e3dc6f8be6d1899f693a4382913c9ed51a06babb5201639d76453ab297d1c54a456544acf5c892e34 + languageName: node + linkType: hard + "signal-exit@npm:^4.0.1": version: 4.1.0 resolution: "signal-exit@npm:4.1.0" @@ -1649,7 +2040,7 @@ __metadata: languageName: node linkType: hard -"source-map-js@npm:^1.2.1": +"source-map-js@npm:^1.2.0, source-map-js@npm:^1.2.1": version: 1.2.1 resolution: "source-map-js@npm:1.2.1" checksum: 10c0/7bda1fc4c197e3c6ff17de1b8b2c20e60af81b63a52cb32ec5a5d67a20a7d42651e2cb34ebe93833c5a2a084377e17455854fee3e21e7925c64a51b6a52b0faf @@ -1681,6 +2072,20 @@ __metadata: languageName: node linkType: hard +"stackback@npm:0.0.2": + version: 0.0.2 + resolution: "stackback@npm:0.0.2" + checksum: 10c0/89a1416668f950236dd5ac9f9a6b2588e1b9b62b1b6ad8dff1bfc5d1a15dbf0aafc9b52d2226d00c28dffff212da464eaeebfc6b7578b9d180cef3e3782c5983 + languageName: node + linkType: hard + +"std-env@npm:^3.8.0": + version: 3.8.0 + resolution: "std-env@npm:3.8.0" + checksum: 10c0/f560a2902fd0fa3d648d7d0acecbd19d664006f7372c1fba197ed4c216b4c9e48db6e2769b5fe1616d42a9333c9f066c5011935035e85c59f45dc4f796272040 + languageName: node + linkType: hard + "string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0": version: 4.2.3 resolution: "string-width@npm:4.2.3" @@ -1730,6 +2135,15 @@ __metadata: languageName: node linkType: hard +"supports-color@npm:^7.1.0": + version: 7.2.0 + resolution: "supports-color@npm:7.2.0" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10c0/afb4c88521b8b136b5f5f95160c98dee7243dc79d5432db7efc27efb219385bbc7d9427398e43dd6cc730a0f87d5085ce1652af7efbe391327bc0a7d0f7fc124 + languageName: node + linkType: hard + "tar@npm:^6.1.11, tar@npm:^6.2.1": version: 6.2.1 resolution: "tar@npm:6.2.1" @@ -1744,6 +2158,38 @@ __metadata: languageName: node linkType: hard +"test-exclude@npm:^7.0.1": + version: 7.0.1 + resolution: "test-exclude@npm:7.0.1" + dependencies: + "@istanbuljs/schema": "npm:^0.1.2" + glob: "npm:^10.4.1" + minimatch: "npm:^9.0.4" + checksum: 10c0/6d67b9af4336a2e12b26a68c83308c7863534c65f27ed4ff7068a56f5a58f7ac703e8fc80f698a19bb154fd8f705cdf7ec347d9512b2c522c737269507e7b263 + languageName: node + linkType: hard + +"tinybench@npm:^2.9.0": + version: 2.9.0 + resolution: "tinybench@npm:2.9.0" + checksum: 10c0/c3500b0f60d2eb8db65250afe750b66d51623057ee88720b7f064894a6cb7eb93360ca824a60a31ab16dab30c7b1f06efe0795b352e37914a9d4bad86386a20c + languageName: node + linkType: hard + +"tinyexec@npm:^0.3.1": + version: 0.3.1 + resolution: "tinyexec@npm:0.3.1" + checksum: 10c0/11e7a7c5d8b3bddf8b5cbe82a9290d70a6fad84d528421d5d18297f165723cb53d2e737d8f58dcce5ca56f2e4aa2d060f02510b1f8971784f97eb3e9aec28f09 + languageName: node + linkType: hard + +"tinypool@npm:^1.0.1": + version: 1.0.2 + resolution: "tinypool@npm:1.0.2" + checksum: 10c0/31ac184c0ff1cf9a074741254fe9ea6de95026749eb2b8ec6fd2b9d8ca94abdccda731f8e102e7f32e72ed3b36d32c6975fd5f5523df3f1b6de6c3d8dfd95e63 + languageName: node + linkType: hard + "tinyqueue@npm:^3.0.0": version: 3.0.0 resolution: "tinyqueue@npm:3.0.0" @@ -1751,6 +2197,20 @@ __metadata: languageName: node linkType: hard +"tinyrainbow@npm:^1.2.0": + version: 1.2.0 + resolution: "tinyrainbow@npm:1.2.0" + checksum: 10c0/7f78a4b997e5ba0f5ecb75e7ed786f30bab9063716e7dff24dd84013fb338802e43d176cb21ed12480561f5649a82184cf31efb296601a29d38145b1cdb4c192 + languageName: node + linkType: hard + +"tinyspy@npm:^3.0.2": + version: 3.0.2 + resolution: "tinyspy@npm:3.0.2" + checksum: 10c0/55ffad24e346622b59292e097c2ee30a63919d5acb7ceca87fc0d1c223090089890587b426e20054733f97a58f20af2c349fb7cc193697203868ab7ba00bcea0 + languageName: node + linkType: hard + "tslib@npm:^2.6.2": version: 2.8.0 resolution: "tslib@npm:2.8.0" @@ -1824,6 +2284,64 @@ __metadata: languageName: node linkType: hard +"vite-node@npm:2.1.5": + version: 2.1.5 + resolution: "vite-node@npm:2.1.5" + dependencies: + cac: "npm:^6.7.14" + debug: "npm:^4.3.7" + es-module-lexer: "npm:^1.5.4" + pathe: "npm:^1.1.2" + vite: "npm:^5.0.0" + bin: + vite-node: vite-node.mjs + checksum: 10c0/4ebe6bdf52f5ed65cb6f18af087faa87d8dca8e1a87413d1dbb8ead141d6e5d359ae006bd6c5e8f8c89cd5d90499bbf1d3f9e9a161dcc4bc86ec526862c01360 + languageName: node + linkType: hard + +"vite@npm:^5.0.0": + version: 5.4.11 + resolution: "vite@npm:5.4.11" + dependencies: + esbuild: "npm:^0.21.3" + fsevents: "npm:~2.3.3" + postcss: "npm:^8.4.43" + rollup: "npm:^4.20.0" + peerDependencies: + "@types/node": ^18.0.0 || >=20.0.0 + less: "*" + lightningcss: ^1.21.0 + sass: "*" + sass-embedded: "*" + stylus: "*" + sugarss: "*" + terser: ^5.4.0 + dependenciesMeta: + fsevents: + optional: true + peerDependenciesMeta: + "@types/node": + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + bin: + vite: bin/vite.js + checksum: 10c0/d536bb7af57dd0eca2a808f95f5ff1d7b7ffb8d86e17c6893087680a0448bd0d15e07475270c8a6de65cb5115592d037130a1dd979dc76bcef8c1dda202a1874 + languageName: node + linkType: hard + "vite@npm:^5.4.4": version: 5.4.7 resolution: "vite@npm:5.4.7" @@ -1867,6 +2385,56 @@ __metadata: languageName: node linkType: hard +"vitest@npm:^2.1.5": + version: 2.1.5 + resolution: "vitest@npm:2.1.5" + dependencies: + "@vitest/expect": "npm:2.1.5" + "@vitest/mocker": "npm:2.1.5" + "@vitest/pretty-format": "npm:^2.1.5" + "@vitest/runner": "npm:2.1.5" + "@vitest/snapshot": "npm:2.1.5" + "@vitest/spy": "npm:2.1.5" + "@vitest/utils": "npm:2.1.5" + chai: "npm:^5.1.2" + debug: "npm:^4.3.7" + expect-type: "npm:^1.1.0" + magic-string: "npm:^0.30.12" + pathe: "npm:^1.1.2" + std-env: "npm:^3.8.0" + tinybench: "npm:^2.9.0" + tinyexec: "npm:^0.3.1" + tinypool: "npm:^1.0.1" + tinyrainbow: "npm:^1.2.0" + vite: "npm:^5.0.0" + vite-node: "npm:2.1.5" + why-is-node-running: "npm:^2.3.0" + peerDependencies: + "@edge-runtime/vm": "*" + "@types/node": ^18.0.0 || >=20.0.0 + "@vitest/browser": 2.1.5 + "@vitest/ui": 2.1.5 + happy-dom: "*" + jsdom: "*" + peerDependenciesMeta: + "@edge-runtime/vm": + optional: true + "@types/node": + optional: true + "@vitest/browser": + optional: true + "@vitest/ui": + optional: true + happy-dom: + optional: true + jsdom: + optional: true + bin: + vitest: vitest.mjs + checksum: 10c0/1befb842da0826eed8761fe6cbd6ecae6b38d1ae83ac6619b994544d07e47905feaff2b254210315aa8e9b86645174c71a63b5d809799a289679a0063381c9a4 + languageName: node + linkType: hard + "vt-pbf@npm:^3.1.3": version: 3.1.3 resolution: "vt-pbf@npm:3.1.3" @@ -1900,6 +2468,18 @@ __metadata: languageName: node linkType: hard +"why-is-node-running@npm:^2.3.0": + version: 2.3.0 + resolution: "why-is-node-running@npm:2.3.0" + dependencies: + siginfo: "npm:^2.0.0" + stackback: "npm:0.0.2" + bin: + why-is-node-running: cli.js + checksum: 10c0/1cde0b01b827d2cf4cb11db962f3958b9175d5d9e7ac7361d1a7b0e2dc6069a263e69118bd974c4f6d0a890ef4eedfe34cf3d5167ec14203dbc9a18620537054 + languageName: node + linkType: hard + "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version: 7.0.0 resolution: "wrap-ansi@npm:7.0.0"