@automattic/jetpack-ai-client 0.34.19 → 0.34.21

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
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.34.21] - 2026-06-15
9
+ ### Changed
10
+ - Update package dependencies. [#49273]
11
+
12
+ ## [0.34.20] - 2026-06-08
13
+ ### Changed
14
+ - Update dependencies. [#49354]
15
+
8
16
  ## [0.34.19] - 2026-06-01
9
17
  ### Changed
10
18
  - Update package dependencies. [#48404]
@@ -884,6 +892,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
884
892
  - AI Client: stop using smart document visibility handling on the fetchEventSource library, so it does not restart the completion when changing tabs. [#32004]
885
893
  - Updated package dependencies. [#31468] [#31659] [#31785]
886
894
 
895
+ [0.34.21]: https://github.com/Automattic/jetpack-ai-client/compare/v0.34.20...v0.34.21
896
+ [0.34.20]: https://github.com/Automattic/jetpack-ai-client/compare/v0.34.19...v0.34.20
887
897
  [0.34.19]: https://github.com/Automattic/jetpack-ai-client/compare/v0.34.18...v0.34.19
888
898
  [0.34.18]: https://github.com/Automattic/jetpack-ai-client/compare/v0.34.17...v0.34.18
889
899
  [0.34.17]: https://github.com/Automattic/jetpack-ai-client/compare/v0.34.16...v0.34.17
@@ -33,7 +33,7 @@ export default async function askQuestionSync(question, options = {}) {
33
33
  * The URL to the AI assistant query endpoint.
34
34
  */
35
35
  const URL = 'https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query';
36
- let token = null;
36
+ let token;
37
37
  try {
38
38
  token = (await requestJwt()).token;
39
39
  }
@@ -18,7 +18,7 @@ const debug = debugFactory('jetpack-ai-client:audio-transcription');
18
18
  export default async function transcribeAudio(audio, feature, requestAbortSignal) {
19
19
  debug('Transcribing audio: %o. Feature: %o', audio, feature);
20
20
  // Get a token to use the transcription service
21
- let token = '';
21
+ let token;
22
22
  try {
23
23
  token = (await requestJwt()).token;
24
24
  }
@@ -130,7 +130,7 @@ const getStableDiffusionImageGenerationPrompt = async (postContent, userPrompt,
130
130
  };
131
131
  const useImageGenerator = () => {
132
132
  const executeImageGeneration = async function (parameters) {
133
- let token = '';
133
+ let token;
134
134
  try {
135
135
  token = (await requestJwt()).token;
136
136
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-ai-client",
3
- "version": "0.34.19",
3
+ "version": "0.34.21",
4
4
  "private": false,
5
5
  "description": "A JS client for consuming Jetpack AI services",
6
6
  "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/ai-client/#readme",
@@ -32,31 +32,31 @@
32
32
  "watch": "tsgo --watch --pretty"
33
33
  },
34
34
  "dependencies": {
35
- "@automattic/jetpack-base-styles": "^1.2.5",
36
- "@automattic/jetpack-components": "^1.12.1",
37
- "@automattic/jetpack-connection": "^1.4.54",
35
+ "@automattic/jetpack-base-styles": "^1.2.6",
36
+ "@automattic/jetpack-components": "^1.12.7",
37
+ "@automattic/jetpack-connection": "^1.4.60",
38
38
  "@automattic/jetpack-explat": "workspace:*",
39
39
  "@automattic/jetpack-script-data": "^0.6.4",
40
- "@automattic/jetpack-shared-extension-utils": "^1.5.18",
40
+ "@automattic/jetpack-shared-extension-utils": "^2.0.0",
41
41
  "@microsoft/fetch-event-source": "2.0.1",
42
42
  "@types/jest": "30.0.0",
43
43
  "@types/react": "18.3.28",
44
44
  "@types/wordpress__block-editor": "15.0.6",
45
- "@wordpress/api-fetch": "7.46.0",
46
- "@wordpress/base-styles": "8.0.0",
47
- "@wordpress/blob": "4.46.0",
48
- "@wordpress/block-editor": "15.19.0",
49
- "@wordpress/blocks": "15.19.0",
50
- "@wordpress/components": "33.1.0",
51
- "@wordpress/compose": "7.46.0",
52
- "@wordpress/data": "10.46.0",
53
- "@wordpress/editor": "14.46.0",
54
- "@wordpress/element": "6.46.0",
55
- "@wordpress/i18n": "6.19.0",
45
+ "@wordpress/api-fetch": "7.48.0",
46
+ "@wordpress/base-styles": "9.1.0",
47
+ "@wordpress/blob": "4.48.0",
48
+ "@wordpress/block-editor": "15.21.0",
49
+ "@wordpress/blocks": "15.21.0",
50
+ "@wordpress/components": "35.0.0",
51
+ "@wordpress/compose": "8.1.0",
52
+ "@wordpress/data": "10.48.0",
53
+ "@wordpress/editor": "14.48.0",
54
+ "@wordpress/element": "8.0.0",
55
+ "@wordpress/i18n": "6.21.0",
56
56
  "@wordpress/icons": "13.1.0",
57
- "@wordpress/primitives": "4.46.0",
57
+ "@wordpress/primitives": "4.48.0",
58
58
  "@wordpress/ui": "0.13.0",
59
- "@wordpress/url": "4.46.0",
59
+ "@wordpress/url": "4.48.0",
60
60
  "clsx": "2.1.1",
61
61
  "debug": "4.4.3",
62
62
  "markdown-it": "14.1.1",
@@ -51,7 +51,7 @@ export default async function askQuestionSync(
51
51
  */
52
52
  const URL = 'https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query';
53
53
 
54
- let token = null;
54
+ let token;
55
55
 
56
56
  try {
57
57
  token = ( await requestJwt() ).token;
@@ -25,7 +25,7 @@ export default async function transcribeAudio(
25
25
  debug( 'Transcribing audio: %o. Feature: %o', audio, feature );
26
26
 
27
27
  // Get a token to use the transcription service
28
- let token = '';
28
+ let token;
29
29
  try {
30
30
  token = ( await requestJwt() ).token;
31
31
  } catch ( error ) {
@@ -157,7 +157,7 @@ const useImageGenerator = () => {
157
157
  const executeImageGeneration = async function (
158
158
  parameters: object
159
159
  ): Promise< ImageGenerationResponse > {
160
- let token = '';
160
+ let token;
161
161
 
162
162
  try {
163
163
  token = ( await requestJwt() ).token;