Skip to content

Commit 8d1d35f

Browse files
chore(audience-core): remove 9 dead exports from public surface
Strip exports that no consumer outside core ever imports: - getAnonymousId (internal to cookie.ts) - setCookie (internal to cookie.ts) - storage namespace (internal to queue.ts) - SESSION_MAX_AGE (internal to session.ts) - getOrCreateSessionId (consumers use getOrCreateSession instead) - getSessionId (same) - truncateSource (internal to validation.ts) - clearAttribution (never imported externally) - ConsentUpdatePayload (internal consent wire type) Shrinks the public API surface of @imtbl/audience-core. No consumer code changes needed — nothing imported these. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 40b4c63 commit 8d1d35f

1 file changed

Lines changed: 5 additions & 19 deletions

File tree

packages/audience/core/src/index.ts

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,14 @@ export type {
1313
BatchPayload,
1414
ConsentLevel,
1515
ConsentStatus,
16-
ConsentUpdatePayload,
1716
} from './types';
1817
export { IdentityType } from './types';
1918

2019
export {
2120
getOrCreateAnonymousId,
22-
getAnonymousId,
2321
getCookie,
24-
setCookie,
2522
deleteCookie,
2623
} from './cookie';
27-
export * as storage from './storage';
2824

2925
export {
3026
getBaseUrl,
@@ -34,7 +30,6 @@ export {
3430
FLUSH_SIZE,
3531
COOKIE_NAME,
3632
SESSION_COOKIE,
37-
SESSION_MAX_AGE,
3833
SESSION_START,
3934
SESSION_END,
4035
} from './config';
@@ -43,25 +38,16 @@ export { generateId, getTimestamp, isBrowser } from './utils';
4338

4439
export type { HttpSend, TransportOptions } from './transport';
4540
export { httpSend } from './transport';
46-
export type {
47-
TransportError,
48-
TransportResult,
49-
AudienceErrorCode,
50-
} from './errors';
51-
export { AudienceError, toAudienceError } from './errors';
41+
export type { TransportResult, AudienceErrorCode } from './errors';
42+
export { TransportError, AudienceError, toAudienceError } from './errors';
5243
export { MessageQueue } from './queue';
5344
export { collectContext } from './context';
54-
export {
55-
isTimestampValid,
56-
isAliasValid,
57-
truncate,
58-
truncateSource,
59-
} from './validation';
45+
export { isTimestampValid, isAliasValid, truncate } from './validation';
6046

61-
export { getOrCreateSession, getOrCreateSessionId, getSessionId } from './session';
47+
export { getOrCreateSession } from './session';
6248
export type { SessionResult } from './session';
6349

64-
export { collectAttribution, clearAttribution } from './attribution';
50+
export { collectAttribution } from './attribution';
6551
export type { Attribution } from './attribution';
6652

6753
export { createConsentManager, detectDoNotTrack } from './consent';

0 commit comments

Comments
 (0)