ibm-cloud-sdk-core 4.3.2 → 4.3.3

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
@@ -1,3 +1,10 @@
1
+ ## [4.3.3](https://github.com/IBM/node-sdk-core/compare/v4.3.2...v4.3.3) (2024-06-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * revert "fix(deps): remove `expect` as redundant development dependency" ([362e20a](https://github.com/IBM/node-sdk-core/commit/362e20aad22172bc6db0a3458743809b0cdefe3a))
7
+
1
8
  ## [4.3.2](https://github.com/IBM/node-sdk-core/compare/v4.3.1...v4.3.2) (2024-06-03)
2
9
 
3
10
 
@@ -13,8 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- // eslint-disable-next-line import/no-extraneous-dependencies
17
- import { expect } from '@jest/globals';
16
+ import expect from 'expect';
18
17
  /**
19
18
  * This module provides a set of helper methods used to reduce code duplication in the generated unit tests
20
19
  * for the SDKs that depend on this core package. Note that these methods are not used by the tests for this
@@ -14,10 +14,12 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
+ var __importDefault = (this && this.__importDefault) || function (mod) {
18
+ return (mod && mod.__esModule) ? mod : { "default": mod };
19
+ };
17
20
  Object.defineProperty(exports, "__esModule", { value: true });
18
21
  exports.expectToBePromise = exports.getOptions = exports.checkForSuccessfulExecution = exports.checkUserHeader = exports.checkMediaHeaders = exports.checkUrlAndMethod = void 0;
19
- // eslint-disable-next-line import/no-extraneous-dependencies
20
- var globals_1 = require("@jest/globals");
22
+ var expect_1 = __importDefault(require("expect"));
21
23
  /**
22
24
  * This module provides a set of helper methods used to reduce code duplication in the generated unit tests
23
25
  * for the SDKs that depend on this core package. Note that these methods are not used by the tests for this
@@ -32,8 +34,8 @@ var globals_1 = require("@jest/globals");
32
34
  * @param method - The HTTP method for the request, from the API definition
33
35
  */
34
36
  function checkUrlAndMethod(options, url, method) {
35
- (0, globals_1.expect)(options.url).toEqual(url);
36
- (0, globals_1.expect)(options.method).toEqual(method);
37
+ (0, expect_1.default)(options.url).toEqual(url);
38
+ (0, expect_1.default)(options.method).toEqual(method);
37
39
  }
38
40
  exports.checkUrlAndMethod = checkUrlAndMethod;
39
41
  /**
@@ -47,8 +49,8 @@ exports.checkUrlAndMethod = checkUrlAndMethod;
47
49
  */
48
50
  function checkMediaHeaders(createRequestMock, accept, contentType) {
49
51
  var headers = createRequestMock.mock.calls[0][0].defaultOptions.headers;
50
- (0, globals_1.expect)(headers.Accept).toEqual(accept);
51
- (0, globals_1.expect)(headers['Content-Type']).toEqual(contentType);
52
+ (0, expect_1.default)(headers.Accept).toEqual(accept);
53
+ (0, expect_1.default)(headers['Content-Type']).toEqual(contentType);
52
54
  }
53
55
  exports.checkMediaHeaders = checkMediaHeaders;
54
56
  /**
@@ -62,7 +64,7 @@ exports.checkMediaHeaders = checkMediaHeaders;
62
64
  */
63
65
  function checkUserHeader(createRequestMock, userHeaderName, userHeaderValue) {
64
66
  var headers = createRequestMock.mock.calls[0][0].defaultOptions.headers;
65
- (0, globals_1.expect)(headers[userHeaderName]).toEqual(userHeaderValue);
67
+ (0, expect_1.default)(headers[userHeaderName]).toEqual(userHeaderValue);
66
68
  }
67
69
  exports.checkUserHeader = checkUserHeader;
68
70
  /**
@@ -73,7 +75,7 @@ exports.checkUserHeader = checkUserHeader;
73
75
  */
74
76
  function checkForSuccessfulExecution(createRequestMock) {
75
77
  var sdkParams = createRequestMock.mock.calls[0][0];
76
- (0, globals_1.expect)(typeof sdkParams).toEqual('object');
78
+ (0, expect_1.default)(typeof sdkParams).toEqual('object');
77
79
  }
78
80
  exports.checkForSuccessfulExecution = checkForSuccessfulExecution;
79
81
  /**
@@ -95,6 +97,6 @@ exports.getOptions = getOptions;
95
97
  * @param sdkPromise - the Promise returned by an SDK method
96
98
  */
97
99
  function expectToBePromise(sdkPromise) {
98
- (0, globals_1.expect)(typeof sdkPromise.then).toBe('function');
100
+ (0, expect_1.default)(typeof sdkPromise.then).toBe('function');
99
101
  }
100
102
  exports.expectToBePromise = expectToBePromise;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ibm-cloud-sdk-core",
3
- "version": "4.3.2",
3
+ "version": "4.3.3",
4
4
  "description": "Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.",
5
5
  "main": "index.js",
6
6
  "typings": "./es/index.d.ts",
@@ -41,6 +41,7 @@
41
41
  "camelcase": "^6.3.0",
42
42
  "debug": "^4.3.4",
43
43
  "dotenv": "^16.4.5",
44
+ "expect": "^27.5.1",
44
45
  "extend": "3.0.2",
45
46
  "file-type": "16.5.4",
46
47
  "form-data": "4.0.0",