@automattic/jetpack-components 0.40.3 → 0.40.4

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,10 +2,14 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [0.40.4] - 2023-07-18
6
+ ### Changed
7
+ - Use Connection initial state for fetching Calypso Env. [#31906]
8
+ - Code quality improvements. [#31684]
9
+
5
10
  ## [0.40.3] - 2023-07-17
6
11
  ### Changed
7
12
  - Updated package dependencies. [#31872]
8
- - Updated package dependencies. [#31874]
9
13
 
10
14
  ## [0.40.2] - 2023-07-11
11
15
  ### Changed
@@ -768,6 +772,7 @@
768
772
  ### Changed
769
773
  - Update node version requirement to 14.16.1
770
774
 
775
+ [0.40.4]: https://github.com/Automattic/jetpack-components/compare/0.40.3...0.40.4
771
776
  [0.40.3]: https://github.com/Automattic/jetpack-components/compare/0.40.2...0.40.3
772
777
  [0.40.2]: https://github.com/Automattic/jetpack-components/compare/0.40.1...0.40.2
773
778
  [0.40.1]: https://github.com/Automattic/jetpack-components/compare/0.40.0...0.40.1
@@ -81,7 +81,7 @@ export const BoostScoreBar: FunctionComponent< BoostScoreBarProps > = ( {
81
81
  <div className="jb-score-bar__score">{ score }</div>
82
82
  ) }
83
83
 
84
- { showPrevScores && prevScore && prevScore < score && (
84
+ { showPrevScores && !! prevScore && prevScore < score && (
85
85
  <div
86
86
  className="jb-score-bar__no_boost_score"
87
87
  style={ { left: `min(${ prevScoreOffset }%, calc( 100% - var(--clearance-space))` } }
@@ -45,7 +45,6 @@ $no_boost_score_size: 28px;
45
45
  grid-template-columns: 24px 1fr;
46
46
  grid-column-gap: 10px;
47
47
  justify-content: center;
48
- position: relative;
49
48
  font-size: 14px;
50
49
  position: relative;
51
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "0.40.3",
3
+ "version": "0.40.4",
4
4
  "description": "Jetpack Components Package",
5
5
  "author": "Automattic",
6
6
  "license": "GPL-2.0-or-later",
@@ -25,7 +25,7 @@ export default function getRedirectUrl( source: string, args: GetRedirectUrlArgs
25
25
 
26
26
  let calypsoEnv;
27
27
  if ( typeof window !== 'undefined' ) {
28
- calypsoEnv = window.Initial_State?.calypsoEnv;
28
+ calypsoEnv = window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv;
29
29
  }
30
30
 
31
31
  if ( source.search( 'https://' ) === 0 ) {
@@ -38,9 +38,9 @@ export default function getRedirectUrl( source: string, args: GetRedirectUrlArgs
38
38
  queryVars.source = encodeURIComponent( source );
39
39
  }
40
40
 
41
- Object.keys( args ).map( argName => {
41
+ for ( const argName in args ) {
42
42
  queryVars[ argName ] = encodeURIComponent( args[ argName ] );
43
- } );
43
+ }
44
44
 
45
45
  if (
46
46
  ! Object.keys( queryVars ).includes( 'site' ) &&
@@ -39,7 +39,7 @@ export type QueryVars = {
39
39
 
40
40
  declare global {
41
41
  interface Window {
42
- Initial_State: {
42
+ JP_CONNECTION_INITIAL_STATE: {
43
43
  calypsoEnv?: string;
44
44
  };
45
45
  }