Skip to content

Commit

Permalink
renaming all packages
Browse files Browse the repository at this point in the history
  • Loading branch information
thegoldenmule committed Oct 14, 2024
1 parent ac27084 commit a61f74b
Show file tree
Hide file tree
Showing 24 changed files with 50 additions and 53 deletions.
8 changes: 4 additions & 4 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
10 changes: 5 additions & 5 deletions benchmarks/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "document-model-benchmarks",
"name": "benchmarks",
"version": "0.1.0",
"type": "module",
"scripts": {
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/src/js.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions benchmarks/src/series.ts
Original file line number Diff line number Diff line change
@@ -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) => {},
Expand Down
3 changes: 1 addition & 2 deletions benchmarks/src/wasm.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions browser/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion browser/src/MemoryAnalyticsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion browser/test/Integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion browser/test/MemoryAnalyticsStore.test.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion browser/test/Persistence.test.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion browser/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions compat/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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) => {},
Expand Down
8 changes: 4 additions & 4 deletions compat/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
},
},
Expand Down
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions knex/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions knex/src/KnexAnalyticsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion knex/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions pg/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pg/src/AnalyticsSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 2 additions & 3 deletions pg/src/PostgresAnalyticsStore.ts
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
2 changes: 1 addition & 1 deletion pg/test/AnalyticsStore.spec.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pg/test/Integration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
AnalyticsGranularity,
AnalyticsQuery,
GroupedPeriodResults,
} from "document-analytics-core";
} from "@powerhouse/analytics-engine-core";
import {
KnexQueryExecutor,
PostgresAnalyticsStore,
Expand Down
2 changes: 1 addition & 1 deletion pg/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit a61f74b

Please sign in to comment.