Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
jellizaveta committed Aug 21, 2024
2 parents 5c2f629 + 48ba492 commit bb1f0ce
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic

- support for matching line number in `abort-on-stack-trace` scriptlet
when `inlineScript` or `injectedScript` option is used [#439]
- new values to `set-cookie` and `set-cookie-reload` scriptlets: `checked`, `unchecked` [#444]
- new values to `set-local-storage-item` and `set-session-storage-item` scriptlets:
`allowed`, `denied` [#445]

[Unreleased]: https://github.com/AdguardTeam/Scriptlets/compare/v1.11.16...HEAD
[#439]: https://github.com/AdguardTeam/Scriptlets/issues/439
[#444]: https://github.com/AdguardTeam/Scriptlets/issues/444
[#445]: https://github.com/AdguardTeam/Scriptlets/issues/445

## [v1.11.16] - 2024-08-01
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adguard/scriptlets",
"version": "1.11.20",
"version": "1.11.21",
"description": "AdGuard's JavaScript library of Scriptlets and Redirect resources",
"scripts": {
"build": "babel-node -x .js,.ts scripts/build.js",
Expand Down
2 changes: 2 additions & 0 deletions src/helpers/cookie-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ export const getLimitedCookieValue = (value: string): string | number | null =>
'hidden',
'essential',
'nonessential',
'checked',
'unchecked',
]);

let validValue;
Expand Down
1 change: 1 addition & 0 deletions src/scriptlets/set-cookie-reload.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import {
* - `necessary` / `required`
* - `hide` / `hidden`
* - `essential` / `nonessential`
* - `checked` / `unchecked`
* - `path` — optional, cookie path, defaults to `/`; possible values:
* - `/` — root path
* - `none` — to set no path at all
Expand Down
1 change: 1 addition & 0 deletions src/scriptlets/set-cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import {
* - `necessary` / `required`
* - `hide` / `hidden`
* - `essential` / `nonessential`
* - `checked` / `unchecked`
* - `path` — optional, cookie path, defaults to `/`; possible values:
* - `/` — root path
* - `none` — to set no path at all
Expand Down
2 changes: 2 additions & 0 deletions tests/scriptlets/set-cookie.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ const cookies = [
['__test-cookie_hidden', 'hidden'],
['__test-cookie_essential', 'essential'],
['__test-cookie_nonessential', 'nonessential'],
['__test-cookie_checked', 'checked'],
['__test-cookie_unchecked', 'unchecked'],
];

test.each('Set cookie with valid value', cookies, (assert, [cName, cValue]) => {
Expand Down

0 comments on commit bb1f0ce

Please sign in to comment.