From a61f74bdf3273b35db09deeff51d82eb63ba8657 Mon Sep 17 00:00:00 2001 From: Benjamin Jordan Date: Mon, 14 Oct 2024 12:29:05 -0500 Subject: [PATCH] renaming all packages --- benchmarks/README.md | 8 ++++---- benchmarks/package.json | 10 +++++----- benchmarks/src/js.ts | 4 ++-- benchmarks/src/series.ts | 8 ++++---- benchmarks/src/wasm.ts | 3 +-- browser/package.json | 6 +++--- browser/src/MemoryAnalyticsStore.ts | 2 +- browser/test/Integration.test.ts | 2 +- browser/test/MemoryAnalyticsStore.test.ts | 2 +- browser/test/Persistence.test.ts | 2 +- browser/vitest.config.ts | 2 +- compat/package.json | 8 ++++---- compat/test/index.test.ts | 8 ++++---- compat/vitest.config.ts | 8 ++++---- core/package.json | 2 +- knex/package.json | 4 ++-- knex/src/KnexAnalyticsStore.ts | 3 +-- knex/vitest.config.ts | 2 +- pg/package.json | 6 +++--- pg/src/AnalyticsSerializer.ts | 2 +- pg/src/PostgresAnalyticsStore.ts | 5 ++--- pg/test/AnalyticsStore.spec.ts | 2 +- pg/test/Integration.spec.ts | 2 +- pg/vitest.config.ts | 2 +- 24 files changed, 50 insertions(+), 53 deletions(-) diff --git a/benchmarks/README.md b/benchmarks/README.md index 61ed7cf..55c5977 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -5,10 +5,10 @@ The code in this directory measures performance characteristics of the in-memory ##### Development Prereqs ``` -pnpm link --global document-analytics-core -pnpm link --global document-analytics-knex -pnpm link --global document-analytics-memory -pnpm link --global document-analytics-pg +pnpm link --global @powerhouse/analytics-engine-core +pnpm link --global @powerhouse/analytics-engine-knex +pnpm link --global @powerhouse/analytics-engine-browser +pnpm link --global @powerhouse/analytics-engine-pg pnpm install ``` diff --git a/benchmarks/package.json b/benchmarks/package.json index f4fb405..8166546 100644 --- a/benchmarks/package.json +++ b/benchmarks/package.json @@ -1,5 +1,5 @@ { - "name": "document-model-benchmarks", + "name": "benchmarks", "version": "0.1.0", "type": "module", "scripts": { @@ -9,10 +9,10 @@ "test-raw": "pnpm build && PG_CONNECTION_STRING=postgresql://postgres:password@localhost:5555/analytics node ./dist/raw.js" }, "dependencies": { - "document-analytics-core": "0.1.0", - "document-analytics-knex": "0.1.0", - "document-analytics-memory": "0.1.0", - "document-analytics-pg": "0.1.0", + "@powerhouse/analytics-engine-core": "0.1.0", + "@powerhouse/analytics-engine-knex": "0.1.0", + "@powerhouse/analytics-engine-browser": "0.1.0", + "@powerhouse/analytics-engine-pg": "0.1.0", "knex": "^3.1.0", "luxon": "^3.5.0", "pg": "^8.13.0", diff --git a/benchmarks/src/js.ts b/benchmarks/src/js.ts index 1e8cc92..3906f7d 100644 --- a/benchmarks/src/js.ts +++ b/benchmarks/src/js.ts @@ -1,8 +1,8 @@ import fs from "fs"; import { DateTime } from "luxon"; -import { MemoryAnalyticsStore } from "document-analytics-memory"; +import { MemoryAnalyticsStore } from "@powerhouse/analytics-engine-browser"; import { Bench } from "tinybench"; -import { AnalyticsPath } from "document-analytics-core"; +import { AnalyticsPath } from "@powerhouse/analytics-engine-core"; import { queryLogger, resultsLogger } from "./util.js"; // first, load the data diff --git a/benchmarks/src/series.ts b/benchmarks/src/series.ts index 83e5f93..298e3f4 100644 --- a/benchmarks/src/series.ts +++ b/benchmarks/src/series.ts @@ -1,15 +1,15 @@ import fs from "fs"; import { DateTime } from "luxon"; import { Bench } from "tinybench"; -import { AnalyticsPath } from "document-analytics-core"; +import { AnalyticsPath } from "@powerhouse/analytics-engine-core"; import { logs, queryLogger, resultsLogger } from "./util.js"; import { KnexQueryExecutor, PostgresAnalyticsStore, -} from "document-analytics-pg"; -import { MemoryAnalyticsStore } from "document-analytics-memory"; +} from "@powerhouse/analytics-engine-pg"; +import { MemoryAnalyticsStore } from "@powerhouse/analytics-engine-browser"; -// todo: export these from document-analytics-pg +// todo: export these from @powerhouse/analytics-engine-pg const passthroughProfiler = () => ({ prefix: "", push: (system: string) => {}, diff --git a/benchmarks/src/wasm.ts b/benchmarks/src/wasm.ts index 3b08d6f..26e5a52 100644 --- a/benchmarks/src/wasm.ts +++ b/benchmarks/src/wasm.ts @@ -1,7 +1,6 @@ import fs from "fs"; -import { MemoryAnalyticsStore } from "document-analytics-memory"; +import { MemoryAnalyticsStore } from "@powerhouse/analytics-engine-browser"; import { Bench, Task } from "tinybench"; -import { beforeEach } from "node:test"; import { logs } from "./util.js"; // first, load the data diff --git a/browser/package.json b/browser/package.json index 07a18ed..4e372a9 100644 --- a/browser/package.json +++ b/browser/package.json @@ -1,5 +1,5 @@ { - "name": "document-analytics-memory", + "name": "@powerhouse/analytics-engine-browser", "version": "0.1.0", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -14,8 +14,8 @@ }, "dependencies": { "date-fns": "^3.6.0", - "document-analytics-core": "0.1.0", - "document-analytics-knex": "0.1.0", + "@powerhouse/analytics-engine-core": "0.1.0", + "@powerhouse/analytics-engine-knex": "0.1.0", "events": "^3.3.0", "knex": "^3.1.0", "luxon": "^3.5.0", diff --git a/browser/src/MemoryAnalyticsStore.ts b/browser/src/MemoryAnalyticsStore.ts index d061f62..3e3d623 100644 --- a/browser/src/MemoryAnalyticsStore.ts +++ b/browser/src/MemoryAnalyticsStore.ts @@ -6,7 +6,7 @@ import fs from "fs"; import { KnexAnalyticsStore, IKnexQueryExecutor, -} from "document-analytics-knex"; +} from "@powerhouse/analytics-engine-knex"; // this is awful, but needed for wa-sqlite to load from file:/// because fetch // cannot load file:/// paths diff --git a/browser/test/Integration.test.ts b/browser/test/Integration.test.ts index b93b6b2..98e77f1 100644 --- a/browser/test/Integration.test.ts +++ b/browser/test/Integration.test.ts @@ -6,7 +6,7 @@ import { AnalyticsGranularity, AnalyticsQuery, GroupedPeriodResults, -} from "document-analytics-core"; +} from "@powerhouse/analytics-engine-core"; import { MemoryAnalyticsStore } from "../src/MemoryAnalyticsStore"; let store: MemoryAnalyticsStore; diff --git a/browser/test/MemoryAnalyticsStore.test.ts b/browser/test/MemoryAnalyticsStore.test.ts index 38a10bd..d498187 100644 --- a/browser/test/MemoryAnalyticsStore.test.ts +++ b/browser/test/MemoryAnalyticsStore.test.ts @@ -1,5 +1,5 @@ import { DateTime } from "luxon"; -import { AnalyticsDimension, AnalyticsPath } from "document-analytics-core"; +import { AnalyticsDimension, AnalyticsPath } from "@powerhouse/analytics-engine-core"; import { MemoryAnalyticsStore } from "../src/MemoryAnalyticsStore.js"; import { afterAll, beforeAll, it, expect } from "vitest"; diff --git a/browser/test/Persistence.test.ts b/browser/test/Persistence.test.ts index 8b776bf..7aad393 100644 --- a/browser/test/Persistence.test.ts +++ b/browser/test/Persistence.test.ts @@ -1,5 +1,5 @@ import { DateTime } from "luxon"; -import { AnalyticsDimension, AnalyticsPath } from "document-analytics-core"; +import { AnalyticsDimension, AnalyticsPath } from "@powerhouse/analytics-engine-core"; import { MemoryAnalyticsStore, MemoryStoreOptions, diff --git a/browser/vitest.config.ts b/browser/vitest.config.ts index 43ee1fa..a475306 100644 --- a/browser/vitest.config.ts +++ b/browser/vitest.config.ts @@ -11,7 +11,7 @@ export default defineConfig({ testTimeout: 5000, server: { deps: { - inline: ["document-analytics-core", "events"], + inline: ["@powerhouse/analytics-engine-core", "events"], }, }, setupFiles: "./test/vitest.setup.ts", diff --git a/compat/package.json b/compat/package.json index 7f3cebe..7aa2f01 100644 --- a/compat/package.json +++ b/compat/package.json @@ -5,10 +5,10 @@ "test": "PG_CONNECTION_STRING=postgresql://postgres:password@localhost:5555/analytics vitest" }, "dependencies": { - "document-analytics-core": "0.1.0", - "document-analytics-knex": "0.1.0", - "document-analytics-memory": "0.1.0", - "document-analytics-pg": "0.1.0", + "@powerhouse/analytics-engine-core": "0.1.0", + "@powerhouse/analytics-engine-knex": "0.1.0", + "@powerhouse/analytics-engine-memory": "0.1.0", + "@powerhouse/analytics-engine-pg": "0.1.0", "knex": "^3.1.0", "luxon": "^3.5.0", "pg": "^8.13.0" diff --git a/compat/test/index.test.ts b/compat/test/index.test.ts index fc13f9f..e83c75c 100644 --- a/compat/test/index.test.ts +++ b/compat/test/index.test.ts @@ -1,11 +1,11 @@ import fs from "fs"; import { DateTime } from "luxon"; -import { AnalyticsPath } from "document-analytics-core"; +import { AnalyticsPath } from "@powerhouse/analytics-engine-core"; import { KnexQueryExecutor, PostgresAnalyticsStore, -} from "document-analytics-pg"; -import { MemoryAnalyticsStore } from "document-analytics-memory"; +} from "@powerhouse/analytics-engine-pg"; +import { MemoryAnalyticsStore } from "@powerhouse/analytics-engine-memory"; import { afterAll, beforeAll, it, expect, describe } from "vitest"; const connectionString = process.env.PG_CONNECTION_STRING; @@ -16,7 +16,7 @@ if (!connectionString) { let postgres: PostgresAnalyticsStore; let memory: MemoryAnalyticsStore; -// todo: export these from document-analytics-pg +// todo: export these from @powerhouse/analytics-engine-pg const passthroughProfiler = () => ({ prefix: "", push: (system: string) => {}, diff --git a/compat/vitest.config.ts b/compat/vitest.config.ts index f54feb5..e074cfc 100644 --- a/compat/vitest.config.ts +++ b/compat/vitest.config.ts @@ -7,10 +7,10 @@ export default defineConfig({ server: { deps: { inline: [ - "document-analytics-core", - "document-analytics-knex", - "document-analytics-pg", - "document-analytics-memory", + "@powerhouse/analytics-engine-core", + "@powerhouse/analytics-engine-knex", + "@powerhouse/analytics-engine-pg", + "@powerhouse/analytics-engine-memory", ], }, }, diff --git a/core/package.json b/core/package.json index a5cee49..e194a9a 100644 --- a/core/package.json +++ b/core/package.json @@ -1,5 +1,5 @@ { - "name": "document-analytics-core", + "name": "@powerhouse/analytics-engine-core", "version": "0.1.0", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/knex/package.json b/knex/package.json index e26b961..95ed354 100644 --- a/knex/package.json +++ b/knex/package.json @@ -1,5 +1,5 @@ { - "name": "document-analytics-knex", + "name": "@powerhouse/analytics-engine-knex", "version": "0.1.0", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -17,7 +17,7 @@ "@types/node": "^22.4.2", "@types/pg": "^8.11.6", "date-fns": "^3.6.0", - "document-analytics-core": "0.1.0", + "@powerhouse/analytics-engine-core": "0.1.0", "knex": "^3.1.0", "luxon": "^3.5.0", "pg": "^8.12.0" diff --git a/knex/src/KnexAnalyticsStore.ts b/knex/src/KnexAnalyticsStore.ts index 4ef3c35..73f53b2 100644 --- a/knex/src/KnexAnalyticsStore.ts +++ b/knex/src/KnexAnalyticsStore.ts @@ -6,9 +6,8 @@ import { AnalyticsSeriesInput, AnalyticsSeriesQuery, AnalyticsDimension, - IAnalyticsProfiler, IAnalyticsStore, -} from "document-analytics-core"; +} from "@powerhouse/analytics-engine-core"; function toPascalCase(str: string) { return str diff --git a/knex/vitest.config.ts b/knex/vitest.config.ts index d7d8ace..6affbaa 100644 --- a/knex/vitest.config.ts +++ b/knex/vitest.config.ts @@ -6,7 +6,7 @@ export default defineConfig({ testTimeout: 5000, server: { deps: { - inline: ["document-analytics-core"], + inline: ["@powerhouse/analytics-engine-core"], }, }, setupFiles: "./test/vitest.setup.ts", diff --git a/pg/package.json b/pg/package.json index 591dbf3..bf3f73c 100644 --- a/pg/package.json +++ b/pg/package.json @@ -1,5 +1,5 @@ { - "name": "document-analytics-pg", + "name": "@powerhouse/analytics-engine-pg", "version": "0.1.0", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -14,8 +14,8 @@ }, "dependencies": { "date-fns": "^3.6.0", - "document-analytics-core": "0.1.0", - "document-analytics-knex": "0.1.0", + "@powerhouse/analytics-engine-core": "0.1.0", + "@powerhouse/analytics-engine-knex": "0.1.0", "knex": "^3.1.0", "luxon": "^3.5.0", "pg": "^8.13.0" diff --git a/pg/src/AnalyticsSerializer.ts b/pg/src/AnalyticsSerializer.ts index 19c9e85..b989d24 100644 --- a/pg/src/AnalyticsSerializer.ts +++ b/pg/src/AnalyticsSerializer.ts @@ -3,7 +3,7 @@ import { AnalyticsPathSegment, AnalyticsPeriod, AnalyticsSerializerTypes, -} from "document-analytics-core"; +} from "@powerhouse/analytics-engine-core"; export function reviver(k: any, v: any) { if (v instanceof Object && v._t === AnalyticsSerializerTypes.AnalyticsPath) { diff --git a/pg/src/PostgresAnalyticsStore.ts b/pg/src/PostgresAnalyticsStore.ts index 142fb72..a11dda5 100644 --- a/pg/src/PostgresAnalyticsStore.ts +++ b/pg/src/PostgresAnalyticsStore.ts @@ -1,9 +1,8 @@ import knexFactory, { Knex } from "knex"; import pkg from "pg"; import { reviver } from "./AnalyticsSerializer.js"; -import { KnexAnalyticsStore } from "document-analytics-knex"; -import { IKnexQueryExecutor } from "document-analytics-knex"; -import { IAnalyticsProfiler } from "document-analytics-core"; +import { KnexAnalyticsStore, IKnexQueryExecutor } from "@powerhouse/analytics-engine-knex"; +import { IAnalyticsProfiler } from "@powerhouse/analytics-engine-core"; const { types } = pkg; types.setTypeParser(types.builtins.DATE, (value: string) => value); diff --git a/pg/test/AnalyticsStore.spec.ts b/pg/test/AnalyticsStore.spec.ts index 56b0112..bb60abc 100644 --- a/pg/test/AnalyticsStore.spec.ts +++ b/pg/test/AnalyticsStore.spec.ts @@ -1,5 +1,5 @@ import { DateTime } from "luxon"; -import { AnalyticsDimension, AnalyticsPath } from "document-analytics-core"; +import { AnalyticsDimension, AnalyticsPath } from "@powerhouse/analytics-engine-core"; import { KnexQueryExecutor, PostgresAnalyticsStore, diff --git a/pg/test/Integration.spec.ts b/pg/test/Integration.spec.ts index 8af8278..650516c 100644 --- a/pg/test/Integration.spec.ts +++ b/pg/test/Integration.spec.ts @@ -6,7 +6,7 @@ import { AnalyticsGranularity, AnalyticsQuery, GroupedPeriodResults, -} from "document-analytics-core"; +} from "@powerhouse/analytics-engine-core"; import { KnexQueryExecutor, PostgresAnalyticsStore, diff --git a/pg/vitest.config.ts b/pg/vitest.config.ts index cfa5a85..fe6e36c 100644 --- a/pg/vitest.config.ts +++ b/pg/vitest.config.ts @@ -6,7 +6,7 @@ export default defineConfig({ testTimeout: 5000, server: { deps: { - inline: ["document-analytics-core", "document-analytics-knex"], + inline: ["@powerhouse/analytics-engine-core", "@powerhouse/analytics-engine-knex"], }, }, setupFiles: "./test/vitest.setup.ts",