@automattic/jetpack-scan 0.5.0 → 0.5.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
+ ## [0.5.2] - 2024-12-16
9
+ ### Changed
10
+ - Updated package dependencies. [#40564]
11
+
12
+ ## [0.5.1] - 2024-12-09
13
+ ### Changed
14
+ - Internal updates.
15
+
8
16
  ## [0.5.0] - 2024-12-04
9
17
  ### Added
10
18
  - Added more types for working with scan results. [#40399]
@@ -79,6 +87,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
79
87
  ### Removed
80
88
  - Updated dependencies. [#39754]
81
89
 
90
+ [0.5.2]: https://github.com/Automattic/jetpack-scan/compare/v0.5.1...v0.5.2
91
+ [0.5.1]: https://github.com/Automattic/jetpack-scan/compare/v0.5.0...v0.5.1
82
92
  [0.5.0]: https://github.com/Automattic/jetpack-scan/compare/v0.4.1...v0.5.0
83
93
  [0.4.1]: https://github.com/Automattic/jetpack-scan/compare/v0.4.0...v0.4.1
84
94
  [0.4.0]: https://github.com/Automattic/jetpack-scan/compare/v0.3.0...v0.4.0
@@ -41,6 +41,6 @@ export type Threat = {
41
41
  slug: string;
42
42
  name: string;
43
43
  version: string;
44
- type: 'plugin' | 'theme' | 'core';
44
+ type: 'plugins' | 'themes' | 'core';
45
45
  };
46
46
  };
@@ -1,6 +1,6 @@
1
1
  import { type ThreatFixStatus } from '../types/fixers.js';
2
2
  import { type Threat } from '../types/threats.js';
3
- export declare const getThreatType: (threat: Threat) => "plugin" | "theme" | "core" | "file";
3
+ export declare const getThreatType: (threat: Threat) => "plugins" | "themes" | "core" | "file";
4
4
  export declare const fixerTimestampIsStale: (lastUpdatedTimestamp: string) => boolean;
5
5
  export declare const fixerIsInError: (fixerStatus: ThreatFixStatus) => boolean;
6
6
  export declare const fixerIsInProgress: (fixerStatus: ThreatFixStatus) => boolean;
@@ -55,22 +55,21 @@ export const getDetailedFixerAction = (threat) => {
55
55
  if (threat.filename) {
56
56
  return __('Delete file', 'jetpack-scan');
57
57
  }
58
- if (((_a = threat.extension) === null || _a === void 0 ? void 0 : _a.type) === 'plugin') {
58
+ if (((_a = threat.extension) === null || _a === void 0 ? void 0 : _a.type) === 'plugins') {
59
59
  return __('Delete plugin from site', 'jetpack-scan');
60
60
  }
61
- if (((_b = threat.extension) === null || _b === void 0 ? void 0 : _b.type) === 'theme') {
61
+ if (((_b = threat.extension) === null || _b === void 0 ? void 0 : _b.type) === 'themes') {
62
62
  return __('Delete theme from site', 'jetpack-scan');
63
63
  }
64
64
  break;
65
65
  case 'update':
66
- if (((_c = threat.extension) === null || _c === void 0 ? void 0 : _c.type) === 'plugin') {
66
+ if (((_c = threat.extension) === null || _c === void 0 ? void 0 : _c.type) === 'plugins') {
67
67
  return __('Update plugin to newer version', 'jetpack-scan');
68
68
  }
69
- if (((_d = threat.extension) === null || _d === void 0 ? void 0 : _d.type) === 'theme') {
69
+ if (((_d = threat.extension) === null || _d === void 0 ? void 0 : _d.type) === 'themes') {
70
70
  return __('Update theme to newer version', 'jetpack-scan');
71
71
  }
72
72
  return __('Update', 'jetpack-scan');
73
- break;
74
73
  case 'replace':
75
74
  case 'rollback':
76
75
  if (threat.filename) {
@@ -97,10 +96,10 @@ export const getFixerDescription = (threat) => {
97
96
  }
98
97
  return __('Delete the infected file.', 'jetpack-scan');
99
98
  }
100
- if (((_a = threat.extension) === null || _a === void 0 ? void 0 : _a.type) === 'plugin') {
99
+ if (((_a = threat.extension) === null || _a === void 0 ? void 0 : _a.type) === 'plugins') {
101
100
  return __('Delete the plugin directory to fix the threat.', 'jetpack-scan');
102
101
  }
103
- if (((_b = threat.extension) === null || _b === void 0 ? void 0 : _b.type) === 'theme') {
102
+ if (((_b = threat.extension) === null || _b === void 0 ? void 0 : _b.type) === 'themes') {
104
103
  return __('Delete the theme directory to fix the threat.', 'jetpack-scan');
105
104
  }
106
105
  break;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@automattic/jetpack-scan",
4
- "version": "0.5.0",
4
+ "version": "0.5.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": {
@@ -45,18 +45,18 @@
45
45
  "main": "./build/index.js",
46
46
  "types": "./build/index.d.ts",
47
47
  "dependencies": {
48
- "@automattic/jetpack-api": "^0.17.20",
49
- "@automattic/jetpack-base-styles": "^0.6.38",
50
- "@wordpress/api-fetch": "7.13.0",
51
- "@wordpress/element": "6.13.0",
52
- "@wordpress/i18n": "5.13.0",
53
- "@wordpress/url": "4.13.0",
48
+ "@automattic/jetpack-api": "^0.17.21",
49
+ "@automattic/jetpack-base-styles": "^0.6.39",
50
+ "@wordpress/api-fetch": "7.14.0",
51
+ "@wordpress/element": "6.14.0",
52
+ "@wordpress/i18n": "5.14.0",
53
+ "@wordpress/url": "4.14.0",
54
54
  "debug": "4.3.4",
55
55
  "react": "^18.2.0",
56
56
  "react-dom": "^18.2.0"
57
57
  },
58
58
  "peerDependencies": {
59
- "@wordpress/i18n": "5.13.0",
59
+ "@wordpress/i18n": "5.14.0",
60
60
  "react": "^18.2.0",
61
61
  "react-dom": "^18.2.0"
62
62
  }
@@ -61,6 +61,6 @@ export type Threat = {
61
61
  slug: string;
62
62
  name: string;
63
63
  version: string;
64
- type: 'plugin' | 'theme' | 'core';
64
+ type: 'plugins' | 'themes' | 'core';
65
65
  };
66
66
  };
@@ -68,23 +68,22 @@ export const getDetailedFixerAction = ( threat: Threat ) => {
68
68
  return __( 'Delete file', 'jetpack-scan' );
69
69
  }
70
70
 
71
- if ( threat.extension?.type === 'plugin' ) {
71
+ if ( threat.extension?.type === 'plugins' ) {
72
72
  return __( 'Delete plugin from site', 'jetpack-scan' );
73
73
  }
74
74
 
75
- if ( threat.extension?.type === 'theme' ) {
75
+ if ( threat.extension?.type === 'themes' ) {
76
76
  return __( 'Delete theme from site', 'jetpack-scan' );
77
77
  }
78
78
  break;
79
79
  case 'update':
80
- if ( threat.extension?.type === 'plugin' ) {
80
+ if ( threat.extension?.type === 'plugins' ) {
81
81
  return __( 'Update plugin to newer version', 'jetpack-scan' );
82
82
  }
83
- if ( threat.extension?.type === 'theme' ) {
83
+ if ( threat.extension?.type === 'themes' ) {
84
84
  return __( 'Update theme to newer version', 'jetpack-scan' );
85
85
  }
86
86
  return __( 'Update', 'jetpack-scan' );
87
- break;
88
87
  case 'replace':
89
88
  case 'rollback':
90
89
  if ( threat.filename ) {
@@ -115,11 +114,11 @@ export const getFixerDescription = ( threat: Threat ) => {
115
114
  return __( 'Delete the infected file.', 'jetpack-scan' );
116
115
  }
117
116
 
118
- if ( threat.extension?.type === 'plugin' ) {
117
+ if ( threat.extension?.type === 'plugins' ) {
119
118
  return __( 'Delete the plugin directory to fix the threat.', 'jetpack-scan' );
120
119
  }
121
120
 
122
- if ( threat.extension?.type === 'theme' ) {
121
+ if ( threat.extension?.type === 'themes' ) {
123
122
  return __( 'Delete the theme directory to fix the threat.', 'jetpack-scan' );
124
123
  }
125
124
  break;