From 83321cbc7978d1ebff7e4955144055d06c4ee420 Mon Sep 17 00:00:00 2001 From: Marcel Gerber Date: Wed, 5 Mar 2025 18:43:09 +0100 Subject: [PATCH] =?UTF-8?q?Switch=20from=20jest=20to=20vitest=20?= =?UTF-8?q?=F0=9F=9A=80=20=20(#4628)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 9 +- .vscode/extensions.json | 3 +- .vscode/launch.json | 31 - Makefile | 9 +- adminShared/SqlFilterSExpression.test.ts | 2 +- adminShared/patchHelper.test.ts | 2 +- adminSiteClient/instrument.ts | 12 +- adminSiteServer/app.test.ts | 1229 +++++---- baker/DeployQueueServer.test.ts | 12 +- baker/GrapherBakingUtils.test.ts | 2 + baker/SiteBaker.test.ts | 2 +- baker/SiteBaker.tsx | 7 +- baker/chunk.test.ts | 2 +- baker/formatting.test.ts | 2 +- baker/pageOverrides.test.ts | 12 +- baker/redirects.test.ts | 9 +- baker/redirects.ts | 82 +- baker/redirectsFromDb.ts | 81 + baker/siteRenderers.test.ts | 2 +- db/Variable.test.ts | 25 +- db/execWrapper.test.ts | 2 +- db/gdocTests.test.ts | 2 +- db/model/Gdoc/archieToEnriched.test.ts | 2 + db/model/Gdoc/htmlToEnriched.test.ts | 2 + db/tests/basic.test.ts | 3 +- db/tests/run-db-tests.sh | 2 +- docs/devcontainer-setup.md | 6 +- docs/local-typescript-setup.md | 6 +- eslint.config.mjs | 1 - ...m.test.tsx => ExplorerCreatePage.test.tsx} | 6 +- .../ExplorerAdminServer.test.ts | 7 +- gitCms/GitCms.test.ts | 8 +- gitCms/GitCmsClient.test.ts | 2 +- gitCms/GitCmsServer.test.ts | 2 +- jest.config.js | 28 - jest.db.config.js | 13 - package.json | 20 +- .../MarkdownTextWrap/MarkdownTextWrap.test.ts | 2 +- .../components/src/TextWrap/TextWrap.test.ts | 2 +- .../src/TextWrap/TextWrapUtils.test.ts | 2 +- .../core-table/src/CoreTable.test.ts | 2 +- .../core-table/src/CoreTableColumns.test.ts | 2 + .../core-table/src/CoreTablePrinter.test.ts | 10 +- .../core-table/src/CoreTableUtils.test.ts | 2 +- .../core-table/src/OwidTable.test.ts | 2 +- .../core-table/src/OwidTableUtil.test.ts | 2 + .../core-table/src/Transforms.test.ts | 2 +- .../@ourworldindata/explorer/package.json | 7 - ...plorer.jsdom.test.tsx => Explorer.test.ts} | 6 +- ...dom.test.tsx => ExplorerControls.test.tsx} | 6 +- .../explorer/src/ExplorerProgram.test.ts | 2 +- .../explorer/src/gridLang/GridCell.test.ts | 2 +- .../explorer/src/gridLang/GridProgram.test.ts | 2 +- .../ExplorerUrlMigrations.test.ts | 2 +- packages/@ourworldindata/grapher/package.json | 7 - .../grapher/src/axis/Axis.test.ts | 2 +- .../grapher/src/axis/AxisConfig.test.ts | 2 +- ...iews.jsdom.test.tsx => AxisViews.test.tsx} | 2 +- .../src/barCharts/DiscreteBarChart.test.ts | 2 +- .../grapher/src/chart/ChartDimension.test.ts | 2 +- .../src/color/BinningStrategies.test.ts | 2 +- .../grapher/src/color/ColorScale.test.ts | 2 +- .../grapher/src/color/ColorScaleBin.test.ts | 2 +- .../src/color/ColorScaleConfig.test.ts | 2 +- .../grapher/src/color/ColorUtils.test.ts | 2 +- ...test.tsx => GlobalEntitySelector.test.tsx} | 6 +- .../grapher/src/core/EntityUrlBuilder.test.ts | 4 +- ...{Grapher.jsdom.test.ts => Grapher.test.ts} | 2 +- .../grapher/src/core/GrapherUrl.test.ts | 2 + .../src/core/GrapherUrlMigrations.test.ts | 2 +- ...test.tsx => GrapherWithChartTypes.test.ts} | 4 +- .../src/core/LegacyToOwidTable.test.ts | 2 +- ...able.jsdom.test.tsx => DataTable.test.tsx} | 6 +- .../grapher/src/facetChart/FacetChart.test.ts | 2 +- .../grapher/src/focus/FocusArray.test.ts | 2 +- .../HorizontalColorLegends.test.ts | 2 +- .../grapher/src/lineCharts/LineChart.test.ts | 2 +- ...LineLegend.test.tsx => LineLegend.test.ts} | 2 +- ...pChart.jsdom.test.tsx => MapChart.test.ts} | 2 +- .../grapher/src/mapCharts/MapConfig.test.ts | 2 +- .../grapher/src/mapCharts/MapProjections.ts | 15 +- ...tip.jsdom.test.tsx => MapTooltip.test.tsx} | 6 +- .../grapher/src/mapCharts/MapTopology.test.ts | 2 +- ...adModal.test.tsx => DownloadModal.test.ts} | 2 +- .../ComparisonLineGenerator.test.ts | 2 +- .../scatterCharts/MultiColorPolyline.test.ts | 2 +- .../scatterCharts/ScatterPlotChart.test.ts | 2 +- .../src/schema/migrations/migrate.test.ts | 2 +- .../src/selection/SelectionArray.test.ts | 2 +- ...r.test.tsx => SlideShowController.test.ts} | 2 +- .../src/slopeCharts/SlopeChart.test.ts | 2 +- ....jsdom.test.tsx => MarimekkoChart.test.ts} | 461 +++- .../src/stackedCharts/MarimekkoChart.test.tsx | 457 ---- .../stackedCharts/StackedAreaChart.test.ts | 2 +- .../src/stackedCharts/StackedBarChart.test.ts | 2 +- .../StackedDiscreteBarChart.test.ts | 2 +- .../src/stackedCharts/StackedUtils.test.ts | 2 +- .../src/timeline/TimelineController.test.ts | 2 +- packages/@ourworldindata/types/package.json | 1 - packages/@ourworldindata/utils/package.json | 2 - .../@ourworldindata/utils/src/Bounds.test.ts | 2 +- .../utils/src/FuzzySearch.test.ts | 2 + .../utils/src/MultiDimDataPageConfig.test.ts | 2 +- .../utils/src/OwidVariable.test.ts | 2 +- .../utils/src/PointVector.test.ts | 2 +- .../utils/src/PromiseCache.test.ts | 8 +- .../utils/src/PromiseSwitcher.test.ts | 16 +- .../utils/src/TimeBounds.test.ts | 2 +- .../@ourworldindata/utils/src/Util.test.ts | 10 +- .../utils/src/formatValue.test.ts | 2 +- .../utils/src/grapherConfigUtils.test.ts | 2 +- .../utils/src/persistable/Persistable.test.ts | 2 +- .../@ourworldindata/utils/src/regions.test.ts | 2 +- .../utils/src/serializers.test.ts | 2 +- .../utils/src/urls/Url.test.ts | 2 +- .../utils/src/urls/UrlUtils.test.ts | 2 +- serverUtils/errorLog.ts | 3 +- serverUtils/hash.test.ts | 2 + serverUtils/instrument.ts | 27 +- serverUtils/serverUtil.test.ts | 2 + site/Breadcrumb/Breadcrumb.test.ts | 2 +- site/CookiePreferencesManager.test.ts | 2 +- ...ge.jsdom.test.tsx => GrapherPage.test.tsx} | 2 +- ....jsdom.test.tsx => RelatedCharts.test.tsx} | 6 +- site/formatting.test.ts | 2 + ...ts.jsdom.test.tsx => KeyInsights.test.tsx} | 11 +- site/instrument.ts | 46 +- site/viteUtils.test.ts | 2 + vite.config-common.mts | 26 +- vitest.config.ts | 15 + vitest.db.config.ts | 10 + yarn.lock | 2415 +++++------------ 132 files changed, 2232 insertions(+), 3142 deletions(-) create mode 100644 baker/redirectsFromDb.ts rename explorerAdminClient/{ExplorerCreatePage.jsdom.test.tsx => ExplorerCreatePage.test.tsx} (89%) delete mode 100644 jest.config.js delete mode 100644 jest.db.config.js rename packages/@ourworldindata/explorer/src/{Explorer.jsdom.test.tsx => Explorer.test.ts} (97%) rename packages/@ourworldindata/explorer/src/{ExplorerControls.jsdom.test.tsx => ExplorerControls.test.tsx} (92%) rename packages/@ourworldindata/grapher/src/axis/{AxisViews.jsdom.test.tsx => AxisViews.test.tsx} (97%) rename packages/@ourworldindata/grapher/src/controls/globalEntitySelector/{GlobalEntitySelector.jsdom.test.tsx => GlobalEntitySelector.test.tsx} (93%) rename packages/@ourworldindata/grapher/src/core/{Grapher.jsdom.test.ts => Grapher.test.ts} (99%) rename packages/@ourworldindata/grapher/src/core/{GrapherWithChartTypes.jsdom.test.tsx => GrapherWithChartTypes.test.ts} (95%) rename packages/@ourworldindata/grapher/src/dataTable/{DataTable.jsdom.test.tsx => DataTable.test.tsx} (98%) rename packages/@ourworldindata/grapher/src/lineLegend/{LineLegend.test.tsx => LineLegend.test.ts} (99%) rename packages/@ourworldindata/grapher/src/mapCharts/{MapChart.jsdom.test.tsx => MapChart.test.ts} (96%) rename packages/@ourworldindata/grapher/src/mapCharts/{MapTooltip.jsdom.test.tsx => MapTooltip.test.tsx} (92%) rename packages/@ourworldindata/grapher/src/modal/{DownloadModal.test.tsx => DownloadModal.test.ts} (97%) rename packages/@ourworldindata/grapher/src/slideshowController/{SlideShowController.test.tsx => SlideShowController.test.ts} (93%) rename packages/@ourworldindata/grapher/src/stackedCharts/{MarimekkoChart.jsdom.test.tsx => MarimekkoChart.test.ts} (53%) delete mode 100644 packages/@ourworldindata/grapher/src/stackedCharts/MarimekkoChart.test.tsx rename site/{GrapherPage.jsdom.test.tsx => GrapherPage.test.tsx} (97%) rename site/blocks/{RelatedCharts.jsdom.test.tsx => RelatedCharts.test.tsx} (96%) rename site/gdocs/components/{KeyInsights.jsdom.test.tsx => KeyInsights.test.tsx} (93%) create mode 100644 vitest.config.ts create mode 100644 vitest.db.config.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb2d45f029..100cec80e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: Continuous Integration on: [push, pull_request] jobs: - # Checks for prettify errors, TypeScript errors and runs Jest tests. + # Checks for prettify errors, TypeScript errors and runs vitest tests. testdbcheck: runs-on: ubuntu-latest @@ -35,11 +35,8 @@ jobs: - name: Run tsc build run: yarn buildTsc - - name: Run tsc buildTests - run: yarn lerna run buildTests - - - name: Run jest - run: yarn testJest + - name: Run vitest + run: yarn test eslint: runs-on: ubuntu-latest diff --git a/.vscode/extensions.json b/.vscode/extensions.json index ca46ff7a84..c67e40e557 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,6 +2,7 @@ "recommendations": [ "esbenp.prettier-vscode", "dbaeumer.vscode-eslint", - "editorconfig.editorconfig" + "editorconfig.editorconfig", + "vitest.explorer" ] } diff --git a/.vscode/launch.json b/.vscode/launch.json index b55be64837..604ec3e0ac 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,37 +4,6 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ - { - "args": [], - "internalConsoleOptions": "openOnSessionStart", - "name": "Jest Tests", - "program": "${workspaceFolder}/node_modules/jest/bin/jest.js", - "request": "launch", - "skipFiles": [ - "/**" - ], - "skipFiles": [ - "/**" - ], - "type": "node" - }, - { - //somewhat unstable, WIP - "type": "node", - "request": "launch", - "name": "Jest Test current file", - "program": "${workspaceFolder}/node_modules/.bin/jest", - "args": [ - "${fileBasenameNoExtension}.js", - "--watch" - ], - "args": [ - "${fileBasenameNoExtension}.js", - "--watch" - ], - "console": "integratedTerminal" - // "internalConsoleOptions": "neverOpen" - }, { "name": "Launch site dev", "program": "${workspaceFolder}/itsJustJavascript/adminSiteServer/app.js", diff --git a/Makefile b/Makefile index 68e69e26a8..6e69b1af48 100644 --- a/Makefile +++ b/Makefile @@ -224,19 +224,14 @@ tmp-downloads/owid_metadata.sql.gz: test: node_modules @echo '==> Linting' yarn run eslint - yarn lerna run build - yarn lerna run buildTests @echo '==> Checking formatting' yarn testPrettierAll @echo '==> Running tests' - yarn run jest + yarn run test dbtest: node_modules - @echo '==> Building' - yarn buildTsc - @echo '==> Running db test script' ./db/tests/run-db-tests.sh @@ -254,7 +249,7 @@ format: node_modules unittest: node_modules @echo '==> Running tests' - yarn run jest --all + yarn run test ../owid-grapher-svgs: cd .. && git clone git@github.com:owid/owid-grapher-svgs diff --git a/adminShared/SqlFilterSExpression.test.ts b/adminShared/SqlFilterSExpression.test.ts index aebb5d2237..19bdbe144e 100644 --- a/adminShared/SqlFilterSExpression.test.ts +++ b/adminShared/SqlFilterSExpression.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { variableAnnotationAllowedColumnNamesAndTypes } from "./AdminSessionTypes.js" import { parseToOperation, diff --git a/adminShared/patchHelper.test.ts b/adminShared/patchHelper.test.ts index 90b68a454c..ea6c2c8276 100644 --- a/adminShared/patchHelper.test.ts +++ b/adminShared/patchHelper.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { setValueRecursive, setValueRecursiveInplace } from "./patchHelper.js" diff --git a/adminSiteClient/instrument.ts b/adminSiteClient/instrument.ts index 7fbf6bd5e9..a0b8a6b422 100644 --- a/adminSiteClient/instrument.ts +++ b/adminSiteClient/instrument.ts @@ -5,8 +5,10 @@ import { SENTRY_ADMIN_DSN, } from "../settings/clientSettings.js" -Sentry.init({ - dsn: SENTRY_ADMIN_DSN, - environment: ENV, - release: COMMIT_SHA, -}) +if (!process.env.VITEST) { + Sentry.init({ + dsn: SENTRY_ADMIN_DSN, + environment: ENV, + release: COMMIT_SHA, + }) +} diff --git a/adminSiteServer/app.test.ts b/adminSiteServer/app.test.ts index 2e2a2e8c3b..0941341724 100644 --- a/adminSiteServer/app.test.ts +++ b/adminSiteServer/app.test.ts @@ -1,26 +1,35 @@ +import { + expect, + it, + describe, + beforeAll, + afterAll, + vi, + afterEach, + beforeEach, +} from "vitest" + import { google } from "googleapis" -import { beforeAll, jest } from "@jest/globals" + +const baseDir = findProjectBaseDir(__dirname) +if (!baseDir) throw Error("Could not find project base directory") + // Mock the google docs api to retrieve files from the test-files directory // AFAICT, we have to do this directly after the import // and before any other code that might import googleapis -jest.mock("googleapis", () => { - const originalModule: any = jest.requireActual("googleapis") +vi.mock("googleapis", async (importOriginal) => { + const originalModule: typeof import("googleapis") = await importOriginal() return { ...originalModule, google: { ...originalModule.google, - docs: jest.fn(() => ({ + docs: vi.fn(() => ({ documents: { - get: jest.fn(({ documentId }) => { - // This is a bit hacky and assumes we are running from inside - // the itsJustJavascript directory - I couldn't find a better way - // to get the workspace root directory here + get: vi.fn(({ documentId }) => { const unparsed = fs.readFileSync( path.join( - __dirname, - "..", - "..", + baseDir, "adminSiteServer", "test-files", `${documentId}.json` @@ -72,13 +81,13 @@ import path from "path" import fs from "fs" import { omitUndefinedValues } from "@ourworldindata/utils" import { latestGrapherConfigSchema } from "@ourworldindata/grapher" +import findProjectBaseDir from "../settings/findBaseDir.js" const ADMIN_SERVER_HOST = "localhost" const ADMIN_SERVER_PORT = 8765 const ADMIN_URL = `http://${ADMIN_SERVER_HOST}:${ADMIN_SERVER_PORT}/admin/api` -jest.setTimeout(10000) // wait for up to 10s for the app server to start let testKnexInstance: Knex | undefined = undefined let serverKnexInstance: Knex | undefined = undefined let app: OwidAdminApp | undefined = undefined @@ -143,16 +152,14 @@ afterEach(async () => { await cleanupDb() }) -afterAll((done: any) => { - void cleanupDb() - .then(() => - Promise.allSettled([ - app?.stopListening(), - testKnexInstance?.destroy(), - serverKnexInstance?.destroy(), - ]) - ) - .then(() => done()) +afterAll(async () => { + await cleanupDb().then(() => + Promise.allSettled([ + app?.stopListening(), + testKnexInstance?.destroy(), + serverKnexInstance?.destroy(), + ]) + ) }) async function getCountForTable(tableName: string): Promise { @@ -204,7 +211,7 @@ async function makeRequestAgainstAdminApi( return json } -describe("OwidAdminApp", () => { +describe("OwidAdminApp", { timeout: 10000 }, () => { const testChartConfig = { $schema: latestGrapherConfigSchema, slug: "test-chart", @@ -298,643 +305,663 @@ describe("OwidAdminApp", () => { }) }) -describe("OwidAdminApp: indicator-level chart configs", () => { - const variableId = 1 - const otherVariableId = 2 - - const dummyDataset = { - id: 1, - name: "Dummy dataset", - description: "Dataset description", - namespace: "owid", - createdByUserId: 1, - metadataEditedAt: new Date(), - metadataEditedByUserId: 1, - dataEditedAt: new Date(), - dataEditedByUserId: 1, - } +describe( + "OwidAdminApp: indicator-level chart configs", + { timeout: 10000 }, + () => { + const variableId = 1 + const otherVariableId = 2 - // dummy variable and its grapherConfigETL - const dummyVariable = { - id: variableId, - unit: "kg", - coverage: "Global by country", - timespan: "2000-2020", - datasetId: 1, - display: '{ "unit": "kg", "shortUnit": "kg" }', - } - const testVariableConfigETL = { - $schema: latestGrapherConfigSchema, - hasMapTab: true, - note: "Indicator note", - selectedEntityNames: ["France", "Italy", "Spain"], - hideRelativeToggle: false, - } - const testVariableConfigAdmin = { - $schema: latestGrapherConfigSchema, - title: "Admin title", - subtitle: "Admin subtitle", - } + const dummyDataset = { + id: 1, + name: "Dummy dataset", + description: "Dataset description", + namespace: "owid", + createdByUserId: 1, + metadataEditedAt: new Date(), + metadataEditedByUserId: 1, + dataEditedAt: new Date(), + dataEditedByUserId: 1, + } - // second dummy variable and its grapherConfigETL - const otherDummyVariable = { - ...dummyVariable, - id: otherVariableId, - } - const otherTestVariableConfig = { - $schema: latestGrapherConfigSchema, - note: "Other indicator note", - } + // dummy variable and its grapherConfigETL + const dummyVariable = { + id: variableId, + unit: "kg", + coverage: "Global by country", + timespan: "2000-2020", + datasetId: 1, + display: '{ "unit": "kg", "shortUnit": "kg" }', + } + const testVariableConfigETL = { + $schema: latestGrapherConfigSchema, + hasMapTab: true, + note: "Indicator note", + selectedEntityNames: ["France", "Italy", "Spain"], + hideRelativeToggle: false, + } + const testVariableConfigAdmin = { + $schema: latestGrapherConfigSchema, + title: "Admin title", + subtitle: "Admin subtitle", + } - const testChartConfig = { - $schema: latestGrapherConfigSchema, - slug: "test-chart", - title: "Test chart", - chartTypes: ["Marimekko"], - selectedEntityNames: [], - hideRelativeToggle: false, - dimensions: [ - { - variableId, - property: "y", - }, - ], - } - const testMultiDimConfig = { - grapherConfigSchema: latestGrapherConfigSchema, - title: { - title: "Energy use", - titleVariant: "by energy source", - }, - views: [ - { - config: { title: "Total energy use" }, - dimensions: { - source: "all", - metric: "total", - }, - indicators: { - y: variableId, - }, - }, - { - dimensions: { - metric: "per_capita", - source: "all", - }, - indicators: { - y: otherVariableId, + // second dummy variable and its grapherConfigETL + const otherDummyVariable = { + ...dummyVariable, + id: otherVariableId, + } + const otherTestVariableConfig = { + $schema: latestGrapherConfigSchema, + note: "Other indicator note", + } + + const testChartConfig = { + $schema: latestGrapherConfigSchema, + slug: "test-chart", + title: "Test chart", + chartTypes: ["Marimekko"], + selectedEntityNames: [], + hideRelativeToggle: false, + dimensions: [ + { + variableId, + property: "y", }, + ], + } + const testMultiDimConfig = { + grapherConfigSchema: latestGrapherConfigSchema, + title: { + title: "Energy use", + titleVariant: "by energy source", }, - ], - dimensions: [ - { - name: "Energy source", - slug: "source", - choices: [ - { - name: "All sources", - slug: "all", - group: "Aggregates", - description: "Total energy use", + views: [ + { + config: { title: "Total energy use" }, + dimensions: { + source: "all", + metric: "total", }, - ], - }, - { - name: "Metric", - slug: "metric", - choices: [ - { - name: "Total consumption", - slug: "total", - description: - "The amount of energy consumed nationally per year", + indicators: { + y: variableId, }, - { - name: "Consumption per capita", - slug: "per_capita", - description: - "The average amount of energy each person consumes per year", + }, + { + dimensions: { + metric: "per_capita", + source: "all", }, - ], - }, - ], - } - - beforeEach(async () => { - await testKnexInstance!(DatasetsTableName).insert([dummyDataset]) - await testKnexInstance!(VariablesTableName).insert([ - dummyVariable, - otherDummyVariable, - ]) - }) - - it("should be able to edit ETL grapher configs via the api", async () => { - // make sure the database is in a clean state - const chartConfigsCount = await getCountForTable(ChartConfigsTableName) - expect(chartConfigsCount).toBe(0) - - // add a grapher config for a variable - await makeRequestAgainstAdminApi({ - method: "PUT", - path: `/variables/${variableId}/grapherConfigETL`, - body: JSON.stringify(testVariableConfigETL), - }) - - // get inserted configs from the database - const row = await testKnexInstance!(ChartConfigsTableName).first() - const patchConfigETL = JSON.parse(row.patch) - const fullConfigETL = JSON.parse(row.full) - - // for ETL configs, patch and full configs should be the same - expect(patchConfigETL).toEqual(fullConfigETL) - - // check that the dimensions field were added to the config - const processedTestVariableConfigETL = { - ...testVariableConfigETL, - - // automatically added + indicators: { + y: otherVariableId, + }, + }, + ], dimensions: [ { - property: "y", - variableId, + name: "Energy source", + slug: "source", + choices: [ + { + name: "All sources", + slug: "all", + group: "Aggregates", + description: "Total energy use", + }, + ], + }, + { + name: "Metric", + slug: "metric", + choices: [ + { + name: "Total consumption", + slug: "total", + description: + "The amount of energy consumed nationally per year", + }, + { + name: "Consumption per capita", + slug: "per_capita", + description: + "The average amount of energy each person consumes per year", + }, + ], }, ], } - expect(patchConfigETL).toEqual(processedTestVariableConfigETL) - - // fetch the admin+etl merged grapher config - let mergedGrapherConfig = await fetchJsonFromAdminApi( - `/variables/mergedGrapherConfig/${variableId}.json` - ) - - // since no admin-authored config exists, the merged config should be - // the same as the ETL config - expect(mergedGrapherConfig).toEqual(fullConfigETL) - - // add an admin-authored config for the variable - await makeRequestAgainstAdminApi({ - method: "PUT", - path: `/variables/${variableId}/grapherConfigAdmin`, - body: JSON.stringify(testVariableConfigAdmin), - }) - - // fetch the merged grapher config and verify that the admin-authored - // config has been merged in - mergedGrapherConfig = await fetchJsonFromAdminApi( - `/variables/mergedGrapherConfig/${variableId}.json` - ) - expect(mergedGrapherConfig).toEqual({ - ...processedTestVariableConfigETL, - ...testVariableConfigAdmin, - }) - // create mdim config that uses both of the variables - await makeRequestAgainstAdminApi({ - method: "PUT", - path: "/multi-dims/test%2Fcatalog%23path", - body: JSON.stringify({ config: testMultiDimConfig }), + beforeEach(async () => { + await testKnexInstance!(DatasetsTableName).insert([dummyDataset]) + await testKnexInstance!(VariablesTableName).insert([ + dummyVariable, + otherDummyVariable, + ]) }) - const mdim = await testKnexInstance!(MultiDimDataPagesTableName).first() - expect(mdim.catalogPath).toBe("test/catalog#path") - expect(mdim.slug).toBe(null) - const savedMdimConfig = JSON.parse(mdim.config) - // variableId should be normalized to an array - expect(savedMdimConfig.views[0].indicators.y).toBeInstanceOf(Array) - - const [mdxcc1, mdxcc2] = await testKnexInstance!( - MultiDimXChartConfigsTableName - ) - expect(mdxcc1.multiDimId).toBe(mdim.id) - expect(mdxcc1.viewId).toBe("total__all") - expect(mdxcc1.variableId).toBe(variableId) - expect(mdxcc2.multiDimId).toBe(mdim.id) - expect(mdxcc2.viewId).toBe("per_capita__all") - expect(mdxcc2.variableId).toBe(otherVariableId) - - // view config should override the variable config - const expectedMergedViewConfig = { - ...mergedGrapherConfig, - title: "Total energy use", - selectedEntityNames: [], // mdims define their own default entities - } - const fullViewConfig1 = await testKnexInstance!(ChartConfigsTableName) - .where("id", mdxcc1.chartConfigId) - .first() - expect(JSON.parse(fullViewConfig1.full)).toEqual( - expectedMergedViewConfig - ) - // update the admin-authored config for the variable - await makeRequestAgainstAdminApi({ - method: "PUT", - path: `/variables/${variableId}/grapherConfigAdmin`, - body: JSON.stringify({ - ...testVariableConfigAdmin, - subtitle: "Newly updated subtitle", - }), - }) - const expectedMergedViewConfigUpdated = { - ...expectedMergedViewConfig, - subtitle: "Newly updated subtitle", - } - const fullViewConfig1Updated = await testKnexInstance!( - ChartConfigsTableName - ) - .where("id", mdxcc1.chartConfigId) - .first() - expect(JSON.parse(fullViewConfig1Updated.full)).toEqual( - expectedMergedViewConfigUpdated - ) + it("should be able to edit ETL grapher configs via the api", async () => { + // make sure the database is in a clean state + const chartConfigsCount = await getCountForTable( + ChartConfigsTableName + ) + expect(chartConfigsCount).toBe(0) - // clean-up the mdim tables - await testKnexInstance!(MultiDimXChartConfigsTableName).truncate() - await testKnexInstance!(MultiDimDataPagesTableName).delete() - await testKnexInstance!(ChartConfigsTableName) - .whereIn("id", [mdxcc1.chartConfigId, mdxcc2.chartConfigId]) - .delete() - - // delete the admin-authored grapher config we just added - // and verify that the merged config is now the same as the ETL config - await makeRequestAgainstAdminApi({ - method: "DELETE", - path: `/variables/${variableId}/grapherConfigAdmin`, - }) - mergedGrapherConfig = await fetchJsonFromAdminApi( - `/variables/mergedGrapherConfig/${variableId}.json` - ) - expect(mergedGrapherConfig).toEqual(fullConfigETL) + // add a grapher config for a variable + await makeRequestAgainstAdminApi({ + method: "PUT", + path: `/variables/${variableId}/grapherConfigETL`, + body: JSON.stringify(testVariableConfigETL), + }) - // delete the ETL-authored grapher config we just added - await makeRequestAgainstAdminApi({ - method: "DELETE", - path: `/variables/${variableId}/grapherConfigETL`, - }) + // get inserted configs from the database + const row = await testKnexInstance!(ChartConfigsTableName).first() + const patchConfigETL = JSON.parse(row.patch) + const fullConfigETL = JSON.parse(row.full) - // check that the row in the chart_configs table has been deleted - const chartConfigsCountAfterDelete = await getCountForTable( - ChartConfigsTableName - ) - expect(chartConfigsCountAfterDelete).toBe(0) - }) + // for ETL configs, patch and full configs should be the same + expect(patchConfigETL).toEqual(fullConfigETL) - it("should update all charts that inherit from an indicator", async () => { - // make sure the database is in a clean state - const chartConfigsCount = await getCountForTable(ChartConfigsTableName) - expect(chartConfigsCount).toBe(0) + // check that the dimensions field were added to the config + const processedTestVariableConfigETL = { + ...testVariableConfigETL, - // add grapherConfigETL for the variable - await makeRequestAgainstAdminApi({ - method: "PUT", - path: `/variables/${variableId}/grapherConfigETL`, - body: JSON.stringify(testVariableConfigETL), - }) + // automatically added + dimensions: [ + { + property: "y", + variableId, + }, + ], + } + expect(patchConfigETL).toEqual(processedTestVariableConfigETL) - // add grapherConfigAdmin for the variable - await makeRequestAgainstAdminApi({ - method: "PUT", - path: `/variables/${variableId}/grapherConfigAdmin`, - body: JSON.stringify(testVariableConfigAdmin), - }) + // fetch the admin+etl merged grapher config + let mergedGrapherConfig = await fetchJsonFromAdminApi( + `/variables/mergedGrapherConfig/${variableId}.json` + ) - // make a request to create a chart that inherits from the variable - const response = await makeRequestAgainstAdminApi({ - method: "POST", - path: "/charts", - body: JSON.stringify(testChartConfig), - }) - const chartId = response.chartId + // since no admin-authored config exists, the merged config should be + // the same as the ETL config + expect(mergedGrapherConfig).toEqual(fullConfigETL) - // fetch the parent config of the chart and verify that it's the merged etl+admin config - const parentConfig = ( - await fetchJsonFromAdminApi(`/charts/${chartId}.parent.json`) - )?.config - const mergedGrapherConfig = await fetchJsonFromAdminApi( - `/variables/mergedGrapherConfig/${variableId}.json` - ) - expect(parentConfig).toEqual(mergedGrapherConfig) + // add an admin-authored config for the variable + await makeRequestAgainstAdminApi({ + method: "PUT", + path: `/variables/${variableId}/grapherConfigAdmin`, + body: JSON.stringify(testVariableConfigAdmin), + }) + + // fetch the merged grapher config and verify that the admin-authored + // config has been merged in + mergedGrapherConfig = await fetchJsonFromAdminApi( + `/variables/mergedGrapherConfig/${variableId}.json` + ) + expect(mergedGrapherConfig).toEqual({ + ...processedTestVariableConfigETL, + ...testVariableConfigAdmin, + }) - // fetch the full config of the chart and verify that it's been merged - // with the indicator config - const fullConfig = await fetchJsonFromAdminApi( - `/charts/${chartId}.config.json` - ) + // create mdim config that uses both of the variables + await makeRequestAgainstAdminApi({ + method: "PUT", + path: "/multi-dims/test%2Fcatalog%23path", + body: JSON.stringify({ config: testMultiDimConfig }), + }) + const mdim = await testKnexInstance!( + MultiDimDataPagesTableName + ).first() + expect(mdim.catalogPath).toBe("test/catalog#path") + expect(mdim.slug).toBe(null) + const savedMdimConfig = JSON.parse(mdim.config) + // variableId should be normalized to an array + expect(savedMdimConfig.views[0].indicators.y).toBeInstanceOf(Array) + + const [mdxcc1, mdxcc2] = await testKnexInstance!( + MultiDimXChartConfigsTableName + ) + expect(mdxcc1.multiDimId).toBe(mdim.id) + expect(mdxcc1.viewId).toBe("total__all") + expect(mdxcc1.variableId).toBe(variableId) + expect(mdxcc2.multiDimId).toBe(mdim.id) + expect(mdxcc2.viewId).toBe("per_capita__all") + expect(mdxcc2.variableId).toBe(otherVariableId) + + // view config should override the variable config + const expectedMergedViewConfig = { + ...mergedGrapherConfig, + title: "Total energy use", + selectedEntityNames: [], // mdims define their own default entities + } + const fullViewConfig1 = await testKnexInstance!( + ChartConfigsTableName + ) + .where("id", mdxcc1.chartConfigId) + .first() + expect(JSON.parse(fullViewConfig1.full)).toEqual( + expectedMergedViewConfig + ) - expect(fullConfig).toEqual({ - $schema: latestGrapherConfigSchema, - id: chartId, - isPublished: false, - version: 1, - slug: "test-chart", - title: "Test chart", - chartTypes: ["Marimekko"], - selectedEntityNames: [], - hideRelativeToggle: false, - dimensions: [{ variableId, property: "y" }], - subtitle: "Admin subtitle", // inherited from variable - note: "Indicator note", // inherited from variable - hasMapTab: true, // inherited from variable - }) + // update the admin-authored config for the variable + await makeRequestAgainstAdminApi({ + method: "PUT", + path: `/variables/${variableId}/grapherConfigAdmin`, + body: JSON.stringify({ + ...testVariableConfigAdmin, + subtitle: "Newly updated subtitle", + }), + }) + const expectedMergedViewConfigUpdated = { + ...expectedMergedViewConfig, + subtitle: "Newly updated subtitle", + } + const fullViewConfig1Updated = await testKnexInstance!( + ChartConfigsTableName + ) + .where("id", mdxcc1.chartConfigId) + .first() + expect(JSON.parse(fullViewConfig1Updated.full)).toEqual( + expectedMergedViewConfigUpdated + ) - // fetch the patch config and verify it's diffed correctly - const patchConfig = await fetchJsonFromAdminApi( - `/charts/${chartId}.patchConfig.json` - ) - expect(patchConfig).toEqual({ - $schema: latestGrapherConfigSchema, - id: chartId, - version: 1, - isPublished: false, - slug: "test-chart", - title: "Test chart", - chartTypes: ["Marimekko"], - selectedEntityNames: [], - dimensions: [{ variableId, property: "y" }], - // note that `hideRelativeToggle` is not included - }) + // clean-up the mdim tables + await testKnexInstance!(MultiDimXChartConfigsTableName).truncate() + await testKnexInstance!(MultiDimDataPagesTableName).delete() + await testKnexInstance!(ChartConfigsTableName) + .whereIn("id", [mdxcc1.chartConfigId, mdxcc2.chartConfigId]) + .delete() + + // delete the admin-authored grapher config we just added + // and verify that the merged config is now the same as the ETL config + await makeRequestAgainstAdminApi({ + method: "DELETE", + path: `/variables/${variableId}/grapherConfigAdmin`, + }) + mergedGrapherConfig = await fetchJsonFromAdminApi( + `/variables/mergedGrapherConfig/${variableId}.json` + ) + expect(mergedGrapherConfig).toEqual(fullConfigETL) - // delete the ETL config - await makeRequestAgainstAdminApi({ - method: "DELETE", - path: `/variables/${variableId}/grapherConfigETL`, - }) + // delete the ETL-authored grapher config we just added + await makeRequestAgainstAdminApi({ + method: "DELETE", + path: `/variables/${variableId}/grapherConfigETL`, + }) - // delete the admin config - await makeRequestAgainstAdminApi({ - method: "DELETE", - path: `/variables/${variableId}/grapherConfigAdmin`, + // check that the row in the chart_configs table has been deleted + const chartConfigsCountAfterDelete = await getCountForTable( + ChartConfigsTableName + ) + expect(chartConfigsCountAfterDelete).toBe(0) }) - // fetch the parent config of the chart and verify there is none - const parentConfigAfterDelete = ( - await fetchJsonFromAdminApi(`/charts/${chartId}.parent.json`) - )?.config - expect(parentConfigAfterDelete).toBeUndefined() - - // fetch the full config of the chart and verify that it doesn't have - // values from the deleted ETL config - const fullConfigAfterDelete = await fetchJsonFromAdminApi( - `/charts/${chartId}.config.json` - ) - expect(fullConfigAfterDelete).toEqual({ - $schema: latestGrapherConfigSchema, - id: chartId, - version: 1, - isPublished: false, - dimensions: [{ property: "y", variableId: 1 }], - selectedEntityNames: [], - slug: "test-chart", - title: "Test chart", - chartTypes: ["Marimekko"], - }) + it("should update all charts that inherit from an indicator", async () => { + // make sure the database is in a clean state + const chartConfigsCount = await getCountForTable( + ChartConfigsTableName + ) + expect(chartConfigsCount).toBe(0) - // fetch the patch config and verify it's diffed correctly - const patchConfigAfterDelete = await fetchJsonFromAdminApi( - `/charts/${chartId}.patchConfig.json` - ) - expect(patchConfigAfterDelete).toEqual({ - $schema: latestGrapherConfigSchema, - id: chartId, - version: 1, - isPublished: false, - slug: "test-chart", - title: "Test chart", - chartTypes: ["Marimekko"], - selectedEntityNames: [], - dimensions: [ - { - variableId, - property: "y", - }, - ], - // note that hideRelativeToggle is not included - }) - }) + // add grapherConfigETL for the variable + await makeRequestAgainstAdminApi({ + method: "PUT", + path: `/variables/${variableId}/grapherConfigETL`, + body: JSON.stringify(testVariableConfigETL), + }) - it("should update chart configs when inheritance is enabled/disabled", async () => { - const checkInheritance = async ({ - shouldBeEnabled, - }: { - shouldBeEnabled?: boolean - }): Promise => { - const chartRow = await testKnexInstance!(ChartsTableName) - .where({ id: chartId }) - .first() + // add grapherConfigAdmin for the variable + await makeRequestAgainstAdminApi({ + method: "PUT", + path: `/variables/${variableId}/grapherConfigAdmin`, + body: JSON.stringify(testVariableConfigAdmin), + }) + + // make a request to create a chart that inherits from the variable + const response = await makeRequestAgainstAdminApi({ + method: "POST", + path: "/charts", + body: JSON.stringify(testChartConfig), + }) + const chartId = response.chartId + + // fetch the parent config of the chart and verify that it's the merged etl+admin config + const parentConfig = ( + await fetchJsonFromAdminApi(`/charts/${chartId}.parent.json`) + )?.config + const mergedGrapherConfig = await fetchJsonFromAdminApi( + `/variables/mergedGrapherConfig/${variableId}.json` + ) + expect(parentConfig).toEqual(mergedGrapherConfig) + // fetch the full config of the chart and verify that it's been merged + // with the indicator config const fullConfig = await fetchJsonFromAdminApi( `/charts/${chartId}.config.json` ) - if (shouldBeEnabled) { - expect(chartRow.isInheritanceEnabled).toBeTruthy() - expect(fullConfig).toHaveProperty("note", "Indicator note") - expect(fullConfig).toHaveProperty("hasMapTab", true) - } else { - expect(chartRow.isInheritanceEnabled).toBeFalsy() - expect(fullConfig).not.toHaveProperty("note") - expect(fullConfig).not.toHaveProperty("hasMapTab") - } - } + expect(fullConfig).toEqual({ + $schema: latestGrapherConfigSchema, + id: chartId, + isPublished: false, + version: 1, + slug: "test-chart", + title: "Test chart", + chartTypes: ["Marimekko"], + selectedEntityNames: [], + hideRelativeToggle: false, + dimensions: [{ variableId, property: "y" }], + subtitle: "Admin subtitle", // inherited from variable + note: "Indicator note", // inherited from variable + hasMapTab: true, // inherited from variable + }) + + // fetch the patch config and verify it's diffed correctly + const patchConfig = await fetchJsonFromAdminApi( + `/charts/${chartId}.patchConfig.json` + ) + expect(patchConfig).toEqual({ + $schema: latestGrapherConfigSchema, + id: chartId, + version: 1, + isPublished: false, + slug: "test-chart", + title: "Test chart", + chartTypes: ["Marimekko"], + selectedEntityNames: [], + dimensions: [{ variableId, property: "y" }], + // note that `hideRelativeToggle` is not included + }) + + // delete the ETL config + await makeRequestAgainstAdminApi({ + method: "DELETE", + path: `/variables/${variableId}/grapherConfigETL`, + }) + + // delete the admin config + await makeRequestAgainstAdminApi({ + method: "DELETE", + path: `/variables/${variableId}/grapherConfigAdmin`, + }) + + // fetch the parent config of the chart and verify there is none + const parentConfigAfterDelete = ( + await fetchJsonFromAdminApi(`/charts/${chartId}.parent.json`) + )?.config + expect(parentConfigAfterDelete).toBeUndefined() + + // fetch the full config of the chart and verify that it doesn't have + // values from the deleted ETL config + const fullConfigAfterDelete = await fetchJsonFromAdminApi( + `/charts/${chartId}.config.json` + ) + expect(fullConfigAfterDelete).toEqual({ + $schema: latestGrapherConfigSchema, + id: chartId, + version: 1, + isPublished: false, + dimensions: [{ property: "y", variableId: 1 }], + selectedEntityNames: [], + slug: "test-chart", + title: "Test chart", + chartTypes: ["Marimekko"], + }) + + // fetch the patch config and verify it's diffed correctly + const patchConfigAfterDelete = await fetchJsonFromAdminApi( + `/charts/${chartId}.patchConfig.json` + ) + expect(patchConfigAfterDelete).toEqual({ + $schema: latestGrapherConfigSchema, + id: chartId, + version: 1, + isPublished: false, + slug: "test-chart", + title: "Test chart", + chartTypes: ["Marimekko"], + selectedEntityNames: [], + dimensions: [ + { + variableId, + property: "y", + }, + ], + // note that hideRelativeToggle is not included + }) + }) - // make sure the database is in a clean state - const chartConfigsCount = await getCountForTable(ChartConfigsTableName) - expect(chartConfigsCount).toBe(0) + it("should update chart configs when inheritance is enabled/disabled", async () => { + const checkInheritance = async ({ + shouldBeEnabled, + }: { + shouldBeEnabled?: boolean + }): Promise => { + const chartRow = await testKnexInstance!(ChartsTableName) + .where({ id: chartId }) + .first() + + const fullConfig = await fetchJsonFromAdminApi( + `/charts/${chartId}.config.json` + ) - // add grapherConfigETL for the variable - await makeRequestAgainstAdminApi({ - method: "PUT", - path: `/variables/${variableId}/grapherConfigETL`, - body: JSON.stringify(testVariableConfigETL), - }) + if (shouldBeEnabled) { + expect(chartRow.isInheritanceEnabled).toBeTruthy() + expect(fullConfig).toHaveProperty("note", "Indicator note") + expect(fullConfig).toHaveProperty("hasMapTab", true) + } else { + expect(chartRow.isInheritanceEnabled).toBeFalsy() + expect(fullConfig).not.toHaveProperty("note") + expect(fullConfig).not.toHaveProperty("hasMapTab") + } + } - // create a chart whose parent is the given indicator - const response = await makeRequestAgainstAdminApi({ - method: "POST", - path: "/charts", - body: JSON.stringify(testChartConfig), - }) - const chartId = response.chartId + // make sure the database is in a clean state + const chartConfigsCount = await getCountForTable( + ChartConfigsTableName + ) + expect(chartConfigsCount).toBe(0) - // get the ETL config from the database - const row = await testKnexInstance!(ChartConfigsTableName).first() - const fullConfigETL = JSON.parse(row.full) + // add grapherConfigETL for the variable + await makeRequestAgainstAdminApi({ + method: "PUT", + path: `/variables/${variableId}/grapherConfigETL`, + body: JSON.stringify(testVariableConfigETL), + }) + + // create a chart whose parent is the given indicator + const response = await makeRequestAgainstAdminApi({ + method: "POST", + path: "/charts", + body: JSON.stringify(testChartConfig), + }) + const chartId = response.chartId + + // get the ETL config from the database + const row = await testKnexInstance!(ChartConfigsTableName).first() + const fullConfigETL = JSON.parse(row.full) + + // check the parent of the chart + const parent = await fetchJsonFromAdminApi( + `/charts/${chartId}.parent.json` + ) + expect(parent.variableId).toEqual(variableId) + expect(parent.config).toEqual(fullConfigETL) - // check the parent of the chart - const parent = await fetchJsonFromAdminApi( - `/charts/${chartId}.parent.json` - ) - expect(parent.variableId).toEqual(variableId) - expect(parent.config).toEqual(fullConfigETL) + // verify that inheritance is enabled by default + await checkInheritance({ shouldBeEnabled: true }) - // verify that inheritance is enabled by default - await checkInheritance({ shouldBeEnabled: true }) + // disable inheritance + await makeRequestAgainstAdminApi({ + method: "PUT", + path: `/charts/${chartId}?inheritance=disable`, + body: JSON.stringify(testChartConfig), + }) + await checkInheritance({ shouldBeEnabled: false }) - // disable inheritance - await makeRequestAgainstAdminApi({ - method: "PUT", - path: `/charts/${chartId}?inheritance=disable`, - body: JSON.stringify(testChartConfig), - }) - await checkInheritance({ shouldBeEnabled: false }) + // enable inheritance + await makeRequestAgainstAdminApi({ + method: "PUT", + path: `/charts/${chartId}?inheritance=enable`, + body: JSON.stringify(testChartConfig), + }) + await checkInheritance({ shouldBeEnabled: true }) - // enable inheritance - await makeRequestAgainstAdminApi({ - method: "PUT", - path: `/charts/${chartId}?inheritance=enable`, - body: JSON.stringify(testChartConfig), + // update the config without making changes to the inheritance setting + await makeRequestAgainstAdminApi({ + method: "PUT", + path: `/charts/${chartId}`, + body: JSON.stringify(testChartConfig), + }) + await checkInheritance({ shouldBeEnabled: true }) }) - await checkInheritance({ shouldBeEnabled: true }) - // update the config without making changes to the inheritance setting - await makeRequestAgainstAdminApi({ - method: "PUT", - path: `/charts/${chartId}`, - body: JSON.stringify(testChartConfig), - }) - await checkInheritance({ shouldBeEnabled: true }) - }) + it("should recompute configs when the parent of a chart changes", async () => { + // add grapherConfigETL for the variables + await makeRequestAgainstAdminApi({ + method: "PUT", + path: `/variables/${variableId}/grapherConfigETL`, + body: JSON.stringify(testVariableConfigETL), + }) + await makeRequestAgainstAdminApi({ + method: "PUT", + path: `/variables/${otherVariableId}/grapherConfigETL`, + body: JSON.stringify(otherTestVariableConfig), + }) + + // create a chart whose parent is the first indicator + const response = await makeRequestAgainstAdminApi({ + method: "POST", + path: "/charts?inheritance=enable", + body: JSON.stringify(testChartConfig), + }) + const chartId = response.chartId + + // check that chart inherits from the first indicator + let fullConfig = await fetchJsonFromAdminApi( + `/charts/${chartId}.config.json` + ) + expect(fullConfig).toHaveProperty("note", "Indicator note") - it("should recompute configs when the parent of a chart changes", async () => { - // add grapherConfigETL for the variables - await makeRequestAgainstAdminApi({ - method: "PUT", - path: `/variables/${variableId}/grapherConfigETL`, - body: JSON.stringify(testVariableConfigETL), - }) - await makeRequestAgainstAdminApi({ - method: "PUT", - path: `/variables/${otherVariableId}/grapherConfigETL`, - body: JSON.stringify(otherTestVariableConfig), - }) + // update chart config so that it now inherits from the second indicator + const chartConfigWithOtherIndicatorAsParent = { + ...testChartConfig, + dimensions: [ + { + variableId: otherVariableId, + property: "y", + }, + ], + } + await makeRequestAgainstAdminApi({ + method: "PUT", + path: `/charts/${chartId}`, + body: JSON.stringify(chartConfigWithOtherIndicatorAsParent), + }) - // create a chart whose parent is the first indicator - const response = await makeRequestAgainstAdminApi({ - method: "POST", - path: "/charts?inheritance=enable", - body: JSON.stringify(testChartConfig), + // check that chart inherits from the second indicator + fullConfig = await fetchJsonFromAdminApi( + `/charts/${chartId}.config.json` + ) + expect(fullConfig).toHaveProperty("note", "Other indicator note") + + // update chart config so that it doesn't inherit from an indicator + const chartConfigWithoutDimensions = omitUndefinedValues({ + ...testChartConfig, + dimensions: undefined, + }) + await makeRequestAgainstAdminApi({ + method: "PUT", + path: `/charts/${chartId}`, + body: JSON.stringify(chartConfigWithoutDimensions), + }) + + // check that chart doesn't inherit from any indicator + fullConfig = await fetchJsonFromAdminApi( + `/charts/${chartId}.config.json` + ) + expect(fullConfig).not.toHaveProperty("note") }) - const chartId = response.chartId - // check that chart inherits from the first indicator - let fullConfig = await fetchJsonFromAdminApi( - `/charts/${chartId}.config.json` - ) - expect(fullConfig).toHaveProperty("note", "Indicator note") + it("should update timestamps on chart update", async () => { + // make sure the database is in a clean state + const chartCount = await getCountForTable(ChartsTableName) + expect(chartCount).toBe(0) + const chartConfigsCount = await getCountForTable( + ChartConfigsTableName + ) + expect(chartConfigsCount).toBe(0) + + // make a request to create a chart + const response = await makeRequestAgainstAdminApi({ + method: "POST", + path: "/charts", + body: JSON.stringify(testChartConfig), + }) + const chartId = response.chartId + + // helper functions to get the updatedAt timestamp of the chart and its config + const chartUpdatedAt = async (): Promise => + (await testKnexInstance!(ChartsTableName).first()).updatedAt + const configUpdatedAt = async (): Promise => + (await testKnexInstance!(ChartConfigsTableName).first()) + .updatedAt + + // verify that both updatedAt timestamps are null initially + expect(await chartUpdatedAt()).toBeNull() + expect(await configUpdatedAt()).toBeNull() + + // update the chart + await makeRequestAgainstAdminApi({ + method: "PUT", + path: `/charts/${chartId}`, + body: JSON.stringify({ + ...testChartConfig, + title: "New title", + }), + }) + + // verify that the updatedAt timestamps are the same + const chartAfterUpdate = await chartUpdatedAt() + const configAfterUpdate = await configUpdatedAt() + expect(chartAfterUpdate).not.toBeNull() + expect(configAfterUpdate).not.toBeNull() + expect(chartAfterUpdate).toEqual(configAfterUpdate) + }) - // update chart config so that it now inherits from the second indicator - const chartConfigWithOtherIndicatorAsParent = { - ...testChartConfig, - dimensions: [ + it("should return an error if the schema is missing", async () => { + const invalidConfig = { + title: "Title", + // note that the $schema field is missing + } + const json = await makeRequestAgainstAdminApi( { - variableId: otherVariableId, - property: "y", + method: "PUT", + path: `/variables/${variableId}/grapherConfigETL`, + body: JSON.stringify(invalidConfig), }, - ], - } - await makeRequestAgainstAdminApi({ - method: "PUT", - path: `/charts/${chartId}`, - body: JSON.stringify(chartConfigWithOtherIndicatorAsParent), - }) - - // check that chart inherits from the second indicator - fullConfig = await fetchJsonFromAdminApi( - `/charts/${chartId}.config.json` - ) - expect(fullConfig).toHaveProperty("note", "Other indicator note") - - // update chart config so that it doesn't inherit from an indicator - const chartConfigWithoutDimensions = omitUndefinedValues({ - ...testChartConfig, - dimensions: undefined, - }) - await makeRequestAgainstAdminApi({ - method: "PUT", - path: `/charts/${chartId}`, - body: JSON.stringify(chartConfigWithoutDimensions), + { verifySuccess: false } + ) + expect(json.success).toBe(false) }) - // check that chart doesn't inherit from any indicator - fullConfig = await fetchJsonFromAdminApi( - `/charts/${chartId}.config.json` - ) - expect(fullConfig).not.toHaveProperty("note") - }) - - it("should update timestamps on chart update", async () => { - // make sure the database is in a clean state - const chartCount = await getCountForTable(ChartsTableName) - expect(chartCount).toBe(0) - const chartConfigsCount = await getCountForTable(ChartConfigsTableName) - expect(chartConfigsCount).toBe(0) - - // make a request to create a chart - const response = await makeRequestAgainstAdminApi({ - method: "POST", - path: "/charts", - body: JSON.stringify(testChartConfig), - }) - const chartId = response.chartId - - // helper functions to get the updatedAt timestamp of the chart and its config - const chartUpdatedAt = async (): Promise => - (await testKnexInstance!(ChartsTableName).first()).updatedAt - const configUpdatedAt = async (): Promise => - (await testKnexInstance!(ChartConfigsTableName).first()).updatedAt - - // verify that both updatedAt timestamps are null initially - expect(await chartUpdatedAt()).toBeNull() - expect(await configUpdatedAt()).toBeNull() - - // update the chart - await makeRequestAgainstAdminApi({ - method: "PUT", - path: `/charts/${chartId}`, - body: JSON.stringify({ ...testChartConfig, title: "New title" }), + it("should return an error if the schema is invalid", async () => { + const invalidConfig = { + $schema: "invalid", // note that the $schema field is invalid + title: "Title", + } + const json = await makeRequestAgainstAdminApi( + { + method: "PUT", + path: `/variables/${variableId}/grapherConfigETL`, + body: JSON.stringify(invalidConfig), + }, + { verifySuccess: false } + ) + expect(json.success).toBe(false) }) + } +) - // verify that the updatedAt timestamps are the same - const chartAfterUpdate = await chartUpdatedAt() - const configAfterUpdate = await configUpdatedAt() - expect(chartAfterUpdate).not.toBeNull() - expect(configAfterUpdate).not.toBeNull() - expect(chartAfterUpdate).toEqual(configAfterUpdate) - }) - - it("should return an error if the schema is missing", async () => { - const invalidConfig = { - title: "Title", - // note that the $schema field is missing - } - const json = await makeRequestAgainstAdminApi( - { - method: "PUT", - path: `/variables/${variableId}/grapherConfigETL`, - body: JSON.stringify(invalidConfig), - }, - { verifySuccess: false } - ) - expect(json.success).toBe(false) - }) - - it("should return an error if the schema is invalid", async () => { - const invalidConfig = { - $schema: "invalid", // note that the $schema field is invalid - title: "Title", - } - const json = await makeRequestAgainstAdminApi( - { - method: "PUT", - path: `/variables/${variableId}/grapherConfigETL`, - body: JSON.stringify(invalidConfig), - }, - { verifySuccess: false } - ) - expect(json.success).toBe(false) - }) -}) - -describe("OwidAdminApp: tag graph", () => { +describe("OwidAdminApp: tag graph", { timeout: 10000 }, () => { // prettier-ignore const dummyTags: DbInsertTag[] = [ { name: TagGraphRootName, id: 1 }, diff --git a/baker/DeployQueueServer.test.ts b/baker/DeployQueueServer.test.ts index 6da6850824..46c348a3da 100755 --- a/baker/DeployQueueServer.test.ts +++ b/baker/DeployQueueServer.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe, vi } from "vitest" import fs from "fs-extra" import { DeployQueueServer } from "./DeployQueueServer.js" @@ -7,8 +7,6 @@ import { DEPLOY_PENDING_FILE_PATH, } from "../settings/serverSettings.js" -import { jest } from "@jest/globals" - describe("parseQueueContent", () => { const server = new DeployQueueServer() it("parses newline delimited JSON objects", async () => { @@ -37,7 +35,7 @@ describe("parseQueueContent", () => { describe("getDeploys", () => { const server = new DeployQueueServer() it("is empty when nothing is in the queues", async () => { - jest.spyOn(fs, "readFile").mockImplementation( + vi.spyOn(fs, "readFile").mockImplementation( (async (): Promise => { return `` }) as any @@ -46,7 +44,7 @@ describe("getDeploys", () => { }) it("parses queued deploy file", async () => { - jest.spyOn(fs, "readFile").mockImplementation((async ( + vi.spyOn(fs, "readFile").mockImplementation((async ( path: string ): Promise => { if (path === DEPLOY_QUEUE_FILE_PATH) @@ -65,8 +63,8 @@ describe("getDeploys", () => { }) it("parses pending deploy file", async () => { - jest.spyOn(fs, "pathExists").mockImplementation(async () => true) - jest.spyOn(fs, "readFile").mockImplementation((async ( + vi.spyOn(fs, "pathExists").mockImplementation(async () => true) + vi.spyOn(fs, "readFile").mockImplementation((async ( path: string ): Promise => { if (path === DEPLOY_QUEUE_FILE_PATH) diff --git a/baker/GrapherBakingUtils.test.ts b/baker/GrapherBakingUtils.test.ts index e4247abbb3..27fef51061 100644 --- a/baker/GrapherBakingUtils.test.ts +++ b/baker/GrapherBakingUtils.test.ts @@ -1,3 +1,5 @@ +import { expect, it, describe } from "vitest" + import { grapherSlugToExportFileKey, grapherUrlToSlugAndQueryStr, diff --git a/baker/SiteBaker.test.ts b/baker/SiteBaker.test.ts index 324c9a63b4..76db2a7844 100644 --- a/baker/SiteBaker.test.ts +++ b/baker/SiteBaker.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { SiteBaker } from "./SiteBaker.js" diff --git a/baker/SiteBaker.tsx b/baker/SiteBaker.tsx index 3101c73e02..dbfbd89e8c 100644 --- a/baker/SiteBaker.tsx +++ b/baker/SiteBaker.tsx @@ -58,11 +58,7 @@ import { } from "@ourworldindata/utils" import { execWrapper } from "../db/execWrapper.js" import { countryProfileSpecs } from "../site/countryProfileProjects.js" -import { - getGrapherRedirectsMap, - getRedirects, - flushCache as redirectsFlushCache, -} from "./redirects.js" +import { getRedirects, flushCache as redirectsFlushCache } from "./redirects.js" import { bakeAllChangedGrapherPagesAndDeleteRemovedGraphers } from "./GrapherBaker.js" import { EXPLORERS_ROUTE_FOLDER } from "@ourworldindata/explorer" import { GIT_CMS_DIR } from "../gitCms/GitCmsConstants.js" @@ -105,6 +101,7 @@ import { bakeAllMultiDimDataPages } from "./MultiDimBaker.js" import { getAllLinkedPublishedMultiDimDataPages } from "../db/model/MultiDimDataPage.js" import { getPublicDonorNames } from "../db/model/Donor.js" import { getChartViewsInfo } from "../db/model/ChartView.js" +import { getGrapherRedirectsMap } from "./redirectsFromDb.js" type PrefetchedAttachments = { donors: string[] diff --git a/baker/chunk.test.ts b/baker/chunk.test.ts index 0952cbd0af..741fdb1646 100755 --- a/baker/chunk.test.ts +++ b/baker/chunk.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { chunkParagraphs } from "./chunk" diff --git a/baker/formatting.test.ts b/baker/formatting.test.ts index 80ce4a7a81..698fd11b51 100755 --- a/baker/formatting.test.ts +++ b/baker/formatting.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { parseFormattingOptions, diff --git a/baker/pageOverrides.test.ts b/baker/pageOverrides.test.ts index 543aa61474..11fbbef61f 100644 --- a/baker/pageOverrides.test.ts +++ b/baker/pageOverrides.test.ts @@ -1,8 +1,10 @@ +import { vi, it, expect } from "vitest" + import { FullPost, WP_PostType } from "@ourworldindata/utils" import { extractFormattingOptions } from "../serverUtils/wordpressUtils.js" import * as pageOverrides from "./pageOverrides.js" +import * as Post from "../db/model/Post.js" -import { jest } from "@jest/globals" import { KnexReadonlyTransaction } from "../db/db.js" const mockCreatePost = (slug: string): FullPost => { @@ -21,9 +23,9 @@ const mockCreatePost = (slug: string): FullPost => { const forestLandingSlug = "forests-and-deforestation" -const getPostBySlugLogToSlackNoThrow = jest.spyOn( - pageOverrides, - "getPostBySlugLogToSlackNoThrow" +const getPostBySlugLogToSlackNoThrow = vi.spyOn( + Post, + "getFullPostBySlugFromSnapshot" ) getPostBySlugLogToSlackNoThrow.mockImplementation((knex, landingSlug) => Promise.resolve(mockCreatePost(landingSlug)) @@ -77,7 +79,7 @@ it("does not get parent landing and logs (landing post not found)", async () => ) getPostBySlugLogToSlackNoThrow.mockImplementationOnce(() => - Promise.resolve(undefined) + Promise.resolve(undefined as any) ) await expect( diff --git a/baker/redirects.test.ts b/baker/redirects.test.ts index 20b1a3bf82..7901782e17 100644 --- a/baker/redirects.test.ts +++ b/baker/redirects.test.ts @@ -1,15 +1,16 @@ +import { vi, it, expect } from "vitest" + import { Url, strToQueryParams } from "@ourworldindata/utils" import { formatUrls } from "../site/formatting.js" -import * as redirects from "./redirects.js" +import * as redirectsFromDb from "./redirectsFromDb.js" import { resolveInternalRedirect } from "./redirects.js" -import { jest } from "@jest/globals" import { KnexReadonlyTransaction } from "../db/db.js" type ArrayForMap = [string, string][] -const getGrapherAndWordpressRedirectsMap = jest.spyOn( - redirects, +const getGrapherAndWordpressRedirectsMap = vi.spyOn( + redirectsFromDb, "getGrapherAndWordpressRedirectsMap" ) diff --git a/baker/redirects.ts b/baker/redirects.ts index b41417c6bc..fa0d81206b 100644 --- a/baker/redirects.ts +++ b/baker/redirects.ts @@ -1,5 +1,5 @@ import * as db from "../db/db.js" -import { memoize, Url } from "@ourworldindata/utils" +import { Url } from "@ourworldindata/utils" import { isCanonicalInternalUrl } from "./formatting.js" import { resolveExplorerRedirect } from "./replaceExplorerRedirects.js" import { logErrorAndMaybeCaptureInSentry } from "../serverUtils/errorLog.js" @@ -7,6 +7,10 @@ import { // deleteExpiredRedirects, getRedirectsFromDb, } from "../db/model/Redirect.js" +import { + getGrapherAndWordpressRedirectsMap, + getRecentGrapherRedirects, +} from "./redirectsFromDb.js" export const getRedirects = async (knex: db.KnexReadonlyTransaction) => { const staticRedirects = [ @@ -93,82 +97,6 @@ export const getRedirects = async (knex: db.KnexReadonlyTransaction) => { ] } -async function getRecentGrapherRedirects(knex: db.KnexReadonlyTransaction) { - // Prevent Cloudflare from serving outdated grapher pages, which can remain - // in the cache for up to a week. This is necessary, since we take into - // consideration the grapher redirects only when the route returns a 404, - // which won't be the case if the page is still cached. - // - // https://developers.cloudflare.com/pages/configuration/serving-pages/#asset-retention - return await db.knexRaw<{ - source: string - target: string - }>( - knex, - `-- sql - SELECT - chart_slug_redirects.slug as source, - chart_configs.slug as target - FROM chart_slug_redirects - INNER JOIN charts ON charts.id=chart_id - INNER JOIN chart_configs ON chart_configs.id=charts.configId - WHERE - COALESCE(chart_slug_redirects.updatedAt, chart_slug_redirects.createdAt) - > (NOW() - INTERVAL 1 WEEK) - ` - ) -} - -export const getGrapherRedirectsMap = async ( - knex: db.KnexReadonlyTransaction, - urlPrefix: string = "/grapher/" -) => { - const chartRedirectRows = (await db.knexRaw<{ - oldSlug: string - newSlug: string - }>( - knex, - `-- sql - SELECT chart_slug_redirects.slug as oldSlug, chart_configs.slug as newSlug - FROM chart_slug_redirects - INNER JOIN charts ON charts.id=chart_id - INNER JOIN chart_configs ON chart_configs.id=charts.configId - ` - )) as Array<{ oldSlug: string; newSlug: string }> - - return new Map( - chartRedirectRows - .filter((row) => row.oldSlug !== row.newSlug) - .map((row) => [ - `${urlPrefix}${row.oldSlug}`, - `${urlPrefix}${row.newSlug}`, - ]) - ) -} - -export const getWordpressRedirectsMap = async ( - knex: db.KnexReadonlyTransaction -) => { - const redirectsFromDb = await getRedirectsFromDb(knex) - - return new Map(redirectsFromDb.map((row) => [row.source, row.target])) -} - -export const getGrapherAndWordpressRedirectsMap = memoize( - async (knex: db.KnexReadonlyTransaction): Promise> => { - // source: pathnames only (e.g. /transport) - // target: pathnames with or without origins (e.g. /transport-new or https://ourworldindata.org/transport-new) - - const grapherRedirects = await getGrapherRedirectsMap(knex) - const wordpressRedirects = await getWordpressRedirectsMap(knex) - - // The order the redirects are added to the map is important. Adding the - // Wordpress redirects last means that Wordpress redirects can overwrite - // grapher redirects. - return new Map([...grapherRedirects, ...wordpressRedirects]) - } -) - export const resolveRedirectFromMap = async ( url: Url, redirectsMap: Map diff --git a/baker/redirectsFromDb.ts b/baker/redirectsFromDb.ts new file mode 100644 index 0000000000..cce1559ffb --- /dev/null +++ b/baker/redirectsFromDb.ts @@ -0,0 +1,81 @@ +import { memoize } from "@ourworldindata/utils" +import * as db from "../db/db.js" +import { getRedirectsFromDb } from "../db/model/Redirect.js" + +export async function getRecentGrapherRedirects( + knex: db.KnexReadonlyTransaction +) { + // Prevent Cloudflare from serving outdated grapher pages, which can remain + // in the cache for up to a week. This is necessary, since we take into + // consideration the grapher redirects only when the route returns a 404, + // which won't be the case if the page is still cached. + // + // https://developers.cloudflare.com/pages/configuration/serving-pages/#asset-retention + return await db.knexRaw<{ + source: string + target: string + }>( + knex, + `-- sql + SELECT + chart_slug_redirects.slug as source, + chart_configs.slug as target + FROM chart_slug_redirects + INNER JOIN charts ON charts.id=chart_id + INNER JOIN chart_configs ON chart_configs.id=charts.configId + WHERE + COALESCE(chart_slug_redirects.updatedAt, chart_slug_redirects.createdAt) + > (NOW() - INTERVAL 1 WEEK) + ` + ) +} + +export const getGrapherRedirectsMap = async ( + knex: db.KnexReadonlyTransaction, + urlPrefix: string = "/grapher/" +) => { + const chartRedirectRows = (await db.knexRaw<{ + oldSlug: string + newSlug: string + }>( + knex, + `-- sql + SELECT chart_slug_redirects.slug as oldSlug, chart_configs.slug as newSlug + FROM chart_slug_redirects + INNER JOIN charts ON charts.id=chart_id + INNER JOIN chart_configs ON chart_configs.id=charts.configId + ` + )) as Array<{ oldSlug: string; newSlug: string }> + + return new Map( + chartRedirectRows + .filter((row) => row.oldSlug !== row.newSlug) + .map((row) => [ + `${urlPrefix}${row.oldSlug}`, + `${urlPrefix}${row.newSlug}`, + ]) + ) +} + +export const getWordpressRedirectsMap = async ( + knex: db.KnexReadonlyTransaction +) => { + const redirectsFromDb = await getRedirectsFromDb(knex) + + return new Map(redirectsFromDb.map((row) => [row.source, row.target])) +} + +export const getGrapherAndWordpressRedirectsMap = memoize( + async (knex: db.KnexReadonlyTransaction): Promise> => { + // source: pathnames only (e.g. /transport) + // target: pathnames with or without origins (e.g. /transport-new or https://ourworldindata.org/transport-new) + + const grapherRedirects = await getGrapherRedirectsMap(knex) + const wordpressRedirects = await getWordpressRedirectsMap(knex) + + // The order the redirects are added to the map is important. Adding the + // Wordpress redirects last means that Wordpress redirects can overwrite + // grapher redirects. + return new Map([...grapherRedirects, ...wordpressRedirects]) + } +) diff --git a/baker/siteRenderers.test.ts b/baker/siteRenderers.test.ts index 5b3043e146..ac69360d65 100755 --- a/baker/siteRenderers.test.ts +++ b/baker/siteRenderers.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import {} from "../site/blocks/ProminentLink.js" import { renderExplorerPage } from "./siteRenderers.js" diff --git a/db/Variable.test.ts b/db/Variable.test.ts index 1f51b46ae2..80f796991d 100644 --- a/db/Variable.test.ts +++ b/db/Variable.test.ts @@ -1,4 +1,9 @@ -#! /usr/bin/env yarn jest +/** + * All the tests in here are skipped, currently, because mocking SQL/S3 calls is difficult: + * see https://vitest.dev/guide/mocking#mocking-pitfalls + */ + +import { expect, it, describe, afterEach, vi } from "vitest" import { writeVariableCSV, _dataAsDFfromS3 } from "./model/Variable.js" import * as Variable from "./model/Variable.js" @@ -7,15 +12,13 @@ import { Writable } from "stream" import { OwidVariableId } from "@ourworldindata/utils" import * as db from "./db.js" -import { jest } from "@jest/globals" - afterEach(() => { - jest.restoreAllMocks() + vi.restoreAllMocks() }) -export const mockS3data = (s3data: Record): void => { - jest.spyOn(Variable, "fetchS3Values").mockImplementation( - jest.fn((key: OwidVariableId) => s3data[key]) +const mockS3data = (s3data: Record): void => { + vi.spyOn(Variable, "fetchS3Values").mockImplementation( + vi.fn((key: OwidVariableId) => s3data[key]) ) const entities = pl @@ -25,16 +28,16 @@ export const mockS3data = (s3data: Record): void => { entityCode: ["code"], }) .withColumn(pl.col("entityId").cast(pl.Int32)) - jest.spyOn(Variable, "entitiesAsDF").mockResolvedValueOnce(entities) + vi.spyOn(Variable, "entitiesAsDF").mockResolvedValueOnce(entities) } -describe("writeVariableCSV", () => { +describe.skip("writeVariableCSV", () => { const getCSVOutput = async ( variablesDf: pl.DataFrame | undefined, s3data: any, variableIds: number[] ): Promise => { - const spy = jest.spyOn(Variable, "readSQLasDF") + const spy = vi.spyOn(Variable, "readSQLasDF") if (variablesDf) spy.mockResolvedValueOnce(variablesDf) if (s3data) mockS3data(s3data) @@ -161,7 +164,7 @@ UK,2001,2,, }) }) -describe("_dataAsDFfromS3", () => { +describe.skip("_dataAsDFfromS3", () => { it("works correctly for mixed data", async () => { const s3data = { 1: { diff --git a/db/execWrapper.test.ts b/db/execWrapper.test.ts index 318c5582c9..db71491da9 100755 --- a/db/execWrapper.test.ts +++ b/db/execWrapper.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { ExecError, execWrapper } from "./execWrapper.js" diff --git a/db/gdocTests.test.ts b/db/gdocTests.test.ts index 7249a16c39..608c565d7a 100644 --- a/db/gdocTests.test.ts +++ b/db/gdocTests.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env yarn jest +import { expect, it, describe } from "vitest" import { EnrichedBlockAdditionalCharts, diff --git a/db/model/Gdoc/archieToEnriched.test.ts b/db/model/Gdoc/archieToEnriched.test.ts index 2b10559b47..1d4372326e 100644 --- a/db/model/Gdoc/archieToEnriched.test.ts +++ b/db/model/Gdoc/archieToEnriched.test.ts @@ -1,3 +1,5 @@ +import { expect, it } from "vitest" + import { extractRefs } from "./archieToEnriched.js" it("Can extract a ref from some text", () => { diff --git a/db/model/Gdoc/htmlToEnriched.test.ts b/db/model/Gdoc/htmlToEnriched.test.ts index a340866593..40c6c0aa1f 100644 --- a/db/model/Gdoc/htmlToEnriched.test.ts +++ b/db/model/Gdoc/htmlToEnriched.test.ts @@ -1,3 +1,5 @@ +import { expect, it } from "vitest" + import { cheerioElementsToArchieML } from "./htmlToEnriched.js" import * as cheerio from "cheerio" diff --git a/db/tests/basic.test.ts b/db/tests/basic.test.ts index 1c2c6733e1..adbf574ebc 100644 --- a/db/tests/basic.test.ts +++ b/db/tests/basic.test.ts @@ -1,4 +1,5 @@ -#! /usr/bin/env jest +import { expect, beforeAll, test, afterAll } from "vitest" + import { dbTestConfig } from "./dbTestConfig.js" import { knex, Knex } from "knex" import { diff --git a/db/tests/run-db-tests.sh b/db/tests/run-db-tests.sh index 4d75d4702a..4aec79e508 100755 --- a/db/tests/run-db-tests.sh +++ b/db/tests/run-db-tests.sh @@ -26,7 +26,7 @@ echo '==> Running migrations' yarn tsx --tsconfig tsconfig.tsx.json node_modules/typeorm/cli.js migration:run -d db/tests/dataSource.dbtests.ts echo '==> Running tests' -if ! yarn run jest --config=jest.db.config.js --runInBand # runInBand runs multiple test files serially - useful to avoid weird race conditions +if ! yarn run vitest -c vitest.db.config.ts then echo '💀 Tests failed' ./devTools/docker/mark-test-mysql-dirty.sh diff --git a/docs/devcontainer-setup.md b/docs/devcontainer-setup.md index 152bc6dbd8..0026d70edc 100644 --- a/docs/devcontainer-setup.md +++ b/docs/devcontainer-setup.md @@ -49,7 +49,7 @@ If you want to access MySQL you have two options. ⚠ Note that depending on whi ## Running tests -To run our test suite you first need to build the TypeScript files into JavaScript and then run jest: +To run our test suite you first need to build the TypeScript files into JavaScript and then run vitest: 1. Run buildTsc @@ -57,10 +57,10 @@ To run our test suite you first need to build the TypeScript files into JavaScri yarn buildTsc ``` -2. Run jest +2. Run vitest ```sh - yarn testJest + yarn test ``` ## Using storybook diff --git a/docs/local-typescript-setup.md b/docs/local-typescript-setup.md index b81657b828..f6e2778347 100644 --- a/docs/local-typescript-setup.md +++ b/docs/local-typescript-setup.md @@ -64,7 +64,7 @@ Note: on Windows we strongly recommend using the [Windows Subsystem for Linux](h ## Running tests -To run our test suite you first need to build the TypeScript files into JavaScript and then run jest: +To run our test suite you first need to build the TypeScript files into JavaScript and then run vitest: 1. Build JavaScript @@ -72,8 +72,8 @@ To run our test suite you first need to build the TypeScript files into JavaScri yarn lerna run build && yarn buildTsc ``` -2. Run jest +2. Run vitest ```sh - yarn testJest + yarn test ``` diff --git a/eslint.config.mjs b/eslint.config.mjs index e22917ecd8..bb7bd234d4 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -181,7 +181,6 @@ export default tseslint.config( "**/*.cjs", "**/*.js", "**/dist/", - "**/jest.config.js", "**/knexfile.ts", "archive/**/*", "bakedSite/**/*", diff --git a/explorerAdminClient/ExplorerCreatePage.jsdom.test.tsx b/explorerAdminClient/ExplorerCreatePage.test.tsx similarity index 89% rename from explorerAdminClient/ExplorerCreatePage.jsdom.test.tsx rename to explorerAdminClient/ExplorerCreatePage.test.tsx index 9810020ec8..eb46a7ea8f 100755 --- a/explorerAdminClient/ExplorerCreatePage.jsdom.test.tsx +++ b/explorerAdminClient/ExplorerCreatePage.test.tsx @@ -1,4 +1,8 @@ -#! /usr/bin/env jest +/** + * @vitest-environment jsdom + */ + +import { expect, it, describe } from "vitest" import Enzyme from "enzyme" import Adapter from "@wojtekmaj/enzyme-adapter-react-17" diff --git a/explorerAdminServer/ExplorerAdminServer.test.ts b/explorerAdminServer/ExplorerAdminServer.test.ts index bb1aa3da0c..25667ac6c5 100644 --- a/explorerAdminServer/ExplorerAdminServer.test.ts +++ b/explorerAdminServer/ExplorerAdminServer.test.ts @@ -1,11 +1,8 @@ -#! /usr/bin/env jest -import { jest } from "@jest/globals" - -jest.setTimeout(10000) // wait up to 10s +import { expect, it } from "vitest" import { ExplorerAdminServer } from "./ExplorerAdminServer.js" -it("can init", async () => { +it("can init", { timeout: 10000 }, async () => { const server = new ExplorerAdminServer(__dirname) expect(server).toBeTruthy() diff --git a/gitCms/GitCms.test.ts b/gitCms/GitCms.test.ts index eac97dce27..6ed7f03345 100644 --- a/gitCms/GitCms.test.ts +++ b/gitCms/GitCms.test.ts @@ -1,15 +1,11 @@ -#! /usr/bin/env jest +import { expect, it, describe, beforeAll, afterAll } from "vitest" import { GitCmsClient } from "./GitCmsClient.js" import { GitCmsServer } from "./GitCmsServer.js" import fs from "fs-extra" import express from "express" -import { jest } from "@jest/globals" - -jest.setTimeout(10000) // wait for up to 10s for the server to respond - -describe("client/server integration tests", () => { +describe("client/server integration tests", { timeout: 10000 }, () => { const baseDir = __dirname + "/integrationTestTempDirectoryOkToDelete" // Arrange diff --git a/gitCms/GitCmsClient.test.ts b/gitCms/GitCmsClient.test.ts index 91c778bd9c..7d879e4807 100755 --- a/gitCms/GitCmsClient.test.ts +++ b/gitCms/GitCmsClient.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { GitCmsClient } from "./GitCmsClient.js" diff --git a/gitCms/GitCmsServer.test.ts b/gitCms/GitCmsServer.test.ts index 28f37bc3d9..814ceef359 100644 --- a/gitCms/GitCmsServer.test.ts +++ b/gitCms/GitCmsServer.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { GitCmsServer } from "./GitCmsServer.js" diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index b692eb8f13..0000000000 --- a/jest.config.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - testTimeout: 1000, - projects: [ - { - displayName: { name: "node", color: "magenta" }, - testEnvironment: "node", - testPathIgnorePatterns: [ - ".jsdom.test.", - "/itsJustJavascript/db/tests", - "/itsJustJavascript/adminSiteServer/app.test.(jsx|js)", - "/.nx/cache/", - ], - testMatch: ["**/*.test.(jsx|js)"], - }, - { - displayName: { name: "jsdom", color: "cyan" }, - testEnvironment: "jsdom", - testMatch: ["**/*.jsdom.test.(jsx|js)"], - testPathIgnorePatterns: ["/.nx/cache/"], - }, - ], -} - -// special envs for tests -process.env = Object.assign(process.env, { - CATALOG_PATH: "https://owid-catalog.nyc3.digitaloceanspaces.com", - BAKED_BASE_URL: "http://localhost:3030", -}) diff --git a/jest.db.config.js b/jest.db.config.js deleted file mode 100644 index a22424b9da..0000000000 --- a/jest.db.config.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - testTimeout: 10000, - projects: [ - { - displayName: { name: "db", color: "blue" }, - testEnvironment: "node", - testMatch: [ - "/itsJustJavascript/db/tests/**/*.test.js", - "/itsJustJavascript/adminSiteServer/*.test.(jsx|js)", - ], - }, - ], -} diff --git a/package.json b/package.json index f13662a404..b7a1887999 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,6 @@ "packageManager": "yarn@4.6.0", "scripts": { "batchTagWithGpt": "tsx --tsconfig tsconfig.tsx.json baker/batchTagWithGpt.ts", - "buildCoverage": "jest --coverage=true --coverageProvider=v8", "buildLocalBake": "tsx --tsconfig tsconfig.tsx.json baker/buildLocalBake.ts", "buildTsc": "tsc -b -verbose", "buildLerna": "lerna run build", @@ -38,7 +37,7 @@ "testCypress": "yarn cypress open --project devTools --config-file cypress/cypress.json", "testLint": "eslint .", "testPrettierAll": "yarn prettier --check \"**/*.{tsx,ts,jsx,js,json,md,html,css,scss,yml}\"", - "testJest": "lerna run buildTests && jest", + "test": "vitest", "generateDbTypes": "npx @rmp135/sql-ts -c db/sql-ts/sql-ts-config.json", "syncGraphersToR2": "tsx --tsconfig tsconfig.tsx.json devTools/syncGraphersToR2/syncGraphersToR2.ts", "syncCloudflareImages": "tsx --tsconfig tsconfig.tsx.json devTools/cloudflareImagesSync/cloudflareImagesSync.ts", @@ -70,7 +69,6 @@ "@slack/web-api": "^7.1.0", "@tanstack/react-query": "4", "@tippyjs/react": "^4.2.6", - "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0", "algoliasearch": "^4.23.2", "antd": "^5.24.0", "archieml": "^0.5.0", @@ -89,7 +87,6 @@ "embla-carousel-class-names": "^8.1.7", "embla-carousel-react": "^8.1.7", "entities": "^4.4.0", - "enzyme": "^3.11.0", "expr-eval": "^2.0.2", "express": "^4.21.2", "express-async-errors": "^3.1.1", @@ -175,12 +172,13 @@ "uuidv7": "^1.0.1", "webfontloader": "^1.6.28", "workerpool": "^6.2.0", - "yaml": "^2.4.2" + "yaml": "^2.4.2", + "yargs": "^17.7.2" }, "devDependencies": { "@eslint/js": "^9.21.0", "@rmp135/sql-ts": "^2.1.0", - "@testing-library/jest-dom": "^6.1.3", + "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^12.1.5", "@tsconfig/node22": "^22.0.0", "@types/bcrypt": "^5.0.0", @@ -189,7 +187,7 @@ "@types/colorbrewer": "^1.0.29", "@types/cookie-parser": "^1.4.3", "@types/d3": "^6", - "@types/enzyme": "^3.10.12", + "@types/enzyme": "^3.10.18", "@types/express": "^4.17.14", "@types/express-rate-limit": "^5.1.0", "@types/fs-extra": "^11.0.1", @@ -224,10 +222,14 @@ "@types/url-parse": "^1.4.8", "@types/webfontloader": "^1.6.34", "@types/workerpool": "^6.1.0", + "@types/yargs": "^17.0.33", "@vitejs/plugin-react": "^4.3.4", + "@vitest/coverage-v8": "^3.0.7", + "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0", "@yarnpkg/types": "^4.0.0", "bundlewatch": "^0.4.0", "cypress": "9.3.1", + "enzyme": "^3.11.0", "eslint": "^9.21.0", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.8.3", @@ -238,8 +240,7 @@ "flag-icons": "^7.3.1", "http-server": "^14.1.1", "husky": "^9.0.11", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0", + "jsdom": "^26.0.0", "lerna": "^8.2.1", "lint-staged": "^15.2.11", "prettier": "^3.5.0", @@ -250,6 +251,7 @@ "typescript-eslint": "^8.26.0", "vite": "^6.2.0", "vite-plugin-checker": "^0.9.0", + "vitest": "^3.0.7", "wrangler": "^3.111.0" }, "resolutions": { diff --git a/packages/@ourworldindata/components/src/MarkdownTextWrap/MarkdownTextWrap.test.ts b/packages/@ourworldindata/components/src/MarkdownTextWrap/MarkdownTextWrap.test.ts index 7a0efc9a1f..b76ed8acf1 100644 --- a/packages/@ourworldindata/components/src/MarkdownTextWrap/MarkdownTextWrap.test.ts +++ b/packages/@ourworldindata/components/src/MarkdownTextWrap/MarkdownTextWrap.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { FontFamily } from "@ourworldindata/utils" import { diff --git a/packages/@ourworldindata/components/src/TextWrap/TextWrap.test.ts b/packages/@ourworldindata/components/src/TextWrap/TextWrap.test.ts index 8d21c1d01b..3a2c92984b 100755 --- a/packages/@ourworldindata/components/src/TextWrap/TextWrap.test.ts +++ b/packages/@ourworldindata/components/src/TextWrap/TextWrap.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { TextWrap, shortenForTargetWidth } from "./TextWrap" import { Bounds } from "@ourworldindata/utils" diff --git a/packages/@ourworldindata/components/src/TextWrap/TextWrapUtils.test.ts b/packages/@ourworldindata/components/src/TextWrap/TextWrapUtils.test.ts index 6cae2e6092..8aa88e4de3 100644 --- a/packages/@ourworldindata/components/src/TextWrap/TextWrapUtils.test.ts +++ b/packages/@ourworldindata/components/src/TextWrap/TextWrapUtils.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { joinFragments, splitIntoFragments } from "./TextWrapUtils" diff --git a/packages/@ourworldindata/core-table/src/CoreTable.test.ts b/packages/@ourworldindata/core-table/src/CoreTable.test.ts index e86ffa7481..f9a45eaeef 100755 --- a/packages/@ourworldindata/core-table/src/CoreTable.test.ts +++ b/packages/@ourworldindata/core-table/src/CoreTable.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { CoreTable } from "./CoreTable.js" import { TransformType, ColumnTypeNames } from "@ourworldindata/types" diff --git a/packages/@ourworldindata/core-table/src/CoreTableColumns.test.ts b/packages/@ourworldindata/core-table/src/CoreTableColumns.test.ts index 90acfd2a9c..dada484ad1 100644 --- a/packages/@ourworldindata/core-table/src/CoreTableColumns.test.ts +++ b/packages/@ourworldindata/core-table/src/CoreTableColumns.test.ts @@ -1,3 +1,5 @@ +import { expect, it, describe } from "vitest" + import { ColumnTypeNames } from "@ourworldindata/types" import { ColumnTypeMap } from "./CoreTableColumns.js" import { ErrorValueTypes } from "./ErrorValues.js" diff --git a/packages/@ourworldindata/core-table/src/CoreTablePrinter.test.ts b/packages/@ourworldindata/core-table/src/CoreTablePrinter.test.ts index 8b7460b499..10b29c20b8 100755 --- a/packages/@ourworldindata/core-table/src/CoreTablePrinter.test.ts +++ b/packages/@ourworldindata/core-table/src/CoreTablePrinter.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { toAlignedTextTable, toMarkdownTable } from "./CoreTablePrinters.js" import { parseDelimited } from "./CoreTableUtils.js" @@ -14,10 +14,10 @@ it("to aligned table", () => { alignRight: false, maxCharactersPerColumn: 100, }) - expect(result).toEqual(`name score color -bob 12 red -mike 321 blue -al 1214 green`) + expect(result).toEqual( + // using \n here because we have trailing whitespace in each line, and prettier would remove it + `name score color\nbob 12 red \nmike 321 blue \nal 1214 green` + ) }) it("to markdown table", () => { diff --git a/packages/@ourworldindata/core-table/src/CoreTableUtils.test.ts b/packages/@ourworldindata/core-table/src/CoreTableUtils.test.ts index e8fcbb2295..327197d469 100755 --- a/packages/@ourworldindata/core-table/src/CoreTableUtils.test.ts +++ b/packages/@ourworldindata/core-table/src/CoreTableUtils.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { ColumnTypeNames, CoreMatrix, Time } from "@ourworldindata/types" import { diff --git a/packages/@ourworldindata/core-table/src/OwidTable.test.ts b/packages/@ourworldindata/core-table/src/OwidTable.test.ts index 3220831096..abf51e8b4f 100755 --- a/packages/@ourworldindata/core-table/src/OwidTable.test.ts +++ b/packages/@ourworldindata/core-table/src/OwidTable.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { SampleColumnSlugs, diff --git a/packages/@ourworldindata/core-table/src/OwidTableUtil.test.ts b/packages/@ourworldindata/core-table/src/OwidTableUtil.test.ts index 229b26ae78..cf5cd76f81 100644 --- a/packages/@ourworldindata/core-table/src/OwidTableUtil.test.ts +++ b/packages/@ourworldindata/core-table/src/OwidTableUtil.test.ts @@ -1,3 +1,5 @@ +import { expect, it, describe } from "vitest" + import { replaceDef } from "./CoreTableUtils.js" import { OwidTable } from "./OwidTable.js" import { diff --git a/packages/@ourworldindata/core-table/src/Transforms.test.ts b/packages/@ourworldindata/core-table/src/Transforms.test.ts index da2a465b18..6e07b5395f 100755 --- a/packages/@ourworldindata/core-table/src/Transforms.test.ts +++ b/packages/@ourworldindata/core-table/src/Transforms.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { insertMissingValuePlaceholders, diff --git a/packages/@ourworldindata/explorer/package.json b/packages/@ourworldindata/explorer/package.json index dcd02be098..80af824bc3 100644 --- a/packages/@ourworldindata/explorer/package.json +++ b/packages/@ourworldindata/explorer/package.json @@ -13,7 +13,6 @@ }, "scripts": { "build": "tsup src/index.ts", - "buildTests": "tsc -p tsconfig.test.json", "watch": "tsup src/index.ts --watch" }, "keywords": [], @@ -53,22 +52,16 @@ "@types/colorbrewer": "^1.0.29", "@types/d3": "^6", "@types/d3-format": "^2", - "@types/enzyme": "^3.10.12", - "@types/jest": "^29.5.5", "@types/js-cookie": "^3.0.2", "@types/mousetrap": "^1.6.9", "@types/react": "^17.0.69", "@types/react-dom": "^17.0.22", "@types/topojson-client": "^3.1.1", "@types/url-parse": "^1.4.8", - "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0", - "enzyme": "^3.11.0", "esbuild": "^0.25.0", "esbuild-sass-plugin": "^3.3.1", "eslint": "^9.21.0", "eslint-plugin-react-hooks": "^5.2.0", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0", "tsup": "^8.4.0", "typescript": "~5.8.2" }, diff --git a/packages/@ourworldindata/explorer/src/Explorer.jsdom.test.tsx b/packages/@ourworldindata/explorer/src/Explorer.test.ts similarity index 97% rename from packages/@ourworldindata/explorer/src/Explorer.jsdom.test.tsx rename to packages/@ourworldindata/explorer/src/Explorer.test.ts index e35fcf581c..2349677397 100755 --- a/packages/@ourworldindata/explorer/src/Explorer.jsdom.test.tsx +++ b/packages/@ourworldindata/explorer/src/Explorer.test.ts @@ -1,4 +1,8 @@ -#! yarn testJest +/** + * @vitest-environment jsdom + */ + +import { expect, it, describe } from "vitest" import { Explorer } from "./Explorer.js" import { diff --git a/packages/@ourworldindata/explorer/src/ExplorerControls.jsdom.test.tsx b/packages/@ourworldindata/explorer/src/ExplorerControls.test.tsx similarity index 92% rename from packages/@ourworldindata/explorer/src/ExplorerControls.jsdom.test.tsx rename to packages/@ourworldindata/explorer/src/ExplorerControls.test.tsx index 31268bd61e..51c23c14e2 100755 --- a/packages/@ourworldindata/explorer/src/ExplorerControls.jsdom.test.tsx +++ b/packages/@ourworldindata/explorer/src/ExplorerControls.test.tsx @@ -1,4 +1,8 @@ -#! /usr/bin/env jest +/** + * @vitest-environment jsdom + */ + +import { expect, it, describe } from "vitest" import { ExplorerControlType } from "./ExplorerConstants.js" import { ExplorerControlPanel } from "./ExplorerControls.js" diff --git a/packages/@ourworldindata/explorer/src/ExplorerProgram.test.ts b/packages/@ourworldindata/explorer/src/ExplorerProgram.test.ts index 4c6664d8f6..a9377477dd 100755 --- a/packages/@ourworldindata/explorer/src/ExplorerProgram.test.ts +++ b/packages/@ourworldindata/explorer/src/ExplorerProgram.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { ExplorerProgram } from "./ExplorerProgram.js" import { diff --git a/packages/@ourworldindata/explorer/src/gridLang/GridCell.test.ts b/packages/@ourworldindata/explorer/src/gridLang/GridCell.test.ts index 68be92e75a..d7c7c1fbf1 100755 --- a/packages/@ourworldindata/explorer/src/gridLang/GridCell.test.ts +++ b/packages/@ourworldindata/explorer/src/gridLang/GridCell.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { GridCell } from "./GridCell.js" import { diff --git a/packages/@ourworldindata/explorer/src/gridLang/GridProgram.test.ts b/packages/@ourworldindata/explorer/src/gridLang/GridProgram.test.ts index 79d6f69209..2bd721f89a 100755 --- a/packages/@ourworldindata/explorer/src/gridLang/GridProgram.test.ts +++ b/packages/@ourworldindata/explorer/src/gridLang/GridProgram.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { GridProgram } from "./GridProgram.js" diff --git a/packages/@ourworldindata/explorer/src/urlMigrations/ExplorerUrlMigrations.test.ts b/packages/@ourworldindata/explorer/src/urlMigrations/ExplorerUrlMigrations.test.ts index e3a719bd74..b1f20ec88b 100755 --- a/packages/@ourworldindata/explorer/src/urlMigrations/ExplorerUrlMigrations.test.ts +++ b/packages/@ourworldindata/explorer/src/urlMigrations/ExplorerUrlMigrations.test.ts @@ -1,4 +1,4 @@ -#! yarn testJest +import { expect, it, describe } from "vitest" import { Url } from "@ourworldindata/utils" import { diff --git a/packages/@ourworldindata/grapher/package.json b/packages/@ourworldindata/grapher/package.json index e2ca9ffbe1..d51b10dadf 100644 --- a/packages/@ourworldindata/grapher/package.json +++ b/packages/@ourworldindata/grapher/package.json @@ -13,7 +13,6 @@ }, "scripts": { "build": "tsup src/index.ts", - "buildTests": "tsc -p tsconfig.test.json", "watch": "tsup src/index.ts --watch" }, "keywords": [], @@ -53,22 +52,16 @@ "@types/colorbrewer": "^1.0.29", "@types/d3": "^6", "@types/d3-format": "^2", - "@types/enzyme": "^3.10.12", - "@types/jest": "^29.5.5", "@types/js-cookie": "^3.0.2", "@types/mousetrap": "^1.6.9", "@types/react": "^17.0.69", "@types/react-dom": "^17.0.22", "@types/topojson-client": "^3.1.1", "@types/url-parse": "^1.4.8", - "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0", - "enzyme": "^3.11.0", "esbuild": "^0.25.0", "esbuild-sass-plugin": "^3.3.1", "eslint": "^9.21.0", "eslint-plugin-react-hooks": "^5.2.0", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0", "tsup": "^8.4.0", "typescript": "~5.8.2" }, diff --git a/packages/@ourworldindata/grapher/src/axis/Axis.test.ts b/packages/@ourworldindata/grapher/src/axis/Axis.test.ts index 98f20fac06..f007676ff7 100755 --- a/packages/@ourworldindata/grapher/src/axis/Axis.test.ts +++ b/packages/@ourworldindata/grapher/src/axis/Axis.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { HorizontalAxis } from "../axis/Axis" import { ScaleType, AxisConfigInterface } from "@ourworldindata/types" diff --git a/packages/@ourworldindata/grapher/src/axis/AxisConfig.test.ts b/packages/@ourworldindata/grapher/src/axis/AxisConfig.test.ts index 9d4bd130dd..01725e7e8e 100755 --- a/packages/@ourworldindata/grapher/src/axis/AxisConfig.test.ts +++ b/packages/@ourworldindata/grapher/src/axis/AxisConfig.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { AxisConfig } from "../axis/AxisConfig" import { ScaleType } from "@ourworldindata/types" diff --git a/packages/@ourworldindata/grapher/src/axis/AxisViews.jsdom.test.tsx b/packages/@ourworldindata/grapher/src/axis/AxisViews.test.tsx similarity index 97% rename from packages/@ourworldindata/grapher/src/axis/AxisViews.jsdom.test.tsx rename to packages/@ourworldindata/grapher/src/axis/AxisViews.test.tsx index ba071966af..4732f0e821 100755 --- a/packages/@ourworldindata/grapher/src/axis/AxisViews.jsdom.test.tsx +++ b/packages/@ourworldindata/grapher/src/axis/AxisViews.test.tsx @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { AxisConfig } from "./AxisConfig" import { DualAxisComponent, HorizontalAxisGridLines } from "./AxisViews" diff --git a/packages/@ourworldindata/grapher/src/barCharts/DiscreteBarChart.test.ts b/packages/@ourworldindata/grapher/src/barCharts/DiscreteBarChart.test.ts index 4278982988..9c1d77dcc7 100755 --- a/packages/@ourworldindata/grapher/src/barCharts/DiscreteBarChart.test.ts +++ b/packages/@ourworldindata/grapher/src/barCharts/DiscreteBarChart.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { DiscreteBarChart } from "./DiscreteBarChart" import { diff --git a/packages/@ourworldindata/grapher/src/chart/ChartDimension.test.ts b/packages/@ourworldindata/grapher/src/chart/ChartDimension.test.ts index 0be6d478f0..073b9abff7 100755 --- a/packages/@ourworldindata/grapher/src/chart/ChartDimension.test.ts +++ b/packages/@ourworldindata/grapher/src/chart/ChartDimension.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" // todo: remove this when we remove chartDimension diff --git a/packages/@ourworldindata/grapher/src/color/BinningStrategies.test.ts b/packages/@ourworldindata/grapher/src/color/BinningStrategies.test.ts index dacb647842..7383e24c0c 100755 --- a/packages/@ourworldindata/grapher/src/color/BinningStrategies.test.ts +++ b/packages/@ourworldindata/grapher/src/color/BinningStrategies.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { BinningStrategy } from "@ourworldindata/types" import { getBinMaximums } from "./BinningStrategies" diff --git a/packages/@ourworldindata/grapher/src/color/ColorScale.test.ts b/packages/@ourworldindata/grapher/src/color/ColorScale.test.ts index 3b25ed269a..79fa57332e 100755 --- a/packages/@ourworldindata/grapher/src/color/ColorScale.test.ts +++ b/packages/@ourworldindata/grapher/src/color/ColorScale.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { CoreTable, ErrorValueTypes } from "@ourworldindata/core-table" import { ColorScale } from "./ColorScale" diff --git a/packages/@ourworldindata/grapher/src/color/ColorScaleBin.test.ts b/packages/@ourworldindata/grapher/src/color/ColorScaleBin.test.ts index e53a8ec0ad..7fe5188dff 100755 --- a/packages/@ourworldindata/grapher/src/color/ColorScaleBin.test.ts +++ b/packages/@ourworldindata/grapher/src/color/ColorScaleBin.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { CategoricalBin, NumericBin } from "./ColorScaleBin" diff --git a/packages/@ourworldindata/grapher/src/color/ColorScaleConfig.test.ts b/packages/@ourworldindata/grapher/src/color/ColorScaleConfig.test.ts index af961faf5f..986fd4a8f3 100755 --- a/packages/@ourworldindata/grapher/src/color/ColorScaleConfig.test.ts +++ b/packages/@ourworldindata/grapher/src/color/ColorScaleConfig.test.ts @@ -1,4 +1,4 @@ -#! yarn testJest +import { expect, it, describe } from "vitest" import { BinningStrategy, ColorSchemeName } from "@ourworldindata/types" import { NO_DATA_LABEL } from "./ColorScale" diff --git a/packages/@ourworldindata/grapher/src/color/ColorUtils.test.ts b/packages/@ourworldindata/grapher/src/color/ColorUtils.test.ts index 7451a85cf6..f2148e6eb8 100644 --- a/packages/@ourworldindata/grapher/src/color/ColorUtils.test.ts +++ b/packages/@ourworldindata/grapher/src/color/ColorUtils.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { getLeastUsedColor, isDarkColor } from "./ColorUtils" diff --git a/packages/@ourworldindata/grapher/src/controls/globalEntitySelector/GlobalEntitySelector.jsdom.test.tsx b/packages/@ourworldindata/grapher/src/controls/globalEntitySelector/GlobalEntitySelector.test.tsx similarity index 93% rename from packages/@ourworldindata/grapher/src/controls/globalEntitySelector/GlobalEntitySelector.jsdom.test.tsx rename to packages/@ourworldindata/grapher/src/controls/globalEntitySelector/GlobalEntitySelector.test.tsx index 76d3fbf2d3..780422bbdf 100644 --- a/packages/@ourworldindata/grapher/src/controls/globalEntitySelector/GlobalEntitySelector.jsdom.test.tsx +++ b/packages/@ourworldindata/grapher/src/controls/globalEntitySelector/GlobalEntitySelector.test.tsx @@ -1,4 +1,8 @@ -#! /usr/bin/env jest +/** + * @vitest-environment jsdom + */ + +import { expect, describe, test } from "vitest" import Enzyme from "enzyme" import Adapter from "@wojtekmaj/enzyme-adapter-react-17" import { GlobalEntitySelector } from "./GlobalEntitySelector" diff --git a/packages/@ourworldindata/grapher/src/core/EntityUrlBuilder.test.ts b/packages/@ourworldindata/grapher/src/core/EntityUrlBuilder.test.ts index 35a0c31ad3..557de675ee 100755 --- a/packages/@ourworldindata/grapher/src/core/EntityUrlBuilder.test.ts +++ b/packages/@ourworldindata/grapher/src/core/EntityUrlBuilder.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { Url } from "@ourworldindata/utils" import { @@ -129,7 +129,7 @@ describe("facebook", () => { }) }) -describe("it can handle legacy urls with dimension in selection key", () => { +it("can handle legacy urls with dimension in selection key", () => { const url = Url.fromQueryParams({ country: [ "United States", diff --git a/packages/@ourworldindata/grapher/src/core/Grapher.jsdom.test.ts b/packages/@ourworldindata/grapher/src/core/Grapher.test.ts similarity index 99% rename from packages/@ourworldindata/grapher/src/core/Grapher.jsdom.test.ts rename to packages/@ourworldindata/grapher/src/core/Grapher.test.ts index ccbd95ec73..c05084e71e 100755 --- a/packages/@ourworldindata/grapher/src/core/Grapher.jsdom.test.ts +++ b/packages/@ourworldindata/grapher/src/core/Grapher.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { Grapher, GrapherProgrammaticInterface } from "../core/Grapher" import { GRAPHER_CHART_TYPES, diff --git a/packages/@ourworldindata/grapher/src/core/GrapherUrl.test.ts b/packages/@ourworldindata/grapher/src/core/GrapherUrl.test.ts index 543b68e3ad..0314a1ad1d 100644 --- a/packages/@ourworldindata/grapher/src/core/GrapherUrl.test.ts +++ b/packages/@ourworldindata/grapher/src/core/GrapherUrl.test.ts @@ -1,3 +1,5 @@ +import { expect, it, describe } from "vitest" + import { StackMode, TimeBoundValueStr } from "@ourworldindata/types" import { grapherConfigToQueryParams } from "./GrapherUrl.js" diff --git a/packages/@ourworldindata/grapher/src/core/GrapherUrlMigrations.test.ts b/packages/@ourworldindata/grapher/src/core/GrapherUrlMigrations.test.ts index dbffbda3c8..814f111e62 100644 --- a/packages/@ourworldindata/grapher/src/core/GrapherUrlMigrations.test.ts +++ b/packages/@ourworldindata/grapher/src/core/GrapherUrlMigrations.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { legacyToCurrentGrapherQueryParams } from "./GrapherUrlMigrations" diff --git a/packages/@ourworldindata/grapher/src/core/GrapherWithChartTypes.jsdom.test.tsx b/packages/@ourworldindata/grapher/src/core/GrapherWithChartTypes.test.ts similarity index 95% rename from packages/@ourworldindata/grapher/src/core/GrapherWithChartTypes.jsdom.test.tsx rename to packages/@ourworldindata/grapher/src/core/GrapherWithChartTypes.test.ts index 6a4c8bb65b..ff3c6aef99 100755 --- a/packages/@ourworldindata/grapher/src/core/GrapherWithChartTypes.jsdom.test.tsx +++ b/packages/@ourworldindata/grapher/src/core/GrapherWithChartTypes.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe, test } from "vitest" import { DimensionProperty } from "@ourworldindata/utils" import { @@ -48,7 +48,7 @@ const basicGrapherConfig: GrapherProgrammaticInterface = { ], } -describe("grapher and discrete bar charts", () => { +test("grapher and discrete bar charts", () => { const grapher = new Grapher({ chartTypes: [GRAPHER_CHART_TYPES.DiscreteBar], ...basicGrapherConfig, diff --git a/packages/@ourworldindata/grapher/src/core/LegacyToOwidTable.test.ts b/packages/@ourworldindata/grapher/src/core/LegacyToOwidTable.test.ts index a6bd3265a0..e52e6787f2 100755 --- a/packages/@ourworldindata/grapher/src/core/LegacyToOwidTable.test.ts +++ b/packages/@ourworldindata/grapher/src/core/LegacyToOwidTable.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { GRAPHER_CHART_TYPES, diff --git a/packages/@ourworldindata/grapher/src/dataTable/DataTable.jsdom.test.tsx b/packages/@ourworldindata/grapher/src/dataTable/DataTable.test.tsx similarity index 98% rename from packages/@ourworldindata/grapher/src/dataTable/DataTable.jsdom.test.tsx rename to packages/@ourworldindata/grapher/src/dataTable/DataTable.test.tsx index 4cb13dd95f..e7ae671acb 100755 --- a/packages/@ourworldindata/grapher/src/dataTable/DataTable.jsdom.test.tsx +++ b/packages/@ourworldindata/grapher/src/dataTable/DataTable.test.tsx @@ -1,4 +1,8 @@ -#! /usr/bin/env jest +/** + * @vitest-environment jsdom + */ + +import { expect, it, describe, beforeAll } from "vitest" import { GRAPHER_CHART_TYPES, GRAPHER_TAB_OPTIONS } from "@ourworldindata/types" import { childMortalityGrapher, diff --git a/packages/@ourworldindata/grapher/src/facetChart/FacetChart.test.ts b/packages/@ourworldindata/grapher/src/facetChart/FacetChart.test.ts index 2c490ba04f..6d6b304917 100755 --- a/packages/@ourworldindata/grapher/src/facetChart/FacetChart.test.ts +++ b/packages/@ourworldindata/grapher/src/facetChart/FacetChart.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { FacetChart } from "./FacetChart" import { SynthesizeGDPTable, OwidTable } from "@ourworldindata/core-table" diff --git a/packages/@ourworldindata/grapher/src/focus/FocusArray.test.ts b/packages/@ourworldindata/grapher/src/focus/FocusArray.test.ts index 504e0abd19..dae299bb4e 100644 --- a/packages/@ourworldindata/grapher/src/focus/FocusArray.test.ts +++ b/packages/@ourworldindata/grapher/src/focus/FocusArray.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { FocusArray } from "./FocusArray" diff --git a/packages/@ourworldindata/grapher/src/horizontalColorLegend/HorizontalColorLegends.test.ts b/packages/@ourworldindata/grapher/src/horizontalColorLegend/HorizontalColorLegends.test.ts index bc38e84836..e90fd38d2b 100755 --- a/packages/@ourworldindata/grapher/src/horizontalColorLegend/HorizontalColorLegends.test.ts +++ b/packages/@ourworldindata/grapher/src/horizontalColorLegend/HorizontalColorLegends.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { CategoricalBin, NumericBin } from "../color/ColorScaleBin" import { diff --git a/packages/@ourworldindata/grapher/src/lineCharts/LineChart.test.ts b/packages/@ourworldindata/grapher/src/lineCharts/LineChart.test.ts index bc77d3dee6..ab3e9d7f2f 100755 --- a/packages/@ourworldindata/grapher/src/lineCharts/LineChart.test.ts +++ b/packages/@ourworldindata/grapher/src/lineCharts/LineChart.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { LineChart } from "./LineChart" import { diff --git a/packages/@ourworldindata/grapher/src/lineLegend/LineLegend.test.tsx b/packages/@ourworldindata/grapher/src/lineLegend/LineLegend.test.ts similarity index 99% rename from packages/@ourworldindata/grapher/src/lineLegend/LineLegend.test.tsx rename to packages/@ourworldindata/grapher/src/lineLegend/LineLegend.test.ts index 6913952d58..f78a8e7d76 100755 --- a/packages/@ourworldindata/grapher/src/lineLegend/LineLegend.test.tsx +++ b/packages/@ourworldindata/grapher/src/lineLegend/LineLegend.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { PartialBy } from "@ourworldindata/utils" import { AxisConfig } from "../axis/AxisConfig" diff --git a/packages/@ourworldindata/grapher/src/mapCharts/MapChart.jsdom.test.tsx b/packages/@ourworldindata/grapher/src/mapCharts/MapChart.test.ts similarity index 96% rename from packages/@ourworldindata/grapher/src/mapCharts/MapChart.jsdom.test.tsx rename to packages/@ourworldindata/grapher/src/mapCharts/MapChart.test.ts index 27e19a8673..3397889faa 100755 --- a/packages/@ourworldindata/grapher/src/mapCharts/MapChart.jsdom.test.tsx +++ b/packages/@ourworldindata/grapher/src/mapCharts/MapChart.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { SampleColumnSlugs, diff --git a/packages/@ourworldindata/grapher/src/mapCharts/MapConfig.test.ts b/packages/@ourworldindata/grapher/src/mapCharts/MapConfig.test.ts index 46104c63e5..f405a4bfec 100755 --- a/packages/@ourworldindata/grapher/src/mapCharts/MapConfig.test.ts +++ b/packages/@ourworldindata/grapher/src/mapCharts/MapConfig.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { MapConfig } from "./MapConfig" import { MapProjectionName } from "@ourworldindata/types" diff --git a/packages/@ourworldindata/grapher/src/mapCharts/MapProjections.ts b/packages/@ourworldindata/grapher/src/mapCharts/MapProjections.ts index 50716baa24..afbb8cceb9 100644 --- a/packages/@ourworldindata/grapher/src/mapCharts/MapProjections.ts +++ b/packages/@ourworldindata/grapher/src/mapCharts/MapProjections.ts @@ -7,10 +7,6 @@ import { import { MapProjectionName } from "@ourworldindata/types" import { geoRobinson, geoPatterson } from "./d3-geo-projection.js" -// https://github.com/d3/d3-geo-projection/issues/202 -// todo: would be nice to get propert types for this and not have to run different code during testing -const projectionToUseDuringJestTesting = geoConicConformal() - export const MapProjectionLabels: Record = { World: "World", Africa: "Africa", @@ -22,11 +18,7 @@ export const MapProjectionLabels: Record = { } export const MapProjectionGeos: { [key in MapProjectionName]: GeoPath } = { - World: geoPath().projection( - typeof geoRobinson === "undefined" - ? projectionToUseDuringJestTesting - : geoRobinson() - ), + World: geoPath().projection(geoRobinson()), Africa: geoPath().projection( geoConicConformal().rotate([-25, 0]).center([0, 0]).parallels([30, -20]) @@ -48,10 +40,7 @@ export const MapProjectionGeos: { [key in MapProjectionName]: GeoPath } = { // From http://bl.ocks.org/dhoboy/ff8448ace9d5d567390a Asia: geoPath().projection( - (typeof geoPatterson === "undefined" - ? projectionToUseDuringJestTesting - : geoPatterson() - ) + geoPatterson() .center([58, 54]) .scale(150) .translate([0, 0]) diff --git a/packages/@ourworldindata/grapher/src/mapCharts/MapTooltip.jsdom.test.tsx b/packages/@ourworldindata/grapher/src/mapCharts/MapTooltip.test.tsx similarity index 92% rename from packages/@ourworldindata/grapher/src/mapCharts/MapTooltip.jsdom.test.tsx rename to packages/@ourworldindata/grapher/src/mapCharts/MapTooltip.test.tsx index ad85afe950..0b9dc54377 100755 --- a/packages/@ourworldindata/grapher/src/mapCharts/MapTooltip.jsdom.test.tsx +++ b/packages/@ourworldindata/grapher/src/mapCharts/MapTooltip.test.tsx @@ -1,4 +1,8 @@ -#! /usr/bin/env jest +/** + * @vitest-environment jsdom + */ + +import { expect, test } from "vitest" import { Grapher } from "../core/Grapher.js" import { legacyMapGrapher } from "./MapChart.sample.js" diff --git a/packages/@ourworldindata/grapher/src/mapCharts/MapTopology.test.ts b/packages/@ourworldindata/grapher/src/mapCharts/MapTopology.test.ts index 76760709ce..73561cf657 100644 --- a/packages/@ourworldindata/grapher/src/mapCharts/MapTopology.test.ts +++ b/packages/@ourworldindata/grapher/src/mapCharts/MapTopology.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { MapTopology } from "./MapTopology" import { regions, Country } from "@ourworldindata/utils" diff --git a/packages/@ourworldindata/grapher/src/modal/DownloadModal.test.tsx b/packages/@ourworldindata/grapher/src/modal/DownloadModal.test.ts similarity index 97% rename from packages/@ourworldindata/grapher/src/modal/DownloadModal.test.tsx rename to packages/@ourworldindata/grapher/src/modal/DownloadModal.test.ts index 6a0dd9a219..84b37a3e5c 100644 --- a/packages/@ourworldindata/grapher/src/modal/DownloadModal.test.tsx +++ b/packages/@ourworldindata/grapher/src/modal/DownloadModal.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { ColumnTypeNames } from "@ourworldindata/types" import { OwidTable } from "@ourworldindata/core-table" diff --git a/packages/@ourworldindata/grapher/src/scatterCharts/ComparisonLineGenerator.test.ts b/packages/@ourworldindata/grapher/src/scatterCharts/ComparisonLineGenerator.test.ts index 594509c013..20d4402b4d 100755 --- a/packages/@ourworldindata/grapher/src/scatterCharts/ComparisonLineGenerator.test.ts +++ b/packages/@ourworldindata/grapher/src/scatterCharts/ComparisonLineGenerator.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { generateComparisonLinePoints } from "./ComparisonLineGenerator" import { ScaleType } from "@ourworldindata/types" diff --git a/packages/@ourworldindata/grapher/src/scatterCharts/MultiColorPolyline.test.ts b/packages/@ourworldindata/grapher/src/scatterCharts/MultiColorPolyline.test.ts index e42bfac9f7..8a35b3d0ef 100755 --- a/packages/@ourworldindata/grapher/src/scatterCharts/MultiColorPolyline.test.ts +++ b/packages/@ourworldindata/grapher/src/scatterCharts/MultiColorPolyline.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { getSegmentsFromPoints } from "../scatterCharts/MultiColorPolyline" diff --git a/packages/@ourworldindata/grapher/src/scatterCharts/ScatterPlotChart.test.ts b/packages/@ourworldindata/grapher/src/scatterCharts/ScatterPlotChart.test.ts index 04c95cb6b9..0de6b9528a 100755 --- a/packages/@ourworldindata/grapher/src/scatterCharts/ScatterPlotChart.test.ts +++ b/packages/@ourworldindata/grapher/src/scatterCharts/ScatterPlotChart.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { ScatterPlotChart } from "../scatterCharts/ScatterPlotChart" import { diff --git a/packages/@ourworldindata/grapher/src/schema/migrations/migrate.test.ts b/packages/@ourworldindata/grapher/src/schema/migrations/migrate.test.ts index 9f6704c0e9..50f685aa77 100644 --- a/packages/@ourworldindata/grapher/src/schema/migrations/migrate.test.ts +++ b/packages/@ourworldindata/grapher/src/schema/migrations/migrate.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { defaultGrapherConfig } from "../defaultGrapherConfig" import { migrateGrapherConfigToLatestVersion } from "./migrate" diff --git a/packages/@ourworldindata/grapher/src/selection/SelectionArray.test.ts b/packages/@ourworldindata/grapher/src/selection/SelectionArray.test.ts index ad270798a6..cf8e02ae45 100755 --- a/packages/@ourworldindata/grapher/src/selection/SelectionArray.test.ts +++ b/packages/@ourworldindata/grapher/src/selection/SelectionArray.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { SelectionArray } from "./SelectionArray" diff --git a/packages/@ourworldindata/grapher/src/slideshowController/SlideShowController.test.tsx b/packages/@ourworldindata/grapher/src/slideshowController/SlideShowController.test.ts similarity index 93% rename from packages/@ourworldindata/grapher/src/slideshowController/SlideShowController.test.tsx rename to packages/@ourworldindata/grapher/src/slideshowController/SlideShowController.test.ts index 05a48eb342..30ca57d96c 100755 --- a/packages/@ourworldindata/grapher/src/slideshowController/SlideShowController.test.tsx +++ b/packages/@ourworldindata/grapher/src/slideshowController/SlideShowController.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { SlideShowController } from "./SlideShowController" diff --git a/packages/@ourworldindata/grapher/src/slopeCharts/SlopeChart.test.ts b/packages/@ourworldindata/grapher/src/slopeCharts/SlopeChart.test.ts index 5a80686a37..fdc30553ae 100755 --- a/packages/@ourworldindata/grapher/src/slopeCharts/SlopeChart.test.ts +++ b/packages/@ourworldindata/grapher/src/slopeCharts/SlopeChart.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { SlopeChart, SlopeChartManager } from "./SlopeChart" import { diff --git a/packages/@ourworldindata/grapher/src/stackedCharts/MarimekkoChart.jsdom.test.tsx b/packages/@ourworldindata/grapher/src/stackedCharts/MarimekkoChart.test.ts similarity index 53% rename from packages/@ourworldindata/grapher/src/stackedCharts/MarimekkoChart.jsdom.test.tsx rename to packages/@ourworldindata/grapher/src/stackedCharts/MarimekkoChart.test.ts index 899997644b..7a2db5709f 100644 --- a/packages/@ourworldindata/grapher/src/stackedCharts/MarimekkoChart.jsdom.test.tsx +++ b/packages/@ourworldindata/grapher/src/stackedCharts/MarimekkoChart.test.ts @@ -1,12 +1,458 @@ -#! /usr/bin/env jest +import { expect, it, test } from "vitest" import { Bounds, ColumnTypeNames, omit } from "@ourworldindata/utils" -import { OwidTable } from "@ourworldindata/core-table" +import { + OwidTable, + SampleColumnSlugs, + SynthesizeGDPTable, +} from "@ourworldindata/core-table" import { DefaultColorScheme } from "../color/CustomSchemes" import { Grapher } from "../core/Grapher" -import { GRAPHER_CHART_TYPES } from "@ourworldindata/types" +import { GRAPHER_CHART_TYPES, SortBy, SortOrder } from "@ourworldindata/types" import { MarimekkoChart } from "./MarimekkoChart" -import { BarShape, PlacedItem } from "./MarimekkoChartConstants" +import { + BarShape, + Item, + MarimekkoChartManager, + PlacedItem, +} from "./MarimekkoChartConstants" + +it("can create a chart", () => { + const table = SynthesizeGDPTable({ + timeRange: [2000, 2001], + entityCount: 5, + }) + const manager = { + table, + yColumnSlugs: [SampleColumnSlugs.GDP], + xColumnSlug: SampleColumnSlugs.Population, + showNoDataArea: false, + } + + const chart = new MarimekkoChart({ manager }) + //expect(chart.failMessage).toBeTruthy() + + // selection.addToSelection(table.sampleEntityName(5)) + expect(chart.failMessage).toEqual("") + expect(chart.series.length).toEqual(1) + expect(chart.series[0].points.length).toEqual(5) + expect(chart.xSeries!.points.length).toEqual(5) + expect(chart.placedItems.length).toEqual(5) + //expect(chart.placedItems) +}) + +it("can display a Marimekko chart correctly", () => { + const csv = `year,entityName,population,percentBelow2USD +2001,medium,4000,4 +2001,big,5000,8 +2001,small,1000,3` + const table = new OwidTable(csv, [ + { slug: "population", type: ColumnTypeNames.Numeric }, + { slug: "percentBelow2USD", type: ColumnTypeNames.Numeric }, + { slug: "year", type: ColumnTypeNames.Year }, + ]) + + const manager: MarimekkoChartManager = { + table, + selection: table.availableEntityNames, + yColumnSlugs: ["percentBelow2USD"], + xColumnSlug: "population", + endTime: 2001, + showNoDataArea: false, + } + const chart = new MarimekkoChart({ + manager, + bounds: new Bounds(0, 0, 1000, 1000), + }) + const xAxisRange = chart["dualAxis"].horizontalAxis.rangeSize + + expect(chart.failMessage).toEqual("") + expect(chart.series.length).toEqual(1) + expect(chart.series[0].points.length).toEqual(3) + // Y series points should be one series in order of the data + const expectedYPoints = [ + { + position: "medium", + value: 4, + valueOffset: 0, + time: 2001, + }, + { + position: "big", + value: 8, + valueOffset: 0, + time: 2001, + }, + { + position: "small", + value: 3, + valueOffset: 0, + time: 2001, + }, + ] + // X series points should be in order of the data + const expectedXPoints = [ + { value: 4000, entity: "medium", time: 2001 }, + { value: 5000, entity: "big", time: 2001 }, + { value: 1000, entity: "small", time: 2001 }, + ] + expect(chart.series[0].points).toEqual(expectedYPoints) + expect(chart.xSeries!.points).toEqual(expectedXPoints) + // placedItems should be in default sort order + expect(chart.placedItems.map(roundXPosition)).toEqual([ + { + entityName: "big", + entityColor: undefined, + bars: [ + { + kind: BarShape.Bar, + color: DefaultColorScheme.colorSets[0][0], + seriesName: "percentBelow2USD", + yPoint: expectedYPoints[1], + }, + ], + xPoint: expectedXPoints[1], + xPosition: 0, + }, + { + entityName: "medium", + entityColor: undefined, + bars: [ + { + kind: BarShape.Bar, + color: DefaultColorScheme.colorSets[0][0], + seriesName: "percentBelow2USD", + yPoint: expectedYPoints[0], + }, + ], + xPoint: expectedXPoints[0], + xPosition: Math.round(xAxisRange * 0.5), + }, + { + entityName: "small", + entityColor: undefined, + bars: [ + { + kind: BarShape.Bar, + color: DefaultColorScheme.colorSets[0][0], + seriesName: "percentBelow2USD", + yPoint: expectedYPoints[2], + }, + ], + xPoint: expectedXPoints[2], + xPosition: Math.round(xAxisRange * 0.9), + }, + ]) +}) + +function roundXPosition(item: PlacedItem): PlacedItem { + return { + ...item, + xPosition: Math.round(item.xPosition), + } +} + +it("can display two time series stacked correctly", () => { + const csv = `year,entityName,population,percentBelow2USD,percentBelow10USD +2001,medium,4000,4,8.5 +2001,big,5000,8,20 +2001,small,1000,3,5` + const table = new OwidTable(csv, [ + { slug: "population", type: ColumnTypeNames.Numeric }, + { slug: "percentBelow2USD", type: ColumnTypeNames.Numeric }, + { slug: "percentBelow10USD", type: ColumnTypeNames.Numeric }, + { slug: "year", type: ColumnTypeNames.Year }, + ]) + + const manager: MarimekkoChartManager = { + table, + selection: table.availableEntityNames, + yColumnSlugs: ["percentBelow2USD", "percentBelow10USD"], + xColumnSlug: "population", + endTime: 2001, + showNoDataArea: false, + } + const chart = new MarimekkoChart({ + manager, + bounds: new Bounds(0, 0, 1000, 1000), + }) + const xAxisRange = chart["dualAxis"].horizontalAxis.rangeSize + + expect(chart.failMessage).toEqual("") + expect(chart.series.length).toEqual(2) + expect(chart.series[0].points.length).toEqual(3) + expect(chart.series[1].points.length).toEqual(3) + // Y series points should be one series in order of the data + const expectedYPointsFirstSeries = [ + { + position: "medium", + value: 4, + valueOffset: 0, + time: 2001, + }, + { + position: "big", + value: 8, + valueOffset: 0, + time: 2001, + }, + { + position: "small", + value: 3, + valueOffset: 0, + time: 2001, + }, + ] + const expectedYPointsSecondSeries = [ + { + position: "medium", + value: 8.5, + valueOffset: 4, + time: 2001, + }, + { + position: "big", + value: 20, + valueOffset: 8, + time: 2001, + }, + { + position: "small", + value: 5, + valueOffset: 3, + time: 2001, + }, + ] + // X series points should be in order of the data + const expectedXPoints = [ + { value: 4000, entity: "medium", time: 2001 }, + { value: 5000, entity: "big", time: 2001 }, + { value: 1000, entity: "small", time: 2001 }, + ] + expect(chart.series[0].points).toEqual(expectedYPointsFirstSeries) + expect(chart.series[1].points).toEqual(expectedYPointsSecondSeries) + expect(chart.xSeries!.points).toEqual(expectedXPoints) + // placedItems should be in default sort order + expect(chart.placedItems.map(roundXPosition)).toEqual([ + { + entityName: "big", + entityColor: undefined, + bars: [ + { + kind: BarShape.Bar, + color: DefaultColorScheme.colorSets[0][0], + seriesName: "percentBelow2USD", + yPoint: expectedYPointsFirstSeries[1], + }, + { + kind: BarShape.Bar, + color: DefaultColorScheme.colorSets[0][1], + seriesName: "percentBelow10USD", + yPoint: expectedYPointsSecondSeries[1], + }, + ], + xPoint: expectedXPoints[1], + xPosition: 0, + }, + { + entityName: "medium", + entityColor: undefined, + bars: [ + { + kind: BarShape.Bar, + color: DefaultColorScheme.colorSets[0][0], + seriesName: "percentBelow2USD", + yPoint: expectedYPointsFirstSeries[0], + }, + { + kind: BarShape.Bar, + color: DefaultColorScheme.colorSets[0][1], + seriesName: "percentBelow10USD", + yPoint: expectedYPointsSecondSeries[0], + }, + ], + xPoint: expectedXPoints[0], + xPosition: Math.round(xAxisRange * 0.5), + }, + { + entityName: "small", + entityColor: undefined, + bars: [ + { + kind: BarShape.Bar, + color: DefaultColorScheme.colorSets[0][0], + seriesName: "percentBelow2USD", + yPoint: expectedYPointsFirstSeries[2], + }, + { + kind: BarShape.Bar, + color: DefaultColorScheme.colorSets[0][1], + seriesName: "percentBelow10USD", + yPoint: expectedYPointsSecondSeries[2], + }, + ], + xPoint: expectedXPoints[2], + xPosition: Math.round(xAxisRange * 0.9), + }, + ]) +}) + +it("can do sorting", () => { + const csv = `year,entityName,population,percentBelow2USD +2001,AA,4000,4 +2001,BB,5000,8 +2001,CC,1000,3` + const table = new OwidTable(csv, [ + { slug: "population", type: ColumnTypeNames.Numeric }, + { slug: "percentBelow2USD", type: ColumnTypeNames.Numeric }, + { slug: "year", type: ColumnTypeNames.Year }, + ]) + + const manager: MarimekkoChartManager = { + table, + selection: table.availableEntityNames, + yColumnSlugs: ["percentBelow2USD"], + xColumnSlug: "population", + endTime: 2001, + showNoDataArea: false, + } + let chart = new MarimekkoChart({ + manager: { + ...manager, + sortConfig: { + sortBy: SortBy.total, + sortOrder: SortOrder.asc, + }, + }, + + bounds: new Bounds(0, 0, 1000, 1000), + }) + + expect(chart.failMessage).toEqual("") + expect(chart.series.length).toEqual(1) + expect(chart.series[0].points.length).toEqual(3) + // Y series points should be one series in order of the data + const expectedYPoints = [ + { + position: "AA", + value: 4, + valueOffset: 0, + time: 2001, + }, + { + position: "BB", + value: 8, + valueOffset: 0, + time: 2001, + }, + { + position: "CC", + value: 3, + valueOffset: 0, + time: 2001, + }, + ] + // X series points should be in order of the data + const expectedXPoints = [ + { value: 4000, entity: "AA", time: 2001 }, + { value: 5000, entity: "BB", time: 2001 }, + { value: 1000, entity: "CC", time: 2001 }, + ] + expect(chart.series[0].points).toEqual(expectedYPoints) + expect(chart.xSeries!.points).toEqual(expectedXPoints) + // placedItems should be in default sort order + const items = new Map([ + [ + "big", + { + entityName: "BB", + entityColor: undefined, + bars: [ + { + kind: BarShape.Bar, + color: DefaultColorScheme.colorSets[0][0], + seriesName: "percentBelow2USD", + yPoint: expectedYPoints[1], + }, + ], + xPoint: expectedXPoints[1], + }, + ], + [ + "medium", + { + entityName: "AA", + entityColor: undefined, + bars: [ + { + kind: BarShape.Bar, + color: DefaultColorScheme.colorSets[0][0], + seriesName: "percentBelow2USD", + yPoint: expectedYPoints[0], + }, + ], + xPoint: expectedXPoints[0], + }, + ], + [ + "small", + { + entityName: "CC", + entityColor: undefined, + bars: [ + { + kind: BarShape.Bar, + color: DefaultColorScheme.colorSets[0][0], + seriesName: "percentBelow2USD", + yPoint: expectedYPoints[2], + }, + ], + xPoint: expectedXPoints[2], + }, + ], + ]) + expect(chart["sortedItems"]).toEqual([ + items.get("small"), + items.get("medium"), + items.get("big"), + ]) + + chart = new MarimekkoChart({ + manager: { + ...manager, + sortConfig: { + sortBy: SortBy.column, + sortColumnSlug: "percentBelow2USD", + sortOrder: SortOrder.asc, + }, + }, + + bounds: new Bounds(0, 0, 1000, 1000), + }) + expect(chart["sortedItems"]).toEqual([ + items.get("small"), + items.get("medium"), + items.get("big"), + ]) + + chart = new MarimekkoChart({ + manager: { + ...manager, + sortConfig: { + sortBy: SortBy.entityName, + sortOrder: SortOrder.asc, + }, + }, + + bounds: new Bounds(0, 0, 1000, 1000), + }) + expect(chart["sortedItems"]).toEqual([ + items.get("medium"), + items.get("big"), + items.get("small"), + ]) +}) + it("can filter years correctly", () => { const csv = `year,entityName,population,percentBelow2USD 2000,medium,4000,5 @@ -474,10 +920,3 @@ it("can deal with y columns with missing values", () => { expect(xPositions[1]).toBeCloseTo(xAxisRange * 0.4, 0) expect(xPositions[2]).toBeCloseTo(xAxisRange * 0.5, 0) }) - -function roundXPosition(item: PlacedItem): PlacedItem { - return { - ...item, - xPosition: Math.round(item.xPosition), - } -} diff --git a/packages/@ourworldindata/grapher/src/stackedCharts/MarimekkoChart.test.tsx b/packages/@ourworldindata/grapher/src/stackedCharts/MarimekkoChart.test.tsx deleted file mode 100644 index ad49fc1302..0000000000 --- a/packages/@ourworldindata/grapher/src/stackedCharts/MarimekkoChart.test.tsx +++ /dev/null @@ -1,457 +0,0 @@ -#! /usr/bin/env jest - -import { - Bounds, - SortOrder, - SortBy, - ColumnTypeNames, -} from "@ourworldindata/utils" -import { - OwidTable, - SampleColumnSlugs, - SynthesizeGDPTable, -} from "@ourworldindata/core-table" -import { DefaultColorScheme } from "../color/CustomSchemes" -import { MarimekkoChart } from "./MarimekkoChart" -import { - MarimekkoChartManager, - BarShape, - Item, - PlacedItem, -} from "./MarimekkoChartConstants" - -it("can create a chart", () => { - const table = SynthesizeGDPTable({ - timeRange: [2000, 2001], - entityCount: 5, - }) - const manager = { - table, - yColumnSlugs: [SampleColumnSlugs.GDP], - xColumnSlug: SampleColumnSlugs.Population, - showNoDataArea: false, - } - - const chart = new MarimekkoChart({ manager }) - //expect(chart.failMessage).toBeTruthy() - - // selection.addToSelection(table.sampleEntityName(5)) - expect(chart.failMessage).toEqual("") - expect(chart.series.length).toEqual(1) - expect(chart.series[0].points.length).toEqual(5) - expect(chart.xSeries!.points.length).toEqual(5) - expect(chart.placedItems.length).toEqual(5) - //expect(chart.placedItems) -}) - -it("can display a Marimekko chart correctly", () => { - const csv = `year,entityName,population,percentBelow2USD -2001,medium,4000,4 -2001,big,5000,8 -2001,small,1000,3` - const table = new OwidTable(csv, [ - { slug: "population", type: ColumnTypeNames.Numeric }, - { slug: "percentBelow2USD", type: ColumnTypeNames.Numeric }, - { slug: "year", type: ColumnTypeNames.Year }, - ]) - - const manager: MarimekkoChartManager = { - table, - selection: table.availableEntityNames, - yColumnSlugs: ["percentBelow2USD"], - xColumnSlug: "population", - endTime: 2001, - showNoDataArea: false, - } - const chart = new MarimekkoChart({ - manager, - bounds: new Bounds(0, 0, 1000, 1000), - }) - const xAxisRange = chart["dualAxis"].horizontalAxis.rangeSize - - expect(chart.failMessage).toEqual("") - expect(chart.series.length).toEqual(1) - expect(chart.series[0].points.length).toEqual(3) - // Y series points should be one series in order of the data - const expectedYPoints = [ - { - position: "medium", - value: 4, - valueOffset: 0, - time: 2001, - }, - { - position: "big", - value: 8, - valueOffset: 0, - time: 2001, - }, - { - position: "small", - value: 3, - valueOffset: 0, - time: 2001, - }, - ] - // X series points should be in order of the data - const expectedXPoints = [ - { value: 4000, entity: "medium", time: 2001 }, - { value: 5000, entity: "big", time: 2001 }, - { value: 1000, entity: "small", time: 2001 }, - ] - expect(chart.series[0].points).toEqual(expectedYPoints) - expect(chart.xSeries!.points).toEqual(expectedXPoints) - // placedItems should be in default sort order - expect(chart.placedItems.map(roundXPosition)).toEqual([ - { - entityName: "big", - entityColor: undefined, - bars: [ - { - kind: BarShape.Bar, - color: DefaultColorScheme.colorSets[0][0], - seriesName: "percentBelow2USD", - yPoint: expectedYPoints[1], - }, - ], - xPoint: expectedXPoints[1], - xPosition: 0, - }, - { - entityName: "medium", - entityColor: undefined, - bars: [ - { - kind: BarShape.Bar, - color: DefaultColorScheme.colorSets[0][0], - seriesName: "percentBelow2USD", - yPoint: expectedYPoints[0], - }, - ], - xPoint: expectedXPoints[0], - xPosition: Math.round(xAxisRange * 0.5), - }, - { - entityName: "small", - entityColor: undefined, - bars: [ - { - kind: BarShape.Bar, - color: DefaultColorScheme.colorSets[0][0], - seriesName: "percentBelow2USD", - yPoint: expectedYPoints[2], - }, - ], - xPoint: expectedXPoints[2], - xPosition: Math.round(xAxisRange * 0.9), - }, - ]) -}) - -function roundXPosition(item: PlacedItem): PlacedItem { - return { - ...item, - xPosition: Math.round(item.xPosition), - } -} - -it("can display two time series stacked correctly", () => { - const csv = `year,entityName,population,percentBelow2USD,percentBelow10USD -2001,medium,4000,4,8.5 -2001,big,5000,8,20 -2001,small,1000,3,5` - const table = new OwidTable(csv, [ - { slug: "population", type: ColumnTypeNames.Numeric }, - { slug: "percentBelow2USD", type: ColumnTypeNames.Numeric }, - { slug: "percentBelow10USD", type: ColumnTypeNames.Numeric }, - { slug: "year", type: ColumnTypeNames.Year }, - ]) - - const manager: MarimekkoChartManager = { - table, - selection: table.availableEntityNames, - yColumnSlugs: ["percentBelow2USD", "percentBelow10USD"], - xColumnSlug: "population", - endTime: 2001, - showNoDataArea: false, - } - const chart = new MarimekkoChart({ - manager, - bounds: new Bounds(0, 0, 1000, 1000), - }) - const xAxisRange = chart["dualAxis"].horizontalAxis.rangeSize - - expect(chart.failMessage).toEqual("") - expect(chart.series.length).toEqual(2) - expect(chart.series[0].points.length).toEqual(3) - expect(chart.series[1].points.length).toEqual(3) - // Y series points should be one series in order of the data - const expectedYPointsFirstSeries = [ - { - position: "medium", - value: 4, - valueOffset: 0, - time: 2001, - }, - { - position: "big", - value: 8, - valueOffset: 0, - time: 2001, - }, - { - position: "small", - value: 3, - valueOffset: 0, - time: 2001, - }, - ] - const expectedYPointsSecondSeries = [ - { - position: "medium", - value: 8.5, - valueOffset: 4, - time: 2001, - }, - { - position: "big", - value: 20, - valueOffset: 8, - time: 2001, - }, - { - position: "small", - value: 5, - valueOffset: 3, - time: 2001, - }, - ] - // X series points should be in order of the data - const expectedXPoints = [ - { value: 4000, entity: "medium", time: 2001 }, - { value: 5000, entity: "big", time: 2001 }, - { value: 1000, entity: "small", time: 2001 }, - ] - expect(chart.series[0].points).toEqual(expectedYPointsFirstSeries) - expect(chart.series[1].points).toEqual(expectedYPointsSecondSeries) - expect(chart.xSeries!.points).toEqual(expectedXPoints) - // placedItems should be in default sort order - expect(chart.placedItems.map(roundXPosition)).toEqual([ - { - entityName: "big", - entityColor: undefined, - bars: [ - { - kind: BarShape.Bar, - color: DefaultColorScheme.colorSets[0][0], - seriesName: "percentBelow2USD", - yPoint: expectedYPointsFirstSeries[1], - }, - { - kind: BarShape.Bar, - color: DefaultColorScheme.colorSets[0][1], - seriesName: "percentBelow10USD", - yPoint: expectedYPointsSecondSeries[1], - }, - ], - xPoint: expectedXPoints[1], - xPosition: 0, - }, - { - entityName: "medium", - entityColor: undefined, - bars: [ - { - kind: BarShape.Bar, - color: DefaultColorScheme.colorSets[0][0], - seriesName: "percentBelow2USD", - yPoint: expectedYPointsFirstSeries[0], - }, - { - kind: BarShape.Bar, - color: DefaultColorScheme.colorSets[0][1], - seriesName: "percentBelow10USD", - yPoint: expectedYPointsSecondSeries[0], - }, - ], - xPoint: expectedXPoints[0], - xPosition: Math.round(xAxisRange * 0.5), - }, - { - entityName: "small", - entityColor: undefined, - bars: [ - { - kind: BarShape.Bar, - color: DefaultColorScheme.colorSets[0][0], - seriesName: "percentBelow2USD", - yPoint: expectedYPointsFirstSeries[2], - }, - { - kind: BarShape.Bar, - color: DefaultColorScheme.colorSets[0][1], - seriesName: "percentBelow10USD", - yPoint: expectedYPointsSecondSeries[2], - }, - ], - xPoint: expectedXPoints[2], - xPosition: Math.round(xAxisRange * 0.9), - }, - ]) -}) - -it("can do sorting", () => { - const csv = `year,entityName,population,percentBelow2USD -2001,AA,4000,4 -2001,BB,5000,8 -2001,CC,1000,3` - const table = new OwidTable(csv, [ - { slug: "population", type: ColumnTypeNames.Numeric }, - { slug: "percentBelow2USD", type: ColumnTypeNames.Numeric }, - { slug: "year", type: ColumnTypeNames.Year }, - ]) - - const manager: MarimekkoChartManager = { - table, - selection: table.availableEntityNames, - yColumnSlugs: ["percentBelow2USD"], - xColumnSlug: "population", - endTime: 2001, - showNoDataArea: false, - } - let chart = new MarimekkoChart({ - manager: { - ...manager, - sortConfig: { - sortBy: SortBy.total, - sortOrder: SortOrder.asc, - }, - }, - - bounds: new Bounds(0, 0, 1000, 1000), - }) - - expect(chart.failMessage).toEqual("") - expect(chart.series.length).toEqual(1) - expect(chart.series[0].points.length).toEqual(3) - // Y series points should be one series in order of the data - const expectedYPoints = [ - { - position: "AA", - value: 4, - valueOffset: 0, - time: 2001, - }, - { - position: "BB", - value: 8, - valueOffset: 0, - time: 2001, - }, - { - position: "CC", - value: 3, - valueOffset: 0, - time: 2001, - }, - ] - // X series points should be in order of the data - const expectedXPoints = [ - { value: 4000, entity: "AA", time: 2001 }, - { value: 5000, entity: "BB", time: 2001 }, - { value: 1000, entity: "CC", time: 2001 }, - ] - expect(chart.series[0].points).toEqual(expectedYPoints) - expect(chart.xSeries!.points).toEqual(expectedXPoints) - // placedItems should be in default sort order - const items = new Map([ - [ - "big", - { - entityName: "BB", - entityColor: undefined, - bars: [ - { - kind: BarShape.Bar, - color: DefaultColorScheme.colorSets[0][0], - seriesName: "percentBelow2USD", - yPoint: expectedYPoints[1], - }, - ], - xPoint: expectedXPoints[1], - }, - ], - [ - "medium", - { - entityName: "AA", - entityColor: undefined, - bars: [ - { - kind: BarShape.Bar, - color: DefaultColorScheme.colorSets[0][0], - seriesName: "percentBelow2USD", - yPoint: expectedYPoints[0], - }, - ], - xPoint: expectedXPoints[0], - }, - ], - [ - "small", - { - entityName: "CC", - entityColor: undefined, - bars: [ - { - kind: BarShape.Bar, - color: DefaultColorScheme.colorSets[0][0], - seriesName: "percentBelow2USD", - yPoint: expectedYPoints[2], - }, - ], - xPoint: expectedXPoints[2], - }, - ], - ]) - expect(chart["sortedItems"]).toEqual([ - items.get("small"), - items.get("medium"), - items.get("big"), - ]) - - chart = new MarimekkoChart({ - manager: { - ...manager, - sortConfig: { - sortBy: SortBy.column, - sortColumnSlug: "percentBelow2USD", - sortOrder: SortOrder.asc, - }, - }, - - bounds: new Bounds(0, 0, 1000, 1000), - }) - expect(chart["sortedItems"]).toEqual([ - items.get("small"), - items.get("medium"), - items.get("big"), - ]) - - chart = new MarimekkoChart({ - manager: { - ...manager, - sortConfig: { - sortBy: SortBy.entityName, - sortOrder: SortOrder.asc, - }, - }, - - bounds: new Bounds(0, 0, 1000, 1000), - }) - expect(chart["sortedItems"]).toEqual([ - items.get("medium"), - items.get("big"), - items.get("small"), - ]) -}) diff --git a/packages/@ourworldindata/grapher/src/stackedCharts/StackedAreaChart.test.ts b/packages/@ourworldindata/grapher/src/stackedCharts/StackedAreaChart.test.ts index ffbb994da9..09e5d885ff 100755 --- a/packages/@ourworldindata/grapher/src/stackedCharts/StackedAreaChart.test.ts +++ b/packages/@ourworldindata/grapher/src/stackedCharts/StackedAreaChart.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { StackedAreaChart } from "./StackedAreaChart" import { diff --git a/packages/@ourworldindata/grapher/src/stackedCharts/StackedBarChart.test.ts b/packages/@ourworldindata/grapher/src/stackedCharts/StackedBarChart.test.ts index 7b4265e630..ccf6faac6e 100755 --- a/packages/@ourworldindata/grapher/src/stackedCharts/StackedBarChart.test.ts +++ b/packages/@ourworldindata/grapher/src/stackedCharts/StackedBarChart.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { SampleColumnSlugs, diff --git a/packages/@ourworldindata/grapher/src/stackedCharts/StackedDiscreteBarChart.test.ts b/packages/@ourworldindata/grapher/src/stackedCharts/StackedDiscreteBarChart.test.ts index 4190b4205d..7f41cf2b91 100755 --- a/packages/@ourworldindata/grapher/src/stackedCharts/StackedDiscreteBarChart.test.ts +++ b/packages/@ourworldindata/grapher/src/stackedCharts/StackedDiscreteBarChart.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { SortOrder, diff --git a/packages/@ourworldindata/grapher/src/stackedCharts/StackedUtils.test.ts b/packages/@ourworldindata/grapher/src/stackedCharts/StackedUtils.test.ts index b4d0a6b2fd..defcf8e8c5 100755 --- a/packages/@ourworldindata/grapher/src/stackedCharts/StackedUtils.test.ts +++ b/packages/@ourworldindata/grapher/src/stackedCharts/StackedUtils.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { stackSeries, diff --git a/packages/@ourworldindata/grapher/src/timeline/TimelineController.test.ts b/packages/@ourworldindata/grapher/src/timeline/TimelineController.test.ts index ea607506e5..db82c6572b 100755 --- a/packages/@ourworldindata/grapher/src/timeline/TimelineController.test.ts +++ b/packages/@ourworldindata/grapher/src/timeline/TimelineController.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { TimeBoundValue, range } from "@ourworldindata/utils" import { TimelineController, TimelineManager } from "./TimelineController" diff --git a/packages/@ourworldindata/types/package.json b/packages/@ourworldindata/types/package.json index 458d4bad28..5beaec0f3f 100644 --- a/packages/@ourworldindata/types/package.json +++ b/packages/@ourworldindata/types/package.json @@ -16,7 +16,6 @@ "devDependencies": { "eslint": "^9.21.0", "eslint-plugin-react-hooks": "^5.2.0", - "jest": "^29.7.0", "typescript": "~5.8.2" }, "license": "MIT", diff --git a/packages/@ourworldindata/utils/package.json b/packages/@ourworldindata/utils/package.json index 826e62101d..71a077cff0 100644 --- a/packages/@ourworldindata/utils/package.json +++ b/packages/@ourworldindata/utils/package.json @@ -35,7 +35,6 @@ "devDependencies": { "@types/d3": "^6", "@types/d3-format": "^2", - "@types/jest": "^29.5.5", "@types/lodash": "^4.17.0", "@types/react": "^17.0.69", "@types/react-tag-autocomplete": "^6.1.1", @@ -43,7 +42,6 @@ "@types/url-parse": "^1.4.8", "eslint": "^9.21.0", "eslint-plugin-react-hooks": "^5.2.0", - "jest": "^29.7.0", "typescript": "~5.8.2" }, "license": "MIT" diff --git a/packages/@ourworldindata/utils/src/Bounds.test.ts b/packages/@ourworldindata/utils/src/Bounds.test.ts index a37cdb3345..99507352d3 100755 --- a/packages/@ourworldindata/utils/src/Bounds.test.ts +++ b/packages/@ourworldindata/utils/src/Bounds.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { Position } from "@ourworldindata/types" import { Bounds } from "./Bounds.js" diff --git a/packages/@ourworldindata/utils/src/FuzzySearch.test.ts b/packages/@ourworldindata/utils/src/FuzzySearch.test.ts index baabf80d57..2458948843 100644 --- a/packages/@ourworldindata/utils/src/FuzzySearch.test.ts +++ b/packages/@ourworldindata/utils/src/FuzzySearch.test.ts @@ -1,3 +1,5 @@ +import { expect, it, describe } from "vitest" + import { FuzzySearch } from "./FuzzySearch.js" describe(FuzzySearch, () => { diff --git a/packages/@ourworldindata/utils/src/MultiDimDataPageConfig.test.ts b/packages/@ourworldindata/utils/src/MultiDimDataPageConfig.test.ts index 4122a6625a..aafa1e0400 100644 --- a/packages/@ourworldindata/utils/src/MultiDimDataPageConfig.test.ts +++ b/packages/@ourworldindata/utils/src/MultiDimDataPageConfig.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { uuidv7 } from "uuidv7" diff --git a/packages/@ourworldindata/utils/src/OwidVariable.test.ts b/packages/@ourworldindata/utils/src/OwidVariable.test.ts index f925f072c7..4780a4e1a2 100755 --- a/packages/@ourworldindata/utils/src/OwidVariable.test.ts +++ b/packages/@ourworldindata/utils/src/OwidVariable.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { OwidVariableDisplayConfig } from "./OwidVariable.js" diff --git a/packages/@ourworldindata/utils/src/PointVector.test.ts b/packages/@ourworldindata/utils/src/PointVector.test.ts index 58dbe44118..d9f13e2669 100755 --- a/packages/@ourworldindata/utils/src/PointVector.test.ts +++ b/packages/@ourworldindata/utils/src/PointVector.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { PointVector } from "./PointVector.js" diff --git a/packages/@ourworldindata/utils/src/PromiseCache.test.ts b/packages/@ourworldindata/utils/src/PromiseCache.test.ts index 3b46f28c4a..9dd7fb2bf3 100644 --- a/packages/@ourworldindata/utils/src/PromiseCache.test.ts +++ b/packages/@ourworldindata/utils/src/PromiseCache.test.ts @@ -1,3 +1,5 @@ +import { expect, it, assert } from "vitest" + import { PromiseCache } from "./PromiseCache.js" const wait = (ms: number): Promise => @@ -30,7 +32,7 @@ it("promise is discarded if it rejects", async () => { try { await firstPromise - fail() + assert.fail() } catch { // ignore } @@ -39,7 +41,7 @@ it("promise is discarded if it rejects", async () => { try { await cache.get("key") - fail() + assert.fail() } catch { // ignore } @@ -49,7 +51,7 @@ it("promise is discarded if it rejects", async () => { try { await thirdPromise - fail() + assert.fail() } catch { // ignore } diff --git a/packages/@ourworldindata/utils/src/PromiseSwitcher.test.ts b/packages/@ourworldindata/utils/src/PromiseSwitcher.test.ts index d91782cdd7..ad7a78d385 100644 --- a/packages/@ourworldindata/utils/src/PromiseSwitcher.test.ts +++ b/packages/@ourworldindata/utils/src/PromiseSwitcher.test.ts @@ -1,6 +1,6 @@ -import { PromiseSwitcher } from "./PromiseSwitcher.js" +import { expect, it, vi } from "vitest" -import { jest } from "@jest/globals" +import { PromiseSwitcher } from "./PromiseSwitcher.js" const delayResolve = (result: any, ms: number = 10): Promise => new Promise((resolve) => { @@ -13,7 +13,7 @@ const delayReject = (error: any, ms: number = 10): Promise => }) it("handles fulfilling single promise", async () => { - const onResolve = jest.fn(() => undefined) + const onResolve = vi.fn(() => undefined) const selector = new PromiseSwitcher({ onResolve }) await selector.set(Promise.resolve("done")) expect(onResolve).toBeCalledWith("done") @@ -22,7 +22,7 @@ it("handles fulfilling single promise", async () => { }) it("selecting a new promise while one is pending discards the pending promise", async () => { - const onResolve = jest.fn(() => undefined) + const onResolve = vi.fn(() => undefined) const selector = new PromiseSwitcher({ onResolve }) void selector.set(delayResolve("first")) await selector.set(Promise.resolve("second")) @@ -31,8 +31,8 @@ it("selecting a new promise while one is pending discards the pending promise", }) it("handles promise rejections", async () => { - const onResolve = jest.fn(() => undefined) - const onReject = jest.fn(() => undefined) + const onResolve = vi.fn(() => undefined) + const onReject = vi.fn(() => undefined) const selector = new PromiseSwitcher({ onResolve, onReject }) await selector.set(Promise.reject("error")) @@ -45,8 +45,8 @@ it("handles promise rejections", async () => { }) it("handles clearing pending promise", async () => { - const onResolve = jest.fn(() => undefined) - const onReject = jest.fn(() => undefined) + const onResolve = vi.fn(() => undefined) + const onReject = vi.fn(() => undefined) const selector = new PromiseSwitcher({ onResolve, onReject }) const resolve = delayResolve("done") diff --git a/packages/@ourworldindata/utils/src/TimeBounds.test.ts b/packages/@ourworldindata/utils/src/TimeBounds.test.ts index 76d320bdc8..420757c2dc 100755 --- a/packages/@ourworldindata/utils/src/TimeBounds.test.ts +++ b/packages/@ourworldindata/utils/src/TimeBounds.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { TimeBoundValue } from "@ourworldindata/types" import { diff --git a/packages/@ourworldindata/utils/src/Util.test.ts b/packages/@ourworldindata/utils/src/Util.test.ts index 77fb234bd1..ffc2273bd0 100755 --- a/packages/@ourworldindata/utils/src/Util.test.ts +++ b/packages/@ourworldindata/utils/src/Util.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import timezoneMock from "timezone-mock" import { @@ -511,11 +511,13 @@ describe("slugifySameCase", () => { [" hello//world ", "helloworld"], ] - cases.forEach(([input, output]) => { - expect(slugifySameCase(input)).toBe(output) + it("slugifies strings", () => { + cases.forEach(([input, output]) => { + expect(slugifySameCase(input)).toBe(output) + }) }) - describe("it can allow slashes", () => { + it("can allow slashes", () => { expect(slugifySameCase("sdgs/energy", true)).toBe("sdgs/energy") expect(slugifySameCase("sdgs/economic development", true)).toBe( "sdgs/economic-development" diff --git a/packages/@ourworldindata/utils/src/formatValue.test.ts b/packages/@ourworldindata/utils/src/formatValue.test.ts index f94def0c9d..d19027fef3 100644 --- a/packages/@ourworldindata/utils/src/formatValue.test.ts +++ b/packages/@ourworldindata/utils/src/formatValue.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { TickFormattingOptions, OwidVariableRoundingMode, diff --git a/packages/@ourworldindata/utils/src/grapherConfigUtils.test.ts b/packages/@ourworldindata/utils/src/grapherConfigUtils.test.ts index 0b879541c0..df2730df44 100644 --- a/packages/@ourworldindata/utils/src/grapherConfigUtils.test.ts +++ b/packages/@ourworldindata/utils/src/grapherConfigUtils.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { DimensionProperty, diff --git a/packages/@ourworldindata/utils/src/persistable/Persistable.test.ts b/packages/@ourworldindata/utils/src/persistable/Persistable.test.ts index eef0650f3e..3bc7b99bc8 100755 --- a/packages/@ourworldindata/utils/src/persistable/Persistable.test.ts +++ b/packages/@ourworldindata/utils/src/persistable/Persistable.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { objectWithPersistablesToObject, diff --git a/packages/@ourworldindata/utils/src/regions.test.ts b/packages/@ourworldindata/utils/src/regions.test.ts index 0c1d78a217..a33263d33b 100755 --- a/packages/@ourworldindata/utils/src/regions.test.ts +++ b/packages/@ourworldindata/utils/src/regions.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it } from "vitest" import { isCountryName, diff --git a/packages/@ourworldindata/utils/src/serializers.test.ts b/packages/@ourworldindata/utils/src/serializers.test.ts index 2e71ca1115..62788b6e9c 100755 --- a/packages/@ourworldindata/utils/src/serializers.test.ts +++ b/packages/@ourworldindata/utils/src/serializers.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { deserializeJSONFromHTML, serializeJSONForHTML } from "./serializers.js" diff --git a/packages/@ourworldindata/utils/src/urls/Url.test.ts b/packages/@ourworldindata/utils/src/urls/Url.test.ts index 7dfa2996b5..c01499f848 100755 --- a/packages/@ourworldindata/utils/src/urls/Url.test.ts +++ b/packages/@ourworldindata/utils/src/urls/Url.test.ts @@ -1,4 +1,4 @@ -#! yarn testJest +import { expect, it, describe } from "vitest" import { Url } from "./Url.js" diff --git a/packages/@ourworldindata/utils/src/urls/UrlUtils.test.ts b/packages/@ourworldindata/utils/src/urls/UrlUtils.test.ts index 4287e7d8e1..8258dc9b2b 100755 --- a/packages/@ourworldindata/utils/src/urls/UrlUtils.test.ts +++ b/packages/@ourworldindata/utils/src/urls/UrlUtils.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { queryParamsToStr, strToQueryParams } from "./UrlUtils.js" diff --git a/serverUtils/errorLog.ts b/serverUtils/errorLog.ts index c1bbd49e29..c5c068ce80 100644 --- a/serverUtils/errorLog.ts +++ b/serverUtils/errorLog.ts @@ -2,5 +2,6 @@ import * as Sentry from "@sentry/react" export async function logErrorAndMaybeCaptureInSentry(err: any) { console.error(err) - Sentry.captureException(err) + + if (!process.env.VITEST) Sentry.captureException(err) } diff --git a/serverUtils/hash.test.ts b/serverUtils/hash.test.ts index e26597d27c..200243169e 100644 --- a/serverUtils/hash.test.ts +++ b/serverUtils/hash.test.ts @@ -1,3 +1,5 @@ +import { expect, it, describe } from "vitest" + import { PassThrough } from "node:stream" import { hashBase36, hashBase36FromStream } from "./hash.js" diff --git a/serverUtils/instrument.ts b/serverUtils/instrument.ts index 88db481e14..9e8010d8f5 100644 --- a/serverUtils/instrument.ts +++ b/serverUtils/instrument.ts @@ -3,17 +3,20 @@ import * as Sentry from "@sentry/node" import { nodeProfilingIntegration } from "@sentry/profiling-node" import findBaseDir from "../settings/findBaseDir.js" -const baseDir = findBaseDir(__dirname) -if (baseDir === undefined) throw new Error("could not locate base package.json") +if (!process.env.VITEST) { + const baseDir = findBaseDir(__dirname) + if (baseDir === undefined) + throw new Error("could not locate base package.json") -dotenv.config({ path: `${baseDir}/.env` }) + dotenv.config({ path: `${baseDir}/.env` }) -// Ensure to call this before importing any other modules! -Sentry.init({ - dsn: process.env.SENTRY_ADMIN_DSN, - integrations: [nodeProfilingIntegration()], - tracesSampleRate: 0.1, - profilesSampleRate: 1.0, // This is relative to tracesSampleRate - environment: process.env.ENV, - release: process.env.COMMIT_SHA, -}) + // Ensure to call this before importing any other modules! + Sentry.init({ + dsn: process.env.SENTRY_ADMIN_DSN, + integrations: [nodeProfilingIntegration()], + tracesSampleRate: 0.1, + profilesSampleRate: 1.0, // This is relative to tracesSampleRate + environment: process.env.ENV, + release: process.env.COMMIT_SHA, + }) +} diff --git a/serverUtils/serverUtil.test.ts b/serverUtils/serverUtil.test.ts index 50619b7852..b9d772b409 100644 --- a/serverUtils/serverUtil.test.ts +++ b/serverUtils/serverUtil.test.ts @@ -1,3 +1,5 @@ +import { expect, it, describe } from "vitest" + import { base64ToBytes, bytesToBase64, diff --git a/site/Breadcrumb/Breadcrumb.test.ts b/site/Breadcrumb/Breadcrumb.test.ts index 7bb679d06d..edba81a9f6 100755 --- a/site/Breadcrumb/Breadcrumb.test.ts +++ b/site/Breadcrumb/Breadcrumb.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { getSubnavItem } from "../gdocs/utils.js" import { getBreadcrumbItems, getSubnavParent } from "./breadcrumbUtils.js" diff --git a/site/CookiePreferencesManager.test.ts b/site/CookiePreferencesManager.test.ts index e8707a33d8..1df6fda9e9 100755 --- a/site/CookiePreferencesManager.test.ts +++ b/site/CookiePreferencesManager.test.ts @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe } from "vitest" import { PreferenceType, diff --git a/site/GrapherPage.jsdom.test.tsx b/site/GrapherPage.test.tsx similarity index 97% rename from site/GrapherPage.jsdom.test.tsx rename to site/GrapherPage.test.tsx index 27af039b31..f36b05340d 100755 --- a/site/GrapherPage.jsdom.test.tsx +++ b/site/GrapherPage.test.tsx @@ -1,4 +1,4 @@ -#! /usr/bin/env jest +import { expect, it, describe, beforeAll } from "vitest" import { GrapherInterface } from "@ourworldindata/types" import { DimensionProperty, diff --git a/site/blocks/RelatedCharts.jsdom.test.tsx b/site/blocks/RelatedCharts.test.tsx similarity index 96% rename from site/blocks/RelatedCharts.jsdom.test.tsx rename to site/blocks/RelatedCharts.test.tsx index b53506376d..1b42c1ee1b 100755 --- a/site/blocks/RelatedCharts.jsdom.test.tsx +++ b/site/blocks/RelatedCharts.test.tsx @@ -1,4 +1,8 @@ -#! /usr/bin/env jest +/** + * @vitest-environment jsdom + */ + +import { expect, it } from "vitest" import Enzyme from "enzyme" import Adapter from "@wojtekmaj/enzyme-adapter-react-17" diff --git a/site/formatting.test.ts b/site/formatting.test.ts index 87e829d2da..6c53408aab 100644 --- a/site/formatting.test.ts +++ b/site/formatting.test.ts @@ -1,3 +1,5 @@ +import { expect, it, describe } from "vitest" + import * as cheerio from "cheerio" import { WP_ColumnStyle } from "@ourworldindata/utils" import { splitContentIntoSectionsAndColumns } from "./formatting.js" diff --git a/site/gdocs/components/KeyInsights.jsdom.test.tsx b/site/gdocs/components/KeyInsights.test.tsx similarity index 93% rename from site/gdocs/components/KeyInsights.jsdom.test.tsx rename to site/gdocs/components/KeyInsights.test.tsx index 39d2da05db..9006ac7c43 100755 --- a/site/gdocs/components/KeyInsights.jsdom.test.tsx +++ b/site/gdocs/components/KeyInsights.test.tsx @@ -1,4 +1,8 @@ -#! /usr/bin/env jest +/** + * @vitest-environment jsdom + */ + +import { expect, it, beforeEach, vi } from "vitest" import { EnrichedBlockKeyInsights, @@ -7,9 +11,8 @@ import { slugify, } from "@ourworldindata/utils" import { fireEvent, render, screen } from "@testing-library/react" -import "@testing-library/jest-dom" +import "@testing-library/jest-dom/vitest" -import { jest } from "@jest/globals" import ArticleBlock from "./ArticleBlock.js" import { KEY_INSIGHTS_INSIGHT_PARAM } from "./KeyInsights.js" @@ -17,7 +20,7 @@ const KEY_INSIGHTS_SLUG = "key-insights" //from https://stackoverflow.com/a/62148101 beforeEach(() => { - const mockIntersectionObserver = jest.fn() + const mockIntersectionObserver = vi.fn() mockIntersectionObserver.mockReturnValue({ observe: () => null, unobserve: () => null, diff --git a/site/instrument.ts b/site/instrument.ts index 5cb7e6dbf5..7f40c67868 100644 --- a/site/instrument.ts +++ b/site/instrument.ts @@ -3,28 +3,30 @@ import { isInIFrame } from "@ourworldindata/utils" import { COMMIT_SHA, ENV, SENTRY_DSN } from "../settings/clientSettings.js" import { getPreferenceValue, PreferenceType } from "./cookiePreferences.js" -const analyticsConsent = getPreferenceValue(PreferenceType.Analytics) +if (!process.env.VITEST) { + const analyticsConsent = getPreferenceValue(PreferenceType.Analytics) -let sentryOpts: Sentry.BrowserOptions = {} -if (analyticsConsent && !isInIFrame()) { - // only collect session replays from: users that have consented to analytics - // AND where page isn't embedded in an iframe - sentryOpts = { - integrations: [ - Sentry.replayIntegration({ - maskAllText: false, - maskAllInputs: false, - blockAllMedia: false, - mask: [".sentry-mask"], - }), - ], - replaysSessionSampleRate: ENV === "development" ? 1 : 0.1, - replaysOnErrorSampleRate: 0, + let sentryOpts: Sentry.BrowserOptions = {} + if (analyticsConsent && !isInIFrame()) { + // only collect session replays from: users that have consented to analytics + // AND where page isn't embedded in an iframe + sentryOpts = { + integrations: [ + Sentry.replayIntegration({ + maskAllText: false, + maskAllInputs: false, + blockAllMedia: false, + mask: [".sentry-mask"], + }), + ], + replaysSessionSampleRate: ENV === "development" ? 1 : 0.1, + replaysOnErrorSampleRate: 0, + } } + Sentry.init({ + dsn: SENTRY_DSN, + environment: ENV, + release: COMMIT_SHA, + ...sentryOpts, + }) } -Sentry.init({ - dsn: SENTRY_DSN, - environment: ENV, - release: COMMIT_SHA, - ...sentryOpts, -}) diff --git a/site/viteUtils.test.ts b/site/viteUtils.test.ts index cf85e20b02..6cf2f10b70 100644 --- a/site/viteUtils.test.ts +++ b/site/viteUtils.test.ts @@ -1,3 +1,5 @@ +import { expect, it, describe } from "vitest" + import { createTagsForManifestEntry } from "./viteUtils.js" import ReactDOMServer from "react-dom/server.js" diff --git a/vite.config-common.mts b/vite.config-common.mts index 89aa720afa..b23f72320c 100644 --- a/vite.config-common.mts +++ b/vite.config-common.mts @@ -1,6 +1,6 @@ import { defineConfig } from "vite" import pluginReact from "@vitejs/plugin-react" -import pluginChecker from "vite-plugin-checker" +import { checker as pluginChecker } from "vite-plugin-checker" import { sentryVitePlugin } from "@sentry/vite-plugin" import * as clientSettings from "./settings/clientSettings.js" import { @@ -71,18 +71,20 @@ export const defineViteConfigForEntrypoint = (entrypoint: ViteEntryPoint) => { }, }, }), - pluginChecker({ - typescript: { - buildMode: true, - tsconfigPath: "tsconfig.vite-checker.json", - }, - }), + !process.env.VITEST && + pluginChecker({ + typescript: { + buildMode: true, + tsconfigPath: "tsconfig.vite-checker.json", + }, + }), // Put the Sentry vite plugin after all other plugins. - sentryVitePlugin({ - authToken: process.env.SENTRY_AUTH_TOKEN, - org: process.env.SENTRY_ORG, - project: entrypoint === "admin" ? "admin" : "website", - }), + !process.env.VITEST && + sentryVitePlugin({ + authToken: process.env.SENTRY_AUTH_TOKEN, + org: process.env.SENTRY_ORG, + project: entrypoint === "admin" ? "admin" : "website", + }), ], server: { port: 8090, diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000000..692b3a85d4 --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,15 @@ +import { configDefaults, defineConfig } from "vitest/config" +import viteConfig from "./vite.config-site.mts" + +export default defineConfig({ + ...viteConfig, + test: { + exclude: [ + ...configDefaults.exclude, + "itsJustJavascript/*", + "*/dist/*", + "db/tests/*", + "adminSiteServer/app.test.ts", + ], + }, +}) diff --git a/vitest.db.config.ts b/vitest.db.config.ts new file mode 100644 index 0000000000..f4799a853d --- /dev/null +++ b/vitest.db.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config" +import viteConfig from "./vite.config-site.mts" + +export default defineConfig({ + ...viteConfig, + test: { + include: ["db/tests/**/*.test.js", "adminSiteServer/app.test.ts"], + maxConcurrency: 1, + }, +}) diff --git a/yarn.lock b/yarn.lock index 21a59a32f4..df607fd623 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,10 +12,10 @@ __metadata: languageName: node linkType: hard -"@adobe/css-tools@npm:^4.3.0": - version: 4.3.3 - resolution: "@adobe/css-tools@npm:4.3.3" - checksum: 10/0e77057efb4e18182560855503066b75edca98671be327d3f8a7ae89ec3da6821e693114b55225909fca00d7e7ed8422f3d79d71fe95dd4d5df1f2026a9fda02 +"@adobe/css-tools@npm:^4.4.0": + version: 4.4.2 + resolution: "@adobe/css-tools@npm:4.4.2" + checksum: 10/893d97ba524d92d5fdcee517a47fa7a144ca89dfcc559f5e1c3a9894599bf64c4ee5fc811fb11de0ab84da6778f4b69ea6aede73813534aeb5dfbc412d0788db languageName: node linkType: hard @@ -257,7 +257,7 @@ __metadata: languageName: node linkType: hard -"@ampproject/remapping@npm:^2.2.0": +"@ampproject/remapping@npm:^2.2.0, @ampproject/remapping@npm:^2.3.0": version: 2.3.0 resolution: "@ampproject/remapping@npm:2.3.0" dependencies: @@ -355,6 +355,19 @@ __metadata: languageName: node linkType: hard +"@asamuzakjp/css-color@npm:^2.8.2": + version: 2.8.3 + resolution: "@asamuzakjp/css-color@npm:2.8.3" + dependencies: + "@csstools/css-calc": "npm:^2.1.1" + "@csstools/css-color-parser": "npm:^3.0.7" + "@csstools/css-parser-algorithms": "npm:^3.0.4" + "@csstools/css-tokenizer": "npm:^3.0.3" + lru-cache: "npm:^10.4.3" + checksum: 10/3fbd6b975cfca220a0620843776e7d266b880293a9e3364a48de11ca3eb54af8209343d01842a7c98d2737e457294a7621a5f6671aaf5f12e1634d10808f2508 + languageName: node + linkType: hard + "@aws-crypto/crc32@npm:5.2.0": version: 5.2.0 resolution: "@aws-crypto/crc32@npm:5.2.0" @@ -1032,7 +1045,7 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.26.2": +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.26.2": version: 7.26.2 resolution: "@babel/code-frame@npm:7.26.2" dependencies: @@ -1050,7 +1063,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.18.5, @babel/core@npm:^7.26.0": +"@babel/core@npm:^7.18.5, @babel/core@npm:^7.26.0": version: 7.26.9 resolution: "@babel/core@npm:7.26.9" dependencies: @@ -1073,7 +1086,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.26.9, @babel/generator@npm:^7.7.2": +"@babel/generator@npm:^7.26.9": version: 7.26.9 resolution: "@babel/generator@npm:7.26.9" dependencies: @@ -1122,7 +1135,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.17.12, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.25.9, @babel/helper-plugin-utils@npm:^7.8.0": +"@babel/helper-plugin-utils@npm:^7.25.9": version: 7.26.5 resolution: "@babel/helper-plugin-utils@npm:7.26.5" checksum: 10/1cc0fd8514da3bb249bed6c27227696ab5e84289749d7258098701cffc0c599b7f61ec40dd332f8613030564b79899d9826813c96f966330bcfc7145a8377857 @@ -1160,7 +1173,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.26.9": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.25.4, @babel/parser@npm:^7.26.9": version: 7.26.9 resolution: "@babel/parser@npm:7.26.9" dependencies: @@ -1171,160 +1184,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-async-generators@npm:^7.8.4": - version: 7.8.4 - resolution: "@babel/plugin-syntax-async-generators@npm:7.8.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/7ed1c1d9b9e5b64ef028ea5e755c0be2d4e5e4e3d6cf7df757b9a8c4cfa4193d268176d0f1f7fbecdda6fe722885c7fda681f480f3741d8a2d26854736f05367 - languageName: node - linkType: hard - -"@babel/plugin-syntax-bigint@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-bigint@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/3a10849d83e47aec50f367a9e56a6b22d662ddce643334b087f9828f4c3dd73bdc5909aaeabe123fed78515767f9ca43498a0e621c438d1cd2802d7fae3c9648 - languageName: node - linkType: hard - -"@babel/plugin-syntax-class-properties@npm:^7.8.3": - version: 7.12.13 - resolution: "@babel/plugin-syntax-class-properties@npm:7.12.13" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.12.13" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/24f34b196d6342f28d4bad303612d7ff566ab0a013ce89e775d98d6f832969462e7235f3e7eaf17678a533d4be0ba45d3ae34ab4e5a9dcbda5d98d49e5efa2fc - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-meta@npm:^7.8.3": - version: 7.10.4 - resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/166ac1125d10b9c0c430e4156249a13858c0366d38844883d75d27389621ebe651115cb2ceb6dc011534d5055719fa1727b59f39e1ab3ca97820eef3dcab5b9b - languageName: node - linkType: hard - -"@babel/plugin-syntax-json-strings@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-json-strings@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/bf5aea1f3188c9a507e16efe030efb996853ca3cadd6512c51db7233cc58f3ac89ff8c6bdfb01d30843b161cfe7d321e1bf28da82f7ab8d7e6bc5464666f354a - languageName: node - linkType: hard - -"@babel/plugin-syntax-jsx@npm:^7.7.2": - version: 7.18.6 - resolution: "@babel/plugin-syntax-jsx@npm:7.18.6" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.18.6" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/6d37ea972970195f1ffe1a54745ce2ae456e0ac6145fae9aa1480f297248b262ea6ebb93010eddb86ebfacb94f57c05a1fc5d232b9a67325b09060299d515c67 - languageName: node - linkType: hard - -"@babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3": - version: 7.10.4 - resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/aff33577037e34e515911255cdbb1fd39efee33658aa00b8a5fd3a4b903585112d037cce1cc9e4632f0487dc554486106b79ccd5ea63a2e00df4363f6d4ff886 - languageName: node - linkType: hard - -"@babel/plugin-syntax-nullish-coalescing-operator@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-nullish-coalescing-operator@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/87aca4918916020d1fedba54c0e232de408df2644a425d153be368313fdde40d96088feed6c4e5ab72aac89be5d07fef2ddf329a15109c5eb65df006bf2580d1 - languageName: node - linkType: hard - -"@babel/plugin-syntax-numeric-separator@npm:^7.8.3": - version: 7.10.4 - resolution: "@babel/plugin-syntax-numeric-separator@npm:7.10.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/01ec5547bd0497f76cc903ff4d6b02abc8c05f301c88d2622b6d834e33a5651aa7c7a3d80d8d57656a4588f7276eba357f6b7e006482f5b564b7a6488de493a1 - languageName: node - linkType: hard - -"@babel/plugin-syntax-object-rest-spread@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-object-rest-spread@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/fddcf581a57f77e80eb6b981b10658421bc321ba5f0a5b754118c6a92a5448f12a0c336f77b8abf734841e102e5126d69110a306eadb03ca3e1547cab31f5cbf - languageName: node - linkType: hard - -"@babel/plugin-syntax-optional-catch-binding@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-optional-catch-binding@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/910d90e72bc90ea1ce698e89c1027fed8845212d5ab588e35ef91f13b93143845f94e2539d831dc8d8ededc14ec02f04f7bd6a8179edd43a326c784e7ed7f0b9 - languageName: node - linkType: hard - -"@babel/plugin-syntax-optional-chaining@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-optional-chaining@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/eef94d53a1453361553c1f98b68d17782861a04a392840341bc91780838dd4e695209c783631cf0de14c635758beafb6a3a65399846ffa4386bff90639347f30 - languageName: node - linkType: hard - -"@babel/plugin-syntax-top-level-await@npm:^7.8.3": - version: 7.12.13 - resolution: "@babel/plugin-syntax-top-level-await@npm:7.12.13" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.12.13" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/74cf8c8b8715ec0de6c55b96af4907cfa3bbf87dbaecdc4c30acac8c30d281d62c578001faf8f99e1884e1ccb933f5a919eb184c542b92fcef7bdefe64482c39 - languageName: node - linkType: hard - -"@babel/plugin-syntax-typescript@npm:^7.7.2": - version: 7.17.12 - resolution: "@babel/plugin-syntax-typescript@npm:7.17.12" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.17.12" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/50ab09f1953a2b0586cff9e29bf7cea3d886b48c1361a861687c2aef46356c6d73778c3341b0c051dc82a34417f19e9d759ae918353c5a98d25e85f2f6d24181 - languageName: node - linkType: hard - "@babel/plugin-transform-react-jsx-self@npm:^7.25.9": version: 7.25.9 resolution: "@babel/plugin-transform-react-jsx-self@npm:7.25.9" @@ -1356,7 +1215,7 @@ __metadata: languageName: node linkType: hard -"@babel/template@npm:^7.26.9, @babel/template@npm:^7.3.3": +"@babel/template@npm:^7.26.9": version: 7.26.9 resolution: "@babel/template@npm:7.26.9" dependencies: @@ -1382,7 +1241,7 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.9, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3": +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.25.4, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.9, @babel/types@npm:^7.3.0": version: 7.26.9 resolution: "@babel/types@npm:7.26.9" dependencies: @@ -1392,10 +1251,10 @@ __metadata: languageName: node linkType: hard -"@bcoe/v8-coverage@npm:^0.2.3": - version: 0.2.3 - resolution: "@bcoe/v8-coverage@npm:0.2.3" - checksum: 10/1a1f0e356a3bb30b5f1ced6f79c413e6ebacf130421f15fac5fcd8be5ddf98aedb4404d7f5624e3285b700e041f9ef938321f3ca4d359d5b716f96afa120d88d +"@bcoe/v8-coverage@npm:^1.0.2": + version: 1.0.2 + resolution: "@bcoe/v8-coverage@npm:1.0.2" + checksum: 10/46600b2dde460269b07a8e4f12b72e418eae1337b85c979f43af3336c9a1c65b04e42508ab6b245f1e0e3c64328e1c38d8cd733e4a7cebc4fbf9cf65c6e59937 languageName: node linkType: hard @@ -1466,6 +1325,52 @@ __metadata: languageName: node linkType: hard +"@csstools/color-helpers@npm:^5.0.2": + version: 5.0.2 + resolution: "@csstools/color-helpers@npm:5.0.2" + checksum: 10/8763079c54578bd2215c68de0795edb9cfa29bffa29625bff89f3c47d9df420d86296ff3a6fa8c29ca037bbaa64dc10a963461233341de0516a3161a3b549e7b + languageName: node + linkType: hard + +"@csstools/css-calc@npm:^2.1.1, @csstools/css-calc@npm:^2.1.2": + version: 2.1.2 + resolution: "@csstools/css-calc@npm:2.1.2" + peerDependencies: + "@csstools/css-parser-algorithms": ^3.0.4 + "@csstools/css-tokenizer": ^3.0.3 + checksum: 10/23ba633b15ba733f9da6d65e6a97a34116d10add7df15f6b05df93f00bb47b335a2268fcfd93c442da5d4678706f7bb26ffcc26a74621e34fe0d399bb27e53d3 + languageName: node + linkType: hard + +"@csstools/css-color-parser@npm:^3.0.7": + version: 3.0.8 + resolution: "@csstools/css-color-parser@npm:3.0.8" + dependencies: + "@csstools/color-helpers": "npm:^5.0.2" + "@csstools/css-calc": "npm:^2.1.2" + peerDependencies: + "@csstools/css-parser-algorithms": ^3.0.4 + "@csstools/css-tokenizer": ^3.0.3 + checksum: 10/935d0d6b484ee3b38390c765c66b0bb6632ca4172f211ef87f259a193bdae7f818732e8ef214fcce06016d5cf8fa1d917c24e4ff42f7359f589a979acc7e4511 + languageName: node + linkType: hard + +"@csstools/css-parser-algorithms@npm:^3.0.4": + version: 3.0.4 + resolution: "@csstools/css-parser-algorithms@npm:3.0.4" + peerDependencies: + "@csstools/css-tokenizer": ^3.0.3 + checksum: 10/dfb6926218d9f8ba25d8b43ea46c03863c819481f8c55e4de4925780eaab9e6bcd6bead1d56b4ef82d09fcd9d69a7db2750fa9db08eece9470fd499dc76d0edb + languageName: node + linkType: hard + +"@csstools/css-tokenizer@npm:^3.0.3": + version: 3.0.3 + resolution: "@csstools/css-tokenizer@npm:3.0.3" + checksum: 10/6baa3160e426e1f177b8f10d54ec7a4a596090f65a05f16d7e9e4da049962a404eabc5f885f4867093702c259cd4080ac92a438326e22dea015201b3e71f5bbb + languageName: node + linkType: hard + "@cypress/request@npm:^2.88.10": version: 2.88.12 resolution: "@cypress/request@npm:2.88.12" @@ -2477,172 +2382,10 @@ __metadata: languageName: node linkType: hard -"@istanbuljs/load-nyc-config@npm:^1.0.0": - version: 1.1.0 - resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" - dependencies: - camelcase: "npm:^5.3.1" - find-up: "npm:^4.1.0" - get-package-type: "npm:^0.1.0" - js-yaml: "npm:^3.13.1" - resolve-from: "npm:^5.0.0" - checksum: 10/b000a5acd8d4fe6e34e25c399c8bdbb5d3a202b4e10416e17bfc25e12bab90bb56d33db6089ae30569b52686f4b35ff28ef26e88e21e69821d2b85884bd055b8 - languageName: node - linkType: hard - "@istanbuljs/schema@npm:^0.1.2": - version: 0.1.2 - resolution: "@istanbuljs/schema@npm:0.1.2" - checksum: 10/e4a7fffc72fb2cfe2edfee8a09f68b2da18b1ab328a29d8be2933681f9e36103f0b083a5ae07129f4de26296eb7c2a1cc144cfea6cdb47f871a69766947144d3 - languageName: node - linkType: hard - -"@jest/console@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/console@npm:29.7.0" - dependencies: - "@jest/types": "npm:^29.6.3" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - jest-message-util: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - slash: "npm:^3.0.0" - checksum: 10/4a80c750e8a31f344233cb9951dee9b77bf6b89377cb131f8b3cde07ff218f504370133a5963f6a786af4d2ce7f85642db206ff7a15f99fe58df4c38ac04899e - languageName: node - linkType: hard - -"@jest/core@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/core@npm:29.7.0" - dependencies: - "@jest/console": "npm:^29.7.0" - "@jest/reporters": "npm:^29.7.0" - "@jest/test-result": "npm:^29.7.0" - "@jest/transform": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - "@types/node": "npm:*" - ansi-escapes: "npm:^4.2.1" - chalk: "npm:^4.0.0" - ci-info: "npm:^3.2.0" - exit: "npm:^0.1.2" - graceful-fs: "npm:^4.2.9" - jest-changed-files: "npm:^29.7.0" - jest-config: "npm:^29.7.0" - jest-haste-map: "npm:^29.7.0" - jest-message-util: "npm:^29.7.0" - jest-regex-util: "npm:^29.6.3" - jest-resolve: "npm:^29.7.0" - jest-resolve-dependencies: "npm:^29.7.0" - jest-runner: "npm:^29.7.0" - jest-runtime: "npm:^29.7.0" - jest-snapshot: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - jest-validate: "npm:^29.7.0" - jest-watcher: "npm:^29.7.0" - micromatch: "npm:^4.0.4" - pretty-format: "npm:^29.7.0" - slash: "npm:^3.0.0" - strip-ansi: "npm:^6.0.0" - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - checksum: 10/ab6ac2e562d083faac7d8152ec1cc4eccc80f62e9579b69ed40aedf7211a6b2d57024a6cd53c4e35fd051c39a236e86257d1d99ebdb122291969a0a04563b51e - languageName: node - linkType: hard - -"@jest/environment@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/environment@npm:29.7.0" - dependencies: - "@jest/fake-timers": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - "@types/node": "npm:*" - jest-mock: "npm:^29.7.0" - checksum: 10/90b5844a9a9d8097f2cf107b1b5e57007c552f64315da8c1f51217eeb0a9664889d3f145cdf8acf23a84f4d8309a6675e27d5b059659a004db0ea9546d1c81a8 - languageName: node - linkType: hard - -"@jest/expect-utils@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/expect-utils@npm:29.7.0" - dependencies: - jest-get-type: "npm:^29.6.3" - checksum: 10/ef8d379778ef574a17bde2801a6f4469f8022a46a5f9e385191dc73bb1fc318996beaed4513fbd7055c2847227a1bed2469977821866534593a6e52a281499ee - languageName: node - linkType: hard - -"@jest/expect@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/expect@npm:29.7.0" - dependencies: - expect: "npm:^29.7.0" - jest-snapshot: "npm:^29.7.0" - checksum: 10/fea6c3317a8da5c840429d90bfe49d928e89c9e89fceee2149b93a11b7e9c73d2f6e4d7cdf647163da938fc4e2169e4490be6bae64952902bc7a701033fd4880 - languageName: node - linkType: hard - -"@jest/fake-timers@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/fake-timers@npm:29.7.0" - dependencies: - "@jest/types": "npm:^29.6.3" - "@sinonjs/fake-timers": "npm:^10.0.2" - "@types/node": "npm:*" - jest-message-util: "npm:^29.7.0" - jest-mock: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - checksum: 10/9b394e04ffc46f91725ecfdff34c4e043eb7a16e1d78964094c9db3fde0b1c8803e45943a980e8c740d0a3d45661906de1416ca5891a538b0660481a3a828c27 - languageName: node - linkType: hard - -"@jest/globals@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/globals@npm:29.7.0" - dependencies: - "@jest/environment": "npm:^29.7.0" - "@jest/expect": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - jest-mock: "npm:^29.7.0" - checksum: 10/97dbb9459135693ad3a422e65ca1c250f03d82b2a77f6207e7fa0edd2c9d2015fbe4346f3dc9ebff1678b9d8da74754d4d440b7837497f8927059c0642a22123 - languageName: node - linkType: hard - -"@jest/reporters@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/reporters@npm:29.7.0" - dependencies: - "@bcoe/v8-coverage": "npm:^0.2.3" - "@jest/console": "npm:^29.7.0" - "@jest/test-result": "npm:^29.7.0" - "@jest/transform": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - "@jridgewell/trace-mapping": "npm:^0.3.18" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - collect-v8-coverage: "npm:^1.0.0" - exit: "npm:^0.1.2" - glob: "npm:^7.1.3" - graceful-fs: "npm:^4.2.9" - istanbul-lib-coverage: "npm:^3.0.0" - istanbul-lib-instrument: "npm:^6.0.0" - istanbul-lib-report: "npm:^3.0.0" - istanbul-lib-source-maps: "npm:^4.0.0" - istanbul-reports: "npm:^3.1.3" - jest-message-util: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - jest-worker: "npm:^29.7.0" - slash: "npm:^3.0.0" - string-length: "npm:^4.0.1" - strip-ansi: "npm:^6.0.0" - v8-to-istanbul: "npm:^9.0.1" - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - checksum: 10/a17d1644b26dea14445cedd45567f4ba7834f980be2ef74447204e14238f121b50d8b858fde648083d2cd8f305f81ba434ba49e37a5f4237a6f2a61180cc73dc + version: 0.1.3 + resolution: "@istanbuljs/schema@npm:0.1.3" + checksum: 10/a9b1e49acdf5efc2f5b2359f2df7f90c5c725f2656f16099e8b2cd3a000619ecca9fc48cf693ba789cf0fd989f6e0df6a22bc05574be4223ecdbb7997d04384b languageName: node linkType: hard @@ -2655,78 +2398,6 @@ __metadata: languageName: node linkType: hard -"@jest/source-map@npm:^29.6.3": - version: 29.6.3 - resolution: "@jest/source-map@npm:29.6.3" - dependencies: - "@jridgewell/trace-mapping": "npm:^0.3.18" - callsites: "npm:^3.0.0" - graceful-fs: "npm:^4.2.9" - checksum: 10/bcc5a8697d471396c0003b0bfa09722c3cd879ad697eb9c431e6164e2ea7008238a01a07193dfe3cbb48b1d258eb7251f6efcea36f64e1ebc464ea3c03ae2deb - languageName: node - linkType: hard - -"@jest/test-result@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/test-result@npm:29.7.0" - dependencies: - "@jest/console": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - "@types/istanbul-lib-coverage": "npm:^2.0.0" - collect-v8-coverage: "npm:^1.0.0" - checksum: 10/c073ab7dfe3c562bff2b8fee6cc724ccc20aa96bcd8ab48ccb2aa309b4c0c1923a9e703cea386bd6ae9b71133e92810475bb9c7c22328fc63f797ad3324ed189 - languageName: node - linkType: hard - -"@jest/test-sequencer@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/test-sequencer@npm:29.7.0" - dependencies: - "@jest/test-result": "npm:^29.7.0" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^29.7.0" - slash: "npm:^3.0.0" - checksum: 10/4420c26a0baa7035c5419b0892ff8ffe9a41b1583ec54a10db3037cd46a7e29dd3d7202f8aa9d376e9e53be5f8b1bc0d16e1de6880a6d319b033b01dc4c8f639 - languageName: node - linkType: hard - -"@jest/transform@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/transform@npm:29.7.0" - dependencies: - "@babel/core": "npm:^7.11.6" - "@jest/types": "npm:^29.6.3" - "@jridgewell/trace-mapping": "npm:^0.3.18" - babel-plugin-istanbul: "npm:^6.1.1" - chalk: "npm:^4.0.0" - convert-source-map: "npm:^2.0.0" - fast-json-stable-stringify: "npm:^2.1.0" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^29.7.0" - jest-regex-util: "npm:^29.6.3" - jest-util: "npm:^29.7.0" - micromatch: "npm:^4.0.4" - pirates: "npm:^4.0.4" - slash: "npm:^3.0.0" - write-file-atomic: "npm:^4.0.2" - checksum: 10/30f42293545ab037d5799c81d3e12515790bb58513d37f788ce32d53326d0d72ebf5b40f989e6896739aa50a5f77be44686e510966370d58511d5ad2637c68c1 - languageName: node - linkType: hard - -"@jest/types@npm:^29.6.3": - version: 29.6.3 - resolution: "@jest/types@npm:29.6.3" - dependencies: - "@jest/schemas": "npm:^29.6.3" - "@types/istanbul-lib-coverage": "npm:^2.0.0" - "@types/istanbul-reports": "npm:^3.0.0" - "@types/node": "npm:*" - "@types/yargs": "npm:^17.0.8" - chalk: "npm:^4.0.0" - checksum: 10/f74bf512fd09bbe2433a2ad460b04668b7075235eea9a0c77d6a42222c10a79b9747dc2b2a623f140ed40d6865a2ed8f538f3cbb75169120ea863f29a7ed76cd - languageName: node - linkType: hard - "@jridgewell/gen-mapping@npm:^0.3.2, @jridgewell/gen-mapping@npm:^0.3.5": version: 0.3.8 resolution: "@jridgewell/gen-mapping@npm:0.3.8" @@ -2752,7 +2423,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.15": +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.15, @jridgewell/sourcemap-codec@npm:^1.5.0": version: 1.5.0 resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" checksum: 10/4ed6123217569a1484419ac53f6ea0d9f3b57e5b57ab30d7c267bdb27792a27eb0e4b08e84a2680aa55cc2f2b411ffd6ec3db01c44fdc6dc43aca4b55f8374fd @@ -2769,7 +2440,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": +"@jridgewell/trace-mapping@npm:^0.3.23, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": version: 0.3.25 resolution: "@jridgewell/trace-mapping@npm:0.3.25" dependencies: @@ -3861,27 +3532,21 @@ __metadata: "@types/colorbrewer": "npm:^1.0.29" "@types/d3": "npm:^6" "@types/d3-format": "npm:^2" - "@types/enzyme": "npm:^3.10.12" - "@types/jest": "npm:^29.5.5" "@types/js-cookie": "npm:^3.0.2" "@types/mousetrap": "npm:^1.6.9" "@types/react": "npm:^17.0.69" "@types/react-dom": "npm:^17.0.22" "@types/topojson-client": "npm:^3.1.1" "@types/url-parse": "npm:^1.4.8" - "@wojtekmaj/enzyme-adapter-react-17": "npm:^0.8.0" classnames: "npm:^2.5.1" colorbrewer: "npm:^1.3.0" d3: "npm:^6.1.1" decko: "npm:^1.2.0" - enzyme: "npm:^3.11.0" esbuild: "npm:^0.25.0" esbuild-sass-plugin: "npm:^3.3.1" eslint: "npm:^9.21.0" eslint-plugin-react-hooks: "npm:^5.2.0" expr-eval: "npm:^2.0.2" - jest: "npm:^29.7.0" - jest-environment-jsdom: "npm:^29.7.0" js-cookie: "npm:^3.0.1" mobx: "npm:^5.15.7" mobx-formatters: "npm:^1.0.2" @@ -3918,27 +3583,21 @@ __metadata: "@types/colorbrewer": "npm:^1.0.29" "@types/d3": "npm:^6" "@types/d3-format": "npm:^2" - "@types/enzyme": "npm:^3.10.12" - "@types/jest": "npm:^29.5.5" "@types/js-cookie": "npm:^3.0.2" "@types/mousetrap": "npm:^1.6.9" "@types/react": "npm:^17.0.69" "@types/react-dom": "npm:^17.0.22" "@types/topojson-client": "npm:^3.1.1" "@types/url-parse": "npm:^1.4.8" - "@wojtekmaj/enzyme-adapter-react-17": "npm:^0.8.0" classnames: "npm:^2.5.1" colorbrewer: "npm:^1.3.0" d3: "npm:^6.1.1" decko: "npm:^1.2.0" - enzyme: "npm:^3.11.0" esbuild: "npm:^0.25.0" esbuild-sass-plugin: "npm:^3.3.1" eslint: "npm:^9.21.0" eslint-plugin-react-hooks: "npm:^5.2.0" expr-eval: "npm:^2.0.2" - jest: "npm:^29.7.0" - jest-environment-jsdom: "npm:^29.7.0" js-cookie: "npm:^3.0.1" mobx: "npm:^5.15.7" mobx-formatters: "npm:^1.0.2" @@ -3965,7 +3624,6 @@ __metadata: "@sinclair/typebox": "npm:^0.28.5" eslint: "npm:^9.21.0" eslint-plugin-react-hooks: "npm:^5.2.0" - jest: "npm:^29.7.0" mobx: "npm:^5.15.7" typescript: "npm:~5.8.2" languageName: unknown @@ -3979,7 +3637,6 @@ __metadata: "@tippyjs/react": "npm:^4.2.6" "@types/d3": "npm:^6" "@types/d3-format": "npm:^2" - "@types/jest": "npm:^29.5.5" "@types/lodash": "npm:^4.17.0" "@types/react": "npm:^17.0.69" "@types/react-tag-autocomplete": "npm:^6.1.1" @@ -3990,7 +3647,6 @@ __metadata: eslint: "npm:^9.21.0" eslint-plugin-react-hooks: "npm:^5.2.0" fuzzysort: "npm:^3.1.0" - jest: "npm:^29.7.0" lodash: "npm:^4.17.21" mobx: "npm:^5.15.7" mobx-react: "npm:5" @@ -4745,24 +4401,6 @@ __metadata: languageName: node linkType: hard -"@sinonjs/commons@npm:^3.0.0": - version: 3.0.0 - resolution: "@sinonjs/commons@npm:3.0.0" - dependencies: - type-detect: "npm:4.0.8" - checksum: 10/086720ae0bc370829322df32612205141cdd44e592a8a9ca97197571f8f970352ea39d3bda75b347c43789013ddab36b34b59e40380a49bdae1c2df3aa85fe4f - languageName: node - linkType: hard - -"@sinonjs/fake-timers@npm:^10.0.2": - version: 10.3.0 - resolution: "@sinonjs/fake-timers@npm:10.3.0" - dependencies: - "@sinonjs/commons": "npm:^3.0.0" - checksum: 10/78155c7bd866a85df85e22028e046b8d46cf3e840f72260954f5e3ed5bd97d66c595524305a6841ffb3f681a08f6e5cef572a2cce5442a8a232dc29fb409b83e - languageName: node - linkType: hard - "@slack/logger@npm:^4.0.0": version: 4.0.0 resolution: "@slack/logger@npm:4.0.0" @@ -5442,33 +5080,18 @@ __metadata: languageName: node linkType: hard -"@testing-library/jest-dom@npm:^6.1.3": - version: 6.1.3 - resolution: "@testing-library/jest-dom@npm:6.1.3" +"@testing-library/jest-dom@npm:^6.6.3": + version: 6.6.3 + resolution: "@testing-library/jest-dom@npm:6.6.3" dependencies: - "@adobe/css-tools": "npm:^4.3.0" - "@babel/runtime": "npm:^7.9.2" + "@adobe/css-tools": "npm:^4.4.0" aria-query: "npm:^5.0.0" chalk: "npm:^3.0.0" css.escape: "npm:^1.5.1" - dom-accessibility-api: "npm:^0.5.6" - lodash: "npm:^4.17.15" + dom-accessibility-api: "npm:^0.6.3" + lodash: "npm:^4.17.21" redent: "npm:^3.0.0" - peerDependencies: - "@jest/globals": ">= 28" - "@types/jest": ">= 28" - jest: ">= 28" - vitest: ">= 0.32" - peerDependenciesMeta: - "@jest/globals": - optional: true - "@types/jest": - optional: true - jest: - optional: true - vitest: - optional: true - checksum: 10/8155815a4511636d4adbc565005e58e8f5d2829dd053579768e1055b391c0e94a03f8fc079c56d095ff720cd8d5e1319d64244c456643b11b2a870fd52d3c718 + checksum: 10/1f3427e45870eab9dcc59d6504b780d4a595062fe1687762ae6e67d06a70bf439b40ab64cf58cbace6293a99e3764d4647fdc8300a633b721764f5ce39dade18 languageName: node linkType: hard @@ -5498,13 +5121,6 @@ __metadata: languageName: node linkType: hard -"@tootallnate/once@npm:2": - version: 2.0.0 - resolution: "@tootallnate/once@npm:2.0.0" - checksum: 10/ad87447820dd3f24825d2d947ebc03072b20a42bfc96cbafec16bff8bbda6c1a81fcb0be56d5b21968560c5359a0af4038a68ba150c3e1694fe4c109a063bed8 - languageName: node - linkType: hard - "@trysound/sax@npm:0.2.0": version: 0.2.0 resolution: "@trysound/sax@npm:0.2.0" @@ -5552,7 +5168,7 @@ __metadata: languageName: node linkType: hard -"@types/babel__core@npm:^7.1.14, @types/babel__core@npm:^7.20.5": +"@types/babel__core@npm:^7.20.5": version: 7.20.5 resolution: "@types/babel__core@npm:7.20.5" dependencies: @@ -5584,7 +5200,7 @@ __metadata: languageName: node linkType: hard -"@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6": +"@types/babel__traverse@npm:*": version: 7.11.1 resolution: "@types/babel__traverse@npm:7.11.1" dependencies: @@ -5941,17 +5557,17 @@ __metadata: languageName: node linkType: hard -"@types/enzyme@npm:^3.10.12": - version: 3.10.12 - resolution: "@types/enzyme@npm:3.10.12" +"@types/enzyme@npm:^3.10.18": + version: 3.10.18 + resolution: "@types/enzyme@npm:3.10.18" dependencies: "@types/cheerio": "npm:*" - "@types/react": "npm:*" - checksum: 10/59e0246a12edc72065db18b5f4cdac58581b98b73b098369bacbdeafa27b6c193478187b382fec3023565e121189998bd54c9904580d0c546ad00919de5c50ed + "@types/react": "npm:^16" + checksum: 10/0dfabb97c9678f90c00cff1db0df0d8678d598770df1512ce11c98640e7931890e2de5861bad4327df0cc36c736c8d1406c74760645ef1b5180106631adc559d languageName: node linkType: hard -"@types/estree@npm:*, @types/estree@npm:1.0.6, @types/estree@npm:^1.0.6": +"@types/estree@npm:*, @types/estree@npm:1.0.6, @types/estree@npm:^1.0.0, @types/estree@npm:^1.0.6": version: 1.0.6 resolution: "@types/estree@npm:1.0.6" checksum: 10/9d35d475095199c23e05b431bcdd1f6fec7380612aed068b14b2a08aa70494de8a9026765a5a91b1073f636fb0368f6d8973f518a31391d519e20c59388ed88d @@ -6024,15 +5640,6 @@ __metadata: languageName: node linkType: hard -"@types/graceful-fs@npm:^4.1.3": - version: 4.1.5 - resolution: "@types/graceful-fs@npm:4.1.5" - dependencies: - "@types/node": "npm:*" - checksum: 10/d076bb61f45d0fc42dee496ef8b1c2f8742e15d5e47e90e20d0243386e426c04d4efd408a48875ab432f7960b4ce3414db20ed0fbbfc7bcc89d84e574f6e045a - languageName: node - linkType: hard - "@types/history@npm:*, @types/history@npm:^4.7.11": version: 4.7.11 resolution: "@types/history@npm:4.7.11" @@ -6078,41 +5685,6 @@ __metadata: languageName: node linkType: hard -"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": - version: 2.0.3 - resolution: "@types/istanbul-lib-coverage@npm:2.0.3" - checksum: 10/0650cba4be8f464bee89b9de0b71a5ea3b5cc676ce24e1196b5d6a51542ce9e613ae4549bf19756bb33dbbbb32b47931040266100062bfb197c597d73e341eb0 - languageName: node - linkType: hard - -"@types/istanbul-lib-report@npm:*": - version: 1.1.1 - resolution: "@types/istanbul-lib-report@npm:1.1.1" - dependencies: - "@types/istanbul-lib-coverage": "npm:*" - checksum: 10/9d1303f5abb7be40bd68b9bdfe58c4c8578f50277d4fb93a2595c2dad5a71798f6e111d1b593ad0ce33a7d7d3c19624b7b693b711b0f5ba12c22ead41e19e15a - languageName: node - linkType: hard - -"@types/istanbul-reports@npm:^3.0.0": - version: 3.0.0 - resolution: "@types/istanbul-reports@npm:3.0.0" - dependencies: - "@types/istanbul-lib-report": "npm:*" - checksum: 10/286a18cff19c4dac4321b9ea406a3560faf577fb2a4df5abf9d577fa81ba831c9baa7d40d03f1daf7fe613d468546b731c00b844b72fad9834c583311a35bb7b - languageName: node - linkType: hard - -"@types/jest@npm:^29.5.5": - version: 29.5.5 - resolution: "@types/jest@npm:29.5.5" - dependencies: - expect: "npm:^29.0.0" - pretty-format: "npm:^29.0.0" - checksum: 10/85bf86fd31ed9b76c26abc6bf771d09a9a8ff9362c81be353b8cf8ba102e09741b7f6951dca09aaa56d5fb410291e1eb5650b508da2fb3d36a0f035a91552a0d - languageName: node - linkType: hard - "@types/js-cookie@npm:^3.0.2": version: 3.0.2 resolution: "@types/js-cookie@npm:3.0.2" @@ -6120,17 +5692,6 @@ __metadata: languageName: node linkType: hard -"@types/jsdom@npm:^20.0.0": - version: 20.0.0 - resolution: "@types/jsdom@npm:20.0.0" - dependencies: - "@types/node": "npm:*" - "@types/tough-cookie": "npm:*" - parse5: "npm:^7.0.0" - checksum: 10/4cd814a948aa9b739652cde183acc6a9a10bcf04ed82c3a53f691bbc52d156b49269fa3046c70842680a29d240607fcd7be5f35a73ddbf571d95a664e8e49cec - languageName: node - linkType: hard - "@types/json-schema@npm:^7.0.15": version: 7.0.15 resolution: "@types/json-schema@npm:7.0.15" @@ -6426,6 +5987,17 @@ __metadata: languageName: node linkType: hard +"@types/react@npm:^16": + version: 16.14.62 + resolution: "@types/react@npm:16.14.62" + dependencies: + "@types/prop-types": "npm:*" + "@types/scheduler": "npm:^0.16" + csstype: "npm:^3.0.2" + checksum: 10/58f58ef594b1d919063a8456c3eb1b73f50eb3a44261a4468ad76930ebbc7dc66cdb2d4a099e4311a0e4ca131a8b2110da4ef057fe85443cdc894db7329ac137 + languageName: node + linkType: hard + "@types/reactcss@npm:*": version: 1.2.3 resolution: "@types/reactcss@npm:1.2.3" @@ -6442,10 +6014,10 @@ __metadata: languageName: node linkType: hard -"@types/scheduler@npm:*": - version: 0.16.2 - resolution: "@types/scheduler@npm:0.16.2" - checksum: 10/b6b4dcfeae6deba2e06a70941860fb1435730576d3689225a421280b7742318d1548b3d22c1f66ab68e414f346a9542f29240bc955b6332c5b11e561077583bc +"@types/scheduler@npm:*, @types/scheduler@npm:^0.16": + version: 0.16.8 + resolution: "@types/scheduler@npm:0.16.8" + checksum: 10/6c091b096daa490093bf30dd7947cd28e5b2cd612ec93448432b33f724b162587fed9309a0acc104d97b69b1d49a0f3fc755a62282054d62975d53d7fd13472d languageName: node linkType: hard @@ -6497,13 +6069,6 @@ __metadata: languageName: node linkType: hard -"@types/stack-utils@npm:^2.0.0": - version: 2.0.0 - resolution: "@types/stack-utils@npm:2.0.0" - checksum: 10/b3fbae25b073116977ecb5c67d22f14567b51a7792403b0bf46e5de8f29bde3bd4ec1626afb22065495ca7f1c699c8bd66720050c94b8f8f9bcefbee79d161fd - languageName: node - linkType: hard - "@types/string-pixel-width@npm:^1.7.2": version: 1.7.2 resolution: "@types/string-pixel-width@npm:1.7.2" @@ -6558,13 +6123,6 @@ __metadata: languageName: node linkType: hard -"@types/tough-cookie@npm:*": - version: 2.3.5 - resolution: "@types/tough-cookie@npm:2.3.5" - checksum: 10/e7d1b4cf22c19c4e383c100df5d90f4fd8d1af67c93e80cf65eee76ddab9b136505426e65fb8d0fb009fa49c8ea7120f5aabc0e30caaadf62b621f14a7e1e7e2 - languageName: node - linkType: hard - "@types/trusted-types@npm:^2.0.7": version: 2.0.7 resolution: "@types/trusted-types@npm:2.0.7" @@ -6617,18 +6175,18 @@ __metadata: linkType: hard "@types/yargs-parser@npm:*": - version: 15.0.0 - resolution: "@types/yargs-parser@npm:15.0.0" - checksum: 10/333ab73a1f9c82c64b2fac2441558e58f062fbe7affc35bb53b8e755b62cdd32b1bbc6f4da23773887a2189bf04395e2a8c710df344df4cd578993aeefe98053 + version: 21.0.3 + resolution: "@types/yargs-parser@npm:21.0.3" + checksum: 10/a794eb750e8ebc6273a51b12a0002de41343ffe46befef460bdbb57262d187fdf608bc6615b7b11c462c63c3ceb70abe2564c8dd8ee0f7628f38a314f74a9b9b languageName: node linkType: hard -"@types/yargs@npm:^17.0.8": - version: 17.0.10 - resolution: "@types/yargs@npm:17.0.10" +"@types/yargs@npm:^17.0.33": + version: 17.0.33 + resolution: "@types/yargs@npm:17.0.33" dependencies: "@types/yargs-parser": "npm:*" - checksum: 10/cfe94e8ba50364e08d7b3ecb10a7c153762d0e56c571079538bb06b306638d1045e395fc5a745b94519e73798779c761fa386ec13c82306a62349f64d7b9eec1 + checksum: 10/16f6681bf4d99fb671bf56029141ed01db2862e3db9df7fc92d8bea494359ac96a1b4b1c35a836d1e95e665fb18ad753ab2015fc0db663454e8fd4e5d5e2ef91 languageName: node linkType: hard @@ -6768,6 +6326,113 @@ __metadata: languageName: node linkType: hard +"@vitest/coverage-v8@npm:^3.0.7": + version: 3.0.7 + resolution: "@vitest/coverage-v8@npm:3.0.7" + dependencies: + "@ampproject/remapping": "npm:^2.3.0" + "@bcoe/v8-coverage": "npm:^1.0.2" + debug: "npm:^4.4.0" + 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.17" + magicast: "npm:^0.3.5" + std-env: "npm:^3.8.0" + test-exclude: "npm:^7.0.1" + tinyrainbow: "npm:^2.0.0" + peerDependencies: + "@vitest/browser": 3.0.7 + vitest: 3.0.7 + peerDependenciesMeta: + "@vitest/browser": + optional: true + checksum: 10/dd6fab55f6c03e4e62926e83c9a31ea5d6960e4b801e439307a1a48796230b4ae6273c437a1d78098f03439fb95bc75ad1a308d750e1393e3f3f52494ff90817 + languageName: node + linkType: hard + +"@vitest/expect@npm:3.0.7": + version: 3.0.7 + resolution: "@vitest/expect@npm:3.0.7" + dependencies: + "@vitest/spy": "npm:3.0.7" + "@vitest/utils": "npm:3.0.7" + chai: "npm:^5.2.0" + tinyrainbow: "npm:^2.0.0" + checksum: 10/b31ac9eed0e729073eae2140fa7eff00df43b2e2f9c94c68d09a730f4c824b820fdfc9995a2d90335ec73084387db467d465b2eed81121a4e697353c1336801a + languageName: node + linkType: hard + +"@vitest/mocker@npm:3.0.7": + version: 3.0.7 + resolution: "@vitest/mocker@npm:3.0.7" + dependencies: + "@vitest/spy": "npm:3.0.7" + estree-walker: "npm:^3.0.3" + magic-string: "npm:^0.30.17" + peerDependencies: + msw: ^2.4.9 + vite: ^5.0.0 || ^6.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + checksum: 10/0e34f4b57afa92b3d8a0a9cb09aece5202a2d88e398b9f2b161488e1a95088743c261692efc91b8f755dbe98e525f66fdd442ed1f021f2a5b133d981bce0e66e + languageName: node + linkType: hard + +"@vitest/pretty-format@npm:3.0.7, @vitest/pretty-format@npm:^3.0.7": + version: 3.0.7 + resolution: "@vitest/pretty-format@npm:3.0.7" + dependencies: + tinyrainbow: "npm:^2.0.0" + checksum: 10/700479370765a8db24403e9abda808397c137873244531f50d91c9fc6434299b416f6742e0d6512e8a0c5786dad676f17091584f3f48bfce5c2ccb7cec1f4f64 + languageName: node + linkType: hard + +"@vitest/runner@npm:3.0.7": + version: 3.0.7 + resolution: "@vitest/runner@npm:3.0.7" + dependencies: + "@vitest/utils": "npm:3.0.7" + pathe: "npm:^2.0.3" + checksum: 10/4b58698aea6fa6331208d3071d5bc242e6e791da678d8685eb453983552bf9cad61d097afb5b18b6f6d524557497ad1b7a6a1d6e1bcefbbc3b0f599b3747e123 + languageName: node + linkType: hard + +"@vitest/snapshot@npm:3.0.7": + version: 3.0.7 + resolution: "@vitest/snapshot@npm:3.0.7" + dependencies: + "@vitest/pretty-format": "npm:3.0.7" + magic-string: "npm:^0.30.17" + pathe: "npm:^2.0.3" + checksum: 10/1af8c7845a76e0b492f8cfd485d376c1e739fdd189c8eabe231108e7fddfc89d77f8f885dbc14ccdc2a8666b869145f2c3cbe2878afdeb95de9f9590df69c252 + languageName: node + linkType: hard + +"@vitest/spy@npm:3.0.7": + version: 3.0.7 + resolution: "@vitest/spy@npm:3.0.7" + dependencies: + tinyspy: "npm:^3.0.2" + checksum: 10/21285d7d0c315e32d584338193626078b12105e33c2106eb8efebca106d2a543094621d34933fe45a4c2c0d6a165c58dc407d2af8bf8017ba801602366dc9681 + languageName: node + linkType: hard + +"@vitest/utils@npm:3.0.7": + version: 3.0.7 + resolution: "@vitest/utils@npm:3.0.7" + dependencies: + "@vitest/pretty-format": "npm:3.0.7" + loupe: "npm:^3.1.3" + tinyrainbow: "npm:^2.0.0" + checksum: 10/46e91c43c63615cb96b8f56bb2e94e368c0af8ca4f7814f229f99ac87b24a7cec34febcfdd8370f9c8f86f525da0b61470ad06f1a47945c3e200f64efb696ae3 + languageName: node + linkType: hard + "@wojtekmaj/enzyme-adapter-react-17@npm:^0.8.0": version: 0.8.0 resolution: "@wojtekmaj/enzyme-adapter-react-17@npm:0.8.0" @@ -6849,13 +6514,6 @@ __metadata: languageName: node linkType: hard -"abab@npm:^2.0.6": - version: 2.0.6 - resolution: "abab@npm:2.0.6" - checksum: 10/ebe95d7278999e605823fc515a3b05d689bc72e7f825536e73c95ebf621636874c6de1b749b3c4bf866b96ccd4b3a2802efa313d0e45ad51a413c8c73247db20 - languageName: node - linkType: hard - "abbrev@npm:1": version: 1.1.1 resolution: "abbrev@npm:1.1.1" @@ -6889,16 +6547,6 @@ __metadata: languageName: node linkType: hard -"acorn-globals@npm:^7.0.0": - version: 7.0.1 - resolution: "acorn-globals@npm:7.0.1" - dependencies: - acorn: "npm:^8.1.0" - acorn-walk: "npm:^8.0.2" - checksum: 10/2a2998a547af6d0db5f0cdb90acaa7c3cbca6709010e02121fb8b8617c0fbd8bab0b869579903fde358ac78454356a14fadcc1a672ecb97b04b1c2ccba955ce8 - languageName: node - linkType: hard - "acorn-import-attributes@npm:^1.9.5": version: 1.9.5 resolution: "acorn-import-attributes@npm:1.9.5" @@ -6917,14 +6565,14 @@ __metadata: languageName: node linkType: hard -"acorn-walk@npm:8.3.2, acorn-walk@npm:^8.0.2": +"acorn-walk@npm:8.3.2": version: 8.3.2 resolution: "acorn-walk@npm:8.3.2" checksum: 10/57dbe2fd8cf744f562431775741c5c087196cd7a65ce4ccb3f3981cdfad25cd24ad2bad404997b88464ac01e789a0a61e5e355b2a84876f13deef39fb39686ca languageName: node linkType: hard -"acorn@npm:8.14.0, acorn@npm:^8.1.0, acorn@npm:^8.14.0, acorn@npm:^8.8.1, acorn@npm:^8.8.2": +"acorn@npm:8.14.0, acorn@npm:^8.14.0, acorn@npm:^8.8.1, acorn@npm:^8.8.2": version: 8.14.0 resolution: "acorn@npm:8.14.0" bin: @@ -6949,12 +6597,10 @@ __metadata: languageName: node linkType: hard -"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.1": - version: 7.1.1 - resolution: "agent-base@npm:7.1.1" - dependencies: - debug: "npm:^4.3.4" - checksum: 10/c478fec8f79953f118704d007a38f2a185458853f5c45579b9669372bd0e12602e88dc2ad0233077831504f7cd6fcc8251c383375bba5eaaf563b102938bda26 +"agent-base@npm:^7.1.0, agent-base@npm:^7.1.1, agent-base@npm:^7.1.2": + version: 7.1.3 + resolution: "agent-base@npm:7.1.3" + checksum: 10/3db6d8d4651f2aa1a9e4af35b96ab11a7607af57a24f3bc721a387eaa3b5f674e901f0a648b0caefd48f3fd117c7761b79a3b55854e2aebaa96c3f32cf76af84 languageName: node linkType: hard @@ -7159,7 +6805,7 @@ __metadata: languageName: node linkType: hard -"anymatch@npm:^3.0.3, anymatch@npm:~3.1.2": +"anymatch@npm:~3.1.2": version: 3.1.2 resolution: "anymatch@npm:3.1.2" dependencies: @@ -7224,9 +6870,9 @@ __metadata: linkType: hard "aria-query@npm:^5.0.0": - version: 5.0.0 - resolution: "aria-query@npm:5.0.0" - checksum: 10/e8476d143796835a2813236390b004b33f8e5af742ecf09d7502d3a7175093429f532c9d567ea729ef4d4ef2a86c37a8e963f050d2d42e899b9a4cc7983a0c03 + version: 5.3.2 + resolution: "aria-query@npm:5.3.2" + checksum: 10/b2fe9bc98bd401bc322ccb99717c1ae2aaf53ea0d468d6e7aebdc02fac736e4a99b46971ee05b783b08ade23c675b2d8b60e4a1222a95f6e27bc4d2a0bfdcc03 languageName: node linkType: hard @@ -7283,15 +6929,16 @@ __metadata: linkType: hard "array.prototype.filter@npm:^1.0.0": - version: 1.0.1 - resolution: "array.prototype.filter@npm:1.0.1" + version: 1.0.4 + resolution: "array.prototype.filter@npm:1.0.4" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - es-abstract: "npm:^1.19.0" + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" es-array-method-boxes-properly: "npm:^1.0.0" + es-object-atoms: "npm:^1.0.0" is-string: "npm:^1.0.7" - checksum: 10/c3545c870f7b2729563b8239811912a8b5c9581dcae2d30f4d936bf7ad7b640da7f46eb21ff1a10f616de52e9859222971a6c864d06fa41c8c8dd9c6a88c17a7 + checksum: 10/8de1b625c7bbfb64d2db3eb786836c45fc6995545bb88831e7826faf7d3f50768c4ba8441d3567557f8020424f3f40cab43d76aa798c8868e8ee319b960dda2b languageName: node linkType: hard @@ -7324,14 +6971,14 @@ __metadata: linkType: hard "array.prototype.flat@npm:^1.2.3, array.prototype.flat@npm:^1.3.2": - version: 1.3.2 - resolution: "array.prototype.flat@npm:1.3.2" + version: 1.3.3 + resolution: "array.prototype.flat@npm:1.3.3" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10/d9d2f6f27584de92ec7995bc931103e6de722cd2498bdbfc4cba814fc3e52f056050a93be883018811f7c0a35875f5056584a0e940603a5e5934f0279896aebe + call-bind: "npm:^1.0.8" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.5" + es-shim-unscopables: "npm:^1.0.2" + checksum: 10/f9b992fa0775d8f7c97abc91eb7f7b2f0ed8430dd9aeb9fdc2967ac4760cdd7fc2ef7ead6528fef40c7261e4d790e117808ce0d3e7e89e91514d4963a531cd01 languageName: node linkType: hard @@ -7414,6 +7061,13 @@ __metadata: languageName: node linkType: hard +"assertion-error@npm:^2.0.1": + version: 2.0.1 + resolution: "assertion-error@npm:2.0.1" + checksum: 10/a0789dd882211b87116e81e2648ccb7f60340b34f19877dd020b39ebb4714e475eb943e14ba3e22201c221ef6645b7bfe10297e76b6ac95b48a9898c1211ce66 + languageName: node + linkType: hard + "astral-regex@npm:^2.0.0": version: 2.0.0 resolution: "astral-regex@npm:2.0.0" @@ -7506,48 +7160,6 @@ __metadata: languageName: node linkType: hard -"babel-jest@npm:^29.7.0": - version: 29.7.0 - resolution: "babel-jest@npm:29.7.0" - dependencies: - "@jest/transform": "npm:^29.7.0" - "@types/babel__core": "npm:^7.1.14" - babel-plugin-istanbul: "npm:^6.1.1" - babel-preset-jest: "npm:^29.6.3" - chalk: "npm:^4.0.0" - graceful-fs: "npm:^4.2.9" - slash: "npm:^3.0.0" - peerDependencies: - "@babel/core": ^7.8.0 - checksum: 10/8a0953bd813b3a8926008f7351611055548869e9a53dd36d6e7e96679001f71e65fd7dbfe253265c3ba6a4e630dc7c845cf3e78b17d758ef1880313ce8fba258 - languageName: node - linkType: hard - -"babel-plugin-istanbul@npm:^6.1.1": - version: 6.1.1 - resolution: "babel-plugin-istanbul@npm:6.1.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.0.0" - "@istanbuljs/load-nyc-config": "npm:^1.0.0" - "@istanbuljs/schema": "npm:^0.1.2" - istanbul-lib-instrument: "npm:^5.0.4" - test-exclude: "npm:^6.0.0" - checksum: 10/ffd436bb2a77bbe1942a33245d770506ab2262d9c1b3c1f1da7f0592f78ee7445a95bc2efafe619dd9c1b6ee52c10033d6c7d29ddefe6f5383568e60f31dfe8d - languageName: node - linkType: hard - -"babel-plugin-jest-hoist@npm:^29.6.3": - version: 29.6.3 - resolution: "babel-plugin-jest-hoist@npm:29.6.3" - dependencies: - "@babel/template": "npm:^7.3.3" - "@babel/types": "npm:^7.3.3" - "@types/babel__core": "npm:^7.1.14" - "@types/babel__traverse": "npm:^7.0.6" - checksum: 10/9bfa86ec4170bd805ab8ca5001ae50d8afcb30554d236ba4a7ffc156c1a92452e220e4acbd98daefc12bf0216fccd092d0a2efed49e7e384ec59e0597a926d65 - languageName: node - linkType: hard - "babel-plugin-macros@npm:^3.1.0": version: 3.1.0 resolution: "babel-plugin-macros@npm:3.1.0" @@ -7559,40 +7171,6 @@ __metadata: languageName: node linkType: hard -"babel-preset-current-node-syntax@npm:^1.0.0": - version: 1.0.1 - resolution: "babel-preset-current-node-syntax@npm:1.0.1" - dependencies: - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - "@babel/plugin-syntax-bigint": "npm:^7.8.3" - "@babel/plugin-syntax-class-properties": "npm:^7.8.3" - "@babel/plugin-syntax-import-meta": "npm:^7.8.3" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.8.3" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - "@babel/plugin-syntax-numeric-separator": "npm:^7.8.3" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - "@babel/plugin-syntax-top-level-await": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/94561959cb12bfa80867c9eeeace7c3d48d61707d33e55b4c3fdbe82fc745913eb2dbfafca62aef297421b38aadcb58550e5943f50fbcebbeefd70ce2bed4b74 - languageName: node - linkType: hard - -"babel-preset-jest@npm:^29.6.3": - version: 29.6.3 - resolution: "babel-preset-jest@npm:29.6.3" - dependencies: - babel-plugin-jest-hoist: "npm:^29.6.3" - babel-preset-current-node-syntax: "npm:^1.0.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/aa4ff2a8a728d9d698ed521e3461a109a1e66202b13d3494e41eea30729a5e7cc03b3a2d56c594423a135429c37bf63a9fa8b0b9ce275298be3095a88c69f6fb - languageName: node - linkType: hard - "bail@npm:^1.0.0": version: 1.0.5 resolution: "bail@npm:1.0.5" @@ -7793,15 +7371,6 @@ __metadata: languageName: node linkType: hard -"bser@npm:^2.0.0": - version: 2.0.0 - resolution: "bser@npm:2.0.0" - dependencies: - node-int64: "npm:^0.4.0" - checksum: 10/3a91cf786064b993df19db244c9ce2ea7f1bdc0a6680cd3d7d796f7a63fea2eb5b9fd3f81dd22ab9a05d0f69c2449857b03cad63704a9656a5ab72d0da42e93c - languageName: node - linkType: hard - "buffer-crc32@npm:~0.2.3": version: 0.2.13 resolution: "buffer-crc32@npm:0.2.13" @@ -7923,12 +7492,12 @@ __metadata: linkType: hard "call-bind-apply-helpers@npm:^1.0.0, call-bind-apply-helpers@npm:^1.0.1": - version: 1.0.1 - resolution: "call-bind-apply-helpers@npm:1.0.1" + version: 1.0.2 + resolution: "call-bind-apply-helpers@npm:1.0.2" dependencies: es-errors: "npm:^1.3.0" function-bind: "npm:^1.1.2" - checksum: 10/6e30c621170e45f1fd6735e84d02ee8e02a3ab95cb109499d5308cbe5d1e84d0cd0e10b48cc43c76aa61450ae1b03a7f89c37c10fc0de8d4998b42aab0f268cc + checksum: 10/00482c1f6aa7cfb30fb1dbeb13873edf81cfac7c29ed67a5957d60635a56b2a4a480f1016ddbdb3395cc37900d46037fb965043a51c5c789ffeab4fc535d18b5 languageName: node linkType: hard @@ -7979,13 +7548,6 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^6.2.0": - version: 6.2.0 - resolution: "camelcase@npm:6.2.0" - checksum: 10/8335cfd0ecc472eae685896a42afd8c9dacd193a91f569120b931c87deb053a1ba82102031b9b48a4dbc1d18066caeacf2e4ace8c3c7f0d02936d348dc0b5a87 - languageName: node - linkType: hard - "caniuse-lite@npm:^1.0.30001688": version: 1.0.30001692 resolution: "caniuse-lite@npm:1.0.30001692" @@ -8000,6 +7562,19 @@ __metadata: languageName: node linkType: hard +"chai@npm:^5.2.0": + version: 5.2.0 + resolution: "chai@npm:5.2.0" + 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: 10/2ce03671c159c6a567bf1912756daabdbb7c075f3c0078f1b59d61da8d276936367ee696dfe093b49e1479d9ba93a6074c8e55d49791dddd8061728cdcad249e + languageName: node + linkType: hard + "chalk@npm:4.1.0": version: 4.1.0 resolution: "chalk@npm:4.1.0" @@ -8044,13 +7619,6 @@ __metadata: languageName: node linkType: hard -"char-regex@npm:^1.0.2": - version: 1.0.2 - resolution: "char-regex@npm:1.0.2" - checksum: 10/1ec5c2906adb9f84e7f6732a40baef05d7c85401b82ffcbc44b85fbd0f7a2b0c2a96f2eb9cf55cae3235dc12d4023003b88f09bcae8be9ae894f52ed746f4d48 - languageName: node - linkType: hard - "character-entities-legacy@npm:^1.0.0": version: 1.1.4 resolution: "character-entities-legacy@npm:1.1.4" @@ -8086,6 +7654,13 @@ __metadata: languageName: node linkType: hard +"check-error@npm:^2.1.1": + version: 2.1.1 + resolution: "check-error@npm:2.1.1" + checksum: 10/d785ed17b1d4a4796b6e75c765a9a290098cf52ff9728ce0756e8ffd4293d2e419dd30c67200aee34202463b474306913f2fcfaf1890641026d9fc6966fea27a + languageName: node + linkType: hard + "check-more-types@npm:^2.24.0": version: 2.24.0 resolution: "check-more-types@npm:2.24.0" @@ -8199,7 +7774,7 @@ __metadata: languageName: node linkType: hard -"cjs-module-lexer@npm:^1.0.0, cjs-module-lexer@npm:^1.2.2": +"cjs-module-lexer@npm:^1.2.2": version: 1.4.1 resolution: "cjs-module-lexer@npm:1.4.1" checksum: 10/6e830a1e00a34d416949bbc1924f3e8da65cef4a6a09e2b7fa35722e2d1c34bf378d3baca987b698d1cbc3eb83e44b044039b4e82755c96f30e0f03d1d227637 @@ -8346,13 +7921,6 @@ __metadata: languageName: node linkType: hard -"co@npm:^4.6.0": - version: 4.6.0 - resolution: "co@npm:4.6.0" - checksum: 10/a5d9f37091c70398a269e625cedff5622f200ed0aa0cff22ee7b55ed74a123834b58711776eb0f1dc58eb6ebbc1185aa7567b57bd5979a948c6e4f85073e2c05 - languageName: node - linkType: hard - "codemirror@npm:5": version: 5.65.2 resolution: "codemirror@npm:5.65.2" @@ -8360,13 +7928,6 @@ __metadata: languageName: node linkType: hard -"collect-v8-coverage@npm:^1.0.0": - version: 1.0.1 - resolution: "collect-v8-coverage@npm:1.0.1" - checksum: 10/85b26945ab9b8e15077f877a4a5bc91d836480c600bac4cd0a0e8be8515583fdfc393ccff049ff3e9f46cac39e5295af049209f3c484f30a028056cc5dd1fe8a - languageName: node - linkType: hard - "color-convert@npm:^2.0.1": version: 2.0.1 resolution: "color-convert@npm:2.0.1" @@ -8688,7 +8249,7 @@ __metadata: languageName: node linkType: hard -"convert-source-map@npm:^1.5.0, convert-source-map@npm:^1.6.0": +"convert-source-map@npm:^1.5.0": version: 1.8.0 resolution: "convert-source-map@npm:1.8.0" dependencies: @@ -8809,23 +8370,6 @@ __metadata: languageName: node linkType: hard -"create-jest@npm:^29.7.0": - version: 29.7.0 - resolution: "create-jest@npm:29.7.0" - dependencies: - "@jest/types": "npm:^29.6.3" - chalk: "npm:^4.0.0" - exit: "npm:^0.1.2" - graceful-fs: "npm:^4.2.9" - jest-config: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - prompts: "npm:^2.0.1" - bin: - create-jest: bin/create-jest.js - checksum: 10/847b4764451672b4174be4d5c6d7d63442ec3aa5f3de52af924e4d996d87d7801c18e125504f25232fc75840f6625b3ac85860fac6ce799b5efae7bdcaf4a2b7 - languageName: node - linkType: hard - "cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3, cross-spawn@npm:^7.0.6": version: 7.0.6 resolution: "cross-spawn@npm:7.0.6" @@ -8908,26 +8452,13 @@ __metadata: languageName: node linkType: hard -"cssom@npm:^0.5.0": - version: 0.5.0 - resolution: "cssom@npm:0.5.0" - checksum: 10/b502a315b1ce020a692036cc38cb36afa44157219b80deadfa040ab800aa9321fcfbecf02fd2e6ec87db169715e27978b4ab3701f916461e9cf7808899f23b54 - languageName: node - linkType: hard - -"cssom@npm:~0.3.6": - version: 0.3.8 - resolution: "cssom@npm:0.3.8" - checksum: 10/49eacc88077555e419646c0ea84ddc73c97e3a346ad7cb95e22f9413a9722d8964b91d781ce21d378bd5ae058af9a745402383fa4e35e9cdfd19654b63f892a9 - languageName: node - linkType: hard - -"cssstyle@npm:^2.3.0": - version: 2.3.0 - resolution: "cssstyle@npm:2.3.0" +"cssstyle@npm:^4.2.1": + version: 4.2.1 + resolution: "cssstyle@npm:4.2.1" dependencies: - cssom: "npm:~0.3.6" - checksum: 10/46f7f05a153446c4018b0454ee1464b50f606cb1803c90d203524834b7438eb52f3b173ba0891c618f380ced34ee12020675dc0052a7f1be755fe4ebc27ee977 + "@asamuzakjp/css-color": "npm:^2.8.2" + rrweb-cssom: "npm:^0.8.0" + checksum: 10/e287234f2fd4feb1d79217480f48356f398cc11b9d17d39e6624f7dc1bf4b51d1e2c49f12b1a324834b445c17cbbf83ae5d3ba22c89a6b229f86bcebeda746a8 languageName: node linkType: hard @@ -9334,14 +8865,13 @@ __metadata: languageName: node linkType: hard -"data-urls@npm:^3.0.2": - version: 3.0.2 - resolution: "data-urls@npm:3.0.2" +"data-urls@npm:^5.0.0": + version: 5.0.0 + resolution: "data-urls@npm:5.0.0" dependencies: - abab: "npm:^2.0.6" - whatwg-mimetype: "npm:^3.0.0" - whatwg-url: "npm:^11.0.0" - checksum: 10/033fc3dd0fba6d24bc9a024ddcf9923691dd24f90a3d26f6545d6a2f71ec6956f93462f2cdf2183cc46f10dc01ed3bcb36731a8208456eb1a08147e571fe2a76 + whatwg-mimetype: "npm:^4.0.0" + whatwg-url: "npm:^14.0.0" + checksum: 10/5c40568c31b02641a70204ff233bc4e42d33717485d074244a98661e5f2a1e80e38fe05a5755dfaf2ee549f2ab509d6a3af2a85f4b2ad2c984e5d176695eaf46 languageName: node linkType: hard @@ -9451,10 +8981,10 @@ __metadata: languageName: node linkType: hard -"decimal.js@npm:^10.4.2": - version: 10.4.3 - resolution: "decimal.js@npm:10.4.3" - checksum: 10/de663a7bc4d368e3877db95fcd5c87b965569b58d16cdc4258c063d231ca7118748738df17cd638f7e9dd0be8e34cec08d7234b20f1f2a756a52fc5a38b188d0 +"decimal.js@npm:^10.4.3": + version: 10.5.0 + resolution: "decimal.js@npm:10.5.0" + checksum: 10/714d49cf2f2207b268221795ede330e51452b7c451a0c02a770837d2d4faed47d603a729c2aa1d952eb6c4102d999e91c9b952c1aa016db3c5cba9fc8bf4cda2 languageName: node linkType: hard @@ -9465,7 +8995,7 @@ __metadata: languageName: node linkType: hard -"dedent@npm:1.5.3, dedent@npm:^1.0.0": +"dedent@npm:1.5.3": version: 1.5.3 resolution: "dedent@npm:1.5.3" peerDependencies: @@ -9477,6 +9007,13 @@ __metadata: languageName: node linkType: hard +"deep-eql@npm:^5.0.1": + version: 5.0.2 + resolution: "deep-eql@npm:5.0.2" + checksum: 10/a529b81e2ef8821621d20a36959a0328873a3e49d393ad11f8efe8559f31239494c2eb889b80342808674c475802ba95b9d6c4c27641b9a029405104c1b59fcf + languageName: node + linkType: hard + "deep-is@npm:^0.1.3": version: 0.1.3 resolution: "deep-is@npm:0.1.3" @@ -9484,7 +9021,7 @@ __metadata: languageName: node linkType: hard -"deepmerge@npm:^4.2.2, deepmerge@npm:^4.3.1": +"deepmerge@npm:^4.3.1": version: 4.3.1 resolution: "deepmerge@npm:4.3.1" checksum: 10/058d9e1b0ff1a154468bf3837aea436abcfea1ba1d165ddaaf48ca93765fdd01a30d33c36173da8fbbed951dd0a267602bc782fe288b0fc4b7e1e7091afc4529 @@ -9518,7 +9055,7 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.1.3, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": +"define-properties@npm:^1.1.3, define-properties@npm:^1.2.1": version: 1.2.1 resolution: "define-properties@npm:1.2.1" dependencies: @@ -9599,13 +9136,6 @@ __metadata: languageName: node linkType: hard -"detect-newline@npm:^3.0.0": - version: 3.1.0 - resolution: "detect-newline@npm:3.1.0" - checksum: 10/ae6cd429c41ad01b164c59ea36f264a2c479598e61cba7c99da24175a7ab80ddf066420f2bec9a1c57a6bead411b4655ff15ad7d281c000a89791f48cbe939e7 - languageName: node - linkType: hard - "diff-sequences@npm:^29.6.3": version: 29.6.3 resolution: "diff-sequences@npm:29.6.3" @@ -9645,10 +9175,17 @@ __metadata: languageName: node linkType: hard -"dom-accessibility-api@npm:^0.5.6, dom-accessibility-api@npm:^0.5.9": - version: 0.5.14 - resolution: "dom-accessibility-api@npm:0.5.14" - checksum: 10/19d7a7de931fcc7d9d67c270341220c6bda97124c3b1444b2bea6e8c6c3964ee09c339e3e69be5b830e3fcb60258d43e6377039974b69c5cec2f75db0114ac59 +"dom-accessibility-api@npm:^0.5.9": + version: 0.5.16 + resolution: "dom-accessibility-api@npm:0.5.16" + checksum: 10/377b4a7f9eae0a5d72e1068c369c99e0e4ca17fdfd5219f3abd32a73a590749a267475a59d7b03a891f9b673c27429133a818c44b2e47e32fec024b34274e2ca + languageName: node + linkType: hard + +"dom-accessibility-api@npm:^0.6.3": + version: 0.6.3 + resolution: "dom-accessibility-api@npm:0.6.3" + checksum: 10/83d3371f8226487fbad36e160d44f1d9017fb26d46faba6a06fcad15f34633fc827b8c3e99d49f71d5f3253d866e2131826866fd0a3c86626f8eccfc361881ff languageName: node linkType: hard @@ -9680,15 +9217,6 @@ __metadata: languageName: node linkType: hard -"domexception@npm:^4.0.0": - version: 4.0.0 - resolution: "domexception@npm:4.0.0" - dependencies: - webidl-conversions: "npm:^7.0.0" - checksum: 10/4ed443227d2871d76c58d852b2e93c68e0443815b2741348f20881bedee8c1ad4f9bfc5d30c7dec433cd026b57da63407c010260b1682fef4c8847e7181ea43f - languageName: node - linkType: hard - "domhandler@npm:^5.0.2, domhandler@npm:^5.0.3": version: 5.0.3 resolution: "domhandler@npm:5.0.3" @@ -9852,13 +9380,6 @@ __metadata: languageName: node linkType: hard -"emittery@npm:^0.13.1": - version: 0.13.1 - resolution: "emittery@npm:0.13.1" - checksum: 10/fbe214171d878b924eedf1757badf58a5dce071cd1fa7f620fa841a0901a80d6da47ff05929d53163105e621ce11a71b9d8acb1148ffe1745e045145f6e69521 - languageName: node - linkType: hard - "emoji-regex@npm:^10.3.0": version: 10.3.0 resolution: "emoji-regex@npm:10.3.0" @@ -9962,12 +9483,12 @@ __metadata: linkType: hard "enzyme-shallow-equal@npm:^1.0.0, enzyme-shallow-equal@npm:^1.0.1": - version: 1.0.5 - resolution: "enzyme-shallow-equal@npm:1.0.5" + version: 1.0.7 + resolution: "enzyme-shallow-equal@npm:1.0.7" dependencies: - has: "npm:^1.0.3" + hasown: "npm:^2.0.0" object-is: "npm:^1.1.5" - checksum: 10/e18a728225b3ef501a223608955e2c8e915adf24dfe4d778bdbc89e4ecd80384723e9d44780176be1529f6b642e7837211f502bff89f62833d8f9cae027997e0 + checksum: 10/ecbdf5a897ba33e699316f1456c7865b8140a6fc7916b700721964fe169e750be35f1fff5184a80e35b39e793523d678f4f4d12f48fce15145d206f5db01daa9 languageName: node linkType: hard @@ -10017,7 +9538,7 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.17.5, es-abstract@npm:^1.19.0, es-abstract@npm:^1.22.1, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.6": +"es-abstract@npm:^1.17.5, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.6": version: 1.23.7 resolution: "es-abstract@npm:1.23.7" dependencies: @@ -10117,27 +9638,35 @@ __metadata: languageName: node linkType: hard +"es-module-lexer@npm:^1.6.0": + version: 1.6.0 + resolution: "es-module-lexer@npm:1.6.0" + checksum: 10/807ee7020cc46a9c970c78cad1f2f3fc139877e5ebad7f66dbfbb124d451189ba1c48c1c632bd5f8ce1b8af2caef3fca340ba044a410fa890d17b080a59024bb + languageName: node + linkType: hard + "es-object-atoms@npm:^1.0.0": - version: 1.0.0 - resolution: "es-object-atoms@npm:1.0.0" + version: 1.1.1 + resolution: "es-object-atoms@npm:1.1.1" dependencies: es-errors: "npm:^1.3.0" - checksum: 10/f8910cf477e53c0615f685c5c96210591841850871b81924fcf256bfbaa68c254457d994a4308c60d15b20805e7f61ce6abc669375e01a5349391a8c1767584f + checksum: 10/54fe77de288451dae51c37bfbfe3ec86732dc3778f98f3eb3bdb4bf48063b2c0b8f9c93542656986149d08aa5be3204286e2276053d19582b76753f1a2728867 languageName: node linkType: hard -"es-set-tostringtag@npm:^2.0.3": - version: 2.0.3 - resolution: "es-set-tostringtag@npm:2.0.3" +"es-set-tostringtag@npm:^2.0.3, es-set-tostringtag@npm:^2.1.0": + version: 2.1.0 + resolution: "es-set-tostringtag@npm:2.1.0" dependencies: - get-intrinsic: "npm:^1.2.4" + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.6" has-tostringtag: "npm:^1.0.2" - hasown: "npm:^2.0.1" - checksum: 10/7227fa48a41c0ce83e0377b11130d324ac797390688135b8da5c28994c0165be8b252e15cd1de41e1325e5a5412511586960213e88f9ab4a5e7d028895db5129 + hasown: "npm:^2.0.2" + checksum: 10/86814bf8afbcd8966653f731415888019d4bc4aca6b6c354132a7a75bb87566751e320369654a101d23a91c87a85c79b178bcf40332839bd347aff437c4fb65f languageName: node linkType: hard -"es-shim-unscopables@npm:^1.0.0, es-shim-unscopables@npm:^1.0.2": +"es-shim-unscopables@npm:^1.0.2": version: 1.0.2 resolution: "es-shim-unscopables@npm:1.0.2" dependencies: @@ -10355,13 +9884,6 @@ __metadata: languageName: node linkType: hard -"escape-string-regexp@npm:^2.0.0": - version: 2.0.0 - resolution: "escape-string-regexp@npm:2.0.0" - checksum: 10/9f8a2d5743677c16e85c810e3024d54f0c8dea6424fad3c79ef6666e81dd0846f7437f5e729dfcdac8981bc9e5294c39b4580814d114076b8d36318f46ae4395 - languageName: node - linkType: hard - "escape-string-regexp@npm:^4.0.0": version: 4.0.0 resolution: "escape-string-regexp@npm:4.0.0" @@ -10369,24 +9891,6 @@ __metadata: languageName: node linkType: hard -"escodegen@npm:^2.0.0": - version: 2.1.0 - resolution: "escodegen@npm:2.1.0" - dependencies: - esprima: "npm:^4.0.1" - estraverse: "npm:^5.2.0" - esutils: "npm:^2.0.2" - source-map: "npm:~0.6.1" - dependenciesMeta: - source-map: - optional: true - bin: - escodegen: bin/escodegen.js - esgenerate: bin/esgenerate.js - checksum: 10/47719a65b2888b4586e3fa93769068b275961c13089e90d5d01a96a6e8e95871b1c3893576814c8fbf08a4a31a496f37e7b2c937cf231270f4d81de012832c7c - languageName: node - linkType: hard - "eslint-config-prettier@npm:^9.1.0": version: 9.1.0 resolution: "eslint-config-prettier@npm:9.1.0" @@ -10611,7 +10115,7 @@ __metadata: languageName: node linkType: hard -"esprima@npm:^4.0.0, esprima@npm:^4.0.1": +"esprima@npm:^4.0.0": version: 4.0.1 resolution: "esprima@npm:4.0.1" bin: @@ -10653,6 +10157,15 @@ __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: 10/a65728d5727b71de172c5df323385755a16c0fdab8234dc756c3854cfee343261ddfbb72a809a5660fac8c75d960bb3e21aa898c2d7e9b19bb298482ca58a3af + languageName: node + linkType: hard + "esutils@npm:^2.0.2": version: 2.0.3 resolution: "esutils@npm:2.0.3" @@ -10729,23 +10242,6 @@ __metadata: languageName: node linkType: hard -"execa@npm:^5.0.0": - version: 5.1.1 - resolution: "execa@npm:5.1.1" - dependencies: - cross-spawn: "npm:^7.0.3" - get-stream: "npm:^6.0.0" - human-signals: "npm:^2.1.0" - is-stream: "npm:^2.0.0" - merge-stream: "npm:^2.0.0" - npm-run-path: "npm:^4.0.1" - onetime: "npm:^5.1.2" - signal-exit: "npm:^3.0.3" - strip-final-newline: "npm:^2.0.0" - checksum: 10/8ada91f2d70f7dff702c861c2c64f21dfdc1525628f3c0454fd6f02fce65f7b958616cbd2b99ca7fa4d474e461a3d363824e91b3eb881705231abbf387470597 - languageName: node - linkType: hard - "execa@npm:~8.0.1": version: 8.0.1 resolution: "execa@npm:8.0.1" @@ -10779,23 +10275,10 @@ __metadata: languageName: node linkType: hard -"exit@npm:^0.1.2": - version: 0.1.2 - resolution: "exit@npm:0.1.2" - checksum: 10/387555050c5b3c10e7a9e8df5f43194e95d7737c74532c409910e585d5554eaff34960c166643f5e23d042196529daad059c292dcf1fb61b8ca878d3677f4b87 - languageName: node - linkType: hard - -"expect@npm:^29.0.0, expect@npm:^29.7.0": - version: 29.7.0 - resolution: "expect@npm:29.7.0" - dependencies: - "@jest/expect-utils": "npm:^29.7.0" - jest-get-type: "npm:^29.6.3" - jest-matcher-utils: "npm:^29.7.0" - jest-message-util: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - checksum: 10/63f97bc51f56a491950fb525f9ad94f1916e8a014947f8d8445d3847a665b5471b768522d659f5e865db20b6c2033d2ac10f35fcbd881a4d26407a4f6f18451a +"expect-type@npm:^1.1.0": + version: 1.2.0 + resolution: "expect-type@npm:1.2.0" + checksum: 10/12a081159e87451a96e2e2f8a5e101509b63a4f0738590bb27988d2017c6e5aff6bf722889fe7afd96cf7e343b332b040460db41850fcd7a1392a4c8e26e51e3 languageName: node linkType: hard @@ -10937,7 +10420,7 @@ __metadata: languageName: node linkType: hard -"fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": +"fast-json-stable-stringify@npm:^2.0.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" checksum: 10/2c20055c1fa43c922428f16ca8bb29f2807de63e5c851f665f7ac9790176c01c3b40335257736b299764a8d383388dabc73c8083b8e1bc3d99f0a941444ec60e @@ -10978,15 +10461,6 @@ __metadata: languageName: node linkType: hard -"fb-watchman@npm:^2.0.0": - version: 2.0.0 - resolution: "fb-watchman@npm:2.0.0" - dependencies: - bser: "npm:^2.0.0" - checksum: 10/c18b775674c569b0d0b4530102042040d8ddd7b8688bbc94f10fb85501ce495f755c0fc4126bbee47f30548b0e5c87608fff6f823efff0ee3e4711eb641932db - languageName: node - linkType: hard - "fd-slicer@npm:~1.1.0": version: 1.1.0 resolution: "fd-slicer@npm:1.1.0" @@ -11210,14 +10684,15 @@ __metadata: languageName: node linkType: hard -"form-data@npm:^4.0.0": - version: 4.0.0 - resolution: "form-data@npm:4.0.0" +"form-data@npm:^4.0.0, form-data@npm:^4.0.1": + version: 4.0.2 + resolution: "form-data@npm:4.0.2" dependencies: asynckit: "npm:^0.4.0" combined-stream: "npm:^1.0.8" + es-set-tostringtag: "npm:^2.1.0" mime-types: "npm:^2.1.12" - checksum: 10/7264aa760a8cf09482816d8300f1b6e2423de1b02bba612a136857413fdc96d7178298ced106817655facc6b89036c6e12ae31c9eb5bdc16aabf502ae8a5d805 + checksum: 10/82c65b426af4a40090e517a1bc9057f76970b4c6043e37aa49859c447d88553e77d4cc5626395079a53d2b0889ba5f2a49f3900db3ad3f3f1bf76613532572fb languageName: node linkType: hard @@ -11327,7 +10802,7 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:^2.3.2, fsevents@npm:~2.3.2, fsevents@npm:~2.3.3": +"fsevents@npm:~2.3.2, fsevents@npm:~2.3.3": version: 2.3.3 resolution: "fsevents@npm:2.3.3" dependencies: @@ -11337,7 +10812,7 @@ __metadata: languageName: node linkType: hard -"fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": +"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": version: 2.3.3 resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" dependencies: @@ -11669,7 +11144,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.3, glob@npm:^10.4.5": +"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.3, glob@npm:^10.4.1, glob@npm:^10.4.5": version: 10.4.5 resolution: "glob@npm:10.4.5" dependencies: @@ -11685,7 +11160,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.0.0, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4": +"glob@npm:^7.0.0, glob@npm:^7.1.2, glob@npm:^7.1.3": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -11817,7 +11292,7 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:4.2.11, graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": +"graceful-fs@npm:4.2.11, graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 @@ -11861,7 +11336,7 @@ __metadata: "@sinclair/typebox": "npm:^0.28.5" "@slack/web-api": "npm:^7.1.0" "@tanstack/react-query": "npm:4" - "@testing-library/jest-dom": "npm:^6.1.3" + "@testing-library/jest-dom": "npm:^6.6.3" "@testing-library/react": "npm:^12.1.5" "@tippyjs/react": "npm:^4.2.6" "@tsconfig/node22": "npm:^22.0.0" @@ -11871,7 +11346,7 @@ __metadata: "@types/colorbrewer": "npm:^1.0.29" "@types/cookie-parser": "npm:^1.4.3" "@types/d3": "npm:^6" - "@types/enzyme": "npm:^3.10.12" + "@types/enzyme": "npm:^3.10.18" "@types/express": "npm:^4.17.14" "@types/express-rate-limit": "npm:^5.1.0" "@types/fs-extra": "npm:^11.0.1" @@ -11906,7 +11381,9 @@ __metadata: "@types/url-parse": "npm:^1.4.8" "@types/webfontloader": "npm:^1.6.34" "@types/workerpool": "npm:^6.1.0" + "@types/yargs": "npm:^17.0.33" "@vitejs/plugin-react": "npm:^4.3.4" + "@vitest/coverage-v8": "npm:^3.0.7" "@wojtekmaj/enzyme-adapter-react-17": "npm:^0.8.0" "@yarnpkg/types": "npm:^4.0.0" algoliasearch: "npm:^4.23.2" @@ -11954,10 +11431,9 @@ __metadata: indefinite: "npm:^2.4.3" ini: "npm:^4.1.2" instantsearch.js: "npm:^4.72.1" - jest: "npm:^29.7.0" - jest-environment-jsdom: "npm:^29.7.0" js-base64: "npm:^3.7.2" js-cookie: "npm:^3.0.1" + jsdom: "npm:^26.0.0" json8-pointer: "npm:^1.0.6" jsonwebtoken: "npm:^9.0.0" knex: "npm:^3.1.0" @@ -12035,10 +11511,12 @@ __metadata: uuidv7: "npm:^1.0.1" vite: "npm:^6.2.0" vite-plugin-checker: "npm:^0.9.0" + vitest: "npm:^3.0.7" webfontloader: "npm:^1.6.28" workerpool: "npm:^6.2.0" wrangler: "npm:^3.111.0" yaml: "npm:^2.4.2" + yargs: "npm:^17.7.2" languageName: unknown linkType: soft @@ -12166,7 +11644,7 @@ __metadata: languageName: node linkType: hard -"hasown@npm:^2.0.0, hasown@npm:^2.0.1, hasown@npm:^2.0.2": +"hasown@npm:^2.0.0, hasown@npm:^2.0.2": version: 2.0.2 resolution: "hasown@npm:2.0.2" dependencies: @@ -12294,6 +11772,15 @@ __metadata: languageName: node linkType: hard +"html-encoding-sniffer@npm:^4.0.0": + version: 4.0.0 + resolution: "html-encoding-sniffer@npm:4.0.0" + dependencies: + whatwg-encoding: "npm:^3.1.1" + checksum: 10/e86efd493293a5671b8239bd099d42128433bb3c7b0fdc7819282ef8e118a21f5dead0ad6f358e024a4e5c84f17ebb7a9b36075220fac0a6222b207248bede6f + languageName: node + linkType: hard + "html-escaper@npm:^2.0.0": version: 2.0.2 resolution: "html-escaper@npm:2.0.2" @@ -12346,18 +11833,7 @@ __metadata: languageName: node linkType: hard -"http-proxy-agent@npm:^5.0.0": - version: 5.0.0 - resolution: "http-proxy-agent@npm:5.0.0" - dependencies: - "@tootallnate/once": "npm:2" - agent-base: "npm:6" - debug: "npm:4" - checksum: 10/5ee19423bc3e0fd5f23ce991b0755699ad2a46a440ce9cec99e8126bb98448ad3479d2c0ea54be5519db5b19a4ffaa69616bac01540db18506dd4dac3dc418f0 - languageName: node - linkType: hard - -"http-proxy-agent@npm:^7.0.0": +"http-proxy-agent@npm:^7.0.0, http-proxy-agent@npm:^7.0.2": version: 7.0.2 resolution: "http-proxy-agent@npm:7.0.2" dependencies: @@ -12412,7 +11888,7 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:^5.0.0, https-proxy-agent@npm:^5.0.1": +"https-proxy-agent@npm:^5.0.0": version: 5.0.1 resolution: "https-proxy-agent@npm:5.0.1" dependencies: @@ -12422,13 +11898,13 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:^7.0.1": - version: 7.0.4 - resolution: "https-proxy-agent@npm:7.0.4" +"https-proxy-agent@npm:^7.0.1, https-proxy-agent@npm:^7.0.6": + version: 7.0.6 + resolution: "https-proxy-agent@npm:7.0.6" dependencies: - agent-base: "npm:^7.0.2" + agent-base: "npm:^7.1.2" debug: "npm:4" - checksum: 10/405fe582bba461bfe5c7e2f8d752b384036854488b828ae6df6a587c654299cbb2c50df38c4b6ab303502c3c5e029a793fbaac965d1e86ee0be03faceb554d63 + checksum: 10/784b628cbd55b25542a9d85033bdfd03d4eda630fb8b3c9477959367f3be95dc476ed2ecbb9836c359c7c698027fc7b45723a302324433590f45d6c1706e8c13 languageName: node linkType: hard @@ -12560,7 +12036,7 @@ __metadata: languageName: node linkType: hard -"import-local@npm:3.1.0, import-local@npm:^3.0.2": +"import-local@npm:3.1.0": version: 3.1.0 resolution: "import-local@npm:3.1.0" dependencies: @@ -12819,12 +12295,12 @@ __metadata: linkType: hard "is-boolean-object@npm:^1.0.1, is-boolean-object@npm:^1.2.1": - version: 1.2.1 - resolution: "is-boolean-object@npm:1.2.1" + version: 1.2.2 + resolution: "is-boolean-object@npm:1.2.2" dependencies: - call-bound: "npm:^1.0.2" + call-bound: "npm:^1.0.3" has-tostringtag: "npm:^1.0.2" - checksum: 10/5a15524635c9334ebbd668f20a6cbf023adceed5725ec96a50056d21ae65f52759d04a8fa7d7febf00ff3bc4e6d3837638eb84be572f287bcfd15f8b8facde43 + checksum: 10/051fa95fdb99d7fbf653165a7e6b2cba5d2eb62f7ffa81e793a790f3fb5366c91c1b7b6af6820aa2937dd86c73aa3ca9d9ca98f500988457b1c59692c52ba911 languageName: node linkType: hard @@ -12961,13 +12437,6 @@ __metadata: languageName: node linkType: hard -"is-generator-fn@npm:^2.0.0": - version: 2.1.0 - resolution: "is-generator-fn@npm:2.1.0" - checksum: 10/a6ad5492cf9d1746f73b6744e0c43c0020510b59d56ddcb78a91cbc173f09b5e6beff53d75c9c5a29feb618bfef2bf458e025ecf3a57ad2268e2fb2569f56215 - languageName: node - linkType: hard - "is-generator-function@npm:^1.0.10": version: 1.0.10 resolution: "is-generator-function@npm:1.0.10" @@ -13294,68 +12763,42 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": - version: 3.2.0 - resolution: "istanbul-lib-coverage@npm:3.2.0" - checksum: 10/31621b84ad29339242b63d454243f558a7958ee0b5177749bacf1f74be7d95d3fd93853738ef7eebcddfaf3eab014716e51392a8dbd5aa1bdc1b15c2ebc53c24 - languageName: node - linkType: hard - -"istanbul-lib-instrument@npm:^5.0.4": - version: 5.2.0 - resolution: "istanbul-lib-instrument@npm:5.2.0" - dependencies: - "@babel/core": "npm:^7.12.3" - "@babel/parser": "npm:^7.14.7" - "@istanbuljs/schema": "npm:^0.1.2" - istanbul-lib-coverage: "npm:^3.2.0" - semver: "npm:^6.3.0" - checksum: 10/4caf04f696c80ee39ceb3c6633a77fef85d2f9071592e32ad1ce60aaa3be86489042fffd6cce9f1d4d14ee0c20663dc681875795562ed1cc85fe98fbae8a5895 - languageName: node - linkType: hard - -"istanbul-lib-instrument@npm:^6.0.0": - version: 6.0.0 - resolution: "istanbul-lib-instrument@npm:6.0.0" - dependencies: - "@babel/core": "npm:^7.12.3" - "@babel/parser": "npm:^7.14.7" - "@istanbuljs/schema": "npm:^0.1.2" - istanbul-lib-coverage: "npm:^3.2.0" - semver: "npm:^7.5.4" - checksum: 10/a52efe2170ac2deeaaacc84d10fe8de41d97264a86e57df77e05c1e72227a333280f640836137b28fda802a2c71b2affb00a703979e6f7a462cc80047a6aff21 +"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: 10/40bbdd1e937dfd8c830fa286d0f665e81b7a78bdabcd4565f6d5667c99828bda3db7fb7ac6b96a3e2e8a2461ddbc5452d9f8bc7d00cb00075fa6a3e99f5b6a81 languageName: node linkType: hard -"istanbul-lib-report@npm:^3.0.0": - version: 3.0.0 - resolution: "istanbul-lib-report@npm:3.0.0" +"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:^3.0.0" + make-dir: "npm:^4.0.0" supports-color: "npm:^7.1.0" - checksum: 10/06b37952e9cb0fe419a37c7f3d74612a098167a9eb0e5264228036e78b42ca5226501e8130738b5306d94bae2ea068ca674080d4af959992523d84aacff67728 + checksum: 10/86a83421ca1cf2109a9f6d193c06c31ef04a45e72a74579b11060b1e7bb9b6337a4e6f04abfb8857e2d569c271273c65e855ee429376a0d7c91ad91db42accd1 languageName: node linkType: hard -"istanbul-lib-source-maps@npm:^4.0.0": - version: 4.0.0 - resolution: "istanbul-lib-source-maps@npm:4.0.0" +"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" - source-map: "npm:^0.6.1" - checksum: 10/765252abc6b5c9d29905fc97ce04b92da87d198f2c0161e62fe0aac8bb74fb7bd472a5e1d90fe3e78723d8cad43913f08d8eefa0339536fcc33b3a1922cf5fc3 + checksum: 10/569dd0a392ee3464b1fe1accbaef5cc26de3479eacb5b91d8c67ebb7b425d39fd02247d85649c3a0e9c29b600809fa60b5af5a281a75a89c01f385b1e24823a2 languageName: node linkType: hard -"istanbul-reports@npm:^3.1.3": - version: 3.1.4 - resolution: "istanbul-reports@npm:3.1.4" +"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: 10/b720f7ff87a37e1500e001913e781395b96cc6ca4d475e01da2ec78d1571435ded4b1b31fb53ef8d760bc5fa691b2b6b647bcb4c1238f6aaf58b261d47510c93 + checksum: 10/f1faaa4684efaf57d64087776018d7426312a59aa6eeb4e0e3a777347d23cd286ad18f427e98f0e3dee666103d7404c9d7abc5f240406a912fa16bd6695437fa languageName: node linkType: hard @@ -13364,506 +12807,65 @@ __metadata: resolution: "iterator.prototype@npm:1.1.4" dependencies: define-data-property: "npm:^1.1.4" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.6" - has-symbols: "npm:^1.1.0" - reflect.getprototypeof: "npm:^1.0.8" - set-function-name: "npm:^2.0.2" - checksum: 10/3a7a4568437a67d5b1d863128fabf6cd0875d3a5cb36029036a72fa5ae4c97bad6423529d23083a4f6ae6c72c5d1d70b661124c3d6d964520325fd4ce753ee1a - languageName: node - linkType: hard - -"itty-router@npm:^5.0.17": - version: 5.0.17 - resolution: "itty-router@npm:5.0.17" - checksum: 10/5af87433b7ce1dc5c72c70bbf75e9676082381e6c101ac14fd5621e9d8a7e25cae97506b8654812b508d7f717aa8a881393888b4091112e33089d7b1aabd53d3 - languageName: node - linkType: hard - -"jackspeak@npm:^3.1.2": - version: 3.4.3 - resolution: "jackspeak@npm:3.4.3" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - "@pkgjs/parseargs": "npm:^0.11.0" - dependenciesMeta: - "@pkgjs/parseargs": - optional: true - checksum: 10/96f8786eaab98e4bf5b2a5d6d9588ea46c4d06bbc4f2eb861fdd7b6b182b16f71d8a70e79820f335d52653b16d4843b29dd9cdcf38ae80406756db9199497cf3 - languageName: node - linkType: hard - -"jake@npm:^10.8.5": - version: 10.8.5 - resolution: "jake@npm:10.8.5" - dependencies: - async: "npm:^3.2.3" - chalk: "npm:^4.0.2" - filelist: "npm:^1.0.1" - minimatch: "npm:^3.0.4" - bin: - jake: ./bin/cli.js - checksum: 10/6eaf1cd7fe78b92fa52d7258fb0f16f9bef856a18dc6e2f4da8e610264d293210d6e6e09a89d4e4ce1fc83d07c82963bd00bdcbb88e7a09aa62cc4cdf6e3bdf2 - languageName: node - linkType: hard - -"jest-changed-files@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-changed-files@npm:29.7.0" - dependencies: - execa: "npm:^5.0.0" - jest-util: "npm:^29.7.0" - p-limit: "npm:^3.1.0" - checksum: 10/3d93742e56b1a73a145d55b66e96711fbf87ef89b96c2fab7cfdfba8ec06612591a982111ca2b712bb853dbc16831ec8b43585a2a96b83862d6767de59cbf83d - languageName: node - linkType: hard - -"jest-circus@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-circus@npm:29.7.0" - dependencies: - "@jest/environment": "npm:^29.7.0" - "@jest/expect": "npm:^29.7.0" - "@jest/test-result": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - co: "npm:^4.6.0" - dedent: "npm:^1.0.0" - is-generator-fn: "npm:^2.0.0" - jest-each: "npm:^29.7.0" - jest-matcher-utils: "npm:^29.7.0" - jest-message-util: "npm:^29.7.0" - jest-runtime: "npm:^29.7.0" - jest-snapshot: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - p-limit: "npm:^3.1.0" - pretty-format: "npm:^29.7.0" - pure-rand: "npm:^6.0.0" - slash: "npm:^3.0.0" - stack-utils: "npm:^2.0.3" - checksum: 10/716a8e3f40572fd0213bcfc1da90274bf30d856e5133af58089a6ce45089b63f4d679bd44e6be9d320e8390483ebc3ae9921981993986d21639d9019b523123d - languageName: node - linkType: hard - -"jest-cli@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-cli@npm:29.7.0" - dependencies: - "@jest/core": "npm:^29.7.0" - "@jest/test-result": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - chalk: "npm:^4.0.0" - create-jest: "npm:^29.7.0" - exit: "npm:^0.1.2" - import-local: "npm:^3.0.2" - jest-config: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - jest-validate: "npm:^29.7.0" - yargs: "npm:^17.3.1" - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - bin: - jest: bin/jest.js - checksum: 10/6cc62b34d002c034203065a31e5e9a19e7c76d9e8ef447a6f70f759c0714cb212c6245f75e270ba458620f9c7b26063cd8cf6cd1f7e3afd659a7cc08add17307 - languageName: node - linkType: hard - -"jest-config@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-config@npm:29.7.0" - dependencies: - "@babel/core": "npm:^7.11.6" - "@jest/test-sequencer": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - babel-jest: "npm:^29.7.0" - chalk: "npm:^4.0.0" - ci-info: "npm:^3.2.0" - deepmerge: "npm:^4.2.2" - glob: "npm:^7.1.3" - graceful-fs: "npm:^4.2.9" - jest-circus: "npm:^29.7.0" - jest-environment-node: "npm:^29.7.0" - jest-get-type: "npm:^29.6.3" - jest-regex-util: "npm:^29.6.3" - jest-resolve: "npm:^29.7.0" - jest-runner: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - jest-validate: "npm:^29.7.0" - micromatch: "npm:^4.0.4" - parse-json: "npm:^5.2.0" - pretty-format: "npm:^29.7.0" - slash: "npm:^3.0.0" - strip-json-comments: "npm:^3.1.1" - peerDependencies: - "@types/node": "*" - ts-node: ">=9.0.0" - peerDependenciesMeta: - "@types/node": - optional: true - ts-node: - optional: true - checksum: 10/6bdf570e9592e7d7dd5124fc0e21f5fe92bd15033513632431b211797e3ab57eaa312f83cc6481b3094b72324e369e876f163579d60016677c117ec4853cf02b - languageName: node - linkType: hard - -"jest-diff@npm:>=29.4.3 < 30, jest-diff@npm:^29.4.1, jest-diff@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-diff@npm:29.7.0" - dependencies: - chalk: "npm:^4.0.0" - diff-sequences: "npm:^29.6.3" - jest-get-type: "npm:^29.6.3" - pretty-format: "npm:^29.7.0" - checksum: 10/6f3a7eb9cd9de5ea9e5aa94aed535631fa6f80221832952839b3cb59dd419b91c20b73887deb0b62230d06d02d6b6cf34ebb810b88d904bb4fe1e2e4f0905c98 - languageName: node - linkType: hard - -"jest-docblock@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-docblock@npm:29.7.0" - dependencies: - detect-newline: "npm:^3.0.0" - checksum: 10/8d48818055bc96c9e4ec2e217a5a375623c0d0bfae8d22c26e011074940c202aa2534a3362294c81d981046885c05d304376afba9f2874143025981148f3e96d - languageName: node - linkType: hard - -"jest-each@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-each@npm:29.7.0" - dependencies: - "@jest/types": "npm:^29.6.3" - chalk: "npm:^4.0.0" - jest-get-type: "npm:^29.6.3" - jest-util: "npm:^29.7.0" - pretty-format: "npm:^29.7.0" - checksum: 10/bd1a077654bdaa013b590deb5f7e7ade68f2e3289180a8c8f53bc8a49f3b40740c0ec2d3a3c1aee906f682775be2bebbac37491d80b634d15276b0aa0f2e3fda - languageName: node - linkType: hard - -"jest-environment-jsdom@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-environment-jsdom@npm:29.7.0" - dependencies: - "@jest/environment": "npm:^29.7.0" - "@jest/fake-timers": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - "@types/jsdom": "npm:^20.0.0" - "@types/node": "npm:*" - jest-mock: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - jsdom: "npm:^20.0.0" - peerDependencies: - canvas: ^2.5.0 - peerDependenciesMeta: - canvas: - optional: true - checksum: 10/23bbfc9bca914baef4b654f7983175a4d49b0f515a5094ebcb8f819f28ec186f53c0ba06af1855eac04bab1457f4ea79dae05f70052cf899863e8096daa6e0f5 - languageName: node - linkType: hard - -"jest-environment-node@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-environment-node@npm:29.7.0" - dependencies: - "@jest/environment": "npm:^29.7.0" - "@jest/fake-timers": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - "@types/node": "npm:*" - jest-mock: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - checksum: 10/9cf7045adf2307cc93aed2f8488942e39388bff47ec1df149a997c6f714bfc66b2056768973770d3f8b1bf47396c19aa564877eb10ec978b952c6018ed1bd637 - languageName: node - linkType: hard - -"jest-get-type@npm:^29.6.3": - version: 29.6.3 - resolution: "jest-get-type@npm:29.6.3" - checksum: 10/88ac9102d4679d768accae29f1e75f592b760b44277df288ad76ce5bf038c3f5ce3719dea8aa0f035dac30e9eb034b848ce716b9183ad7cc222d029f03e92205 - languageName: node - linkType: hard - -"jest-haste-map@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-haste-map@npm:29.7.0" - dependencies: - "@jest/types": "npm:^29.6.3" - "@types/graceful-fs": "npm:^4.1.3" - "@types/node": "npm:*" - anymatch: "npm:^3.0.3" - fb-watchman: "npm:^2.0.0" - fsevents: "npm:^2.3.2" - graceful-fs: "npm:^4.2.9" - jest-regex-util: "npm:^29.6.3" - jest-util: "npm:^29.7.0" - jest-worker: "npm:^29.7.0" - micromatch: "npm:^4.0.4" - walker: "npm:^1.0.8" - dependenciesMeta: - fsevents: - optional: true - checksum: 10/8531b42003581cb18a69a2774e68c456fb5a5c3280b1b9b77475af9e346b6a457250f9d756bfeeae2fe6cbc9ef28434c205edab9390ee970a919baddfa08bb85 - languageName: node - linkType: hard - -"jest-leak-detector@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-leak-detector@npm:29.7.0" - dependencies: - jest-get-type: "npm:^29.6.3" - pretty-format: "npm:^29.7.0" - checksum: 10/e3950e3ddd71e1d0c22924c51a300a1c2db6cf69ec1e51f95ccf424bcc070f78664813bef7aed4b16b96dfbdeea53fe358f8aeaaea84346ae15c3735758f1605 - languageName: node - linkType: hard - -"jest-matcher-utils@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-matcher-utils@npm:29.7.0" - dependencies: - chalk: "npm:^4.0.0" - jest-diff: "npm:^29.7.0" - jest-get-type: "npm:^29.6.3" - pretty-format: "npm:^29.7.0" - checksum: 10/981904a494299cf1e3baed352f8a3bd8b50a8c13a662c509b6a53c31461f94ea3bfeffa9d5efcfeb248e384e318c87de7e3baa6af0f79674e987482aa189af40 - languageName: node - linkType: hard - -"jest-message-util@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-message-util@npm:29.7.0" - dependencies: - "@babel/code-frame": "npm:^7.12.13" - "@jest/types": "npm:^29.6.3" - "@types/stack-utils": "npm:^2.0.0" - chalk: "npm:^4.0.0" - graceful-fs: "npm:^4.2.9" - micromatch: "npm:^4.0.4" - pretty-format: "npm:^29.7.0" - slash: "npm:^3.0.0" - stack-utils: "npm:^2.0.3" - checksum: 10/31d53c6ed22095d86bab9d14c0fa70c4a92c749ea6ceece82cf30c22c9c0e26407acdfbdb0231435dc85a98d6d65ca0d9cbcd25cd1abb377fe945e843fb770b9 - languageName: node - linkType: hard - -"jest-mock@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-mock@npm:29.7.0" - dependencies: - "@jest/types": "npm:^29.6.3" - "@types/node": "npm:*" - jest-util: "npm:^29.7.0" - checksum: 10/ae51d1b4f898724be5e0e52b2268a68fcd876d9b20633c864a6dd6b1994cbc48d62402b0f40f3a1b669b30ebd648821f086c26c08ffde192ced951ff4670d51c - languageName: node - linkType: hard - -"jest-pnp-resolver@npm:^1.2.2": - version: 1.2.2 - resolution: "jest-pnp-resolver@npm:1.2.2" - peerDependencies: - jest-resolve: "*" - peerDependenciesMeta: - jest-resolve: - optional: true - checksum: 10/bd85dcc0e76e0eb0c3d56382ec140f08d25ff4068cda9d0e360bb78fb176cb726d0beab82dc0e8694cafd09f55fee7622b8bcb240afa5fad301f4ed3eebb4f47 - languageName: node - linkType: hard - -"jest-regex-util@npm:^29.6.3": - version: 29.6.3 - resolution: "jest-regex-util@npm:29.6.3" - checksum: 10/0518beeb9bf1228261695e54f0feaad3606df26a19764bc19541e0fc6e2a3737191904607fb72f3f2ce85d9c16b28df79b7b1ec9443aa08c3ef0e9efda6f8f2a - languageName: node - linkType: hard - -"jest-resolve-dependencies@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-resolve-dependencies@npm:29.7.0" - dependencies: - jest-regex-util: "npm:^29.6.3" - jest-snapshot: "npm:^29.7.0" - checksum: 10/1e206f94a660d81e977bcfb1baae6450cb4a81c92e06fad376cc5ea16b8e8c6ea78c383f39e95591a9eb7f925b6a1021086c38941aa7c1b8a6a813c2f6e93675 - languageName: node - linkType: hard - -"jest-resolve@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-resolve@npm:29.7.0" - dependencies: - chalk: "npm:^4.0.0" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^29.7.0" - jest-pnp-resolver: "npm:^1.2.2" - jest-util: "npm:^29.7.0" - jest-validate: "npm:^29.7.0" - resolve: "npm:^1.20.0" - resolve.exports: "npm:^2.0.0" - slash: "npm:^3.0.0" - checksum: 10/faa466fd9bc69ea6c37a545a7c6e808e073c66f46ab7d3d8a6ef084f8708f201b85d5fe1799789578b8b47fa1de47b9ee47b414d1863bc117a49e032ba77b7c7 - languageName: node - linkType: hard - -"jest-runner@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-runner@npm:29.7.0" - dependencies: - "@jest/console": "npm:^29.7.0" - "@jest/environment": "npm:^29.7.0" - "@jest/test-result": "npm:^29.7.0" - "@jest/transform": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - emittery: "npm:^0.13.1" - graceful-fs: "npm:^4.2.9" - jest-docblock: "npm:^29.7.0" - jest-environment-node: "npm:^29.7.0" - jest-haste-map: "npm:^29.7.0" - jest-leak-detector: "npm:^29.7.0" - jest-message-util: "npm:^29.7.0" - jest-resolve: "npm:^29.7.0" - jest-runtime: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - jest-watcher: "npm:^29.7.0" - jest-worker: "npm:^29.7.0" - p-limit: "npm:^3.1.0" - source-map-support: "npm:0.5.13" - checksum: 10/9d8748a494bd90f5c82acea99be9e99f21358263ce6feae44d3f1b0cd90991b5df5d18d607e73c07be95861ee86d1cbab2a3fc6ca4b21805f07ac29d47c1da1e - languageName: node - linkType: hard - -"jest-runtime@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-runtime@npm:29.7.0" - dependencies: - "@jest/environment": "npm:^29.7.0" - "@jest/fake-timers": "npm:^29.7.0" - "@jest/globals": "npm:^29.7.0" - "@jest/source-map": "npm:^29.6.3" - "@jest/test-result": "npm:^29.7.0" - "@jest/transform": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - cjs-module-lexer: "npm:^1.0.0" - collect-v8-coverage: "npm:^1.0.0" - glob: "npm:^7.1.3" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^29.7.0" - jest-message-util: "npm:^29.7.0" - jest-mock: "npm:^29.7.0" - jest-regex-util: "npm:^29.6.3" - jest-resolve: "npm:^29.7.0" - jest-snapshot: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - slash: "npm:^3.0.0" - strip-bom: "npm:^4.0.0" - checksum: 10/59eb58eb7e150e0834a2d0c0d94f2a0b963ae7182cfa6c63f2b49b9c6ef794e5193ef1634e01db41420c36a94cefc512cdd67a055cd3e6fa2f41eaf0f82f5a20 - languageName: node - linkType: hard - -"jest-snapshot@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-snapshot@npm:29.7.0" - dependencies: - "@babel/core": "npm:^7.11.6" - "@babel/generator": "npm:^7.7.2" - "@babel/plugin-syntax-jsx": "npm:^7.7.2" - "@babel/plugin-syntax-typescript": "npm:^7.7.2" - "@babel/types": "npm:^7.3.3" - "@jest/expect-utils": "npm:^29.7.0" - "@jest/transform": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - babel-preset-current-node-syntax: "npm:^1.0.0" - chalk: "npm:^4.0.0" - expect: "npm:^29.7.0" - graceful-fs: "npm:^4.2.9" - jest-diff: "npm:^29.7.0" - jest-get-type: "npm:^29.6.3" - jest-matcher-utils: "npm:^29.7.0" - jest-message-util: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - natural-compare: "npm:^1.4.0" - pretty-format: "npm:^29.7.0" - semver: "npm:^7.5.3" - checksum: 10/cb19a3948256de5f922d52f251821f99657339969bf86843bd26cf3332eae94883e8260e3d2fba46129a27c3971c1aa522490e460e16c7fad516e82d10bbf9f8 + es-object-atoms: "npm:^1.0.0" + get-intrinsic: "npm:^1.2.6" + has-symbols: "npm:^1.1.0" + reflect.getprototypeof: "npm:^1.0.8" + set-function-name: "npm:^2.0.2" + checksum: 10/3a7a4568437a67d5b1d863128fabf6cd0875d3a5cb36029036a72fa5ae4c97bad6423529d23083a4f6ae6c72c5d1d70b661124c3d6d964520325fd4ce753ee1a languageName: node linkType: hard -"jest-util@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-util@npm:29.7.0" - dependencies: - "@jest/types": "npm:^29.6.3" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - ci-info: "npm:^3.2.0" - graceful-fs: "npm:^4.2.9" - picomatch: "npm:^2.2.3" - checksum: 10/30d58af6967e7d42bd903ccc098f3b4d3859ed46238fbc88d4add6a3f10bea00c226b93660285f058bc7a65f6f9529cf4eb80f8d4707f79f9e3a23686b4ab8f3 +"itty-router@npm:^5.0.17": + version: 5.0.17 + resolution: "itty-router@npm:5.0.17" + checksum: 10/5af87433b7ce1dc5c72c70bbf75e9676082381e6c101ac14fd5621e9d8a7e25cae97506b8654812b508d7f717aa8a881393888b4091112e33089d7b1aabd53d3 languageName: node linkType: hard -"jest-validate@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-validate@npm:29.7.0" +"jackspeak@npm:^3.1.2": + version: 3.4.3 + resolution: "jackspeak@npm:3.4.3" dependencies: - "@jest/types": "npm:^29.6.3" - camelcase: "npm:^6.2.0" - chalk: "npm:^4.0.0" - jest-get-type: "npm:^29.6.3" - leven: "npm:^3.1.0" - pretty-format: "npm:^29.7.0" - checksum: 10/8ee1163666d8eaa16d90a989edba2b4a3c8ab0ffaa95ad91b08ca42b015bfb70e164b247a5b17f9de32d096987cada63ed8491ab82761bfb9a28bc34b27ae161 + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 10/96f8786eaab98e4bf5b2a5d6d9588ea46c4d06bbc4f2eb861fdd7b6b182b16f71d8a70e79820f335d52653b16d4843b29dd9cdcf38ae80406756db9199497cf3 languageName: node linkType: hard -"jest-watcher@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-watcher@npm:29.7.0" +"jake@npm:^10.8.5": + version: 10.8.5 + resolution: "jake@npm:10.8.5" dependencies: - "@jest/test-result": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - "@types/node": "npm:*" - ansi-escapes: "npm:^4.2.1" - chalk: "npm:^4.0.0" - emittery: "npm:^0.13.1" - jest-util: "npm:^29.7.0" - string-length: "npm:^4.0.1" - checksum: 10/4f616e0345676631a7034b1d94971aaa719f0cd4a6041be2aa299be437ea047afd4fe05c48873b7963f5687a2f6c7cbf51244be8b14e313b97bfe32b1e127e55 + async: "npm:^3.2.3" + chalk: "npm:^4.0.2" + filelist: "npm:^1.0.1" + minimatch: "npm:^3.0.4" + bin: + jake: ./bin/cli.js + checksum: 10/6eaf1cd7fe78b92fa52d7258fb0f16f9bef856a18dc6e2f4da8e610264d293210d6e6e09a89d4e4ce1fc83d07c82963bd00bdcbb88e7a09aa62cc4cdf6e3bdf2 languageName: node linkType: hard -"jest-worker@npm:^29.7.0": +"jest-diff@npm:>=29.4.3 < 30, jest-diff@npm:^29.4.1": version: 29.7.0 - resolution: "jest-worker@npm:29.7.0" + resolution: "jest-diff@npm:29.7.0" dependencies: - "@types/node": "npm:*" - jest-util: "npm:^29.7.0" - merge-stream: "npm:^2.0.0" - supports-color: "npm:^8.0.0" - checksum: 10/364cbaef00d8a2729fc760227ad34b5e60829e0869bd84976bdfbd8c0d0f9c2f22677b3e6dd8afa76ed174765351cd12bae3d4530c62eefb3791055127ca9745 + chalk: "npm:^4.0.0" + diff-sequences: "npm:^29.6.3" + jest-get-type: "npm:^29.6.3" + pretty-format: "npm:^29.7.0" + checksum: 10/6f3a7eb9cd9de5ea9e5aa94aed535631fa6f80221832952839b3cb59dd419b91c20b73887deb0b62230d06d02d6b6cf34ebb810b88d904bb4fe1e2e4f0905c98 languageName: node linkType: hard -"jest@npm:^29.7.0": - version: 29.7.0 - resolution: "jest@npm:29.7.0" - dependencies: - "@jest/core": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - import-local: "npm:^3.0.2" - jest-cli: "npm:^29.7.0" - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - bin: - jest: bin/jest.js - checksum: 10/97023d78446098c586faaa467fbf2c6b07ff06e2c85a19e3926adb5b0effe9ac60c4913ae03e2719f9c01ae8ffd8d92f6b262cedb9555ceeb5d19263d8c6362a +"jest-get-type@npm:^29.6.3": + version: 29.6.3 + resolution: "jest-get-type@npm:29.6.3" + checksum: 10/88ac9102d4679d768accae29f1e75f592b760b44277df288ad76ce5bf038c3f5ce3719dea8aa0f035dac30e9eb034b848ce716b9183ad7cc222d029f03e92205 languageName: node linkType: hard @@ -13932,42 +12934,37 @@ __metadata: languageName: node linkType: hard -"jsdom@npm:^20.0.0": - version: 20.0.3 - resolution: "jsdom@npm:20.0.3" +"jsdom@npm:^26.0.0": + version: 26.0.0 + resolution: "jsdom@npm:26.0.0" dependencies: - abab: "npm:^2.0.6" - acorn: "npm:^8.8.1" - acorn-globals: "npm:^7.0.0" - cssom: "npm:^0.5.0" - cssstyle: "npm:^2.3.0" - data-urls: "npm:^3.0.2" - decimal.js: "npm:^10.4.2" - domexception: "npm:^4.0.0" - escodegen: "npm:^2.0.0" - form-data: "npm:^4.0.0" - html-encoding-sniffer: "npm:^3.0.0" - http-proxy-agent: "npm:^5.0.0" - https-proxy-agent: "npm:^5.0.1" + cssstyle: "npm:^4.2.1" + data-urls: "npm:^5.0.0" + decimal.js: "npm:^10.4.3" + form-data: "npm:^4.0.1" + html-encoding-sniffer: "npm:^4.0.0" + http-proxy-agent: "npm:^7.0.2" + https-proxy-agent: "npm:^7.0.6" is-potential-custom-element-name: "npm:^1.0.1" - nwsapi: "npm:^2.2.2" - parse5: "npm:^7.1.1" + nwsapi: "npm:^2.2.16" + parse5: "npm:^7.2.1" + rrweb-cssom: "npm:^0.8.0" saxes: "npm:^6.0.0" symbol-tree: "npm:^3.2.4" - tough-cookie: "npm:^4.1.2" - w3c-xmlserializer: "npm:^4.0.0" + tough-cookie: "npm:^5.0.0" + w3c-xmlserializer: "npm:^5.0.0" webidl-conversions: "npm:^7.0.0" - whatwg-encoding: "npm:^2.0.0" - whatwg-mimetype: "npm:^3.0.0" - whatwg-url: "npm:^11.0.0" - ws: "npm:^8.11.0" - xml-name-validator: "npm:^4.0.0" + whatwg-encoding: "npm:^3.1.1" + whatwg-mimetype: "npm:^4.0.0" + whatwg-url: "npm:^14.1.0" + ws: "npm:^8.18.0" + xml-name-validator: "npm:^5.0.0" peerDependencies: - canvas: ^2.5.0 + canvas: ^3.0.0 peerDependenciesMeta: canvas: optional: true - checksum: 10/a4cdcff5b07eed87da90b146b82936321533b5efe8124492acf7160ebd5b9cf2b3c2435683592bf1cffb479615245756efb6c173effc1906f845a86ed22af985 + checksum: 10/8c230ee4657240bbbca6b4ebb484be53fc6a777a22a3357c80c5537222813666e3e1f54740bc13e769c461d9598ba7dac402c245949c6cef7ef7014ce6f36f01 languageName: node linkType: hard @@ -14244,13 +13241,6 @@ __metadata: languageName: node linkType: hard -"kleur@npm:^3.0.3": - version: 3.0.3 - resolution: "kleur@npm:3.0.3" - checksum: 10/0c0ecaf00a5c6173d25059c7db2113850b5457016dfa1d0e3ef26da4704fbb186b4938d7611246d86f0ddf1bccf26828daa5877b1f232a65e7373d0122a83e7f - languageName: node - linkType: hard - "knex@npm:^3.1.0": version: 3.1.0 resolution: "knex@npm:3.1.0" @@ -14394,13 +13384,6 @@ __metadata: languageName: node linkType: hard -"leven@npm:^3.1.0": - version: 3.1.0 - resolution: "leven@npm:3.1.0" - checksum: 10/638401d534585261b6003db9d99afd244dfe82d75ddb6db5c0df412842d5ab30b2ef18de471aaec70fe69a46f17b4ae3c7f01d8a4e6580ef7adb9f4273ad1e55 - languageName: node - linkType: hard - "levn@npm:^0.4.1": version: 0.4.1 resolution: "levn@npm:0.4.1" @@ -14642,7 +13625,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:^4.0.1, lodash@npm:^4.17.11, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.21": +"lodash@npm:^4.0.1, lodash@npm:^4.17.11, lodash@npm:^4.17.14, lodash@npm:^4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: 10/c08619c038846ea6ac754abd6dd29d2568aa705feb69339e836dfa8d8b09abbb2f859371e86863eda41848221f9af43714491467b5b0299122431e202bb0c532 @@ -14702,7 +13685,14 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0, lru-cache@npm:^10.2.2": +"loupe@npm:^3.1.0, loupe@npm:^3.1.3": + version: 3.1.3 + resolution: "loupe@npm:3.1.3" + checksum: 10/9e98c34daf0eba48ccc603595e51f2ae002110982d84879cf78c51de2c632f0c571dfe82ce4210af60c32203d06b443465c269bda925076fe6d9b612cc65c321 + languageName: node + linkType: hard + +"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0, lru-cache@npm:^10.2.2, lru-cache@npm:^10.4.3": version: 10.4.3 resolution: "lru-cache@npm:10.4.3" checksum: 10/e6e90267360476720fa8e83cc168aa2bf0311f3f2eea20a6ba78b90a885ae72071d9db132f40fda4129c803e7dcec3a6b6a6fbb44ca90b081630b810b5d6a41a @@ -14742,11 +13732,11 @@ __metadata: linkType: hard "lz-string@npm:^1.4.4": - version: 1.4.4 - resolution: "lz-string@npm:1.4.4" + version: 1.5.0 + resolution: "lz-string@npm:1.5.0" bin: lz-string: bin/bin.js - checksum: 10/da3abc3c15b3f91ab0fba0fe8ea3bb53d3c758d5c50d88d97b759e52d9b5224f8b05edc0e6423bfd448e6bcbe30f79236b7f2e6e7f8a321be62ae77b88092581 + checksum: 10/e86f0280e99a8d8cd4eef24d8601ddae15ce54e43ac9990dfcb79e1e081c255ad24424a30d78d2ad8e51a8ce82a66a930047fed4b4aa38c6f0b392ff9300edfc languageName: node linkType: hard @@ -14768,7 +13758,27 @@ __metadata: languageName: node linkType: hard -"make-dir@npm:4.0.0": +"magic-string@npm:^0.30.17": + version: 0.30.17 + resolution: "magic-string@npm:0.30.17" + dependencies: + "@jridgewell/sourcemap-codec": "npm:^1.5.0" + checksum: 10/2f71af2b0afd78c2e9012a29b066d2c8ba45a9cd0c8070f7fd72de982fb1c403b4e3afdb1dae00691d56885ede66b772ef6bedf765e02e3a7066208fe2fec4aa + 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: 10/3a2dba6b0bdde957797361d09c7931ebdc1b30231705360eeb40ed458d28e1c3112841c3ed4e1b87ceb28f741e333c7673cd961193aa9fdb4f4946b202e6205a + languageName: node + linkType: hard + +"make-dir@npm:4.0.0, make-dir@npm:^4.0.0": version: 4.0.0 resolution: "make-dir@npm:4.0.0" dependencies: @@ -14787,7 +13797,7 @@ __metadata: languageName: node linkType: hard -"make-dir@npm:^3.0.0, make-dir@npm:^3.1.0": +"make-dir@npm:^3.1.0": version: 3.1.0 resolution: "make-dir@npm:3.1.0" dependencies: @@ -14816,15 +13826,6 @@ __metadata: languageName: node linkType: hard -"makeerror@npm:1.0.12": - version: 1.0.12 - resolution: "makeerror@npm:1.0.12" - dependencies: - tmpl: "npm:1.0.5" - checksum: 10/4c66ddfc654537333da952c084f507fa4c30c707b1635344eb35be894d797ba44c901a9cebe914aa29a7f61357543ba09b09dddbd7f65b4aee756b450f169f40 - languageName: node - linkType: hard - "map-obj@npm:^1.0.0": version: 1.0.1 resolution: "map-obj@npm:1.0.1" @@ -15365,9 +14366,9 @@ __metadata: linkType: hard "moo@npm:^0.5.0": - version: 0.5.1 - resolution: "moo@npm:0.5.1" - checksum: 10/78f1bfb8aeee346f1a23987ec9ecbfd5fe0c42249f0330296b84f3ddc324587724b8ca406744844db1ae6d5ae08e345d8e4c533fe24bc11efc2a0b055a58af2c + version: 0.5.2 + resolution: "moo@npm:0.5.2" + checksum: 10/fee356cb13b52e259c925fe297d71b3f47b98b06444b696dd4870d20cad4711eb58d24131afeba9bf7a51d77c77a3cbe8479066497d12a88abb51865c1be7de7 languageName: node linkType: hard @@ -15598,13 +14599,6 @@ __metadata: languageName: node linkType: hard -"node-int64@npm:^0.4.0": - version: 0.4.0 - resolution: "node-int64@npm:0.4.0" - checksum: 10/b7afc2b65e56f7035b1a2eec57ae0fbdee7d742b1cdcd0f4387562b6527a011ab1cbe9f64cc8b3cca61e3297c9637c8bf61cec2e6b8d3a711d4b5267dfafbe02 - languageName: node - linkType: hard - "node-machine-id@npm:1.1.12": version: 1.1.12 resolution: "node-machine-id@npm:1.1.12" @@ -15902,10 +14896,10 @@ __metadata: languageName: node linkType: hard -"nwsapi@npm:^2.2.2": - version: 2.2.7 - resolution: "nwsapi@npm:2.2.7" - checksum: 10/22c002080f0297121ad138aba5a6509e724774d6701fe2c4777627bd939064ecd9e1b6dc1c2c716bb7ca0b9f16247892ff2f664285202ac7eff6ec9543725320 +"nwsapi@npm:^2.2.16": + version: 2.2.18 + resolution: "nwsapi@npm:2.2.18" + checksum: 10/ce2233284abe2d5c4507089972035018f79c0a3fd00c672f7c5afad7603561c2a8e53c81bc02dcc40f4bc87414b277d932a8a96f53816ff1083abab1f5092c43 languageName: node linkType: hard @@ -16001,19 +14995,19 @@ __metadata: linkType: hard "object-inspect@npm:^1.13.3, object-inspect@npm:^1.7.0": - version: 1.13.3 - resolution: "object-inspect@npm:1.13.3" - checksum: 10/14cb973d8381c69e14d7f1c8c75044eb4caf04c6dabcf40ca5c2ce42dc2073ae0bb2a9939eeca142b0c05215afaa1cd5534adb7c8879c32cba2576e045ed8368 + version: 1.13.4 + resolution: "object-inspect@npm:1.13.4" + checksum: 10/aa13b1190ad3e366f6c83ad8a16ed37a19ed57d267385aa4bfdccda833d7b90465c057ff6c55d035a6b2e52c1a2295582b294217a0a3a1ae7abdd6877ef781fb languageName: node linkType: hard "object-is@npm:^1.0.2, object-is@npm:^1.1.5": - version: 1.1.5 - resolution: "object-is@npm:1.1.5" + version: 1.1.6 + resolution: "object-is@npm:1.1.6" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - checksum: 10/75365aff5da4bebad5d20efd9f9a7a13597e603f5eb03d89da8f578c3f3937fe01c6cb5fce86c0611c48795c0841401fd37c943821db0de703c7b30a290576ad + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + checksum: 10/4f6f544773a595da21c69a7531e0e1d6250670f4e09c55f47eb02c516035cfcb1b46ceb744edfd3ecb362309dbccb6d7f88e43bf42e4d4595ac10a329061053a languageName: node linkType: hard @@ -16276,7 +15270,7 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:^3.0.2, p-limit@npm:^3.1.0": +"p-limit@npm:^3.0.2": version: 3.1.0 resolution: "p-limit@npm:3.1.0" dependencies: @@ -16519,7 +15513,7 @@ __metadata: languageName: node linkType: hard -"parse5@npm:^7.0.0, parse5@npm:^7.1.1": +"parse5@npm:^7.0.0, parse5@npm:^7.2.1": version: 7.2.1 resolution: "parse5@npm:7.2.1" dependencies: @@ -16643,10 +15637,17 @@ __metadata: languageName: node linkType: hard -"pathe@npm:^2.0.1": - version: 2.0.2 - resolution: "pathe@npm:2.0.2" - checksum: 10/027dd246720ec6d3b5567e2b0201f1a815b6a69f2912a4dcafed59620afc729af15b4aff4bc780504c88d11dfb081c051e37327b928a093e714c3e09bf35aff3 +"pathe@npm:^2.0.1, pathe@npm:^2.0.3": + version: 2.0.3 + resolution: "pathe@npm:2.0.3" + checksum: 10/01e9a69928f39087d96e1751ce7d6d50da8c39abf9a12e0ac2389c42c83bc76f78c45a475bd9026a02e6a6f79be63acc75667df855862fe567d99a00a540d23d + languageName: node + linkType: hard + +"pathval@npm:^2.0.0": + version: 2.0.0 + resolution: "pathval@npm:2.0.0" + checksum: 10/b91575bf9cdf01757afd7b5e521eb8a0b874a49bc972d08e0047cfea0cd3c019f5614521d4bc83d2855e3fcc331db6817dfd533dd8f3d90b16bc76fad2450fc1 languageName: node linkType: hard @@ -16712,7 +15713,7 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" checksum: 10/60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc @@ -16763,7 +15764,7 @@ __metadata: languageName: node linkType: hard -"pirates@npm:^4.0.1, pirates@npm:^4.0.4": +"pirates@npm:^4.0.1": version: 4.0.5 resolution: "pirates@npm:4.0.5" checksum: 10/3728bae0cf6c18c3d25f5449ee8c5bc1a6a83bca688abe0e1654ce8c069bfd408170397cef133ed9ec8b0faeb4093c5c728d0e72ab7b3385256cd87008c40364 @@ -16930,7 +15931,7 @@ __metadata: languageName: node linkType: hard -"pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0": +"pretty-format@npm:^29.7.0": version: 29.7.0 resolution: "pretty-format@npm:29.7.0" dependencies: @@ -17014,16 +16015,6 @@ __metadata: languageName: node linkType: hard -"prompts@npm:^2.0.1": - version: 2.4.0 - resolution: "prompts@npm:2.4.0" - dependencies: - kleur: "npm:^3.0.3" - sisteransi: "npm:^1.0.5" - checksum: 10/165ef85ab1bb87e44942a8889c48930381d77dde43649d1dd2c3f3dd2bc83eff16920e95ec120d8477bba6128bfe940304cb87da1f65502c59b92f6336de74b2 - languageName: node - linkType: hard - "promzard@npm:^1.0.0": version: 1.0.0 resolution: "promzard@npm:1.0.0" @@ -17115,13 +16106,6 @@ __metadata: languageName: node linkType: hard -"pure-rand@npm:^6.0.0": - version: 6.0.4 - resolution: "pure-rand@npm:6.0.4" - checksum: 10/34fed0abe99d3db7ddc459c12e1eda6bff05db6a17f2017a1ae12202271ccf276fb223b442653518c719671c1b339bbf97f27ba9276dba0997c89e45c4e6a3bf - languageName: node - linkType: hard - "qs@npm:6.13.0, qs@npm:^6.11.0, qs@npm:^6.4.0, qs@npm:^6.7.0": version: 6.13.0 resolution: "qs@npm:6.13.0" @@ -18544,7 +17528,7 @@ __metadata: languageName: node linkType: hard -"resolve.exports@npm:2.0.3, resolve.exports@npm:^2.0.0": +"resolve.exports@npm:2.0.3": version: 2.0.3 resolution: "resolve.exports@npm:2.0.3" checksum: 10/536efee0f30a10fac8604e6cdc7844dbc3f4313568d09f06db4f7ed8a5b8aeb8585966fe975083d1f2dfbc87cf5f8bc7ab65a5c23385c14acbb535ca79f8398a @@ -18781,6 +17765,13 @@ __metadata: languageName: node linkType: hard +"rrweb-cssom@npm:^0.8.0": + version: 0.8.0 + resolution: "rrweb-cssom@npm:0.8.0" + checksum: 10/07521ee36fb6569c17906afad1ac7ff8f099d49ade9249e190693ac36cdf27f88d9acf0cc66978935d5d0a23fca105643d7e9125b9a9d91ed9db9e02d31d7d80 + languageName: node + linkType: hard + "rst-selector-parser@npm:^2.2.3": version: 2.2.3 resolution: "rst-selector-parser@npm:2.2.3" @@ -18987,7 +17978,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^6.0.0, semver@npm:^6.3.0, semver@npm:^6.3.1": +"semver@npm:^6.0.0, semver@npm:^6.3.1": version: 6.3.1 resolution: "semver@npm:6.3.1" bin: @@ -18996,7 +17987,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.3": +"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.6.0, semver@npm:^7.6.3": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: @@ -19266,7 +18257,14 @@ __metadata: languageName: node linkType: hard -"signal-exit@npm:3.0.7, signal-exit@npm:^3.0.0, signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": +"siginfo@npm:^2.0.0": + version: 2.0.0 + resolution: "siginfo@npm:2.0.0" + checksum: 10/e93ff66c6531a079af8fb217240df01f980155b5dc408d2d7bebc398dd284e383eb318153bf8acd4db3c4fe799aa5b9a641e38b0ba3b1975700b1c89547ea4e7 + languageName: node + linkType: hard + +"signal-exit@npm:3.0.7, signal-exit@npm:^3.0.0, signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" checksum: 10/a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 @@ -19321,13 +18319,6 @@ __metadata: languageName: node linkType: hard -"sisteransi@npm:^1.0.5": - version: 1.0.5 - resolution: "sisteransi@npm:1.0.5" - checksum: 10/aba6438f46d2bfcef94cf112c835ab395172c75f67453fe05c340c770d3c402363018ae1ab4172a1026a90c47eaccf3af7b6ff6fa749a680c2929bd7fa2b37a4 - languageName: node - linkType: hard - "slash@npm:3.0.0, slash@npm:^3.0.0": version: 3.0.0 resolution: "slash@npm:3.0.0" @@ -19423,23 +18414,13 @@ __metadata: languageName: node linkType: hard -"source-map-js@npm:>=0.6.2 <2.0.0, source-map-js@npm:^1.0.1, source-map-js@npm:^1.2.1": +"source-map-js@npm:>=0.6.2 <2.0.0, source-map-js@npm:^1.0.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: 10/ff9d8c8bf096d534a5b7707e0382ef827b4dd360a577d3f34d2b9f48e12c9d230b5747974ee7c607f0df65113732711bb701fe9ece3c7edbd43cb2294d707df3 languageName: node linkType: hard -"source-map-support@npm:0.5.13": - version: 0.5.13 - resolution: "source-map-support@npm:0.5.13" - dependencies: - buffer-from: "npm:^1.0.0" - source-map: "npm:^0.6.0" - checksum: 10/d1514a922ac9c7e4786037eeff6c3322f461cd25da34bb9fefb15387b3490531774e6e31d95ab6d5b84a3e139af9c3a570ccaee6b47bd7ea262691ed3a8bc34e - languageName: node - linkType: hard - "source-map@npm:0.8.0-beta.0": version: 0.8.0-beta.0 resolution: "source-map@npm:0.8.0-beta.0" @@ -19456,7 +18437,7 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.1": +"source-map@npm:^0.6.1": version: 0.6.1 resolution: "source-map@npm:0.6.1" checksum: 10/59ef7462f1c29d502b3057e822cdbdae0b0e565302c4dd1a95e11e793d8d9d62006cdc10e0fd99163ca33ff2071360cf50ee13f90440806e7ed57d81cba2f7ff @@ -19601,12 +18582,10 @@ __metadata: languageName: node linkType: hard -"stack-utils@npm:^2.0.3": - version: 2.0.3 - resolution: "stack-utils@npm:2.0.3" - dependencies: - escape-string-regexp: "npm:^2.0.0" - checksum: 10/e51cf0161464422426173e8b4ae886efb8411a4444aa6c8fdee5408849461733bf7f615cc24c607428638c5a26e86fbeb5418fb148409c2a5dbfa7b2ecfcb62f +"stackback@npm:0.0.2": + version: 0.0.2 + resolution: "stackback@npm:0.0.2" + checksum: 10/2d4dc4e64e2db796de4a3c856d5943daccdfa3dd092e452a1ce059c81e9a9c29e0b9badba91b43ef0d5ff5c04ee62feb3bcc559a804e16faf447bac2d883aa99 languageName: node linkType: hard @@ -19627,6 +18606,13 @@ __metadata: languageName: node linkType: hard +"std-env@npm:^3.8.0": + version: 3.8.1 + resolution: "std-env@npm:3.8.1" + checksum: 10/ee119570e2e449be86aa4972f119f9086a918307cc524f6e891b7a7c1327a5c970cf1b7d5898c881777845292a7e3380cf7d80ad34aee355d2c22ac5eb628542 + languageName: node + linkType: hard + "stoppable@npm:1.1.0": version: 1.1.0 resolution: "stoppable@npm:1.1.0" @@ -19648,16 +18634,6 @@ __metadata: languageName: node linkType: hard -"string-length@npm:^4.0.1": - version: 4.0.1 - resolution: "string-length@npm:4.0.1" - dependencies: - char-regex: "npm:^1.0.2" - strip-ansi: "npm:^6.0.0" - checksum: 10/7bd3191668ddafa6f574a8b17a1bd1b085737d64ceefa51f72cdd19c45a730422cd70d984eee7584d6e5b5c84b6318633c6d6a720a4bfd7c58769985fa77573e - languageName: node - linkType: hard - "string-pixel-width@npm:^1.10.0": version: 1.10.0 resolution: "string-pixel-width@npm:1.10.0" @@ -19945,7 +18921,7 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:^8.0.0, supports-color@npm:^8.1.1": +"supports-color@npm:^8.1.1": version: 8.1.1 resolution: "supports-color@npm:8.1.1" dependencies: @@ -20039,14 +19015,14 @@ __metadata: languageName: node linkType: hard -"test-exclude@npm:^6.0.0": - version: 6.0.0 - resolution: "test-exclude@npm:6.0.0" +"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:^7.1.4" - minimatch: "npm:^3.0.4" - checksum: 10/8fccb2cb6c8fcb6bb4115394feb833f8b6cf4b9503ec2485c2c90febf435cac62abe882a0c5c51a37b9bbe70640cdd05acf5f45e486ac4583389f4b0855f69e5 + glob: "npm:^10.4.1" + minimatch: "npm:^9.0.4" + checksum: 10/e6f6f4e1df2e7810e082e8d7dfc53be51a931e6e87925f5e1c2ef92cc1165246ba3bf2dae6b5d86251c16925683dba906bd41e40169ebc77120a2d1b5a0dbbe0 languageName: node linkType: hard @@ -20141,6 +19117,13 @@ __metadata: languageName: node linkType: hard +"tinybench@npm:^2.9.0": + version: 2.9.0 + resolution: "tinybench@npm:2.9.0" + checksum: 10/cfa1e1418e91289219501703c4693c70708c91ffb7f040fd318d24aef419fb5a43e0c0160df9471499191968b2451d8da7f8087b08c3133c251c40d24aced06c + languageName: node + linkType: hard + "tinycolor2@npm:^1.4.1": version: 1.4.1 resolution: "tinycolor2@npm:1.4.1" @@ -20165,6 +19148,27 @@ __metadata: languageName: node linkType: hard +"tinypool@npm:^1.0.2": + version: 1.0.2 + resolution: "tinypool@npm:1.0.2" + checksum: 10/6109322f14b3763f65c8fa49fddab72cd3edd96b82dd50e05e63de74867329ff5353bff4377281ec963213d9314f37f4a353e9ee34bbac85fd4c1e4a568d6076 + languageName: node + linkType: hard + +"tinyrainbow@npm:^2.0.0": + version: 2.0.0 + resolution: "tinyrainbow@npm:2.0.0" + checksum: 10/94d4e16246972614a5601eeb169ba94f1d49752426312d3cf8cc4f2cc663a2e354ffc653aa4de4eebccbf9eeebdd0caef52d1150271fdfde65d7ae7f3dcb9eb5 + languageName: node + linkType: hard + +"tinyspy@npm:^3.0.2": + version: 3.0.2 + resolution: "tinyspy@npm:3.0.2" + checksum: 10/5db671b2ff5cd309de650c8c4761ca945459d7204afb1776db9a04fb4efa28a75f08517a8620c01ee32a577748802231ad92f7d5b194dc003ee7f987a2a06337 + languageName: node + linkType: hard + "tippy.js@npm:^6.3.1": version: 6.3.7 resolution: "tippy.js@npm:6.3.7" @@ -20174,6 +19178,24 @@ __metadata: languageName: node linkType: hard +"tldts-core@npm:^6.1.82": + version: 6.1.82 + resolution: "tldts-core@npm:6.1.82" + checksum: 10/e2a5947a7ee7b7a26c91ab130c3f4faad62a258d4d2ca07ed9d83635b5422cf956adb759c755a553873c023626cd5d246fed2ef125222f19f9475e1fc78c7bb3 + languageName: node + linkType: hard + +"tldts@npm:^6.1.32": + version: 6.1.82 + resolution: "tldts@npm:6.1.82" + dependencies: + tldts-core: "npm:^6.1.82" + bin: + tldts: bin/cli.js + checksum: 10/c0119f944924dfcc94eb3bd827dfeb5b0c3f81b1fbe8fd8081d3e61ca08b691f9c4f5c1c3ce17dc22fa557990aeef50769ddfe0f7ceca8577141f3dfaa8ffb3e + languageName: node + linkType: hard + "tmex@npm:^1.0.8": version: 1.0.8 resolution: "tmex@npm:1.0.8" @@ -20201,13 +19223,6 @@ __metadata: languageName: node linkType: hard -"tmpl@npm:1.0.5": - version: 1.0.5 - resolution: "tmpl@npm:1.0.5" - checksum: 10/cd922d9b853c00fe414c5a774817be65b058d54a2d01ebb415840960406c669a0fc632f66df885e24cb022ec812739199ccbdb8d1164c3e513f85bfca5ab2873 - languageName: node - linkType: hard - "to-regex-range@npm:^5.0.1": version: 5.0.1 resolution: "to-regex-range@npm:5.0.1" @@ -20255,7 +19270,7 @@ __metadata: languageName: node linkType: hard -"tough-cookie@npm:^4.1.2, tough-cookie@npm:^4.1.3": +"tough-cookie@npm:^4.1.3": version: 4.1.4 resolution: "tough-cookie@npm:4.1.4" dependencies: @@ -20267,6 +19282,15 @@ __metadata: languageName: node linkType: hard +"tough-cookie@npm:^5.0.0": + version: 5.1.2 + resolution: "tough-cookie@npm:5.1.2" + dependencies: + tldts: "npm:^6.1.32" + checksum: 10/de430e6e6d34b794137e05b8ac2aa6b74ebbe6cdceb4126f168cf1e76101162a4b2e0e7587c3b70e728bd8654fc39958b2035be7619ee6f08e7257610ba4cd04 + languageName: node + linkType: hard + "tr46@npm:^5.0.0": version: 5.0.0 resolution: "tr46@npm:5.0.0" @@ -20468,13 +19492,6 @@ __metadata: languageName: node linkType: hard -"type-detect@npm:4.0.8": - version: 4.0.8 - resolution: "type-detect@npm:4.0.8" - checksum: 10/5179e3b8ebc51fce1b13efb75fdea4595484433f9683bbc2dca6d99789dba4e602ab7922d2656f2ce8383987467f7770131d4a7f06a26287db0615d2f4c4ce7d - languageName: node - linkType: hard - "type-fest@npm:^0.18.0": version: 0.18.1 resolution: "type-fest@npm:0.18.1" @@ -21092,17 +20109,6 @@ __metadata: languageName: node linkType: hard -"v8-to-istanbul@npm:^9.0.1": - version: 9.0.1 - resolution: "v8-to-istanbul@npm:9.0.1" - dependencies: - "@jridgewell/trace-mapping": "npm:^0.3.12" - "@types/istanbul-lib-coverage": "npm:^2.0.1" - convert-source-map: "npm:^1.6.0" - checksum: 10/0bbaffbb344af7172884a6f9868fa55df96230caf7100fa250b63d95ad0e24848141b35731d16607ae0d0023baa064b75c8e4197f6071f3bd3b09540c98490a1 - languageName: node - linkType: hard - "validate-npm-package-license@npm:3.0.4, validate-npm-package-license@npm:^3.0.1, validate-npm-package-license@npm:^3.0.4": version: 3.0.4 resolution: "validate-npm-package-license@npm:3.0.4" @@ -21167,6 +20173,21 @@ __metadata: languageName: node linkType: hard +"vite-node@npm:3.0.7": + version: 3.0.7 + resolution: "vite-node@npm:3.0.7" + dependencies: + cac: "npm:^6.7.14" + debug: "npm:^4.4.0" + es-module-lexer: "npm:^1.6.0" + pathe: "npm:^2.0.3" + vite: "npm:^5.0.0 || ^6.0.0" + bin: + vite-node: vite-node.mjs + checksum: 10/abbeb0731e4922664bbd2a81a3cd83de9382e571ce8186050200b8e8fc384b1c00e92c26cfe2ec15769b3a944eca5a4e930a53c9c6dad998993858c2fd59eccd + languageName: node + linkType: hard + "vite-plugin-checker@npm:^0.9.0": version: 0.9.0 resolution: "vite-plugin-checker@npm:0.9.0" @@ -21214,7 +20235,7 @@ __metadata: languageName: node linkType: hard -"vite@npm:^6.2.0": +"vite@npm:^5.0.0 || ^6.0.0, vite@npm:^6.2.0": version: 6.2.0 resolution: "vite@npm:6.2.0" dependencies: @@ -21266,6 +20287,59 @@ __metadata: languageName: node linkType: hard +"vitest@npm:^3.0.7": + version: 3.0.7 + resolution: "vitest@npm:3.0.7" + dependencies: + "@vitest/expect": "npm:3.0.7" + "@vitest/mocker": "npm:3.0.7" + "@vitest/pretty-format": "npm:^3.0.7" + "@vitest/runner": "npm:3.0.7" + "@vitest/snapshot": "npm:3.0.7" + "@vitest/spy": "npm:3.0.7" + "@vitest/utils": "npm:3.0.7" + chai: "npm:^5.2.0" + debug: "npm:^4.4.0" + expect-type: "npm:^1.1.0" + magic-string: "npm:^0.30.17" + pathe: "npm:^2.0.3" + std-env: "npm:^3.8.0" + tinybench: "npm:^2.9.0" + tinyexec: "npm:^0.3.2" + tinypool: "npm:^1.0.2" + tinyrainbow: "npm:^2.0.0" + vite: "npm:^5.0.0 || ^6.0.0" + vite-node: "npm:3.0.7" + why-is-node-running: "npm:^2.3.0" + peerDependencies: + "@edge-runtime/vm": "*" + "@types/debug": ^4.1.12 + "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 + "@vitest/browser": 3.0.7 + "@vitest/ui": 3.0.7 + happy-dom: "*" + jsdom: "*" + peerDependenciesMeta: + "@edge-runtime/vm": + optional: true + "@types/debug": + 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: 10/7966bda8b02a6628c5bdc47754d4301a36fd740157084d43d27a24a3b591608c705ab48f5fe16943d8e5cc6a44f15da136c089cd428f0045f339661ce30a6859 + languageName: node + linkType: hard + "vscode-uri@npm:^3.1.0": version: 3.1.0 resolution: "vscode-uri@npm:3.1.0" @@ -21273,12 +20347,12 @@ __metadata: languageName: node linkType: hard -"w3c-xmlserializer@npm:^4.0.0": - version: 4.0.0 - resolution: "w3c-xmlserializer@npm:4.0.0" +"w3c-xmlserializer@npm:^5.0.0": + version: 5.0.0 + resolution: "w3c-xmlserializer@npm:5.0.0" dependencies: - xml-name-validator: "npm:^4.0.0" - checksum: 10/9a00c412b5496f4f040842c9520bc0aaec6e0c015d06412a91a723cd7d84ea605ab903965f546b4ecdb3eae267f5145ba08565222b1d6cb443ee488cda9a0aee + xml-name-validator: "npm:^5.0.0" + checksum: 10/d78f59e6b4f924aa53b6dfc56949959229cae7fe05ea9374eb38d11edcec01398b7f5d7a12576bd5acc57ff446abb5c9115cd83b9d882555015437cf858d42f0 languageName: node linkType: hard @@ -21289,15 +20363,6 @@ __metadata: languageName: node linkType: hard -"walker@npm:^1.0.8": - version: 1.0.8 - resolution: "walker@npm:1.0.8" - dependencies: - makeerror: "npm:1.0.12" - checksum: 10/ad7a257ea1e662e57ef2e018f97b3c02a7240ad5093c392186ce0bcf1f1a60bbadd520d073b9beb921ed99f64f065efb63dfc8eec689a80e569f93c1c5d5e16c - languageName: node - linkType: hard - "wcwidth@npm:^1.0.0, wcwidth@npm:^1.0.1": version: 1.0.1 resolution: "wcwidth@npm:1.0.1" @@ -21365,10 +20430,19 @@ __metadata: languageName: node linkType: hard -"whatwg-mimetype@npm:^3.0.0": - version: 3.0.0 - resolution: "whatwg-mimetype@npm:3.0.0" - checksum: 10/96f9f628c663c2ae05412c185ca81b3df54bcb921ab52fe9ebc0081c1720f25d770665401eb2338ab7f48c71568133845638e18a81ed52ab5d4dcef7d22b40ef +"whatwg-encoding@npm:^3.1.1": + version: 3.1.1 + resolution: "whatwg-encoding@npm:3.1.1" + dependencies: + iconv-lite: "npm:0.6.3" + checksum: 10/bbef815eb67f91487c7f2ef96329743f5fd8357d7d62b1119237d25d41c7e452dff8197235b2d3c031365a17f61d3bb73ca49d0ed1582475aa4a670815e79534 + languageName: node + linkType: hard + +"whatwg-mimetype@npm:^4.0.0": + version: 4.0.0 + resolution: "whatwg-mimetype@npm:4.0.0" + checksum: 10/894a618e2d90bf444b6f309f3ceb6e58cf21b2beaa00c8b333696958c4076f0c7b30b9d33413c9ffff7c5832a0a0c8569e5bb347ef44beded72aeefd0acd62e8 languageName: node linkType: hard @@ -21464,6 +20538,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: 10/0de6e6cd8f2f94a8b5ca44e84cf1751eadcac3ebedcdc6e5fbbe6c8011904afcbc1a2777c53496ec02ced7b81f2e7eda61e76bf8262a8bc3ceaa1f6040508051 + languageName: node + linkType: hard + "wide-align@npm:1.1.5, wide-align@npm:^1.1.2": version: 1.1.5 resolution: "wide-align@npm:1.1.5" @@ -21617,16 +20703,6 @@ __metadata: languageName: node linkType: hard -"write-file-atomic@npm:^4.0.2": - version: 4.0.2 - resolution: "write-file-atomic@npm:4.0.2" - dependencies: - imurmurhash: "npm:^0.1.4" - signal-exit: "npm:^3.0.7" - checksum: 10/3be1f5508a46c190619d5386b1ac8f3af3dbe951ed0f7b0b4a0961eed6fc626bd84b50cf4be768dabc0a05b672f5d0c5ee7f42daa557b14415d18c3a13c7d246 - languageName: node - linkType: hard - "write-json-file@npm:^3.2.0": version: 3.2.0 resolution: "write-json-file@npm:3.2.0" @@ -21652,7 +20728,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:8.18.0, ws@npm:^8.11.0": +"ws@npm:8.18.0": version: 8.18.0 resolution: "ws@npm:8.18.0" peerDependencies: @@ -21667,10 +20743,25 @@ __metadata: languageName: node linkType: hard -"xml-name-validator@npm:^4.0.0": - version: 4.0.0 - resolution: "xml-name-validator@npm:4.0.0" - checksum: 10/f9582a3f281f790344a471c207516e29e293c6041b2c20d84dd6e58832cd7c19796c47e108fd4fd4b164a5e72ad94f2268f8ace8231cde4a2c6428d6aa220f92 +"ws@npm:^8.18.0": + version: 8.18.1 + resolution: "ws@npm:8.18.1" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 10/3f38e9594f2af5b6324138e86b74df7d77bbb8e310bf8188679dd80bac0d1f47e51536a1923ac3365f31f3d8b25ea0b03e4ade466aa8292a86cd5defca64b19b + languageName: node + linkType: hard + +"xml-name-validator@npm:^5.0.0": + version: 5.0.0 + resolution: "xml-name-validator@npm:5.0.0" + checksum: 10/43f30f3f6786e406dd665acf08cd742d5f8a46486bd72517edb04b27d1bcd1599664c2a4a99fc3f1e56a3194bff588b12f178b7972bc45c8047bdc4c3ac8d4a1 languageName: node linkType: hard @@ -21739,7 +20830,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:17.7.2, yargs@npm:^17.3.1, yargs@npm:^17.6.2, yargs@npm:^17.7.2": +"yargs@npm:17.7.2, yargs@npm:^17.6.2, yargs@npm:^17.7.2": version: 17.7.2 resolution: "yargs@npm:17.7.2" dependencies: