Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion DEPENDENCY-AUDIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,18 @@ Keep those on their last CJS major and patch to latest-in-major. No ESM conversi
`legacy-peer-deps` (no longer needed — bunyan-category's `@types/bunyan` peer was the cause).
Prod vulns 7 → **4**. 72 tests green, build clean.
5. **Phase 2** — Apollo + graphql (TD-9488 core). Verified by step 1's nock tests.
6. **Phase 1a / Phase 3** — tooling + CLI fleet (follow-up, post-Nov-1 if needed).
6. **Phase 1a** — ✅ **DONE** (promoted ahead of Phase 2 — Apollo 3 types need modern TS).
`typescript 3.8 → 5.9` (the `^5.5` range resolves to 5.9.x), `@types/node 13 → 22`,
`jest/@types/jest 27 → 30` + `ts-jest 27 → 29` (ts-jest's peer range covers jest 30),
`@typescript-eslint 5 → 8`, `eslint 8.8 → 8.57` (stayed 8.x — no flat-config churn),
`eslint-plugin-jest 23 → 28`, `eslint-config-prettier 6 → 9` (dropped removed
`prettier/@typescript-eslint`). v8 rules `no-explicit-any` / `no-require-imports` /
`no-unused-vars` pinned to `warn`, with `--max-warnings` on the lint script so the
current count is a ratchet (new violations fail). Also bumps `pino 8 → 10` and
`nock 11 → 14` now that TS 5.9 parses their types. 75 tests green,
lint 0 errors, baseline regenerated under TS 5 (emission-style only). Total audit 44 → 35.
7. **Phase 2** — Apollo 2 → **@apollo/client 3** + graphql 14 → 16 (next).
8. **Phase 3** — CLI fleet (chalk/node-fetch/inquirer patch) — follow-up.

### 4a. Yarn → npm migration
- Delete `yarn.lock`; generate `package-lock.json` (`npm install`).
Expand Down
24 changes: 12 additions & 12 deletions PUBLIC-API.baseline.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface QueryResult {
* so consumers can continue passing their existing logger. Each method accepts
* either `(msg)` or `(mergeObject, msg)`, matching both bunyan and pino.
*/
export declare type LogFn = (objOrMsg: unknown, msg?: string) => void;
export type LogFn = (objOrMsg: unknown, msg?: string) => void;
export interface Logger {
trace(objOrMsg: unknown, msg?: string): void;
debug(objOrMsg: unknown, msg?: string): void;
Expand Down Expand Up @@ -78,7 +78,7 @@ export declare enum SyncJobStatus {
ERROR_BAD_DATA = "ERROR_BAD_DATA",
ERROR_UNEXPECTED_FAILURE = "ERROR_UNEXPECTED_FAILURE"
}
export declare type SyncJob = {
export type SyncJob = {
source: SyncJobSources;
scope: string;
accountId: string;
Expand Down Expand Up @@ -122,7 +122,7 @@ export declare type SyncJob = {
numMappedRelationshipDeleteErrors: number;
syncMode: SyncJobModes;
};
export declare type SyncJobOptions = {
export type SyncJobOptions = {
source?: SyncJobSources;
scope?: string;
syncMode?: string;
Expand All @@ -136,25 +136,25 @@ export declare enum SyncJobModes {
DIFF = "DIFF",
CREATE_OR_UPDATE = "CREATE_OR_UPDATE"
}
export declare type SyncJobResponse = {
export type SyncJobResponse = {
job: SyncJob;
};
export declare type PublishEventsResponse = {
export type PublishEventsResponse = {
events: Array<{
id: string;
name: string;
description: string;
createDate: number;
}>;
};
export declare type ObjectDeletion = {
export type ObjectDeletion = {
_id: string;
};
export declare type GraphObjectDeletionPayload = {
export type GraphObjectDeletionPayload = {
deleteEntities: ObjectDeletion[];
deleteRelationships: ObjectDeletion[];
};
export declare type SyncJobResult = {
export type SyncJobResult = {
syncJobId: string;
finalizeResult: SyncJobResponse;
};
Expand Down Expand Up @@ -199,10 +199,10 @@ export declare class JupiterOneClient {
list: () => Promise<QueryTypes.QueryResults<IntegrationDefinition>>;
};
integrationInstances: {
list: <TConfig>(options?: ListIntegrationInstancesOptions) => Promise<QueryTypes.QueryResults<IntegrationInstance<unknown>>>;
get: <TConfig_1>(id: string) => Promise<IntegrationInstance<TConfig_1>>;
create: <TConfig_2>(instance: Pick<IntegrationInstance<TConfig_2>, "name" | "description" | "config" | "integrationDefinitionId" | "offsiteComplete" | "pollingInterval" | "pollingIntervalCronExpression">) => Promise<IntegrationInstance<TConfig_2>>;
update: <TConfig_3>(id: string, update: Partial<Pick<IntegrationInstance<TConfig_3>, "name" | "description" | "config" | "offsiteComplete" | "pollingInterval" | "pollingIntervalCronExpression">>) => Promise<IntegrationInstance<TConfig_3>>;
list: <TConfig>(options?: ListIntegrationInstancesOptions) => Promise<QueryTypes.QueryResults<IntegrationInstance>>;
get: <TConfig>(id: string) => Promise<IntegrationInstance<TConfig>>;
create: <TConfig>(instance: Omit<IntegrationInstance<TConfig>, "id" | "accountId">) => Promise<IntegrationInstance<TConfig>>;
update: <TConfig>(id: string, update: Partial<Omit<IntegrationInstance<TConfig>, "id" | "accountId" | "integrationDefinitionId">>) => Promise<IntegrationInstance<TConfig>>;
delete: (id: string) => Promise<{
success?: boolean;
}>;
Expand Down
4 changes: 3 additions & 1 deletion PUBLIC-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ changelog note.
> npm run build # emits dist/index.d.ts
> diff PUBLIC-API.baseline.d.ts dist/index.d.ts # must be empty, OR every diff consciously approved
> ```
> `PUBLIC-API.baseline.d.ts` = the generated `.d.ts` snapshot at v2.1.2 (235 lines).
> `PUBLIC-API.baseline.d.ts` = the generated `.d.ts` snapshot (regenerated under TS 5 in
> Phase 1a — emission-style only: `export type` vs `export declare type`, `<TConfig>` vs
> `<TConfig_1>`, symbolic `Omit<…>` vs TS-3.8's expanded `Pick<…>`. Semantically identical).
> Expected intentional diffs under the upgrade: the import sources on lines 1-3
> (`apollo-client`→`@apollo/client`, `node-fetch` type path). Any OTHER diff = unplanned break.

Expand Down
Loading
Loading