jest-webextension-mock 3.9.1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # jest-webextension-mock
2
2
 
3
+ ## 4.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a9debb1: Add `browser.action` (MV3 alias for `browserAction`) and `browser.pageAction` APIs. Expand `browserAction` with missing methods (`getBadgeTextColor`, `getUserSettings`, `isEnabled`, `openPopup`, `setBadgeTextColor`) and upgrade events to use `createEventListeners()`.
8
+ - 68ab1a8: Add `browser.alarms` API mock with `create`, `get`, `getAll`, `clear`, `clearAll`, and `onAlarm` event.
9
+
10
+ ### Patch Changes
11
+
12
+ - 135c31f: Add integration runner to validate the package against external repos before publishing.
13
+ - 7dd6007: Overhaul CI/CD pipeline: fix broken ESLint (migrate to flat config), remove dist/ from git, enforce changeset entries on PRs, slim down published package.
14
+ - 7ee3b3c: Fix storage.get() returning `{ key: value }` instead of `{ [key]: value }` when retrieving a single string key.
15
+
16
+ ## 4.0.0
17
+
18
+ ### Major Changes
19
+
20
+ - b8594f9: Drop support for node 14 and 16, add support for node 18 and 22
21
+
3
22
  ## 3.9.1
4
23
 
5
24
  ### Patch Changes
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![npm](https://img.shields.io/npm/v/jest-webextension-mock.svg)](https://www.npmjs.com/package/jest-webextension-mock) [![npm](https://img.shields.io/npm/l/jest-webextension-mock.svg)](https://github.com/clarkbw/jest-webextension-mock/blob/master/LICENSE) [![Codecov](https://img.shields.io/codecov/c/github/clarkbw/jest-webextension-mock.svg)](https://codecov.io/gh/clarkbw/jest-webextension-mock) [![Greenkeeper badge](https://badges.greenkeeper.io/clarkbw/jest-webextension-mock.svg)](https://greenkeeper.io/) [![Twitter](https://img.shields.io/twitter/url/https/github.com/clarkbw/jest-webextension-mock.svg?style=social)](https://twitter.com/intent/tweet?text=Wow:&url=%5Bobject%20Object%5D)
1
+ [![npm](https://img.shields.io/npm/v/jest-webextension-mock.svg)](https://www.npmjs.com/package/jest-webextension-mock) [![npm](https://img.shields.io/npm/l/jest-webextension-mock.svg)](https://github.com/RickyMarou/jest-webextension-mock/blob/main/LICENSE) [![CI](https://github.com/RickyMarou/jest-webextension-mock/actions/workflows/ci.yml/badge.svg)](https://github.com/RickyMarou/jest-webextension-mock/actions/workflows/ci.yml) [![Codecov](https://img.shields.io/codecov/c/github/RickyMarou/jest-webextension-mock.svg)](https://codecov.io/gh/RickyMarou/jest-webextension-mock)
2
2
 
3
3
  ## Install
4
4
 
@@ -96,7 +96,43 @@ it('should toggle the profiler on from stopped', () => {
96
96
 
97
97
  ## Development
98
98
 
99
- ```
99
+ ```bash
100
100
  npm install
101
101
  npm test
102
102
  ```
103
+
104
+ ### Linting
105
+
106
+ ```bash
107
+ npm run lint
108
+ npm run lint:fix # auto-fix
109
+ npm run prettier # format code
110
+ ```
111
+
112
+ ### Contributing
113
+
114
+ PRs require a changeset entry for changelog tracking. After making your changes:
115
+
116
+ ```bash
117
+ npx changeset
118
+ ```
119
+
120
+ Follow the prompts to describe your change (patch/minor/major). This creates a markdown file in `.changeset/` that should be committed with your PR.
121
+
122
+ For changes that don't affect the published package (CI config, docs, etc.), add an empty changeset:
123
+
124
+ ```bash
125
+ npx changeset --empty
126
+ ```
127
+
128
+ ### Publishing (maintainers only)
129
+
130
+ Publishing is done locally to avoid storing npm credentials in CI.
131
+
132
+ ```bash
133
+ npm run release # bumps version + updates CHANGELOG.md
134
+ git add -A && git commit -m "release: vX.Y.Z"
135
+ git push
136
+ npm publish # builds dist/ automatically via prepublishOnly
137
+ git tag vX.Y.Z && git push --tags # tag the release
138
+ ```