Compare commits
59 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b02001796e | |||
| 0d4d2fdd7e | |||
| b65e5446fa | |||
| f75fe3ce5b | |||
| 59ba2712cf | |||
| fefe601541 | |||
| 7291c60413 | |||
| bb679102b1 | |||
| 16027c8971 | |||
| 84405a33e3 | |||
| bdf795c3f2 | |||
| ab73084bb5 | |||
| e9fb4c5414 | |||
| bc54f525e4 | |||
| 9170159bc1 | |||
| fa657a0366 | |||
| 24920ddd52 | |||
| eb0b372113 | |||
| 8f5f4f674e | |||
| 38c1dae9c7 | |||
| f92bcd1d14 | |||
| df09b86d23 | |||
| bd5cfa10ad | |||
| 94914dd1ad | |||
| dfbb58a2f1 | |||
| 54a1c3576f | |||
| 9ddf73b4fe | |||
| 4ceec1a6ab | |||
| ba314d7434 | |||
| 55fed67067 | |||
| 852390092e | |||
| 067be3fed3 | |||
| 1aecdbb71c | |||
| d8e517cb7b | |||
| 9da5b4cacc | |||
| 84af32242b | |||
| 7a81472407 | |||
| 9399d8df42 | |||
| 459f73fd5c | |||
| c1c3d3b7c5 | |||
| 380a9630e5 | |||
| 984568e00c | |||
| 5fefd8e083 | |||
| a6eef643f6 | |||
| a01928e010 | |||
| d901db2316 | |||
| fdda812078 | |||
| 7c59e9d5b5 | |||
| c9b0c4da34 | |||
| 9f214141b4 | |||
| 4638e90f02 | |||
| d1c50ab6f8 | |||
| 489aa0ffd8 | |||
| ebcc605961 | |||
| bb630049d5 | |||
| 39321adfe1 | |||
| ea2b8df906 | |||
| 74a9b1aef4 | |||
| 8b3e35de94 |
@@ -4,12 +4,10 @@ description: Install PNPM, Node, and dependencies
|
||||
inputs:
|
||||
install:
|
||||
default: 'true'
|
||||
type: boolean
|
||||
description: Whether or not to run 'pnpm install'
|
||||
|
||||
installArgs:
|
||||
default: ''
|
||||
type: string
|
||||
description: Additional args to append to "pnpm install"
|
||||
|
||||
runs:
|
||||
@@ -17,12 +15,12 @@ runs:
|
||||
|
||||
steps:
|
||||
- name: 🛠️ Setup PNPM
|
||||
uses: pnpm/action-setup@v4
|
||||
uses: pnpm/action-setup@f2b2b233b538f500472c7274c7012f57857d8ce0 # v4.1.0
|
||||
|
||||
- name: 🛠️ Setup NodeJS
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@b7234cc9fe124f0f4932554b4e5284543083ae7b # v4.4.0
|
||||
with:
|
||||
node-version: 18
|
||||
node-version: 20
|
||||
cache: pnpm
|
||||
|
||||
- name: 📦 Install Dependencies
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
name: 🔔 Notify Unreleased Commits
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 20 * * 1' # Weekly at 8 PM UTC (3 PM CT)
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: List Commits
|
||||
id: list-commits
|
||||
run: |
|
||||
./scripts/list-unreleased-commits.sh > summary.txt
|
||||
|
||||
- name: Discord notification
|
||||
run: |
|
||||
PAYLOAD=$(jq -n --arg content "${{ env.MESSAGE }}" '{"content": $content}')
|
||||
curl -X POST \
|
||||
-F "payload_json=${PAYLOAD}" \
|
||||
-F "file1=@summary.txt" \
|
||||
$DISCORD_WEBHOOK
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_UNRELEASED_COMMITS }}
|
||||
MESSAGE: |
|
||||
If a package needs released, please [run the workflow](<https://github.com/wxt-dev/wxt/actions/workflows/release.yml>).
|
||||
|
||||
Before running, consider:
|
||||
- Are there any breaking changes? If so, prepare a list of breaking changes and update the changelog and release notes after the release.
|
||||
- Are there any PRs open that we wait to release after they're merged?
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
if: ${{ github.repository == 'wxt-dev/wxt' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
|
||||
|
||||
- name: Setup
|
||||
uses: ./.github/actions/setup
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
|
||||
with:
|
||||
# Only fetch the config file from the repository
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
@@ -23,13 +23,13 @@ jobs:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
|
||||
|
||||
- name: Setup
|
||||
uses: ./.github/actions/setup
|
||||
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
|
||||
with:
|
||||
registry: https://${{ secrets.DOCKER_REGISTRY_HOSTNAME }}
|
||||
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
|
||||
|
||||
@@ -33,18 +33,26 @@ jobs:
|
||||
name: Publish
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
contents: write
|
||||
contents: write # Push version changes
|
||||
id-token: write # OIDC for NPM publishing
|
||||
needs:
|
||||
- validate
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ssh-key: ${{ secrets.DEPLOY_KEY }} # https://github.com/sbellone/release-workflow-example
|
||||
|
||||
- name: Setup
|
||||
uses: ./.github/actions/setup
|
||||
|
||||
- name: Update NPM
|
||||
run: sudo npm i -g npm@latest
|
||||
|
||||
- name: Print NPM Version
|
||||
run: npm --version
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config user.name 'github-actions[bot]'
|
||||
@@ -59,10 +67,7 @@ jobs:
|
||||
|
||||
- name: Publish to NPM
|
||||
working-directory: packages/${{ inputs.package }}
|
||||
run: |
|
||||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
|
||||
pnpm build
|
||||
pnpm publish
|
||||
run: npm publish
|
||||
|
||||
- name: Create GitHub release
|
||||
run: pnpm tsx scripts/create-github-release.ts ${{ inputs.package }}
|
||||
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
|
||||
|
||||
- name: Setup
|
||||
uses: ./.github/actions/setup
|
||||
|
||||
@@ -12,16 +12,20 @@ jobs:
|
||||
name: 'Sync with @types/chrome'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
contents: write # Push version changes
|
||||
id-token: write # OIDC for NPM publishing
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
|
||||
|
||||
- name: Setup
|
||||
uses: ./.github/actions/setup
|
||||
with:
|
||||
installArgs: --ignore-scripts
|
||||
|
||||
- name: Update NPM
|
||||
run: sudo npm i -g npm@latest
|
||||
|
||||
- name: Generate Latest Code
|
||||
working-directory: packages/browser
|
||||
run: pnpm gen
|
||||
@@ -32,7 +36,7 @@ jobs:
|
||||
|
||||
- name: Commit Changes
|
||||
id: commit
|
||||
uses: stefanzweifel/git-auto-commit-action@v6
|
||||
uses: stefanzweifel/git-auto-commit-action@01d77ca6cb089da1360e540865f7d035c95aa199 # v6.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
@@ -41,6 +45,4 @@ jobs:
|
||||
- name: Publish Package
|
||||
if: steps.commit.outputs.changes_detected == 'true'
|
||||
working-directory: packages/browser
|
||||
run: |
|
||||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
|
||||
pnpm publish
|
||||
run: npm publish
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
|
||||
|
||||
- name: Setup
|
||||
uses: ./.github/actions/setup
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
|
||||
|
||||
- name: Setup
|
||||
uses: ./.github/actions/setup
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
|
||||
|
||||
- name: Setup
|
||||
uses: ./.github/actions/setup
|
||||
@@ -68,13 +68,13 @@ jobs:
|
||||
coverage: false
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
|
||||
|
||||
- name: Setup
|
||||
uses: ./.github/actions/setup
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
uses: oven-sh/setup-bun@22457c87c1b161cf7dde222c3e82b2b5f8d2bed2 # v2.0.2
|
||||
|
||||
- name: Run Tests
|
||||
if: ${{ ! matrix.coverage }}
|
||||
@@ -86,7 +86,7 @@ jobs:
|
||||
|
||||
- name: Upload Coverage
|
||||
if: matrix.coverage
|
||||
uses: codecov/codecov-action@v5
|
||||
uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
@@ -104,7 +104,7 @@ jobs:
|
||||
- vue
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
|
||||
|
||||
- name: Setup
|
||||
uses: ./.github/actions/setup
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
|
||||
|
||||
- name: Setup
|
||||
uses: ./.github/actions/setup
|
||||
@@ -31,12 +31,12 @@ jobs:
|
||||
pnpm dlx wxt@latest --version
|
||||
|
||||
- name: Record VHS
|
||||
uses: charmbracelet/vhs-action@v2.1.0
|
||||
uses: charmbracelet/vhs-action@59641cdc7fadf3978db65eb8c6937ea2752f4ec3 # v2.1.0
|
||||
with:
|
||||
path: 'docs/tapes/init-demo.tape'
|
||||
|
||||
- name: Save recorded GIF
|
||||
uses: stefanzweifel/git-auto-commit-action@v6
|
||||
uses: stefanzweifel/git-auto-commit-action@01d77ca6cb089da1360e540865f7d035c95aa199 # v6.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
|
||||
+7
-3
@@ -146,13 +146,17 @@ Releases are done with GitHub actions:
|
||||
|
||||
## Upgrading Dependencies
|
||||
|
||||
Use [`taze`](https://www.npmjs.com/package/taze) to upgrade dependencies throughout the entire monorepo.
|
||||
WXT has custom rules around what dependencies can be upgraded. Use the `scripts/upgrade-deps.ts` script to upgrade dependencies and follow these rules.
|
||||
|
||||
```sh
|
||||
pnpm dlx taze -r
|
||||
pnpm tsx scripts/upgrade-deps.ts
|
||||
```
|
||||
|
||||
Configuration is in [`taze.config.ts`](./taze.config.ts).
|
||||
To see all the options, run:
|
||||
|
||||
```sh
|
||||
pnpm tsx scripts/upgrade-deps.ts --help
|
||||
```
|
||||
|
||||
## Install Unreleased Versions
|
||||
|
||||
|
||||
@@ -98,6 +98,10 @@ const chromeExtensionIds = [
|
||||
'kacblhilkacgfnkjfodalohcnllcgmjd', // Add QR Code Generator Icon Back To Address Bar
|
||||
'fkbdlogfdjmpfepbbbjcgcfbgbcfcnne', // Piwik PRO Tracking Helper
|
||||
'nkbikckldmljjiiajklecmgmajgapbfl', // PIPX - Take Control of Picture-in-Picture, Automatically
|
||||
'hgppdobcpkfkmiegekaglonjajeojmdd', // Browsely - AI-powered browser extension
|
||||
'ehmoihnjgkdimihkhokkmfjdgomohjgm', // Filmbudd Pro - Simple, private – and synced ratings and watch notes across all your devices
|
||||
'alglchohmdikgdjhafiicilegegieafa', // MultiField CopyCat - Copy, Paste & Autofill Web Forms Instantly
|
||||
'aamihahiiogceidpbnfgehacgiecephe', // ChatSight - Add Table of Contents to ChatGPT
|
||||
];
|
||||
|
||||
const { data, err, isLoading } = useListExtensionDetails(chromeExtensionIds);
|
||||
|
||||
@@ -72,13 +72,13 @@ jobs:
|
||||
submit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 22
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
|
||||
@@ -9,7 +9,7 @@ WXT provides first class support for Vitest for unit testing:
|
||||
```ts
|
||||
// vitest.config.ts
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import { WxtVitest } from 'wxt/testing';
|
||||
import { WxtVitest } from 'wxt/testing/vitest-plugin';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [WxtVitest()],
|
||||
@@ -36,7 +36,7 @@ This example demonstrates that you don't have to mock `browser.storage` (used by
|
||||
|
||||
```ts
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { fakeBrowser } from 'wxt/testing';
|
||||
import { fakeBrowser } from 'wxt/testing/fake-browser';
|
||||
|
||||
const accountStorage = storage.defineItem<Account>('local:account');
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ This is usually caused by one of two things (or both) when using `createShadowRo
|
||||
Some component libraries manually add CSS to the page by adding a `<style>` or `<link>` element. They place this element in the document's `<head>` by default. This causes your styles to be placed outside the `ShadowRoot` and it's isolation blocks the styles from being applied to your UI.
|
||||
|
||||
When a library does this, **you need to tell the library where to put its styles**. Here's the documentation for a few popular component libraries:
|
||||
|
||||
- Ant Design: [`StyleProvider`](https://ant.design/docs/react/compatible-style#shadow-dom-usage)
|
||||
- Mantine: [`MantineProvider#getRootElement` and `MantineProvider#cssVariablesSelector`](https://mantine.dev/theming/mantine-provider/)
|
||||
|
||||
|
||||
@@ -54,7 +54,6 @@ See <https://github.com/wxt-dev/wxt/issues/784>
|
||||
To upgrade, you have two options:
|
||||
|
||||
1. **Stop using the polyfill**
|
||||
|
||||
- If you're already using `extensionApi: "chrome"`, then you're not using the polyfill and there is nothing to change!
|
||||
- Otherwise there is only one change: `browser.runtime.onMessage` no longer supports using promises to return a response:
|
||||
|
||||
@@ -71,7 +70,6 @@ To upgrade, you have two options:
|
||||
```
|
||||
|
||||
2. **Continue using the polyfill** - If you want to keep using the polyfill, you can! One less thing to worry about during this upgrade.
|
||||
|
||||
- Install `webextension-polyfill` and WXT's [new polyfill module](https://www.npmjs.com/package/@wxt-dev/webextension-polyfill):
|
||||
|
||||
```sh
|
||||
@@ -129,7 +127,6 @@ The default location for the `public/` and `modules/` directories have changed t
|
||||
|
||||
- If you follow the default folder structure, you don't need to make any changes.
|
||||
- If you set a custom `srcDir`, you have two options:
|
||||
|
||||
1. Move the your `public/` and `modules/` directories to the project root:
|
||||
<!-- prettier-ignore -->
|
||||
```html
|
||||
|
||||
+19
-17
@@ -4,7 +4,7 @@
|
||||
"engines": {
|
||||
"node": ">=18.20.3"
|
||||
},
|
||||
"packageManager": "pnpm@10.10.0",
|
||||
"packageManager": "pnpm@10.15.1",
|
||||
"scripts": {
|
||||
"check": "check && pnpm -r --sequential run check",
|
||||
"test": "pnpm -r --sequential run test run",
|
||||
@@ -17,34 +17,36 @@
|
||||
"docs:preview": "pnpm -s docs:gen && vitepress preview docs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aklinker1/buildc": "^1.1.4",
|
||||
"@aklinker1/buildc": "^1.1.5",
|
||||
"@aklinker1/check": "^2.1.0",
|
||||
"@commitlint/config-conventional": "^19.8.0",
|
||||
"@commitlint/types": "^19.8.0",
|
||||
"@commitlint/config-conventional": "^19.8.1",
|
||||
"@commitlint/types": "^19.8.1",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@vitest/coverage-v8": "^3.1.2",
|
||||
"changelogen": "^0.6.1",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@vitest/coverage-v8": "^3.2.4",
|
||||
"changelogen": "^0.6.2",
|
||||
"consola": "^3.4.2",
|
||||
"fast-glob": "^3.3.3",
|
||||
"feed": "^4.2.2",
|
||||
"fs-extra": "^11.3.0",
|
||||
"lint-staged": "^15.5.1",
|
||||
"feed": "^5.1.0",
|
||||
"fs-extra": "^11.3.1",
|
||||
"lint-staged": "^16.1.6",
|
||||
"markdown-it-footnote": "^4.0.0",
|
||||
"markdownlint-cli": "^0.45.0",
|
||||
"nano-spawn": "^0.2.0",
|
||||
"prettier": "^3.5.3",
|
||||
"simple-git-hooks": "^2.13.0",
|
||||
"tsx": "4.19.4",
|
||||
"nano-spawn": "^1.0.2",
|
||||
"prettier": "^3.6.2",
|
||||
"semver": "^7.7.2",
|
||||
"simple-git-hooks": "^2.13.1",
|
||||
"tsx": "4.20.5",
|
||||
"typedoc": "^0.25.4",
|
||||
"typedoc-plugin-frontmatter": "^1.3.0",
|
||||
"typedoc-plugin-markdown": "4.0.0-next.23",
|
||||
"typedoc-vitepress-theme": "1.0.0-next.3",
|
||||
"typescript": "^5.8.3",
|
||||
"vitepress": "^1.6.3",
|
||||
"typescript": "^5.9.2",
|
||||
"vitepress": "^1.6.4",
|
||||
"vitepress-knowledge": "^0.4.1",
|
||||
"vitepress-plugin-group-icons": "^1.5.2",
|
||||
"vitepress-plugin-group-icons": "^1.6.3",
|
||||
"vitest-mock-extended": "^3.1.0",
|
||||
"vue": "^3.5.13",
|
||||
"vue": "^3.5.21",
|
||||
"wxt": "workspace:*"
|
||||
},
|
||||
"simple-git-hooks": {
|
||||
|
||||
@@ -1,6 +1,34 @@
|
||||
# Changelog
|
||||
|
||||
## v0.5.1
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/analytics-v0.5.0...analytics-v0.5.1)
|
||||
|
||||
### 🚀 Enhancements
|
||||
|
||||
- Integrate latest measurement protocol changes ([#1767](https://github.com/wxt-dev/wxt/pull/1767))
|
||||
|
||||
### 🩹 Fixes
|
||||
|
||||
- Use `@wxt-dev/browser` instead of `@types/chrome` ([#1645](https://github.com/wxt-dev/wxt/pull/1645))
|
||||
|
||||
### 🏡 Chore
|
||||
|
||||
- Stop using PNPM catalog ([#1644](https://github.com/wxt-dev/wxt/pull/1644))
|
||||
- Upgrade `@aklinker1/check` to v2 ([#1647](https://github.com/wxt-dev/wxt/pull/1647))
|
||||
- Change browser workspace dependency to `^` ([c7335add](https://github.com/wxt-dev/wxt/commit/c7335add))
|
||||
- Fix auto-fixable `markdownlint` errors ([#1710](https://github.com/wxt-dev/wxt/pull/1710))
|
||||
- **deps:** Upgrade typescript from 5.8.3 to 5.9.2 ([a6eef643](https://github.com/wxt-dev/wxt/commit/a6eef643))
|
||||
- Create script for managing dependency upgrades ([#1875](https://github.com/wxt-dev/wxt/pull/1875))
|
||||
- **deps:** Upgrade all dev dependencies ([#1876](https://github.com/wxt-dev/wxt/pull/1876))
|
||||
|
||||
### ❤️ Contributors
|
||||
|
||||
- Aaron ([@aklinker1](https://github.com/aklinker1))
|
||||
- Tanishq-aggarwal ([@tanishq-aggarwal](https://github.com/tanishq-aggarwal))
|
||||
|
||||
## v0.5.0
|
||||
|
||||
[⚠️ breaking changes](https://wxt.dev/guide/resources/upgrading.html) • [compare changes](https://github.com/wxt-dev/wxt/compare/analytics-v0.4.1...analytics-v0.5.0)
|
||||
|
||||
### 🩹 Fixes
|
||||
@@ -9,4 +37,4 @@
|
||||
|
||||
### ❤️ Contributors
|
||||
|
||||
- Aaron ([@aklinker1](https://github.com/aklinker1))
|
||||
- Aaron ([@aklinker1](https://github.com/aklinker1))
|
||||
@@ -46,6 +46,7 @@ export const googleAnalytics4 =
|
||||
ad_personalization: 'DENIED',
|
||||
},
|
||||
user_properties: mappedUserProperties,
|
||||
user_agent: navigator.userAgent,
|
||||
events: [
|
||||
{
|
||||
name: eventName,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wxt-dev/analytics",
|
||||
"version": "0.5.0",
|
||||
"version": "0.5.1",
|
||||
"description": "Add analytics to your web extension",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -51,11 +51,11 @@
|
||||
"wxt": ">=0.20.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aklinker1/check": "2.0.0",
|
||||
"@aklinker1/check": "^2.1.0",
|
||||
"@types/ua-parser-js": "^0.7.39",
|
||||
"publint": "^0.3.12",
|
||||
"typescript": "^5.8.3",
|
||||
"unbuild": "^3.5.0",
|
||||
"typescript": "^5.9.2",
|
||||
"unbuild": "^3.6.1",
|
||||
"wxt": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,5 +1,37 @@
|
||||
# Changelog
|
||||
|
||||
## v1.1.0
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/auto-icons-v1.0.2...auto-icons-v1.1.0)
|
||||
|
||||
### 🚀 Enhancements
|
||||
|
||||
- Add overlay option for dev icons ([#1825](https://github.com/wxt-dev/wxt/pull/1825))
|
||||
|
||||
### 📖 Documentation
|
||||
|
||||
- Rewrite and restructure the documentation website ([#933](https://github.com/wxt-dev/wxt/pull/933))
|
||||
- Use full URLs in README so they work on the docs site ([d20793d5](https://github.com/wxt-dev/wxt/commit/d20793d5))
|
||||
- Add SVG compatibility note ([#1830](https://github.com/wxt-dev/wxt/pull/1830))
|
||||
|
||||
### 🏡 Chore
|
||||
|
||||
- Add `oxlint` for linting ([#947](https://github.com/wxt-dev/wxt/pull/947))
|
||||
- **deps:** Bump sharp from 0.33.4 to 0.33.5 ([#959](https://github.com/wxt-dev/wxt/pull/959))
|
||||
- Upgrade all non-major dependencies ([#1040](https://github.com/wxt-dev/wxt/pull/1040))
|
||||
- **deps:** Upgrade all non-major dependencies ([#1164](https://github.com/wxt-dev/wxt/pull/1164))
|
||||
- **deps:** Bump dev and non-breaking major dependencies ([#1167](https://github.com/wxt-dev/wxt/pull/1167))
|
||||
- Use PNPM 10's new catelog feature ([#1493](https://github.com/wxt-dev/wxt/pull/1493))
|
||||
- Move production dependencies to PNPM 10 catelog ([#1494](https://github.com/wxt-dev/wxt/pull/1494))
|
||||
- Stop using PNPM catalog ([#1644](https://github.com/wxt-dev/wxt/pull/1644))
|
||||
- Upgrade `@aklinker1/check` to v2 ([#1647](https://github.com/wxt-dev/wxt/pull/1647))
|
||||
|
||||
### ❤️ Contributors
|
||||
|
||||
- Typed SIGTERM ([@typed-sigterm](https://github.com/typed-sigterm))
|
||||
- Kuba ([@zizzfizzix](https://github.com/zizzfizzix))
|
||||
- Aaron ([@aklinker1](https://github.com/aklinker1))
|
||||
|
||||
## v1.0.2
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/auto-icons-v1.0.1...auto-icons-v1.0.2)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"version": "1.0.2",
|
||||
"version": "1.1.0",
|
||||
"type": "module",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -46,15 +46,15 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"defu": "^6.1.4",
|
||||
"fs-extra": "^11.3.0",
|
||||
"sharp": "^0.34.1"
|
||||
"fs-extra": "^11.3.1",
|
||||
"sharp": "^0.34.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aklinker1/check": "2.0.0",
|
||||
"oxlint": "^0.16.8",
|
||||
"@aklinker1/check": "^2.1.0",
|
||||
"oxlint": "^1.14.0",
|
||||
"publint": "^0.3.12",
|
||||
"typescript": "^5.8.3",
|
||||
"unbuild": "^3.5.0",
|
||||
"typescript": "^5.9.2",
|
||||
"unbuild": "^3.6.1",
|
||||
"wxt": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@wxt-dev/browser",
|
||||
"description": "Provides a cross-browser API for using extension APIs and types based on @types/chrome",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.4",
|
||||
"type": "module",
|
||||
"main": "src/index.mjs",
|
||||
"types": "src/index.d.ts",
|
||||
@@ -23,12 +23,12 @@
|
||||
"src"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/chrome": "0.1.1",
|
||||
"fs-extra": "^11.3.0",
|
||||
"nano-spawn": "^0.2.0",
|
||||
"tsx": "4.19.4",
|
||||
"typescript": "^5.8.3",
|
||||
"vitest": "^3.1.2"
|
||||
"@types/chrome": "0.1.6",
|
||||
"fs-extra": "^11.3.1",
|
||||
"nano-spawn": "^1.0.2",
|
||||
"tsx": "4.20.5",
|
||||
"typescript": "^5.9.2",
|
||||
"vitest": "^3.2.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/filesystem": "*",
|
||||
|
||||
+203
-246
@@ -1088,267 +1088,209 @@ export namespace Browser {
|
||||
*/
|
||||
export namespace browsingData {
|
||||
export interface OriginTypes {
|
||||
/** Optional. Extensions and packaged applications a user has installed (be _really_ careful!). */
|
||||
/** Extensions and packaged applications a user has installed (be _really_ careful!). */
|
||||
extension?: boolean | undefined;
|
||||
/** Optional. Websites that have been installed as hosted applications (be careful!). */
|
||||
/** Websites that have been installed as hosted applications (be careful!). */
|
||||
protectedWeb?: boolean | undefined;
|
||||
/** Optional. Normal websites. */
|
||||
/** Normal websites. */
|
||||
unprotectedWeb?: boolean | undefined;
|
||||
}
|
||||
|
||||
/** Options that determine exactly what data will be removed. */
|
||||
export interface RemovalOptions {
|
||||
/**
|
||||
* Optional.
|
||||
* When present, data for origins in this list is excluded from deletion. Can't be used together with `origins`. Only supported for cookies, storage and cache. Cookies are excluded for the whole registrable domain.
|
||||
* @since Chrome 74
|
||||
* When present, data for origins in this list is excluded from deletion. Can't be used together with origins. Only supported for cookies, storage and cache. Cookies are excluded for the whole registrable domain.
|
||||
*/
|
||||
excludeOrigins?: string[] | undefined;
|
||||
/**
|
||||
* Optional.
|
||||
* An object whose properties specify which origin types ought to be cleared. If this object isn't specified, it defaults to clearing only "unprotected" origins. Please ensure that you _really_ want to remove application data before adding 'protectedWeb' or 'extensions'.
|
||||
*/
|
||||
/** An object whose properties specify which origin types ought to be cleared. If this object isn't specified, it defaults to clearing only "unprotected" origins. Please ensure that you _really_ want to remove application data before adding 'protectedWeb' or 'extensions'. */
|
||||
originTypes?: OriginTypes | undefined;
|
||||
/**
|
||||
* Optional.
|
||||
* @since Chrome 74
|
||||
* When present, only data for origins in this list is deleted. Only supported for cookies, storage and cache. Cookies are cleared for the whole registrable domain.
|
||||
* @since Chrome 74
|
||||
*/
|
||||
origins?: string[] | undefined;
|
||||
/**
|
||||
* Optional.
|
||||
* Remove data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the {@link Date.getTime} method). If absent, defaults to 0 (which would remove all browsing data).
|
||||
*/
|
||||
origins?: [string, ...string[]] | undefined;
|
||||
/** Remove data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the {@link Date.getTime getTime} method of the JavaScript `Date` object). If absent, defaults to 0 (which would remove all browsing data). */
|
||||
since?: number | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since Chrome 27
|
||||
* A set of data types. Missing data types are interpreted as false.
|
||||
*/
|
||||
/** A set of data types. Missing data types are interpreted as `false`. */
|
||||
export interface DataTypeSet {
|
||||
/** Optional. Websites' WebSQL data. */
|
||||
/** Websites' WebSQL data. */
|
||||
webSQL?: boolean | undefined;
|
||||
/** Optional. Websites' IndexedDB data. */
|
||||
/** Websites' IndexedDB data. */
|
||||
indexedDB?: boolean | undefined;
|
||||
/** Optional. The browser's cookies. */
|
||||
/** The browser's cookies. */
|
||||
cookies?: boolean | undefined;
|
||||
/** Optional. Stored passwords. */
|
||||
/** Stored passwords. */
|
||||
passwords?: boolean | undefined;
|
||||
/**
|
||||
* @deprecated Deprecated since Chrome 76.
|
||||
* Support for server-bound certificates has been removed. This data type will be ignored.
|
||||
*
|
||||
* Optional. Server-bound certificates.
|
||||
* Server-bound certificates.
|
||||
* @deprecated since Chrome 76. Support for server-bound certificates has been removed. This data type will be ignored.
|
||||
*/
|
||||
serverBoundCertificates?: boolean | undefined;
|
||||
/** Optional. The browser's download list. */
|
||||
/** The browser's download list. */
|
||||
downloads?: boolean | undefined;
|
||||
/** Optional. The browser's cache. Note: when removing data, this clears the entire cache: it is not limited to the range you specify. */
|
||||
/** The browser's cache. */
|
||||
cache?: boolean | undefined;
|
||||
/** Optional. The browser's cacheStorage. */
|
||||
/** Cache storage. */
|
||||
cacheStorage?: boolean | undefined;
|
||||
/** Optional. Websites' appcaches. */
|
||||
/** Websites' appcaches. */
|
||||
appcache?: boolean | undefined;
|
||||
/** Optional. Websites' file systems. */
|
||||
/** Websites' file systems. */
|
||||
fileSystems?: boolean | undefined;
|
||||
/**
|
||||
* @deprecated Deprecated since Chrome 88.
|
||||
* Support for Flash has been removed. This data type will be ignored.
|
||||
*
|
||||
* Optional. Plugins' data.
|
||||
* Plugins' data.
|
||||
* @deprecated since Chrome 88. Support for Flash has been removed. This data type will be ignored.
|
||||
*/
|
||||
pluginData?: boolean | undefined;
|
||||
/** Optional. Websites' local storage data. */
|
||||
/** Websites' local storage data. */
|
||||
localStorage?: boolean | undefined;
|
||||
/** Optional. The browser's stored form data. */
|
||||
/** The browser's stored form data. */
|
||||
formData?: boolean | undefined;
|
||||
/** Optional. The browser's history. */
|
||||
/** The browser's history. */
|
||||
history?: boolean | undefined;
|
||||
/**
|
||||
* Optional.
|
||||
* @since Chrome 39
|
||||
* Service Workers.
|
||||
*/
|
||||
/** Service Workers. */
|
||||
serviceWorkers?: boolean | undefined;
|
||||
}
|
||||
|
||||
export interface SettingsResult {
|
||||
options: RemovalOptions;
|
||||
/** All of the types will be present in the result, with values of true if they are both selected to be removed and permitted to be removed, otherwise false. */
|
||||
/** All of the types will be present in the result, with values of `true` if they are both selected to be removed and permitted to be removed, otherwise `false`. */
|
||||
dataToRemove: DataTypeSet;
|
||||
/** All of the types will be present in the result, with values of true if they are permitted to be removed (e.g., by enterprise policy) and false if not. */
|
||||
/** All of the types will be present in the result, with values of `true` if they are permitted to be removed (e.g., by enterprise policy) and `false` if not. */
|
||||
dataRemovalPermitted: DataTypeSet;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since Chrome 26
|
||||
* Reports which types of data are currently selected in the 'Clear browsing data' settings UI. Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here.
|
||||
* @return The `settings` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
*/
|
||||
export function settings(): Promise<SettingsResult>;
|
||||
/**
|
||||
* @since Chrome 26
|
||||
* Reports which types of data are currently selected in the 'Clear browsing data' settings UI. Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here.
|
||||
*/
|
||||
export function settings(callback: (result: SettingsResult) => void): void;
|
||||
|
||||
/**
|
||||
* @deprecated Deprecated since Chrome 88.
|
||||
* Support for Flash has been removed. This function has no effect.
|
||||
*
|
||||
* Clears plugins' data.
|
||||
* @return The `removePluginData` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
* @deprecated since Chrome 88. Support for Flash has been removed. This function has no effect
|
||||
*/
|
||||
export function removePluginData(options: RemovalOptions): Promise<void>;
|
||||
/**
|
||||
* @deprecated Deprecated since Chrome 88.
|
||||
* Support for Flash has been removed. This function has no effect.
|
||||
*
|
||||
* Clears plugins' data.
|
||||
* @param callback Called when plugins' data has been cleared.
|
||||
*/
|
||||
export function removePluginData(options: RemovalOptions, callback: () => void): void;
|
||||
|
||||
/**
|
||||
* @since Chrome 72
|
||||
* Clears websites' service workers.
|
||||
* @return The `removeServiceWorkers` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
* @since Chrome 72
|
||||
*/
|
||||
export function removeServiceWorkers(options: RemovalOptions): Promise<void>;
|
||||
/**
|
||||
* @since Chrome 72
|
||||
* Clears websites' service workers.
|
||||
* @param callback Called when the browser's service workers have been cleared.
|
||||
*/
|
||||
export function removeServiceWorkers(options: RemovalOptions, callback: () => void): void;
|
||||
|
||||
/**
|
||||
* Clears the browser's stored form data (autofill).
|
||||
* @return The `removeFormData` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
*/
|
||||
export function removeFormData(options: RemovalOptions): Promise<void>;
|
||||
/**
|
||||
* Clears the browser's stored form data (autofill).
|
||||
* @param callback Called when the browser's form data has been cleared.
|
||||
*/
|
||||
export function removeFormData(options: RemovalOptions, callback: () => void): void;
|
||||
|
||||
/**
|
||||
* Clears websites' file system data.
|
||||
* @return The `removeFileSystems` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
*/
|
||||
export function removeFileSystems(options: RemovalOptions): Promise<void>;
|
||||
/**
|
||||
* Clears websites' file system data.
|
||||
* @param callback Called when websites' file systems have been cleared.
|
||||
*/
|
||||
export function removeFileSystems(options: RemovalOptions, callback: () => void): void;
|
||||
|
||||
/**
|
||||
* Clears various types of browsing data stored in a user's profile.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
* @param dataToRemove The set of data types to remove.
|
||||
* @return The `remove` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
||||
*/
|
||||
export function remove(options: RemovalOptions, dataToRemove: DataTypeSet): Promise<void>;
|
||||
/**
|
||||
* Clears various types of browsing data stored in a user's profile.
|
||||
* @param dataToRemove The set of data types to remove.
|
||||
* @param callback Called when deletion has completed.
|
||||
*/
|
||||
export function remove(options: RemovalOptions, dataToRemove: DataTypeSet, callback: () => void): void;
|
||||
|
||||
/**
|
||||
* Clears the browser's stored passwords.
|
||||
* @return The `removePasswords` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
*/
|
||||
export function removePasswords(options: RemovalOptions): Promise<void>;
|
||||
/**
|
||||
* Clears the browser's stored passwords.
|
||||
* @param callback Called when the browser's passwords have been cleared.
|
||||
*/
|
||||
export function removePasswords(options: RemovalOptions, callback: () => void): void;
|
||||
|
||||
/**
|
||||
* Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
|
||||
* @return The `removeCookies` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
*/
|
||||
export function removeCookies(options: RemovalOptions): Promise<void>;
|
||||
/**
|
||||
* Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
|
||||
* @param callback Called when the browser's cookies and server-bound certificates have been cleared.
|
||||
*/
|
||||
export function removeCookies(options: RemovalOptions, callback: () => void): void;
|
||||
|
||||
/**
|
||||
* Clears websites' WebSQL data.
|
||||
* @return The `removeWebSQL` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
*/
|
||||
export function removeWebSQL(options: RemovalOptions): Promise<void>;
|
||||
/**
|
||||
* Clears websites' WebSQL data.
|
||||
* @param callback Called when websites' WebSQL databases have been cleared.
|
||||
*/
|
||||
export function removeWebSQL(options: RemovalOptions, callback: () => void): void;
|
||||
|
||||
/**
|
||||
* Clears websites' appcache data.
|
||||
* @return The `removeAppcache` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
*/
|
||||
export function removeAppcache(options: RemovalOptions): Promise<void>;
|
||||
/**
|
||||
* Clears websites' appcache data.
|
||||
* @param callback Called when websites' appcache data has been cleared.
|
||||
*/
|
||||
export function removeAppcache(options: RemovalOptions, callback: () => void): void;
|
||||
/** Clears websites' cache storage data.
|
||||
* @return The `removeCacheStorage` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
||||
|
||||
/**
|
||||
* Clears websites' cache storage data.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
*/
|
||||
export function removeCacheStorage(options: RemovalOptions): Promise<void>;
|
||||
/** Clears websites' cache storage data.
|
||||
* @param callback Called when websites' appcache data has been cleared.
|
||||
*/
|
||||
export function removeCacheStorage(options: RemovalOptions, callback: () => void): void;
|
||||
|
||||
/**
|
||||
* Clears the browser's list of downloaded files (not the downloaded files themselves).
|
||||
* @return The `removeDownloads` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
*/
|
||||
export function removeDownloads(options: RemovalOptions): Promise<void>;
|
||||
/**
|
||||
* Clears the browser's list of downloaded files (not the downloaded files themselves).
|
||||
* @param callback Called when the browser's list of downloaded files has been cleared.
|
||||
*/
|
||||
export function removeDownloads(options: RemovalOptions, callback: () => void): void;
|
||||
|
||||
/**
|
||||
* Clears websites' local storage data.
|
||||
* @return The `removeLocalStorage` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
*/
|
||||
export function removeLocalStorage(options: RemovalOptions): Promise<void>;
|
||||
/**
|
||||
* Clears websites' local storage data.
|
||||
* @param callback Called when websites' local storage has been cleared.
|
||||
*/
|
||||
export function removeLocalStorage(options: RemovalOptions, callback: () => void): void;
|
||||
|
||||
/**
|
||||
* Clears the browser's cache.
|
||||
* @return The `removeCache` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
*/
|
||||
export function removeCache(options: RemovalOptions): Promise<void>;
|
||||
/**
|
||||
* Clears the browser's cache.
|
||||
* @param callback Called when the browser's cache has been cleared.
|
||||
*/
|
||||
export function removeCache(options: RemovalOptions, callback: () => void): void;
|
||||
|
||||
/**
|
||||
* Clears the browser's history.
|
||||
* @return The `removeHistory` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
*/
|
||||
export function removeHistory(options: RemovalOptions): Promise<void>;
|
||||
/**
|
||||
* Clears the browser's history.
|
||||
* @param callback Called when the browser's history has cleared.
|
||||
*/
|
||||
export function removeHistory(options: RemovalOptions, callback: () => void): void;
|
||||
|
||||
/**
|
||||
* Clears websites' IndexedDB data.
|
||||
* @return The `removeIndexedDB` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
*/
|
||||
export function removeIndexedDB(options: RemovalOptions): Promise<void>;
|
||||
/**
|
||||
* Clears websites' IndexedDB data.
|
||||
* @param callback Called when websites' IndexedDB data has been cleared.
|
||||
*/
|
||||
export function removeIndexedDB(options: RemovalOptions, callback: () => void): void;
|
||||
}
|
||||
|
||||
@@ -1602,29 +1544,24 @@ export namespace Browser {
|
||||
*/
|
||||
export namespace commands {
|
||||
export interface Command {
|
||||
/** Optional. The name of the Extension Command */
|
||||
name?: string | undefined;
|
||||
/** Optional. The Extension Command description */
|
||||
description?: string | undefined;
|
||||
/** Optional. The shortcut active for this command, or blank if not active. */
|
||||
shortcut?: string | undefined;
|
||||
/** The name of the Extension Command */
|
||||
name?: string;
|
||||
/** The Extension Command description */
|
||||
description?: string;
|
||||
/** The shortcut active for this command, or blank if not active. */
|
||||
shortcut?: string;
|
||||
}
|
||||
|
||||
export interface CommandEvent extends Browser.events.Event<(command: string, tab: Browser.tabs.Tab) => void> {}
|
||||
|
||||
/**
|
||||
* Returns all the registered extension commands for this extension and their shortcut (if active).
|
||||
* @return The `getAll` method provides its result via callback or returned as a `Promise` (MV3 only).
|
||||
* Returns all the registered extension commands for this extension and their shortcut (if active). Before Chrome 110, this command did not return `_execute_action`.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
||||
*/
|
||||
export function getAll(): Promise<Command[]>;
|
||||
/**
|
||||
* Returns all the registered extension commands for this extension and their shortcut (if active).
|
||||
* @param callback Called to return the registered commands.
|
||||
*/
|
||||
export function getAll(callback: (commands: Command[]) => void): void;
|
||||
|
||||
/** Fired when a registered command is activated using a keyboard shortcut. */
|
||||
export var onCommand: CommandEvent;
|
||||
export const onCommand: events.Event<(command: string, tab?: tabs.Tab) => void>;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -2151,7 +2088,12 @@ export namespace Browser {
|
||||
*/
|
||||
export namespace cookies {
|
||||
/** A cookie's 'SameSite' state (https://tools.ietf.org/html/draft-west-first-party-cookies). 'no_restriction' corresponds to a cookie set with 'SameSite=None', 'lax' to 'SameSite=Lax', and 'strict' to 'SameSite=Strict'. 'unspecified' corresponds to a cookie set without the SameSite attribute. **/
|
||||
export type SameSiteStatus = "unspecified" | "no_restriction" | "lax" | "strict";
|
||||
export enum SameSiteStatus {
|
||||
NO_RESTRICTION = "no_restriction",
|
||||
LAX = "lax",
|
||||
STRICT = "strict",
|
||||
UNSPECIFIED = "unspecified",
|
||||
}
|
||||
|
||||
/** Represents information about an HTTP cookie. */
|
||||
export interface Cookie {
|
||||
@@ -2172,8 +2114,8 @@ export namespace Browser {
|
||||
session: boolean;
|
||||
/** True if the cookie is a host-only cookie (i.e. a request's host must exactly match the domain of the cookie). */
|
||||
hostOnly: boolean;
|
||||
/** Optional. The expiration date of the cookie as the number of seconds since the UNIX epoch. Not provided for session cookies. */
|
||||
expirationDate?: number | undefined;
|
||||
/** The expiration date of the cookie as the number of seconds since the UNIX epoch. Not provided for session cookies. */
|
||||
expirationDate?: number;
|
||||
/** The path of the cookie. */
|
||||
path: string;
|
||||
/** True if the cookie is marked as HttpOnly (i.e. the cookie is inaccessible to client-side scripts). */
|
||||
@@ -2184,10 +2126,13 @@ export namespace Browser {
|
||||
* The cookie's same-site status (i.e. whether the cookie is sent with cross-site requests).
|
||||
* @since Chrome 51
|
||||
*/
|
||||
sameSite: SameSiteStatus;
|
||||
sameSite: `${SameSiteStatus}`;
|
||||
}
|
||||
|
||||
/** Represents a partitioned cookie's partition key. */
|
||||
/**
|
||||
* Represents a partitioned cookie's partition key.
|
||||
* @since Chrome 119
|
||||
*/
|
||||
export interface CookiePartitionKey {
|
||||
/**
|
||||
* Indicates if the cookie was set in a cross-cross site context. This prevents a top-level site embedded in a cross-site context from accessing cookies set by the top-level site in a same-site context.
|
||||
@@ -2207,31 +2152,31 @@ export namespace Browser {
|
||||
}
|
||||
|
||||
export interface GetAllDetails {
|
||||
/** Optional. Restricts the retrieved cookies to those whose domains match or are subdomains of this one. */
|
||||
/** Restricts the retrieved cookies to those whose domains match or are subdomains of this one. */
|
||||
domain?: string | undefined;
|
||||
/** Optional. Filters the cookies by name. */
|
||||
/** Filters the cookies by name. */
|
||||
name?: string | undefined;
|
||||
/**
|
||||
* The partition key for reading or modifying cookies with the Partitioned attribute.
|
||||
* @since Chrome 119
|
||||
*/
|
||||
partitionKey?: CookiePartitionKey | undefined;
|
||||
/** Optional. Restricts the retrieved cookies to those that would match the given URL. */
|
||||
/** Restricts the retrieved cookies to those that would match the given URL. */
|
||||
url?: string | undefined;
|
||||
/** Optional. The cookie store to retrieve cookies from. If omitted, the current execution context's cookie store will be used. */
|
||||
/** The cookie store to retrieve cookies from. If omitted, the current execution context's cookie store will be used. */
|
||||
storeId?: string | undefined;
|
||||
/** Optional. Filters out session vs. persistent cookies. */
|
||||
/** Filters out session vs. persistent cookies. */
|
||||
session?: boolean | undefined;
|
||||
/** Optional. Restricts the retrieved cookies to those whose path exactly matches this string. */
|
||||
/** Restricts the retrieved cookies to those whose path exactly matches this string. */
|
||||
path?: string | undefined;
|
||||
/** Optional. Filters the cookies by their Secure property. */
|
||||
/** Filters the cookies by their Secure property. */
|
||||
secure?: boolean | undefined;
|
||||
}
|
||||
|
||||
export interface SetDetails {
|
||||
/** Optional. The domain of the cookie. If omitted, the cookie becomes a host-only cookie. */
|
||||
/** The domain of the cookie. If omitted, the cookie becomes a host-only cookie. */
|
||||
domain?: string | undefined;
|
||||
/** Optional. The name of the cookie. Empty by default if omitted. */
|
||||
/** The name of the cookie. Empty by default if omitted. */
|
||||
name?: string | undefined;
|
||||
/**
|
||||
* The partition key for reading or modifying cookies with the Partitioned attribute.
|
||||
@@ -2240,26 +2185,29 @@ export namespace Browser {
|
||||
partitionKey?: CookiePartitionKey | undefined;
|
||||
/** The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie. If host permissions for this URL are not specified in the manifest file, the API call will fail. */
|
||||
url: string;
|
||||
/** Optional. The ID of the cookie store in which to set the cookie. By default, the cookie is set in the current execution context's cookie store. */
|
||||
/** The ID of the cookie store in which to set the cookie. By default, the cookie is set in the current execution context's cookie store. */
|
||||
storeId?: string | undefined;
|
||||
/** Optional. The value of the cookie. Empty by default if omitted. */
|
||||
/** The value of the cookie. Empty by default if omitted. */
|
||||
value?: string | undefined;
|
||||
/** Optional. The expiration date of the cookie as the number of seconds since the UNIX epoch. If omitted, the cookie becomes a session cookie. */
|
||||
/** The expiration date of the cookie as the number of seconds since the UNIX epoch. If omitted, the cookie becomes a session cookie. */
|
||||
expirationDate?: number | undefined;
|
||||
/** Optional. The path of the cookie. Defaults to the path portion of the url parameter. */
|
||||
/** The path of the cookie. Defaults to the path portion of the url parameter. */
|
||||
path?: string | undefined;
|
||||
/** Optional. Whether the cookie should be marked as HttpOnly. Defaults to false. */
|
||||
/** Whether the cookie should be marked as HttpOnly. Defaults to false. */
|
||||
httpOnly?: boolean | undefined;
|
||||
/** Optional. Whether the cookie should be marked as Secure. Defaults to false. */
|
||||
/** Whether the cookie should be marked as Secure. Defaults to false. */
|
||||
secure?: boolean | undefined;
|
||||
/**
|
||||
* Optional. The cookie's same-site status. Defaults to "unspecified", i.e., if omitted, the cookie is set without specifying a SameSite attribute.
|
||||
* The cookie's same-site status. Defaults to "unspecified", i.e., if omitted, the cookie is set without specifying a SameSite attribute.
|
||||
* @since Chrome 51
|
||||
*/
|
||||
sameSite?: SameSiteStatus | undefined;
|
||||
sameSite?: `${SameSiteStatus}` | undefined;
|
||||
}
|
||||
|
||||
/** Details to identify the cookie. */
|
||||
/**
|
||||
* Details to identify the cookie.
|
||||
* @since Chrome 88
|
||||
*/
|
||||
export interface CookieDetails {
|
||||
/** The name of the cookie to access. */
|
||||
name: string;
|
||||
@@ -2279,11 +2227,8 @@ export namespace Browser {
|
||||
cookie: Cookie;
|
||||
/** True if a cookie was removed. */
|
||||
removed: boolean;
|
||||
/**
|
||||
* @since Chrome 12
|
||||
* The underlying reason behind the cookie's change.
|
||||
*/
|
||||
cause: string;
|
||||
/** The underlying reason behind the cookie's change. */
|
||||
cause: `${OnChangedCause}`;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2292,30 +2237,37 @@ export namespace Browser {
|
||||
*/
|
||||
export interface FrameDetails {
|
||||
/** The unique identifier for the document. If the frameId and/or tabId are provided they will be validated to match the document found by provided document ID. */
|
||||
documentId?: string;
|
||||
documentId?: string | undefined;
|
||||
/** The unique identifier for the frame within the tab. */
|
||||
frameId?: number;
|
||||
frameId?: number | undefined;
|
||||
/* The unique identifier for the tab containing the frame. */
|
||||
tabId?: number;
|
||||
tabId?: number | undefined;
|
||||
}
|
||||
|
||||
export interface CookieChangedEvent extends Browser.events.Event<(changeInfo: CookieChangeInfo) => void> {}
|
||||
/**
|
||||
* The underlying reason behind the cookie's change. If a cookie was inserted, or removed via an explicit call to "Browser.cookies.remove", "cause" will be "explicit". If a cookie was automatically removed due to expiry, "cause" will be "expired". If a cookie was removed due to being overwritten with an already-expired expiration date, "cause" will be set to "expired_overwrite". If a cookie was automatically removed due to garbage collection, "cause" will be "evicted". If a cookie was automatically removed due to a "set" call that overwrote it, "cause" will be "overwrite". Plan your response accordingly.
|
||||
* @since Chrome 44
|
||||
*/
|
||||
export enum OnChangedCause {
|
||||
EVICTED = "evicted",
|
||||
EXPIRED = "expired",
|
||||
EXPLICIT = "explicit",
|
||||
EXPIRED_OVERWRITE = "expired_overwrite",
|
||||
OVERWRITE = "overwrite",
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all existing cookie stores.
|
||||
* Parameter cookieStores: All the existing cookie stores.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later.
|
||||
*/
|
||||
export function getAllCookieStores(): Promise<CookieStore[]>;
|
||||
export function getAllCookieStores(callback: (cookieStores: CookieStore[]) => void): void;
|
||||
|
||||
/**
|
||||
* Lists all existing cookie stores.
|
||||
* @return The `getAllCookieStores` method provides its result via callback or returned as a `Promise` (MV3 only).
|
||||
*/
|
||||
export function getAllCookieStores(): Promise<CookieStore[]>;
|
||||
|
||||
/**
|
||||
* The partition key for the frame indicated.
|
||||
* Can return its result via Promise in Manifest V3
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later.
|
||||
* @since Chrome 132
|
||||
*/
|
||||
export function getPartitionKey(details: FrameDetails): Promise<{ partitionKey: CookiePartitionKey }>;
|
||||
@@ -2325,62 +2277,41 @@ export namespace Browser {
|
||||
): void;
|
||||
|
||||
/**
|
||||
* Retrieves all cookies from a single cookie store that match the given information. The cookies returned will be sorted, with those with the longest path first. If multiple cookies have the same path length, those with the earliest creation time will be first.
|
||||
* @param details Information to filter the cookies being retrieved.
|
||||
* Parameter cookies: All the existing, unexpired cookies that match the given cookie info.
|
||||
* Retrieves all cookies from a single cookie store that match the given information. The cookies returned will be sorted, with those with the longest path first. If multiple cookies have the same path length, those with the earliest creation time will be first. This method only retrieves cookies for domains that the extension has host permissions to
|
||||
* @param details Information to identify the cookie to remove.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later.
|
||||
*/
|
||||
export function getAll(details: GetAllDetails): Promise<Cookie[]>;
|
||||
export function getAll(details: GetAllDetails, callback: (cookies: Cookie[]) => void): void;
|
||||
|
||||
/**
|
||||
* Retrieves all cookies from a single cookie store that match the given information. The cookies returned will be sorted, with those with the longest path first. If multiple cookies have the same path length, those with the earliest creation time will be first.
|
||||
* @param details Information to filter the cookies being retrieved.
|
||||
* @return The `getAll` method provides its result via callback or returned as a `Promise` (MV3 only).
|
||||
*/
|
||||
export function getAll(details: GetAllDetails): Promise<Cookie[]>;
|
||||
|
||||
/**
|
||||
* Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
|
||||
* @param details Details about the cookie being set.
|
||||
* @return The `set` method provides its result via callback or returned as a `Promise` (MV3 only).
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later.
|
||||
*/
|
||||
export function set(details: SetDetails): Promise<Cookie | null>;
|
||||
|
||||
/**
|
||||
* Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
|
||||
* @param details Details about the cookie being set.
|
||||
* Optional parameter cookie: Contains details about the cookie that's been set. If setting failed for any reason, this will be "null", and "Browser.runtime.lastError" will be set.
|
||||
*/
|
||||
export function set(details: SetDetails, callback: (cookie: Cookie | null) => void): void;
|
||||
|
||||
/**
|
||||
* Deletes a cookie by name.
|
||||
* @param details Information to identify the cookie to remove.
|
||||
* @return The `remove` method provides its result via callback or returned as a `Promise` (MV3 only).
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later.
|
||||
*/
|
||||
export function remove(details: CookieDetails): Promise<CookieDetails>;
|
||||
|
||||
/**
|
||||
* Deletes a cookie by name.
|
||||
* @param details Information to identify the cookie to remove.
|
||||
*/
|
||||
export function remove(details: CookieDetails, callback?: (details: CookieDetails) => void): void;
|
||||
|
||||
/**
|
||||
* Retrieves information about a single cookie. If more than one cookie of the same name exists for the given URL, the one with the longest path will be returned. For cookies with the same path length, the cookie with the earliest creation time will be returned.
|
||||
* @param details Details to identify the cookie being retrieved.
|
||||
* Parameter cookie: Contains details about the cookie. This parameter is null if no such cookie was found.
|
||||
*/
|
||||
export function get(details: CookieDetails, callback: (cookie: Cookie | null) => void): void;
|
||||
|
||||
/**
|
||||
* Retrieves information about a single cookie. If more than one cookie of the same name exists for the given URL, the one with the longest path will be returned. For cookies with the same path length, the cookie with the earliest creation time will be returned.
|
||||
* @param details Details to identify the cookie being retrieved.
|
||||
* @return The `get` method provides its result via callback or returned as a `Promise` (MV3 only).
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3 or later.
|
||||
*/
|
||||
export function get(details: CookieDetails): Promise<Cookie | null>;
|
||||
export function get(details: CookieDetails, callback: (cookie: Cookie | null) => void): void;
|
||||
|
||||
/** Fired when a cookie is set or removed. As a special case, note that updating a cookie's properties is implemented as a two step process: the cookie to be updated is first removed entirely, generating a notification with "cause" of "overwrite" . Afterwards, a new cookie is written with the updated values, generating a second notification with "cause" "explicit". */
|
||||
export var onChanged: CookieChangedEvent;
|
||||
export const onChanged: events.Event<(changeInfo: CookieChangeInfo) => void>;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -2688,31 +2619,39 @@ export namespace Browser {
|
||||
* Permissions: "desktopCapture"
|
||||
*/
|
||||
export namespace desktopCapture {
|
||||
/** Contains properties that describe the stream. */
|
||||
/** Enum used to define set of desktop media sources used in {@link chooseDesktopMedia}. */
|
||||
export enum DesktopCaptureSourceType {
|
||||
SCREEN = "screen",
|
||||
WINDOW = "window",
|
||||
TAB = "tab",
|
||||
AUDIO = "audio",
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains properties that describe the stream.
|
||||
* @since Chrome 57
|
||||
*/
|
||||
export interface StreamOptions {
|
||||
/** True if "audio" is included in parameter sources, and the end user does not uncheck the "Share audio" checkbox. Otherwise false, and in this case, one should not ask for audio stream through getUserMedia call. */
|
||||
canRequestAudioTrack: boolean;
|
||||
}
|
||||
/**
|
||||
* Shows desktop media picker UI with the specified set of sources.
|
||||
* @param sources Set of sources that should be shown to the user.
|
||||
* Parameter streamId: An opaque string that can be passed to getUserMedia() API to generate media stream that corresponds to the source selected by the user. If user didn't select any source (i.e. canceled the prompt) then the callback is called with an empty streamId. The created streamId can be used only once and expires after a few seconds when it is not used.
|
||||
* @param sources Set of sources that should be shown to the user. The sources order in the set decides the tab order in the picker.
|
||||
* @param targetTab Optional tab for which the stream is created. If not specified then the resulting stream can be used only by the calling extension. The stream can only be used by frames in the given tab whose security origin matches `tab.url`. The tab's origin must be a secure origin, e.g. HTTPS.
|
||||
* @param callback streamId: An opaque string that can be passed to `getUserMedia()` API to generate media stream that corresponds to the source selected by the user. If user didn't select any source (i.e. canceled the prompt) then the callback is called with an empty `streamId`. The created `streamId` can be used only once and expires after a few seconds when it is not used.
|
||||
* @return An id that can be passed to cancelChooseDesktopMedia() in case the prompt need to be canceled.
|
||||
*/
|
||||
export function chooseDesktopMedia(
|
||||
sources: string[],
|
||||
sources: `${DesktopCaptureSourceType}`[],
|
||||
callback: (streamId: string, options: StreamOptions) => void,
|
||||
): number;
|
||||
/**
|
||||
* Shows desktop media picker UI with the specified set of sources.
|
||||
* @param sources Set of sources that should be shown to the user.
|
||||
* @param targetTab Optional tab for which the stream is created. If not specified then the resulting stream can be used only by the calling extension. The stream can only be used by frames in the given tab whose security origin matches tab.url.
|
||||
* Parameter streamId: An opaque string that can be passed to getUserMedia() API to generate media stream that corresponds to the source selected by the user. If user didn't select any source (i.e. canceled the prompt) then the callback is called with an empty streamId. The created streamId can be used only once and expires after a few seconds when it is not used.
|
||||
*/
|
||||
export function chooseDesktopMedia(
|
||||
sources: string[],
|
||||
targetTab: Browser.tabs.Tab,
|
||||
sources: `${DesktopCaptureSourceType}`[],
|
||||
targetTab: tabs.Tab | undefined,
|
||||
callback: (streamId: string, options: StreamOptions) => void,
|
||||
): number;
|
||||
|
||||
/**
|
||||
* Hides desktop media picker dialog shown by chooseDesktopMedia().
|
||||
* @param desktopMediaRequestId Id returned by chooseDesktopMedia()
|
||||
@@ -2928,7 +2867,7 @@ export namespace Browser {
|
||||
|
||||
export interface PanelSearchEvent extends Browser.events.Event<(action: string, queryString?: string) => void> {}
|
||||
|
||||
/** Represents a panel created by extension. */
|
||||
/** Represents a panel created by an extension. */
|
||||
export interface ExtensionPanel {
|
||||
/**
|
||||
* Appends a button to the status bar of the panel.
|
||||
@@ -4327,6 +4266,24 @@ export namespace Browser {
|
||||
export function getHardwarePlatformInfo(callback: (info: HardwarePlatformInfo) => void): void;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
// Enterprise Login
|
||||
////////////////////
|
||||
/**
|
||||
* Use the `Browser.enterprise.login` API to exit Managed Guest sessions. Note: This API is only available to extensions installed by enterprise policy in ChromeOS Managed Guest sessions.
|
||||
*
|
||||
* Permissions: "enterprise.login"
|
||||
*
|
||||
* Note: Only available to policy installed extensions.
|
||||
* @platform ChromeOS only
|
||||
* @since Chrome 139
|
||||
*/
|
||||
export namespace enterprise.login {
|
||||
/** Exits the current managed guest session. */
|
||||
export function exitCurrentManagedGuestSession(): Promise<void>;
|
||||
export function exitCurrentManagedGuestSession(callback: () => void): void;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
// Enterprise Networking Attributes
|
||||
////////////////////
|
||||
@@ -8345,10 +8302,7 @@ export namespace Browser {
|
||||
*/
|
||||
relatedWebsiteSetsEnabled: Browser.types.ChromeSetting<boolean>;
|
||||
|
||||
/**
|
||||
* If disabled, Chrome blocks third-party sites from setting cookies.
|
||||
* The value of this preference is of type boolean, and the default value is `true`.
|
||||
*/
|
||||
/** If disabled, Chrome blocks third-party sites from setting cookies. The value of this preference is of type boolean, and the default value is `true`. Extensions may not enable this API in Incognito mode, where third-party cookies are blocked and can only be allowed at the site level. If you try setting this API to true in Incognito, it will throw an error. */
|
||||
thirdPartyCookiesAllowed: Browser.types.ChromeSetting<boolean>;
|
||||
|
||||
/**
|
||||
@@ -8639,6 +8593,8 @@ export namespace Browser {
|
||||
MIPS = "mips",
|
||||
/** Specifies the processer architecture as mips64. */
|
||||
MIPS64 = "mips64",
|
||||
/** Specifies the processer architecture as riscv64. */
|
||||
RISCV64 = "riscv64",
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -8805,7 +8761,7 @@ export namespace Browser {
|
||||
/** The machine's processor architecture. */
|
||||
arch: `${PlatformArch}`;
|
||||
/** The native client architecture. This may be different from arch on some platforms. */
|
||||
nacl_arch: `${PlatformNaclArch}`;
|
||||
nacl_arch?: `${PlatformNaclArch}`;
|
||||
}
|
||||
|
||||
/** An object which allows two way communication with other pages. */
|
||||
@@ -8894,6 +8850,7 @@ export namespace Browser {
|
||||
| "downloads.ui"
|
||||
| "enterprise.deviceAttributes"
|
||||
| "enterprise.hardwarePlatform"
|
||||
| "enterprise.login"
|
||||
| "enterprise.networkingAttributes"
|
||||
| "enterprise.platformKeys"
|
||||
| "experimental"
|
||||
@@ -9917,14 +9874,14 @@ export namespace Browser {
|
||||
*/
|
||||
get<T = { [key: string]: any }>(callback: (items: T) => void): void;
|
||||
/**
|
||||
* Sets the desired access level for the storage area. The default will be only trusted contexts.
|
||||
* Sets the desired access level for the storage area. By default, session storage is restricted to trusted contexts (extension pages and service workers), while managed, local, and sync storage allow access from both trusted and untrusted contexts.
|
||||
* @param accessOptions An object containing an accessLevel key which contains the access level of the storage area.
|
||||
* @return A void Promise.
|
||||
* @since Chrome 102
|
||||
*/
|
||||
setAccessLevel(accessOptions: { accessLevel: AccessLevel }): Promise<void>;
|
||||
/**
|
||||
* Sets the desired access level for the storage area. The default will be only trusted contexts.
|
||||
* Sets the desired access level for the storage area. By default, session storage is restricted to trusted contexts (extension pages and service workers), while managed, local, and sync storage allow access from both trusted and untrusted contexts.
|
||||
* @param accessOptions An object containing an accessLevel key which contains the access level of the storage area.
|
||||
* @param callback Optional.
|
||||
* @since Chrome 102
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/chrome": "{{chromeTypesVersion}}",
|
||||
"fs-extra": "^11.3.0",
|
||||
"nano-spawn": "^0.2.0",
|
||||
"fs-extra": "^11.3.1",
|
||||
"nano-spawn": "^1.0.2",
|
||||
"tsx": "4.19.4",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript": "^5.9.2",
|
||||
"vitest": "^3.1.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,13 +40,13 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aklinker1/check": "2.0.0",
|
||||
"@aklinker1/check": "^2.1.0",
|
||||
"@types/node": "^20.17.6",
|
||||
"oxlint": "^0.16.8",
|
||||
"oxlint": "^1.14.0",
|
||||
"publint": "^0.3.12",
|
||||
"typescript": "^5.8.3",
|
||||
"unbuild": "^3.5.0",
|
||||
"vitest": "^3.1.2",
|
||||
"typescript": "^5.9.2",
|
||||
"unbuild": "^3.6.1",
|
||||
"vitest": "^3.2.4",
|
||||
"vitest-plugin-random-seed": "^1.1.1",
|
||||
"wxt": "workspace:*"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,43 @@
|
||||
# Changelog
|
||||
|
||||
## v1.1.5
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/module-react-v1.1.4...module-react-v1.1.5)
|
||||
|
||||
### 🏡 Chore
|
||||
|
||||
- **deps:** Support @vitejs/plugin-react@5 ([9170159b](https://github.com/wxt-dev/wxt/commit/9170159b))
|
||||
|
||||
### ❤️ Contributors
|
||||
|
||||
- Aaron ([@aklinker1](https://github.com/aklinker1))
|
||||
|
||||
## v1.1.4
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/module-react-v1.1.3...module-react-v1.1.4)
|
||||
|
||||
### 🩹 Fixes
|
||||
|
||||
- Add support for WXT v0.20.0 ([c9dca022](https://github.com/wxt-dev/wxt/commit/c9dca022))
|
||||
|
||||
### 🏡 Chore
|
||||
|
||||
- Add funding links to `package.json` files ([#1446](https://github.com/wxt-dev/wxt/pull/1446))
|
||||
- Use PNPM 10's new catelog feature ([#1493](https://github.com/wxt-dev/wxt/pull/1493))
|
||||
- Move production dependencies to PNPM 10 catelog ([#1494](https://github.com/wxt-dev/wxt/pull/1494))
|
||||
- **deps:** Upgrade to Vite 6 and related dependencies ([#1496](https://github.com/wxt-dev/wxt/pull/1496))
|
||||
- Stop using PNPM catalog ([#1644](https://github.com/wxt-dev/wxt/pull/1644))
|
||||
- Upgrade `@aklinker1/check` to v2 ([#1647](https://github.com/wxt-dev/wxt/pull/1647))
|
||||
- **deps:** Update all dependencies ([#1648](https://github.com/wxt-dev/wxt/pull/1648))
|
||||
- **deps:** Upgrade typescript from 5.8.3 to 5.9.2 ([a6eef643](https://github.com/wxt-dev/wxt/commit/a6eef643))
|
||||
- Create script for managing dependency upgrades ([#1875](https://github.com/wxt-dev/wxt/pull/1875))
|
||||
- **deps:** Upgrade all dev dependencies ([#1876](https://github.com/wxt-dev/wxt/pull/1876))
|
||||
|
||||
### ❤️ Contributors
|
||||
|
||||
- Aaron ([@aklinker1](https://github.com/aklinker1))
|
||||
- Okinea Dev <hi@okinea.dev>
|
||||
|
||||
## v1.1.3
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/module-react-v1.1.2...module-react-v1.1.3)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"funding": "https://github.com/sponsors/wxt-dev",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.5",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.mjs",
|
||||
@@ -48,17 +48,17 @@
|
||||
"wxt": ">=0.19.16"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vitejs/plugin-react": "^4.4.1"
|
||||
"@vitejs/plugin-react": "^4.4.1 || ^5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aklinker1/check": "2.0.0",
|
||||
"@types/react": "^19.1.2",
|
||||
"@types/react-dom": "^19.1.3",
|
||||
"@aklinker1/check": "^2.1.0",
|
||||
"@types/react": "^19.1.12",
|
||||
"@types/react-dom": "^19.1.9",
|
||||
"publint": "^0.3.12",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"typescript": "^5.8.3",
|
||||
"unbuild": "^3.5.0",
|
||||
"react": "^19.1.1",
|
||||
"react-dom": "^19.1.1",
|
||||
"typescript": "^5.9.2",
|
||||
"unbuild": "^3.6.1",
|
||||
"wxt": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,33 @@
|
||||
# Changelog
|
||||
|
||||
## v1.1.4
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/module-solid-v1.1.3...module-solid-v1.1.4)
|
||||
|
||||
### 🩹 Fixes
|
||||
|
||||
- Add support for WXT v0.20.0 ([c9dca022](https://github.com/wxt-dev/wxt/commit/c9dca022))
|
||||
|
||||
### 🏡 Chore
|
||||
|
||||
- **deps-dev:** Bump solid-js from 1.9.3 to 1.9.4 ([#1391](https://github.com/wxt-dev/wxt/pull/1391))
|
||||
- Add funding links to `package.json` files ([#1446](https://github.com/wxt-dev/wxt/pull/1446))
|
||||
- **deps:** Bump vite-plugin-solid from 2.10.2 to 2.11.6 ([#1491](https://github.com/wxt-dev/wxt/pull/1491))
|
||||
- Use PNPM 10's new catelog feature ([#1493](https://github.com/wxt-dev/wxt/pull/1493))
|
||||
- Move production dependencies to PNPM 10 catelog ([#1494](https://github.com/wxt-dev/wxt/pull/1494))
|
||||
- **deps:** Upgrade to Vite 6 and related dependencies ([#1496](https://github.com/wxt-dev/wxt/pull/1496))
|
||||
- Stop using PNPM catalog ([#1644](https://github.com/wxt-dev/wxt/pull/1644))
|
||||
- Upgrade `@aklinker1/check` to v2 ([#1647](https://github.com/wxt-dev/wxt/pull/1647))
|
||||
- **deps:** Update all dependencies ([#1648](https://github.com/wxt-dev/wxt/pull/1648))
|
||||
- **deps:** Upgrade typescript from 5.8.3 to 5.9.2 ([a6eef643](https://github.com/wxt-dev/wxt/commit/a6eef643))
|
||||
- Create script for managing dependency upgrades ([#1875](https://github.com/wxt-dev/wxt/pull/1875))
|
||||
- **deps:** Upgrade all dev dependencies ([#1876](https://github.com/wxt-dev/wxt/pull/1876))
|
||||
|
||||
### ❤️ Contributors
|
||||
|
||||
- Aaron ([@aklinker1](https://github.com/aklinker1))
|
||||
- Okinea Dev <hi@okinea.dev>
|
||||
|
||||
## v1.1.3
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/module-solid-v1.1.2...module-solid-v1.1.3)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"funding": "https://github.com/sponsors/wxt-dev",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.mjs",
|
||||
@@ -48,14 +48,14 @@
|
||||
"wxt": ">=0.19.16"
|
||||
},
|
||||
"dependencies": {
|
||||
"vite-plugin-solid": "^2.11.6"
|
||||
"vite-plugin-solid": "^2.11.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aklinker1/check": "2.0.0",
|
||||
"@aklinker1/check": "^2.1.0",
|
||||
"publint": "^0.3.12",
|
||||
"solid-js": "^1.9.6",
|
||||
"typescript": "^5.8.3",
|
||||
"unbuild": "^3.5.0",
|
||||
"solid-js": "^1.9.9",
|
||||
"typescript": "^5.9.2",
|
||||
"unbuild": "^3.6.1",
|
||||
"wxt": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,29 @@
|
||||
# Changelog
|
||||
|
||||
## v2.0.4
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/module-svelte-v2.0.3...module-svelte-v2.0.4)
|
||||
|
||||
### 🩹 Fixes
|
||||
|
||||
- Add support for @sveltejs/vite-plugin-svelte@6 ([459f73fd](https://github.com/wxt-dev/wxt/commit/459f73fd))
|
||||
|
||||
### 🏡 Chore
|
||||
|
||||
- Add funding links to `package.json` files ([#1446](https://github.com/wxt-dev/wxt/pull/1446))
|
||||
- Use PNPM 10's new catelog feature ([#1493](https://github.com/wxt-dev/wxt/pull/1493))
|
||||
- Move production dependencies to PNPM 10 catelog ([#1494](https://github.com/wxt-dev/wxt/pull/1494))
|
||||
- Stop using PNPM catalog ([#1644](https://github.com/wxt-dev/wxt/pull/1644))
|
||||
- Upgrade `@aklinker1/check` to v2 ([#1647](https://github.com/wxt-dev/wxt/pull/1647))
|
||||
- **deps:** Upgrade typescript from 5.8.3 to 5.9.2 ([a6eef643](https://github.com/wxt-dev/wxt/commit/a6eef643))
|
||||
- Create script for managing dependency upgrades ([#1875](https://github.com/wxt-dev/wxt/pull/1875))
|
||||
- **deps:** Upgrade all dev dependencies ([#1876](https://github.com/wxt-dev/wxt/pull/1876))
|
||||
|
||||
### ❤️ Contributors
|
||||
|
||||
- Aaron ([@aklinker1](https://github.com/aklinker1))
|
||||
- Okinea Dev <hi@okinea.dev>
|
||||
|
||||
## v2.0.3
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/module-svelte-v2.0.2...module-svelte-v2.0.3)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"funding": "https://github.com/sponsors/wxt-dev",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.mjs",
|
||||
@@ -47,13 +47,13 @@
|
||||
"svelte": ">=5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sveltejs/vite-plugin-svelte": "^4.0.0 || ^5.0.0"
|
||||
"@sveltejs/vite-plugin-svelte": "^4.0.0 || ^5.0.0 || ^6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aklinker1/check": "2.0.0",
|
||||
"@aklinker1/check": "^2.1.0",
|
||||
"publint": "^0.3.12",
|
||||
"typescript": "^5.8.3",
|
||||
"unbuild": "^3.5.0",
|
||||
"typescript": "^5.9.2",
|
||||
"unbuild": "^3.6.1",
|
||||
"wxt": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,27 @@
|
||||
# Changelog
|
||||
|
||||
## v1.0.3
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/module-vue-v1.0.2...module-vue-v1.0.3)
|
||||
|
||||
### 🏡 Chore
|
||||
|
||||
- Add funding links to `package.json` files ([#1446](https://github.com/wxt-dev/wxt/pull/1446))
|
||||
- Use PNPM 10's new catelog feature ([#1493](https://github.com/wxt-dev/wxt/pull/1493))
|
||||
- Move production dependencies to PNPM 10 catelog ([#1494](https://github.com/wxt-dev/wxt/pull/1494))
|
||||
- Stop using PNPM catalog ([#1644](https://github.com/wxt-dev/wxt/pull/1644))
|
||||
- Upgrade `@aklinker1/check` to v2 ([#1647](https://github.com/wxt-dev/wxt/pull/1647))
|
||||
- Wxt & @wxt-dev/module-vue support Vite 7 ([#1771](https://github.com/wxt-dev/wxt/pull/1771))
|
||||
- **deps:** Upgrade typescript from 5.8.3 to 5.9.2 ([a6eef643](https://github.com/wxt-dev/wxt/commit/a6eef643))
|
||||
- Create script for managing dependency upgrades ([#1875](https://github.com/wxt-dev/wxt/pull/1875))
|
||||
- **deps:** Upgrade all dev dependencies ([#1876](https://github.com/wxt-dev/wxt/pull/1876))
|
||||
|
||||
### ❤️ Contributors
|
||||
|
||||
- Aaron ([@aklinker1](https://github.com/aklinker1))
|
||||
- Ayu ([@ayu-exorcist](https://github.com/ayu-exorcist))
|
||||
- Okinea Dev <hi@okinea.dev>
|
||||
|
||||
## v1.0.2
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/module-vue-v1.0.1...module-vue-v1.0.2)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"funding": "https://github.com/sponsors/wxt-dev",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.mjs",
|
||||
@@ -49,10 +49,10 @@
|
||||
"@vitejs/plugin-vue": "^5.2.3 || ^6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aklinker1/check": "2.0.0",
|
||||
"@aklinker1/check": "^2.1.0",
|
||||
"publint": "^0.3.12",
|
||||
"typescript": "^5.8.3",
|
||||
"unbuild": "^3.5.0",
|
||||
"typescript": "^5.9.2",
|
||||
"unbuild": "^3.6.1",
|
||||
"wxt": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,33 @@
|
||||
# Changelog
|
||||
|
||||
## v0.1.2
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/runner-v0.1.1...runner-v0.1.2)
|
||||
|
||||
### 🚀 Enhancements
|
||||
|
||||
- **config:** Add browser path for Zen via Homebrew ([#1813](https://github.com/wxt-dev/wxt/pull/1813))
|
||||
|
||||
### 🩹 Fixes
|
||||
|
||||
- Improve Chrome path search ([#1823](https://github.com/wxt-dev/wxt/pull/1823))
|
||||
- **paths:** Add browser paths for Arc & Dia on macos ([#1814](https://github.com/wxt-dev/wxt/pull/1814))
|
||||
|
||||
### 🏡 Chore
|
||||
|
||||
- Fix auto-fixable `markdownlint` errors ([#1710](https://github.com/wxt-dev/wxt/pull/1710))
|
||||
- Manually fix markdownlint errors ([#1711](https://github.com/wxt-dev/wxt/pull/1711))
|
||||
- **deps:** Upgrade oxlint from 0.16.8 to 1.14.0 ([a01928e0](https://github.com/wxt-dev/wxt/commit/a01928e0))
|
||||
- **deps:** Upgrade typescript from 5.8.3 to 5.9.2 ([a6eef643](https://github.com/wxt-dev/wxt/commit/a6eef643))
|
||||
- Create script for managing dependency upgrades ([#1875](https://github.com/wxt-dev/wxt/pull/1875))
|
||||
- **deps:** Upgrade all dev dependencies ([#1876](https://github.com/wxt-dev/wxt/pull/1876))
|
||||
|
||||
### ❤️ Contributors
|
||||
|
||||
- Aaron ([@aklinker1](https://github.com/aklinker1))
|
||||
- Sam Carlton ([@ThatGuySam](https://github.com/ThatGuySam))
|
||||
- Alexander Kachkaev <alexander@kachkaev.ru>
|
||||
|
||||
## v0.1.1
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/runner-v0.1.0...runner-v0.1.1)
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@wxt-dev/runner",
|
||||
"description": "Launch Chrome and Firefox with a web extension installed",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -29,13 +29,13 @@
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@aklinker1/check": "2.0.0",
|
||||
"oxlint": "^0.16.8",
|
||||
"@aklinker1/check": "^2.1.0",
|
||||
"oxlint": "^1.14.0",
|
||||
"publint": "^0.3.12",
|
||||
"tsx": "4.19.4",
|
||||
"typescript": "^5.8.3",
|
||||
"unbuild": "^3.5.0",
|
||||
"vitest": "^3.1.2"
|
||||
"tsx": "4.20.5",
|
||||
"typescript": "^5.9.2",
|
||||
"unbuild": "^3.6.1",
|
||||
"vitest": "^3.2.4"
|
||||
},
|
||||
"main": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -1,5 +1,52 @@
|
||||
# Changelog
|
||||
|
||||
## v1.2.4
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/storage-v1.2.3...storage-v1.2.4)
|
||||
|
||||
## v1.2.3
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/storage-v1.2.2...storage-v1.2.3)
|
||||
|
||||
## v1.2.2
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/storage-v1.2.1...storage-v1.2.2)
|
||||
|
||||
## v1.2.1
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/storage-v1.2.0...storage-v1.2.1)
|
||||
|
||||
## v1.2.0
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/storage-v1.1.1...storage-v1.2.0)
|
||||
|
||||
### 🚀 Enhancements
|
||||
|
||||
- **storage:** Add `onMigrationComplete` callback ([#1514](https://github.com/wxt-dev/wxt/pull/1514))
|
||||
- **storage:** Add `debug` option to enable migration logs ([#1513](https://github.com/wxt-dev/wxt/pull/1513))
|
||||
|
||||
### 🩹 Fixes
|
||||
|
||||
- Fix typescript error on `defineItem` fallback ([#1601](https://github.com/wxt-dev/wxt/pull/1601))
|
||||
- Use `@wxt-dev/browser` instead of `@types/chrome` ([#1645](https://github.com/wxt-dev/wxt/pull/1645))
|
||||
|
||||
### 🏡 Chore
|
||||
|
||||
- **deps:** Update all dependencies ([#1568](https://github.com/wxt-dev/wxt/pull/1568))
|
||||
- Stop using PNPM catalog ([#1644](https://github.com/wxt-dev/wxt/pull/1644))
|
||||
- Upgrade `@aklinker1/check` to v2 ([#1647](https://github.com/wxt-dev/wxt/pull/1647))
|
||||
- Change browser workspace dependency to `^` ([c7335add](https://github.com/wxt-dev/wxt/commit/c7335add))
|
||||
- **deps:** Upgrade oxlint from 0.16.8 to 1.14.0 ([a01928e0](https://github.com/wxt-dev/wxt/commit/a01928e0))
|
||||
- **deps:** Upgrade typescript from 5.8.3 to 5.9.2 ([a6eef643](https://github.com/wxt-dev/wxt/commit/a6eef643))
|
||||
- Create script for managing dependency upgrades ([#1875](https://github.com/wxt-dev/wxt/pull/1875))
|
||||
- **deps:** Upgrade all dev dependencies ([#1876](https://github.com/wxt-dev/wxt/pull/1876))
|
||||
|
||||
### ❤️ Contributors
|
||||
|
||||
- Aaron ([@aklinker1](https://github.com/aklinker1))
|
||||
- Anh71me ([@iyume](https://github.com/iyume))
|
||||
- Ergou <ma2808203259@hotmail.com>
|
||||
|
||||
## v1.1.1
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/storage-v1.1.0...storage-v1.1.1)
|
||||
@@ -69,4 +116,4 @@ It's still shipped inside WXT and accessible via `wxt/storage`, but now:
|
||||
|
||||
[Read the docs](https://wxt.dev/storage.html) for more details.
|
||||
|
||||
> This is apart of the v1.0 initiative for WXT.
|
||||
> This is apart of the v1.0 initiative for WXT.
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@wxt-dev/storage",
|
||||
"description": "Web extension storage API provided by WXT, supports all browsers.",
|
||||
"version": "1.1.1",
|
||||
"version": "1.2.4",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -35,13 +35,13 @@
|
||||
"dequal": "^2.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aklinker1/check": "2.0.0",
|
||||
"@aklinker1/check": "^2.1.0",
|
||||
"@webext-core/fake-browser": "^1.3.2",
|
||||
"oxlint": "^0.16.8",
|
||||
"oxlint": "^1.14.0",
|
||||
"publint": "^0.3.12",
|
||||
"typescript": "^5.8.3",
|
||||
"unbuild": "^3.5.0",
|
||||
"vitest": "^3.1.2"
|
||||
"typescript": "^5.9.2",
|
||||
"unbuild": "^3.6.1",
|
||||
"vitest": "^3.2.4"
|
||||
},
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
"wxt": ">=0.19.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aklinker1/check": "2.0.0",
|
||||
"oxlint": "^0.16.8",
|
||||
"@aklinker1/check": "^2.1.0",
|
||||
"oxlint": "^1.14.0",
|
||||
"publint": "^0.3.12",
|
||||
"typescript": "^5.8.3",
|
||||
"unbuild": "^3.5.0",
|
||||
"typescript": "^5.9.2",
|
||||
"unbuild": "^3.6.1",
|
||||
"unocss": "^0.64.0 || ^0.65.0 || ^65.0.0 || ^66.0.0",
|
||||
"wxt": "workspace:*"
|
||||
},
|
||||
|
||||
@@ -45,11 +45,11 @@
|
||||
"wxt": ">=0.20.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aklinker1/check": "2.0.0",
|
||||
"@aklinker1/check": "^2.1.0",
|
||||
"@types/webextension-polyfill": "^0.12.3",
|
||||
"publint": "^0.3.12",
|
||||
"typescript": "^5.8.3",
|
||||
"unbuild": "^3.5.0",
|
||||
"typescript": "^5.9.2",
|
||||
"unbuild": "^3.6.1",
|
||||
"webextension-polyfill": "^0.12.0",
|
||||
"wxt": "workspace:*"
|
||||
}
|
||||
|
||||
@@ -18,18 +18,18 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@wxt-dev/i18n": "workspace:*",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0"
|
||||
"react": "^19.1.1",
|
||||
"react-dom": "^19.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.1.2",
|
||||
"@types/react-dom": "^19.1.3",
|
||||
"@types/react": "^19.1.12",
|
||||
"@types/react-dom": "^19.1.9",
|
||||
"@wxt-dev/auto-icons": "workspace:*",
|
||||
"@wxt-dev/unocss": "workspace:*",
|
||||
"sass": "^1.87.0",
|
||||
"typescript": "^5.8.3",
|
||||
"sass": "^1.92.0",
|
||||
"typescript": "^5.9.2",
|
||||
"unocss": "^0.64.0 || ^0.65.0 || ^65.0.0 || ^66.0.0",
|
||||
"vitest": "^3.1.2",
|
||||
"vitest": "^3.2.4",
|
||||
"vitest-plugin-random-seed": "^1.1.1",
|
||||
"wxt": "workspace:*"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,64 @@
|
||||
# Changelog
|
||||
|
||||
## v0.20.11
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/wxt-v0.20.10...wxt-v0.20.11)
|
||||
|
||||
### 🩹 Fixes
|
||||
|
||||
- Split `wxt/testing` into separate modules to fix issues with `jsdom` and `happy-dom` ([#1844](https://github.com/wxt-dev/wxt/pull/1844))
|
||||
- `input_components` is supported by mv3 ([#1881](https://github.com/wxt-dev/wxt/pull/1881))
|
||||
|
||||
### 🏡 Chore
|
||||
|
||||
- **deps:** Upgrade project subdependencies ([#1882](https://github.com/wxt-dev/wxt/pull/1882))
|
||||
|
||||
### ❤️ Contributors
|
||||
|
||||
- Aaron ([@aklinker1](https://github.com/aklinker1))
|
||||
- Qijia Liu <liumeo@pku.edu.cn>
|
||||
- Marcellino Ornelas ([@marcellino-ornelas](https://github.com/marcellino-ornelas))
|
||||
|
||||
## v0.20.10
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/wxt-v0.20.9...wxt-v0.20.10)
|
||||
|
||||
### 🏡 Chore
|
||||
|
||||
- **deps:** Upgrade non-breaking production dependencies ([#1877](https://github.com/wxt-dev/wxt/pull/1877))
|
||||
- **deps:** Upgrade web-ext-run to support CDP ([#1879](https://github.com/wxt-dev/wxt/pull/1879))
|
||||
- **deps:** `publish-browser-extension` upgrade ([#1880](https://github.com/wxt-dev/wxt/pull/1880))
|
||||
|
||||
### ❤️ Contributors
|
||||
|
||||
- Aaron ([@aklinker1](https://github.com/aklinker1))
|
||||
|
||||
## v0.20.9
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/wxt-v0.20.8...wxt-v0.20.9)
|
||||
|
||||
### 🩹 Fixes
|
||||
|
||||
- **types:** Use TType for DocumentEventMap key in ctx.addEventListener ([#1863](https://github.com/wxt-dev/wxt/pull/1863))
|
||||
- Prevent Unlisted CSS from being excluded in the build when using CSS preprocessor ([#1590](https://github.com/wxt-dev/wxt/pull/1590))
|
||||
|
||||
### 🏡 Chore
|
||||
|
||||
- **deps:** Upgrade oxlint from 0.16.8 to 1.14.0 ([a01928e0](https://github.com/wxt-dev/wxt/commit/a01928e0))
|
||||
- **deps:** Upgrade typescript from 5.8.3 to 5.9.2 ([a6eef643](https://github.com/wxt-dev/wxt/commit/a6eef643))
|
||||
- Upgrade nano-spawn to v1 ([5fefd8e0](https://github.com/wxt-dev/wxt/commit/5fefd8e0))
|
||||
- Upgrade faker to v10 ([984568e0](https://github.com/wxt-dev/wxt/commit/984568e0))
|
||||
- Upgrade dotenv to v17.2.2 ([380a9630](https://github.com/wxt-dev/wxt/commit/380a9630))
|
||||
- Upgrade happy-dom to v18.0.1 ([c1c3d3b7](https://github.com/wxt-dev/wxt/commit/c1c3d3b7))
|
||||
- Create script for managing dependency upgrades ([#1875](https://github.com/wxt-dev/wxt/pull/1875))
|
||||
- **deps:** Upgrade all dev dependencies ([#1876](https://github.com/wxt-dev/wxt/pull/1876))
|
||||
|
||||
### ❤️ Contributors
|
||||
|
||||
- Aaron ([@aklinker1](https://github.com/aklinker1))
|
||||
- Kim Gyeongjae ([@PortalCube](https://github.com/PortalCube))
|
||||
- Atomie CHEN <atomic_cwh@163.com>
|
||||
|
||||
## v0.20.8
|
||||
|
||||
[compare changes](https://github.com/wxt-dev/wxt/compare/wxt-v0.20.7...wxt-v0.20.8)
|
||||
|
||||
@@ -220,6 +220,77 @@ describe('Output Directory Structure', () => {
|
||||
expect(await project.fileExists('.output/chrome-mv3/unlisted.js'));
|
||||
});
|
||||
|
||||
it('should support CSS entrypoints', async () => {
|
||||
const project = new TestProject();
|
||||
|
||||
project.addFile(
|
||||
'entrypoints/plain-one.css',
|
||||
`body {
|
||||
font: 100% Helvetica, sans-serif;
|
||||
color: #333;
|
||||
}`,
|
||||
);
|
||||
|
||||
project.addFile(
|
||||
'entrypoints/plain-two.content.css',
|
||||
`body {
|
||||
font: 100% Helvetica, sans-serif;
|
||||
color: #333;
|
||||
}`,
|
||||
);
|
||||
|
||||
project.addFile(
|
||||
'entrypoints/sass-one.scss',
|
||||
`$font-stack: Helvetica, sans-serif;
|
||||
$primary-color: #333;
|
||||
|
||||
body {
|
||||
font: 100% $font-stack;
|
||||
color: $primary-color;
|
||||
}`,
|
||||
);
|
||||
|
||||
project.addFile(
|
||||
'entrypoints/sass-two.content.scss',
|
||||
`$font-stack: Helvetica, sans-serif;
|
||||
$primary-color: #333;
|
||||
|
||||
body {
|
||||
font: 100% $font-stack;
|
||||
color: $primary-color;
|
||||
}`,
|
||||
);
|
||||
|
||||
await project.build();
|
||||
|
||||
expect(await project.serializeOutput(['.output/chrome-mv3/manifest.json']))
|
||||
.toMatchInlineSnapshot(`
|
||||
".output/chrome-mv3/assets/plain-one.css
|
||||
----------------------------------------
|
||||
body{font:100% Helvetica,sans-serif;color:#333}
|
||||
|
||||
================================================================================
|
||||
.output/chrome-mv3/assets/sass-one.css
|
||||
----------------------------------------
|
||||
body{font:100% Helvetica,sans-serif;color:#333}
|
||||
|
||||
================================================================================
|
||||
.output/chrome-mv3/content-scripts/plain-two.css
|
||||
----------------------------------------
|
||||
body{font:100% Helvetica,sans-serif;color:#333}
|
||||
|
||||
================================================================================
|
||||
.output/chrome-mv3/content-scripts/sass-two.css
|
||||
----------------------------------------
|
||||
body{font:100% Helvetica,sans-serif;color:#333}
|
||||
|
||||
================================================================================
|
||||
.output/chrome-mv3/manifest.json
|
||||
----------------------------------------
|
||||
<contents-ignored>"
|
||||
`);
|
||||
});
|
||||
|
||||
it("should output to a custom directory when overriding 'outDir'", async () => {
|
||||
const project = new TestProject();
|
||||
project.addFile('entrypoints/unlisted.html', '<html></html>');
|
||||
@@ -274,7 +345,6 @@ describe('Output Directory Structure', () => {
|
||||
.toMatchInlineSnapshot(`
|
||||
".output/chrome-mv3/background.js
|
||||
----------------------------------------
|
||||
var _a, _b;
|
||||
import { l as logHello, i as initPlugins } from "./chunks/_virtual_wxt-plugins-OjKtWpmY.js";
|
||||
function defineBackground(arg) {
|
||||
if (arg == null || typeof arg === "function") return { main: arg };
|
||||
@@ -286,7 +356,7 @@ describe('Output Directory Structure', () => {
|
||||
logHello("background");
|
||||
}
|
||||
});
|
||||
((_b = (_a = globalThis.browser) == null ? void 0 : _a.runtime) == null ? void 0 : _b.id) ? globalThis.browser : globalThis.chrome;
|
||||
globalThis.browser?.runtime?.id ? globalThis.browser : globalThis.chrome;
|
||||
function print(method, ...args) {
|
||||
return;
|
||||
}
|
||||
@@ -352,9 +422,8 @@ describe('Output Directory Structure', () => {
|
||||
.toMatchInlineSnapshot(`
|
||||
".output/chrome-mv3/background.js
|
||||
----------------------------------------
|
||||
var background = function() {
|
||||
var background = (function() {
|
||||
"use strict";
|
||||
var _a, _b;
|
||||
function defineBackground(arg) {
|
||||
if (arg == null || typeof arg === "function") return { main: arg };
|
||||
return arg;
|
||||
@@ -369,7 +438,7 @@ describe('Output Directory Structure', () => {
|
||||
});
|
||||
function initPlugins() {
|
||||
}
|
||||
((_b = (_a = globalThis.browser) == null ? void 0 : _a.runtime) == null ? void 0 : _b.id) ? globalThis.browser : globalThis.chrome;
|
||||
globalThis.browser?.runtime?.id ? globalThis.browser : globalThis.chrome;
|
||||
function print(method, ...args) {
|
||||
return;
|
||||
}
|
||||
@@ -394,7 +463,7 @@ describe('Output Directory Structure', () => {
|
||||
}
|
||||
const result$1 = result;
|
||||
return result$1;
|
||||
}();
|
||||
})();
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
||||
+32
-24
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "wxt",
|
||||
"type": "module",
|
||||
"version": "0.20.8",
|
||||
"version": "0.20.11",
|
||||
"description": "⚡ Next-gen Web Extension Framework",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
@@ -24,60 +24,60 @@
|
||||
"@wxt-dev/browser": "workspace:^",
|
||||
"@wxt-dev/storage": "workspace:^1.0.0",
|
||||
"async-mutex": "^0.5.0",
|
||||
"c12": "^3.0.3",
|
||||
"c12": "^3.2.0",
|
||||
"cac": "^6.7.14",
|
||||
"chokidar": "^4.0.3",
|
||||
"ci-info": "^4.2.0",
|
||||
"ci-info": "^4.3.0",
|
||||
"consola": "^3.4.2",
|
||||
"defu": "^6.1.4",
|
||||
"dotenv": "^16.5.0",
|
||||
"dotenv-expand": "^12.0.2",
|
||||
"dotenv": "^17.2.2",
|
||||
"dotenv-expand": "^12.0.3",
|
||||
"esbuild": "^0.25.0",
|
||||
"fast-glob": "^3.3.3",
|
||||
"filesize": "^10.1.6",
|
||||
"fs-extra": "^11.3.0",
|
||||
"get-port-please": "^3.1.2",
|
||||
"filesize": "^11.0.2",
|
||||
"fs-extra": "^11.3.1",
|
||||
"get-port-please": "^3.2.0",
|
||||
"giget": "^1.2.3 || ^2.0.0",
|
||||
"hookable": "^5.5.3",
|
||||
"import-meta-resolve": "^4.1.0",
|
||||
"import-meta-resolve": "^4.2.0",
|
||||
"is-wsl": "^3.1.0",
|
||||
"json5": "^2.2.3",
|
||||
"jszip": "^3.10.1",
|
||||
"linkedom": "^0.18.10",
|
||||
"linkedom": "^0.18.12",
|
||||
"magicast": "^0.3.5",
|
||||
"minimatch": "^10.0.1",
|
||||
"nano-spawn": "^0.2.0",
|
||||
"minimatch": "^10.0.3",
|
||||
"nano-spawn": "^1.0.2",
|
||||
"normalize-path": "^3.0.0",
|
||||
"nypm": "^0.6.0",
|
||||
"nypm": "^0.6.1",
|
||||
"ohash": "^2.0.11",
|
||||
"open": "^10.1.2",
|
||||
"open": "^10.2.0",
|
||||
"ora": "^8.2.0",
|
||||
"perfect-debounce": "^1.0.0",
|
||||
"perfect-debounce": "^2.0.0",
|
||||
"picocolors": "^1.1.1",
|
||||
"prompts": "^2.4.2",
|
||||
"publish-browser-extension": "^2.3.0 || ^3.0.0",
|
||||
"publish-browser-extension": "^2.3.0 || ^3.0.2",
|
||||
"scule": "^1.3.0",
|
||||
"unimport": "^3.13.1 || ^4.0.0 || ^5.0.0",
|
||||
"vite": "^5.4.19 || ^6.3.4 || ^7.0.0",
|
||||
"vite-node": "^2.1.4 || ^3.1.2",
|
||||
"web-ext-run": "^0.2.3"
|
||||
"web-ext-run": "^0.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aklinker1/check": "2.0.0",
|
||||
"@faker-js/faker": "^9.7.0",
|
||||
"@aklinker1/check": "^2.1.0",
|
||||
"@faker-js/faker": "^10.0.0",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/lodash.merge": "^4.6.9",
|
||||
"@types/node": "^20.17.6",
|
||||
"@types/normalize-path": "^3.0.2",
|
||||
"@types/prompts": "^2.4.9",
|
||||
"extract-zip": "^2.0.1",
|
||||
"happy-dom": "^17.4.6",
|
||||
"happy-dom": "^18.0.1",
|
||||
"lodash.merge": "^4.6.2",
|
||||
"oxlint": "^0.16.8",
|
||||
"oxlint": "^1.14.0",
|
||||
"publint": "^0.3.12",
|
||||
"typescript": "^5.8.3",
|
||||
"unbuild": "^3.5.0",
|
||||
"vitest": "^3.1.2",
|
||||
"typescript": "^5.9.2",
|
||||
"unbuild": "^3.6.1",
|
||||
"vitest": "^3.2.4",
|
||||
"vitest-plugin-random-seed": "^1.1.1"
|
||||
},
|
||||
"peerDependenciesMeta": {},
|
||||
@@ -179,6 +179,14 @@
|
||||
"types": "./dist/browser.d.ts",
|
||||
"default": "./dist/browser.mjs"
|
||||
},
|
||||
"./testing/fake-browser": {
|
||||
"types": "./dist/testing/fake-browser.d.ts",
|
||||
"default": "./dist/testing/fake-browser.mjs"
|
||||
},
|
||||
"./testing/vitest-plugin": {
|
||||
"types": "./dist/testing/wxt-vitest-plugin.d.ts",
|
||||
"default": "./dist/testing/wxt-vitest-plugin.mjs"
|
||||
},
|
||||
"./testing": {
|
||||
"types": "./dist/testing/index.d.ts",
|
||||
"default": "./dist/testing/index.mjs"
|
||||
|
||||
@@ -308,7 +308,10 @@ export async function createViteBuilder(
|
||||
async build(group) {
|
||||
let entryConfig;
|
||||
if (Array.isArray(group)) entryConfig = getMultiPageConfig(group);
|
||||
else if (group.inputPath.endsWith('.css'))
|
||||
else if (
|
||||
group.type === 'content-script-style' ||
|
||||
group.type === 'unlisted-style'
|
||||
)
|
||||
entryConfig = getCssConfig(group);
|
||||
else entryConfig = getLibModeConfig(group);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export function bundleAnalysis(config: ResolvedConfig): vite.Plugin {
|
||||
config.analysis.outputDir,
|
||||
`${config.analysis.outputName}-${increment++}.json`,
|
||||
),
|
||||
});
|
||||
}) as vite.Plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,7 +43,7 @@ export function extensionApiMock(config: ResolvedConfig): vite.PluginOption {
|
||||
|
||||
const setupTemplate = `
|
||||
import { vi } from 'vitest';
|
||||
import { fakeBrowser } from 'wxt/testing';
|
||||
import { fakeBrowser } from 'wxt/testing/fake-browser';
|
||||
|
||||
vi.stubGlobal("chrome", fakeBrowser);
|
||||
vi.stubGlobal("browser", fakeBrowser);
|
||||
|
||||
@@ -56,7 +56,6 @@ export function createWebExtRunner(): ExtensionRunner {
|
||||
),
|
||||
args: [
|
||||
'--unsafely-disable-devtools-self-xss-warnings',
|
||||
'--disable-features=DisableLoadExtensionCommandLineSwitch',
|
||||
...(wxtUserConfig?.chromiumArgs ?? []),
|
||||
],
|
||||
}),
|
||||
|
||||
@@ -1351,7 +1351,6 @@ describe('Manifest Utils', () => {
|
||||
event_rules: {},
|
||||
file_browser_handlers: {},
|
||||
file_system_provider_capabilities: {},
|
||||
input_components: {},
|
||||
nacl_modules: {},
|
||||
natively_connectable: {},
|
||||
offline_enabled: {},
|
||||
|
||||
@@ -8,6 +8,7 @@ import type { TargetBrowser } from '../../types';
|
||||
export function loadEnv(mode: string, browser: TargetBrowser) {
|
||||
return expand(
|
||||
config({
|
||||
quiet: true,
|
||||
// Files on top override files below
|
||||
path: [
|
||||
`.env.${mode}.${browser}.local`,
|
||||
|
||||
@@ -716,7 +716,6 @@ const mv2OnlyKeys = [
|
||||
'event_rules',
|
||||
'file_browser_handlers',
|
||||
'file_system_provider_capabilities',
|
||||
'input_components',
|
||||
'nacl_modules',
|
||||
'natively_connectable',
|
||||
'offline_enabled',
|
||||
|
||||
@@ -1 +1,11 @@
|
||||
/**
|
||||
* The fake browser is automatically used as a mock for the `wxt/browser` import
|
||||
* when using `wxt/testing/vitest-plugin` with Vitest. It is also setup to
|
||||
* reset all state before each test.
|
||||
*
|
||||
* This module is just a re-export of [@webext-core/fake-browser](https://webext-core.aklinker1.io/fake-browser/triggering-events).
|
||||
*
|
||||
* @module wxt/testing/fake-browser
|
||||
*/
|
||||
|
||||
export { fakeBrowser, type FakeBrowser } from '@webext-core/fake-browser';
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
/**
|
||||
* Utilities for unit testing WXT extensions.
|
||||
*
|
||||
* @deprecated Use `wxt/testing/*` instead to prevent issues with JSDOM or
|
||||
* HappyDOM environments. Will be removed in the next major version of WXT.
|
||||
*
|
||||
* @module wxt/testing
|
||||
*/
|
||||
export * from './fake-browser';
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Contains a Vitest plugin that configures your test environment to work with
|
||||
* WXT projects.
|
||||
*
|
||||
* @module wxt/testing/vitest
|
||||
*/
|
||||
|
||||
import type * as vite from 'vite';
|
||||
import {
|
||||
download,
|
||||
@@ -16,7 +23,7 @@ import { registerWxt, wxt } from '../core/wxt';
|
||||
* ```ts
|
||||
* // vitest.config.ts
|
||||
* import { defineConfig } from 'vitest/config';
|
||||
* import { WxtVitest } from 'wxt/testing';
|
||||
* import { WxtVitest } from 'wxt/testing/vitest-plugin';
|
||||
*
|
||||
* export default defineConfig({
|
||||
* plugins: [WxtVitest()],
|
||||
|
||||
@@ -202,7 +202,7 @@ export class ContentScriptContext implements AbortController {
|
||||
): void;
|
||||
addEventListener<TType extends keyof DocumentEventMap>(
|
||||
target: Document,
|
||||
type: keyof DocumentEventMap,
|
||||
type: TType,
|
||||
handler: (event: DocumentEventMap[TType]) => void,
|
||||
options?: AddEventListenerOptions,
|
||||
): void;
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
"src/utils/split-shadow-root-css.ts",
|
||||
"src/utils/storage.ts",
|
||||
"src/testing/index.ts",
|
||||
"src/testing/fake-browser.ts",
|
||||
"src/testing/wxt-vitest-plugin.ts",
|
||||
"src/modules.ts"
|
||||
]
|
||||
}
|
||||
|
||||
Generated
+2643
-3289
File diff suppressed because it is too large
Load Diff
Executable
+45
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
PACKAGES_DIR="./packages"
|
||||
export GIT_PAGER=cat
|
||||
IGNORED_DIRS=("browser" "wxt-demo")
|
||||
|
||||
if [ ! -d "$PACKAGES_DIR" ]; then
|
||||
echo "Error: Directory '$PACKAGES_DIR' not found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Checking for changes in packages since their last tag..."
|
||||
echo ""
|
||||
|
||||
for dir in "$PACKAGES_DIR"/*; do
|
||||
if [ -d "$dir" ]; then
|
||||
pkg_name=$(basename "$dir")
|
||||
|
||||
# Check if the package name is in the ignored directories list
|
||||
if [[ " ${IGNORED_DIRS[*]} " =~ " $pkg_name " ]]; then
|
||||
echo "Skipping ignored package: $pkg_name"
|
||||
continue # Skip to the next directory
|
||||
fi
|
||||
|
||||
echo "----------------------------------------"
|
||||
echo "Package: $pkg_name"
|
||||
|
||||
# Find the latest tag for the package, e.g., "my-package-v1.2.3"
|
||||
# Sorts tags by version and picks the most recent one.
|
||||
last_tag=$(git tag --list "${pkg_name}-v*" --sort=-v:refname | head -n 1)
|
||||
|
||||
if [ -n "$last_tag" ]; then
|
||||
# If a tag is found, show commits since that tag for the specific package directory
|
||||
echo "Commits since last tag ($last_tag):"
|
||||
git log "${last_tag}..HEAD" --oneline -- "$dir"
|
||||
else
|
||||
# If no tag is found, show all commits for that package directory
|
||||
echo "No tags found for this package. Listing all commits:"
|
||||
git log --oneline -- "$dir"
|
||||
fi
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
@@ -0,0 +1,360 @@
|
||||
import glob from 'fast-glob';
|
||||
import fs from 'fs-extra';
|
||||
import * as semver from 'semver';
|
||||
import { dirname } from 'node:path';
|
||||
import consola from 'consola';
|
||||
import spawn from 'nano-spawn';
|
||||
|
||||
const HELP_MESSAGE = `
|
||||
Upgrades dependencies throughout WXT using custom rules.
|
||||
|
||||
Usage:
|
||||
pnpm tsx scripts/upgrade-deps.ts [options]
|
||||
|
||||
Options:
|
||||
--write, -w Write changes to package.json files
|
||||
--major, -m Allow major version upgrades
|
||||
--dev-only, -d Only check/upgrade dev dependencies
|
||||
--prod-only, -p Only check/upgrade production dependencies
|
||||
--help, -h Display this help message
|
||||
`.slice(1, -1);
|
||||
|
||||
const IGNORED_PACKAGES = [
|
||||
// Very touchy, don't change:
|
||||
'typedoc',
|
||||
'typedoc-plugin-markdown',
|
||||
'typedoc-vitepress-theme',
|
||||
// Manually manage version so a single version is used:
|
||||
'esbuild',
|
||||
// Maintained manually to match min-node version
|
||||
'@types/node',
|
||||
// License changed in newer versions
|
||||
'ua-parser-js',
|
||||
];
|
||||
|
||||
await main();
|
||||
|
||||
async function main(): Promise<never> {
|
||||
const args = process.argv.slice(2);
|
||||
const isHelp = ['-h', '--help'].some((arg) => args.includes(arg));
|
||||
const isWrite = ['-w', '--write'].some((arg) => args.includes(arg));
|
||||
const isDevOnly = ['-d', '--dev-only'].some((arg) => args.includes(arg));
|
||||
const isProdOnly = ['-p', '--prod-only'].some((arg) => args.includes(arg));
|
||||
|
||||
if (isHelp) {
|
||||
console.log(HELP_MESSAGE);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
const { packageJsonFiles, dependencyVersionsMap } =
|
||||
await getPackageJsonDependencies(isDevOnly, isProdOnly);
|
||||
const dependencyVersionMap = validateNoMultipleVersions(
|
||||
dependencyVersionsMap,
|
||||
);
|
||||
|
||||
consola.start(
|
||||
`Fetching ${Object.keys(dependencyVersionsMap).length} dependencies...`,
|
||||
);
|
||||
const dependencies = await fetchAllPackageInfos(dependencyVersionMap);
|
||||
consola.success('Done!');
|
||||
|
||||
const isMajor = ['-m', '--major'].some((arg) => args.includes(arg));
|
||||
const upgrades = await detectUpgrades(dependencies, isMajor);
|
||||
|
||||
if (upgrades.length === 0) {
|
||||
console.log();
|
||||
consola.info("No upgrades found, you're up to date!");
|
||||
console.log();
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
printUpgrades(upgrades);
|
||||
|
||||
if (!isWrite) {
|
||||
consola.info('Run with `-w` to write changes to package.json files');
|
||||
console.log();
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
consola.start('Writing new versions to package.json files...');
|
||||
await writeUpgrades(packageJsonFiles, upgrades);
|
||||
consola.success('Done!');
|
||||
console.log();
|
||||
consola.info('Run `pnpm i` to install new dependencies');
|
||||
console.log();
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
type DependencyVersionsMap = Record<string, Set<string>>;
|
||||
type PackageJsonData = {
|
||||
content: any;
|
||||
path: string;
|
||||
folder: string;
|
||||
};
|
||||
|
||||
async function getPackageJsonDependencies(
|
||||
isDevOnly: boolean,
|
||||
isProdOnly: boolean,
|
||||
): Promise<{
|
||||
packageJsonFiles: string[];
|
||||
dependencyVersionsMap: DependencyVersionsMap;
|
||||
}> {
|
||||
const packageJsonFiles = await glob(
|
||||
['package.json', '*/*/package.json', '!**/node_modules'],
|
||||
{ onlyFiles: true },
|
||||
);
|
||||
const packageJsons: PackageJsonData[] = await Promise.all(
|
||||
packageJsonFiles.map(async (path) => ({
|
||||
content: await fs.readJson(path),
|
||||
path,
|
||||
folder: dirname(path),
|
||||
})),
|
||||
);
|
||||
|
||||
const dependencyVersionsMap = packageJsons.reduce<DependencyVersionsMap>(
|
||||
(map, { content }) => {
|
||||
const addToMap = ([name, version]: [string, any]) => {
|
||||
if (
|
||||
name === 'wxt' ||
|
||||
version.startsWith('workspace:') ||
|
||||
IGNORED_PACKAGES.includes(name)
|
||||
)
|
||||
return;
|
||||
|
||||
map[name] ||= new Set();
|
||||
map[name].add(version as string);
|
||||
};
|
||||
if (!isDevOnly)
|
||||
Object.entries(content.dependencies || {}).forEach(addToMap);
|
||||
if (!isProdOnly)
|
||||
Object.entries(content.devDependencies || {}).forEach(addToMap);
|
||||
return map;
|
||||
},
|
||||
{},
|
||||
);
|
||||
|
||||
return {
|
||||
packageJsonFiles,
|
||||
dependencyVersionsMap,
|
||||
};
|
||||
}
|
||||
|
||||
type DependencyVersionMap = Record<string, string>;
|
||||
|
||||
function validateNoMultipleVersions(
|
||||
dependencyVersionsMap: DependencyVersionsMap,
|
||||
): DependencyVersionMap {
|
||||
const depsWithMultipleVersions = Object.entries(dependencyVersionsMap).filter(
|
||||
([_, versions]) => versions.size > 1,
|
||||
);
|
||||
if (depsWithMultipleVersions.length === 0) {
|
||||
return Object.fromEntries(
|
||||
Object.entries(dependencyVersionsMap).map(([name, versions]) => [
|
||||
name,
|
||||
[...versions][0],
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
||||
const maxWidth = Math.max(
|
||||
...depsWithMultipleVersions.map(([name]) => name.length),
|
||||
);
|
||||
console.log(maxWidth);
|
||||
const addCyan = (text: string) => `\x1b[36m${text}\x1b[0m`;
|
||||
|
||||
consola.info('Found multiple versions of:');
|
||||
for (const [name, versions] of depsWithMultipleVersions) {
|
||||
console.log(
|
||||
` \x1b[35m${name.padEnd(maxWidth)}\x1b[0m ${Array.from(versions)
|
||||
.map(addCyan)
|
||||
.join('\t')}`,
|
||||
);
|
||||
}
|
||||
consola.error(`${depsWithMultipleVersions.length} problem(s) found`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
async function fetchPackageInfo(name: string): Promise<PackageInfo> {
|
||||
// Use PNPM instead of API in case dependencies don't come from NPM
|
||||
const res = await spawn('pnpm', ['view', name, '--json']);
|
||||
return JSON.parse(res.output);
|
||||
}
|
||||
|
||||
type PackageInfo = {
|
||||
name: string;
|
||||
'dist-tags': {
|
||||
latest: string;
|
||||
[tag: string]: string;
|
||||
};
|
||||
versions: string[];
|
||||
time: {
|
||||
created: string;
|
||||
modified: string;
|
||||
[version: string]: string;
|
||||
};
|
||||
};
|
||||
|
||||
type DependencyInfo = {
|
||||
name: string;
|
||||
currentVersionRange: string;
|
||||
info: PackageInfo;
|
||||
};
|
||||
|
||||
async function fetchAllPackageInfos(
|
||||
deps: DependencyVersionMap,
|
||||
): Promise<DependencyInfo[]> {
|
||||
const infos = await Promise.all(
|
||||
Object.entries(deps).map(async ([name, currentVersionRange]) => ({
|
||||
name,
|
||||
currentVersionRange,
|
||||
info: await fetchPackageInfo(name),
|
||||
})),
|
||||
);
|
||||
return infos.toSorted((a, b) => a.name.localeCompare(b.name));
|
||||
}
|
||||
|
||||
type UpgradeDetails = {
|
||||
name: string;
|
||||
rangePrefix: string;
|
||||
currentVersion: string;
|
||||
currentVersionReleasedAt: Date;
|
||||
currentRange: string;
|
||||
upgradeToVersion: string;
|
||||
upgradeToVersionReleasedAt: Date;
|
||||
upgradeToRange: string;
|
||||
diff: semver.ReleaseType | null;
|
||||
latestVersion: string;
|
||||
latestVersionReleasedAt: Date;
|
||||
};
|
||||
|
||||
async function detectUpgrades(
|
||||
deps: DependencyInfo[],
|
||||
isMajor: boolean,
|
||||
): Promise<UpgradeDetails[]> {
|
||||
const results: UpgradeDetails[] = [];
|
||||
|
||||
for (const dep of deps) {
|
||||
const currentRange = dep.currentVersionRange;
|
||||
if (currentRange === '*') continue;
|
||||
|
||||
const parts = currentRange.split(' || ').map((part) => part.trim());
|
||||
const lastRange = parts[parts.length - 1];
|
||||
const isUnion = parts.length > 1;
|
||||
|
||||
const rangePrefix = lastRange.match(/^(.?)(\d+\.\d+\.\d+)/)?.[1] ?? '';
|
||||
|
||||
const currentVersion = semver.minVersion(lastRange)?.version;
|
||||
if (currentVersion == null)
|
||||
throw Error(`Invalid version specifier: ${dep.name}@${currentRange}`);
|
||||
|
||||
const currentVersionReleasedAt = new Date(dep.info.time[currentVersion]);
|
||||
const isPre1 = currentVersion.startsWith('0.');
|
||||
|
||||
const latestVersion = dep.info['dist-tags'].latest;
|
||||
const latestVersionReleasedAt = new Date(dep.info.time[latestVersion]);
|
||||
|
||||
semver.RELEASE_TYPES;
|
||||
const upgradeToVersion = isMajor
|
||||
? // Always use the latest version for major upgrades
|
||||
latestVersion
|
||||
: // Otherwise use the last stable version greater than the current version that is not a major release
|
||||
(dep.info.versions.findLast(
|
||||
(v) =>
|
||||
semver.gt(v, currentVersion) &&
|
||||
(isPre1 ? ['patch'] : ['patch', 'minor']).includes(
|
||||
semver.diff(v, currentVersion)!,
|
||||
) &&
|
||||
semver.prerelease(v) == null,
|
||||
) ?? currentVersion);
|
||||
const upgradeToVersionReleasedAt = new Date(
|
||||
dep.info.time[upgradeToVersion],
|
||||
);
|
||||
|
||||
let upgradeToRange = `${rangePrefix}${upgradeToVersion}`;
|
||||
upgradeToRange = isUnion
|
||||
? semver.satisfies(upgradeToVersion, currentRange)
|
||||
? currentRange
|
||||
: `${currentRange} || ${upgradeToRange}`
|
||||
: upgradeToRange;
|
||||
|
||||
let diff = semver.diff(currentVersion, upgradeToVersion);
|
||||
if (isPre1) {
|
||||
if (diff === 'minor') diff = 'major';
|
||||
if (diff === 'patch') diff = 'minor';
|
||||
}
|
||||
|
||||
if (upgradeToRange === currentRange) continue;
|
||||
// if (currentVersion === latestVersion) continue;
|
||||
|
||||
results.push({
|
||||
name: dep.name,
|
||||
rangePrefix,
|
||||
diff,
|
||||
currentVersion,
|
||||
currentVersionReleasedAt,
|
||||
currentRange,
|
||||
upgradeToVersion,
|
||||
upgradeToVersionReleasedAt,
|
||||
upgradeToRange,
|
||||
latestVersion,
|
||||
latestVersionReleasedAt,
|
||||
});
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
function printUpgrades(upgrades: UpgradeDetails[]): void {
|
||||
const namePadding = Math.max(...upgrades.map((u) => u.name.length));
|
||||
const currentVersionPadding = Math.max(
|
||||
...upgrades.map((u) => u.currentRange.length),
|
||||
);
|
||||
const upgradeToVersionPadding = Math.max(
|
||||
...upgrades.map((u) => u.upgradeToRange.length),
|
||||
);
|
||||
const numberPadding = String(upgrades.length + 1).length + 1;
|
||||
|
||||
consola.info(`Found ${upgrades.length} upgrades:`);
|
||||
console.log();
|
||||
for (let i = 0; i < upgrades.length; i++) {
|
||||
const upgrade = upgrades[i];
|
||||
const num = `\x1b[2m${(i + 1).toString().padStart(numberPadding)}.\x1b[0m`;
|
||||
const name = `\x1b[35m${upgrade.name.padEnd(namePadding)}\x1b[0m`;
|
||||
const color =
|
||||
upgrade.diff == null
|
||||
? '\x1b[2m'
|
||||
: upgrade.diff === 'patch'
|
||||
? '\x1b[32m'
|
||||
: upgrade.diff === 'minor'
|
||||
? '\x1b[33m'
|
||||
: '\x1b[31m';
|
||||
const currentVersion = `\x1b[2m${upgrade.currentRange.padEnd(currentVersionPadding)}\x1b[0m`;
|
||||
const upgradeToVersion = `${color}${upgrade.upgradeToRange.padEnd(upgradeToVersionPadding)}\x1b[0m`;
|
||||
const latest =
|
||||
upgrade.latestVersion !== upgrade.upgradeToVersion
|
||||
? ` \x1b[2m\x1b[31m(${upgrade.latestVersion} available)\x1b[0m`
|
||||
: '';
|
||||
console.log(
|
||||
` ${num} ${name} ${currentVersion} \x1b[2m→\x1b[0m ${upgradeToVersion}${latest}`,
|
||||
);
|
||||
}
|
||||
console.log();
|
||||
}
|
||||
|
||||
async function writeUpgrades(
|
||||
packageJsonFiles: string[],
|
||||
upgrades: UpgradeDetails[],
|
||||
) {
|
||||
for (const packageJsonFile of packageJsonFiles) {
|
||||
const oldText = await fs.readFile(packageJsonFile, 'utf8');
|
||||
let newText = oldText;
|
||||
for (const upgrade of upgrades) {
|
||||
const search = `"${upgrade.name}": "${upgrade.currentRange}"`;
|
||||
const replace = `"${upgrade.name}": "${upgrade.upgradeToRange}"`;
|
||||
newText = newText.replaceAll(search, replace);
|
||||
}
|
||||
if (newText !== oldText) {
|
||||
await fs.writeFile(packageJsonFile, newText, 'utf8');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
// https://github.com/antfu-collective/taze?tab=readme-ov-file#config-file
|
||||
export default {
|
||||
exclude: [
|
||||
// Very touchy, don't change:
|
||||
'typedoc',
|
||||
'typedoc-plugin-markdown',
|
||||
'typedoc-vitepress-theme',
|
||||
// Manually manage version so a single version is used:
|
||||
'esbuild',
|
||||
// Maintained manually to match min-node version
|
||||
'@types/node',
|
||||
// License changed in newer versions
|
||||
'ua-parser-js',
|
||||
],
|
||||
};
|
||||
Vendored
+5
-5
@@ -15,14 +15,14 @@
|
||||
"postinstall": "wxt prepare"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0"
|
||||
"react": "^19.1.1",
|
||||
"react-dom": "^19.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.1.2",
|
||||
"@types/react-dom": "^19.1.3",
|
||||
"@types/react": "^19.1.12",
|
||||
"@types/react-dom": "^19.1.9",
|
||||
"@wxt-dev/module-react": "^1.1.3",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript": "^5.9.2",
|
||||
"wxt": "^0.20.6"
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -15,11 +15,11 @@
|
||||
"postinstall": "wxt prepare"
|
||||
},
|
||||
"dependencies": {
|
||||
"solid-js": "^1.9.6"
|
||||
"solid-js": "^1.9.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@wxt-dev/module-solid": "^1.1.3",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript": "^5.9.2",
|
||||
"wxt": "^0.20.6"
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+4
-4
@@ -15,12 +15,12 @@
|
||||
"postinstall": "wxt prepare"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tsconfig/svelte": "^5.0.4",
|
||||
"@tsconfig/svelte": "^5.0.5",
|
||||
"@wxt-dev/module-svelte": "^2.0.3",
|
||||
"svelte": "^5.28.2",
|
||||
"svelte-check": "^4.1.6",
|
||||
"svelte": "^5.38.6",
|
||||
"svelte-check": "^4.3.1",
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript": "^5.9.2",
|
||||
"wxt": "^0.20.6"
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,12 +1,12 @@
|
||||
import './style.css';
|
||||
import typescriptLogo from '@/assets/typescript.svg';
|
||||
import viteLogo from '/wxt.svg';
|
||||
import wxtLogo from '/wxt.svg';
|
||||
import { setupCounter } from '@/components/counter';
|
||||
|
||||
document.querySelector<HTMLDivElement>('#app')!.innerHTML = `
|
||||
<div>
|
||||
<a href="https://wxt.dev" target="_blank">
|
||||
<img src="${viteLogo}" class="logo" alt="WXT logo" />
|
||||
<img src="${wxtLogo}" class="logo" alt="WXT logo" />
|
||||
</a>
|
||||
<a href="https://www.typescriptlang.org/" target="_blank">
|
||||
<img src="${typescriptLogo}" class="logo vanilla" alt="TypeScript logo" />
|
||||
|
||||
Vendored
+1
-1
@@ -15,7 +15,7 @@
|
||||
"postinstall": "wxt prepare"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.8.3",
|
||||
"typescript": "^5.9.2",
|
||||
"wxt": "^0.20.6"
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -15,12 +15,12 @@
|
||||
"postinstall": "wxt prepare"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue": "^3.5.13"
|
||||
"vue": "^3.5.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@wxt-dev/module-vue": "^1.0.2",
|
||||
"typescript": "5.6.3",
|
||||
"vue-tsc": "^2.2.10",
|
||||
"typescript": "^5.9.2",
|
||||
"vue-tsc": "^3.0.6",
|
||||
"wxt": "^0.20.6"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user