@automattic/jetpack-components 0.45.10 → 0.46.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
@@ -2,6 +2,10 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [0.46.0] - 2024-01-18
6
+ ### Changed
7
+ - Use blog ID for links instead of site slug. [#34950]
8
+
5
9
  ## [0.45.10] - 2024-01-04
6
10
  ### Changed
7
11
  - Updated package dependencies. [#34815] [#34816]
@@ -917,6 +921,7 @@
917
921
  ### Changed
918
922
  - Update node version requirement to 14.16.1
919
923
 
924
+ [0.46.0]: https://github.com/Automattic/jetpack-components/compare/0.45.10...0.46.0
920
925
  [0.45.10]: https://github.com/Automattic/jetpack-components/compare/0.45.9...0.45.10
921
926
  [0.45.9]: https://github.com/Automattic/jetpack-components/compare/0.45.8...0.45.9
922
927
  [0.45.8]: https://github.com/Automattic/jetpack-components/compare/0.45.7...0.45.8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "0.45.10",
3
+ "version": "0.46.0",
4
4
  "description": "Jetpack Components Package",
5
5
  "author": "Automattic",
6
6
  "license": "GPL-2.0-or-later",
@@ -25,7 +25,7 @@ This is optional and allows you to pass an object with more parameters to build
25
25
 
26
26
  This is not a complete list as any argument passed here will be sent to as a query parameter to the Redirect server. These parameters will not necessarily be passed over to the final destination URL. If you want to add a parameter to the final destination URL, use the `query` argument.
27
27
 
28
- * **site**: Optional (but recommended). This is used to identify the site and also to fill in the `[site]` placeholder in the target. Will default to the value of `jetpack_redirects.currentSiteRawUrl`, if available.
28
+ * **site**: Optional (but recommended). This is used to identify the site and also to fill in the `[site]` placeholder in the target. Will default to the value of `jetpack_redirects.currentBlogID` or `jetpack_redirects.currentSiteRawUrl`, if available.
29
29
 
30
30
  * **path**: Optional. Used to fill in the `[path]` placeholder in the target.
31
31
 
@@ -47,7 +47,7 @@ export default function getRedirectUrl( source: string, args: GetRedirectUrlArgs
47
47
  typeof jetpack_redirects !== 'undefined' &&
48
48
  jetpack_redirects.hasOwnProperty( 'currentSiteRawUrl' )
49
49
  ) {
50
- queryVars.site = jetpack_redirects.currentSiteRawUrl;
50
+ queryVars.site = jetpack_redirects.currentBlogID ?? jetpack_redirects.currentSiteRawUrl;
51
51
  }
52
52
 
53
53
  if ( calypsoEnv ) {
@@ -45,5 +45,6 @@ declare global {
45
45
  }
46
46
  const jetpack_redirects: {
47
47
  currentSiteRawUrl?: string;
48
+ currentBlogID?: string;
48
49
  };
49
50
  }