Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Sneh1999 committed Dec 15, 2023
1 parent f507a19 commit ff68691
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
6 changes: 5 additions & 1 deletion packages/cookie-manager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

## 1.1.0 (12/14/2023)

Support retention durations for Cookies in the config and category level
- Updated cookie config to include retention durations at both category and cookie levels.
- Introduced an optional boolean field `sessionCookie` in cookie config to accommodate session cookies.
- Implemented a setExpiryForCookie hook that adjusts the cookie's expiration in the following manner:
- If the sessionCookie parameter is enabled, the expiry is set to session
- If an expiry is specified at the cookie level, it takes precedence; otherwise, the expiry is derived from the category's expiration setting.

## 1.0.0 (12/7/2023)

Expand Down
4 changes: 2 additions & 2 deletions packages/cookie-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default {
{
id: 'locale',
type: TrackerType.COOKIE,
expiry: new Date('2024-09-29T00:00:00.000Z'),
expiry: 10,
},
],
},
Expand Down Expand Up @@ -163,7 +163,7 @@ You need to specify the retention days for a category using the expiry key as fo
{
id: 'locale',
type: TrackerType.COOKIE,
expiry: new Date('2024-09-29T00:00:00.000Z'),
expiry: 10,
},
],
}
Expand Down
8 changes: 0 additions & 8 deletions packages/cookie-manager/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,3 @@ export const TRACKER_CATEGORIES: Array<TrackingCategory> = [
TrackingCategory.PERFORMANCE,
TrackingCategory.TARGETING,
];

export const CATEGORY_EXPIRATION_DAYS: Record<TrackingCategory, number> = {
[TrackingCategory.NECESSARY]: 365,
[TrackingCategory.FUNCTIONAL]: 365,
[TrackingCategory.PERFORMANCE]: 365,
[TrackingCategory.TARGETING]: 365,
[TrackingCategory.DELETE_IF_SEEN]: 0,
};

0 comments on commit ff68691

Please sign in to comment.