-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Action changes for API and docs
- Loading branch information
1 parent
b47e1a0
commit fafaf72
Showing
46 changed files
with
3,679 additions
and
3,053 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,81 @@ | ||
name: Actions-CI | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [master, v5] | ||
branches: [master] | ||
pull_request: | ||
branches: [master, v5] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: npm | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run Linter | ||
run: npm run eslint | ||
- name: Run Formatter | ||
run: npm run prettier | ||
|
||
test: | ||
name: Test - ${{ matrix.node-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [latest, lts/*, lts/-1] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js (${{ matrix.node-version }}) | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: npm | ||
- name: Install dependencies and test | ||
run: npm install | ||
- run: npm test | ||
- run: npm run eslint | ||
- run: npm run prettier | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run tests | ||
run: npm test | ||
|
||
api: | ||
name: API & Doc Validation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: npm | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build | ||
run: npm run build | ||
- name: Extract API | ||
run: npm run api:extract | ||
- name: Generate docs | ||
run: npm run api:docs | ||
- name: Ensure API and doc changes have been committed | ||
run: | | ||
git add --renormalize . | ||
if (( "$(git diff --ignore-space-at-eol --ignore-cr-at-eol | wc -l)" != 0 )); then | ||
cat << EOF >> $GITHUB_STEP_SUMMARY | ||
### Detected uncommitted changes | ||
\`\`\`shell | ||
$(git diff) | ||
\`\`\` | ||
EOF | ||
git diff | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,70 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [tough-cookie](./tough-cookie.md) > [CookieJar](./tough-cookie.cookiejar.md) > [(constructor)](./tough-cookie.cookiejar._constructor_.md) | ||
|
||
## CookieJar.(constructor) | ||
|
||
Creates a new `CookieJar` instance. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
constructor(store?: Nullable<Store>, options?: CreateCookieJarOptions | boolean); | ||
``` | ||
|
||
## Parameters | ||
|
||
<table><thead><tr><th> | ||
|
||
Parameter | ||
|
||
|
||
</th><th> | ||
|
||
Type | ||
|
||
|
||
</th><th> | ||
|
||
Description | ||
|
||
|
||
</th></tr></thead> | ||
<tbody><tr><td> | ||
|
||
store | ||
|
||
|
||
</td><td> | ||
|
||
[Nullable](./tough-cookie.nullable.md)<!-- --><[Store](./tough-cookie.store.md)<!-- -->> | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ a custom [Store](./tough-cookie.store.md) implementation (defaults to [MemoryCookieStore](./tough-cookie.memorycookiestore.md)<!-- -->) | ||
|
||
|
||
</td></tr> | ||
<tr><td> | ||
|
||
options | ||
|
||
|
||
</td><td> | ||
|
||
[CreateCookieJarOptions](./tough-cookie.createcookiejaroptions.md) \| boolean | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ configures how cookies are processed by the cookie jar | ||
|
||
|
||
</td></tr> | ||
</tbody></table> | ||
|
||
## Remarks | ||
|
||
- If a custom store is not passed to the constructor, an in-memory store ([MemoryCookieStore](./tough-cookie.memorycookiestore.md) will be created and used. - If a boolean value is passed as the `options` parameter, this is equivalent to passing `{ rejectPublicSuffixes: <value> }` | ||
|
||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [tough-cookie](./tough-cookie.md) > [CookieJar](./tough-cookie.cookiejar.md) > [(constructor)](./tough-cookie.cookiejar._constructor_.md) | ||
|
||
## CookieJar.(constructor) | ||
|
||
Creates a new `CookieJar` instance. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
constructor(store?: Nullable<Store>, options?: CreateCookieJarOptions | boolean); | ||
``` | ||
|
||
## Parameters | ||
|
||
<table><thead><tr><th> | ||
|
||
Parameter | ||
|
||
|
||
</th><th> | ||
|
||
Type | ||
|
||
|
||
</th><th> | ||
|
||
Description | ||
|
||
|
||
</th></tr></thead> | ||
<tbody><tr><td> | ||
|
||
store | ||
|
||
|
||
</td><td> | ||
|
||
[Nullable](./tough-cookie.nullable.md)<!-- --><[Store](./tough-cookie.store.md)<!-- -->> | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ a custom [Store](./tough-cookie.store.md) implementation (defaults to [MemoryCookieStore](./tough-cookie.memorycookiestore.md)<!-- -->) | ||
|
||
|
||
</td></tr> | ||
<tr><td> | ||
|
||
options | ||
|
||
|
||
</td><td> | ||
|
||
[CreateCookieJarOptions](./tough-cookie.createcookiejaroptions.md) \| boolean | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ configures how cookies are processed by the cookie jar | ||
|
||
|
||
</td></tr> | ||
</tbody></table> | ||
|
||
## Remarks | ||
|
||
- If a custom store is not passed to the constructor, an in-memory store ([MemoryCookieStore](./tough-cookie.memorycookiestore.md) will be created and used. - If a boolean value is passed as the `options` parameter, this is equivalent to passing `{ rejectPublicSuffixes: <value> }` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,59 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [tough-cookie](./tough-cookie.md) > [CookieJar](./tough-cookie.cookiejar.md) > [clone](./tough-cookie.cookiejar.clone.md) | ||
|
||
## CookieJar.clone() method | ||
|
||
Produces a deep clone of this CookieJar. Modifications to the original do not affect the clone, and vice versa. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
clone(callback: Callback<CookieJar>): void; | ||
``` | ||
|
||
## Parameters | ||
|
||
<table><thead><tr><th> | ||
|
||
Parameter | ||
|
||
|
||
</th><th> | ||
|
||
Type | ||
|
||
|
||
</th><th> | ||
|
||
Description | ||
|
||
|
||
</th></tr></thead> | ||
<tbody><tr><td> | ||
|
||
callback | ||
|
||
|
||
</td><td> | ||
|
||
[Callback](./tough-cookie.callback.md)<!-- --><[CookieJar](./tough-cookie.cookiejar.md)<!-- -->> | ||
|
||
|
||
</td><td> | ||
|
||
A function to call when the CookieJar is cloned. | ||
|
||
|
||
</td></tr> | ||
</tbody></table> | ||
**Returns:** | ||
|
||
void | ||
|
||
## Remarks | ||
|
||
- When no [Store](./tough-cookie.store.md) is provided, a new [MemoryCookieStore](./tough-cookie.memorycookiestore.md) will be used. | ||
|
||
- Transferring between store types is supported so long as the source implements `.getAllCookies()` and the destination implements `.putCookie()`<!-- -->. | ||
|
||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [tough-cookie](./tough-cookie.md) > [CookieJar](./tough-cookie.cookiejar.md) > [clone](./tough-cookie.cookiejar.clone.md) | ||
|
||
## CookieJar.clone() method | ||
|
||
Produces a deep clone of this CookieJar. Modifications to the original do not affect the clone, and vice versa. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
clone(callback: Callback<CookieJar>): void; | ||
``` | ||
|
||
## Parameters | ||
|
||
<table><thead><tr><th> | ||
|
||
Parameter | ||
|
||
|
||
</th><th> | ||
|
||
Type | ||
|
||
|
||
</th><th> | ||
|
||
Description | ||
|
||
|
||
</th></tr></thead> | ||
<tbody><tr><td> | ||
|
||
callback | ||
|
||
|
||
</td><td> | ||
|
||
[Callback](./tough-cookie.callback.md)<!-- --><[CookieJar](./tough-cookie.cookiejar.md)<!-- -->> | ||
|
||
|
||
</td><td> | ||
|
||
A function to call when the CookieJar is cloned. | ||
|
||
|
||
</td></tr> | ||
</tbody></table> | ||
**Returns:** | ||
|
||
void | ||
|
||
## Remarks | ||
|
||
- When no [Store](./tough-cookie.store.md) is provided, a new [MemoryCookieStore](./tough-cookie.memorycookiestore.md) will be used. | ||
|
||
- Transferring between store types is supported so long as the source implements `.getAllCookies()` and the destination implements `.putCookie()`<!-- -->. | ||
|
Oops, something went wrong.