@automattic/jetpack-scan 1.0.0 → 1.0.2
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
|
+
## [1.0.2] - 2025-07-03
|
|
9
|
+
### Changed
|
|
10
|
+
- Update package dependencies. [#44148]
|
|
11
|
+
|
|
12
|
+
## [1.0.1] - 2025-06-05
|
|
13
|
+
### Changed
|
|
14
|
+
- Update package dependencies. [#43766]
|
|
15
|
+
|
|
8
16
|
## [1.0.0] - 2025-06-03
|
|
9
17
|
### Added
|
|
10
18
|
- Add threat components. [#41654]
|
|
@@ -128,6 +136,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
128
136
|
### Removed
|
|
129
137
|
- Updated dependencies. [#39754]
|
|
130
138
|
|
|
139
|
+
[1.0.2]: https://github.com/Automattic/jetpack-scan/compare/v1.0.1...v1.0.2
|
|
140
|
+
[1.0.1]: https://github.com/Automattic/jetpack-scan/compare/v1.0.0...v1.0.1
|
|
131
141
|
[1.0.0]: https://github.com/Automattic/jetpack-scan/compare/v0.5.9...v1.0.0
|
|
132
142
|
[0.5.9]: https://github.com/Automattic/jetpack-scan/compare/v0.5.8...v0.5.9
|
|
133
143
|
[0.5.8]: https://github.com/Automattic/jetpack-scan/compare/v0.5.7...v0.5.8
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Modal } from '@wordpress/components';
|
|
2
2
|
import { type Threat } from '@automattic/jetpack-scan';
|
|
3
|
+
import type { ComponentProps } from 'react';
|
|
3
4
|
interface ThreatModalContextType {
|
|
4
5
|
closeModal: () => void;
|
|
5
6
|
threat: Threat;
|
|
@@ -47,5 +48,5 @@ export default function ThreatModal({ threat, isUserConnected, hasConnectedOwner
|
|
|
47
48
|
handleFixThreatClick?: (threats: Threat[]) => void;
|
|
48
49
|
handleIgnoreThreatClick?: (threats: Threat[]) => void;
|
|
49
50
|
handleUnignoreThreatClick?: (threats: Threat[]) => void;
|
|
50
|
-
} &
|
|
51
|
+
} & ComponentProps<typeof Modal>): JSX.Element;
|
|
51
52
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@automattic/jetpack-scan",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"description": "A JS client for consuming Jetpack Scan services",
|
|
6
6
|
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/scan/#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"@storybook/react": "8.6.7",
|
|
30
30
|
"@testing-library/dom": "10.4.0",
|
|
31
31
|
"@testing-library/react": "16.2.0",
|
|
32
|
-
"@types/jest": "
|
|
32
|
+
"@types/jest": "30.0.0",
|
|
33
33
|
"@types/react": "18.3.23",
|
|
34
|
-
"jest": "
|
|
35
|
-
"jest-environment-jsdom": "
|
|
34
|
+
"jest": "30.0.0",
|
|
35
|
+
"jest-environment-jsdom": "30.0.0",
|
|
36
36
|
"storybook": "8.6.7",
|
|
37
|
-
"typescript": "5.8.
|
|
37
|
+
"typescript": "5.8.3"
|
|
38
38
|
},
|
|
39
39
|
"exports": {
|
|
40
40
|
".": {
|
|
@@ -45,23 +45,23 @@
|
|
|
45
45
|
"main": "./build/index.js",
|
|
46
46
|
"types": "./build/index.d.ts",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@automattic/jetpack-api": "^1.0.
|
|
49
|
-
"@automattic/jetpack-base-styles": "^1.0.
|
|
50
|
-
"@automattic/jetpack-components": "^1.
|
|
51
|
-
"@wordpress/api-fetch": "7.
|
|
52
|
-
"@wordpress/components": "29.
|
|
48
|
+
"@automattic/jetpack-api": "^1.0.4",
|
|
49
|
+
"@automattic/jetpack-base-styles": "^1.0.3",
|
|
50
|
+
"@automattic/jetpack-components": "^1.1.9",
|
|
51
|
+
"@wordpress/api-fetch": "7.26.0",
|
|
52
|
+
"@wordpress/components": "29.12.0",
|
|
53
53
|
"@wordpress/dataviews": "4.17.0",
|
|
54
|
-
"@wordpress/date": "5.
|
|
55
|
-
"@wordpress/element": "6.
|
|
56
|
-
"@wordpress/i18n": "5.
|
|
57
|
-
"@wordpress/icons": "10.
|
|
58
|
-
"@wordpress/url": "4.
|
|
54
|
+
"@wordpress/date": "5.26.0",
|
|
55
|
+
"@wordpress/element": "6.26.0",
|
|
56
|
+
"@wordpress/i18n": "5.26.0",
|
|
57
|
+
"@wordpress/icons": "10.26.0",
|
|
58
|
+
"@wordpress/url": "4.26.0",
|
|
59
59
|
"debug": "4.4.1",
|
|
60
60
|
"react": "^18.2.0",
|
|
61
61
|
"react-dom": "^18.2.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@wordpress/i18n": "5.
|
|
64
|
+
"@wordpress/i18n": "5.26.0",
|
|
65
65
|
"react": "^18.2.0",
|
|
66
66
|
"react-dom": "^18.2.0"
|
|
67
67
|
}
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
getFixerDescription,
|
|
10
10
|
} from '@automattic/jetpack-scan';
|
|
11
11
|
import styles from './styles.module.scss';
|
|
12
|
+
import type { MouseEvent } from 'react';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Threat Fixer Button component.
|
|
@@ -66,7 +67,7 @@ export default function ThreatFixerButton( {
|
|
|
66
67
|
}, [ threat, fixerState.error ] );
|
|
67
68
|
|
|
68
69
|
const handleClick = useCallback(
|
|
69
|
-
( event:
|
|
70
|
+
( event: MouseEvent ) => {
|
|
70
71
|
event.stopPropagation();
|
|
71
72
|
onClick( [ threat ] );
|
|
72
73
|
},
|
|
@@ -5,6 +5,7 @@ import { type Threat } from '@automattic/jetpack-scan';
|
|
|
5
5
|
import ThreatSeverityBadge from '../threat-severity-badge/index.tsx';
|
|
6
6
|
import styles from './styles.module.scss';
|
|
7
7
|
import ThreatFixConfirmation from './threat-fix-confirmation.tsx';
|
|
8
|
+
import type { ComponentProps } from 'react';
|
|
8
9
|
|
|
9
10
|
interface ThreatModalContextType {
|
|
10
11
|
closeModal: () => void;
|
|
@@ -69,7 +70,7 @@ export default function ThreatModal( {
|
|
|
69
70
|
handleFixThreatClick?: ( threats: Threat[] ) => void;
|
|
70
71
|
handleIgnoreThreatClick?: ( threats: Threat[] ) => void;
|
|
71
72
|
handleUnignoreThreatClick?: ( threats: Threat[] ) => void;
|
|
72
|
-
} &
|
|
73
|
+
} & ComponentProps< typeof Modal > ): JSX.Element {
|
|
73
74
|
const userConnectionNeeded = ! isUserConnected || ! hasConnectedOwner;
|
|
74
75
|
const siteCredentialsNeeded = ! credentials || credentials.length === 0;
|
|
75
76
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ContextualUpgradeTrigger, Text } from '@automattic/jetpack-components';
|
|
2
2
|
import { __, sprintf } from '@wordpress/i18n';
|
|
3
|
-
import
|
|
3
|
+
import { useMemo, useContext } from 'react';
|
|
4
4
|
import { getFixerDescription } from '@automattic/jetpack-scan';
|
|
5
5
|
import { ThreatModalContext } from './index.tsx';
|
|
6
6
|
import styles from './styles.module.scss';
|