Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump the dev-dependencies group with 7 updates #462

Merged
merged 3 commits into from
Oct 1, 2024
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
4 changes: 2 additions & 2 deletions api/docs/tough-cookie.cookiejar.getcookies_3.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Retrieve the list of cookies that can be sent in a Cookie header for the current
**Signature:**

```typescript
getCookies(url: string | URL, options?: GetCookiesOptions | undefined): Promise<Cookie[]>;
getCookies(url: string | URL, options?: GetCookiesOptions): Promise<Cookie[]>;
```

## Parameters
Expand Down Expand Up @@ -53,7 +53,7 @@ options

</td><td>

[GetCookiesOptions](./tough-cookie.getcookiesoptions.md) \| undefined
[GetCookiesOptions](./tough-cookie.getcookiesoptions.md)


</td><td>
Expand Down
2 changes: 1 addition & 1 deletion api/tough-cookie.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class CookieJar {
getCookies(url: string): Promise<Cookie[]>;
getCookies(url: string, callback: Callback<Cookie[]>): void;
getCookies(url: string | URL, options: GetCookiesOptions | undefined, callback: Callback<Cookie[]>): void;
getCookies(url: string | URL, options?: GetCookiesOptions | undefined): Promise<Cookie[]>;
getCookies(url: string | URL, options?: GetCookiesOptions): Promise<Cookie[]>;
// @internal
getCookies(url: string | URL, options: GetCookiesOptions | undefined | Callback<Cookie[]>, callback?: Callback<Cookie[]>): unknown;
getCookiesSync(url: string, options?: GetCookiesOptions): Cookie[];
Expand Down
8 changes: 4 additions & 4 deletions lib/__tests__/cookieJar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ describe('CookieJar', () => {
'http://other.example.com': ['other=qq; Path=/'],
'http://other.example.com/foo': ['other2=qq; Path=/foo'],
}
for await (const [url, cookies] of Object.entries(cookiesByUrl)) {
for await (const cookie of cookies) {
for (const [url, cookies] of Object.entries(cookiesByUrl)) {
for (const cookie of cookies) {
await cookieJar.setCookie(cookie, url)
}
}
Expand Down Expand Up @@ -995,8 +995,8 @@ describe('CookieJar', () => {
Cookie.parse('foo=bar; Domain=foo.com; Path=/'),
],
}
for await (const [path, cookies] of Object.entries(cookiesByDomain)) {
for await (const cookie of cookies) {
for (const [path, cookies] of Object.entries(cookiesByDomain)) {
for (const cookie of cookies) {
await cookieJar.setCookie(cookie as Cookie, path)
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/__tests__/jarSerialization.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ describe('cookieJar serialization', () => {
// getAllCookies to be exercised.
const paths = ['/', '/foo', '/foo/bar']
const domains = ['example.com', 'www.example.com', 'example.net']
for await (const path of paths) {
for await (const domain of domains) {
for (const path of paths) {
for (const domain of domains) {
const key = 'key'
const value = JSON.stringify({ path, domain })
const cookie = new Cookie({ expires, domain, path, key, value })
Expand Down
7 changes: 2 additions & 5 deletions lib/cookie/cookieJar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ export class CookieJar {
let syncResult: T | undefined = undefined

try {
fn.call(this, (error: Error | null, result?: T | undefined) => {
fn.call(this, (error: Error | null, result?: T) => {
syncErr = error
syncResult = result
})
Expand Down Expand Up @@ -809,10 +809,7 @@ export class CookieJar {
* @param url - The domain to store the cookie with.
* @param options - Configuration settings to use when retrieving the cookies.
*/
getCookies(
url: string | URL,
options?: GetCookiesOptions | undefined,
): Promise<Cookie[]>
getCookies(url: string | URL, options?: GetCookiesOptions): Promise<Cookie[]>
/**
* @internal No doc because this is an overload that supports the implementation
*/
Expand Down
Loading