@mojaloop/ml-testing-toolkit-shared-lib 14.0.4 → 14.1.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/.grype.yaml ADDED
@@ -0,0 +1,13 @@
1
+ disabled: true
2
+ ignore:
3
+
4
+ # Set output format defaults
5
+ output:
6
+ - "table"
7
+ - "json"
8
+
9
+ # Modify your CircleCI job to check critical count
10
+ search:
11
+ scope: "squashed"
12
+ quiet: false
13
+ check-for-app-update: false
package/.ncurc.yaml CHANGED
@@ -1,7 +1,2 @@
1
1
  ## Add a TODO comment indicating the reason for each rejected dependency upgrade added to this list, and what should be done to resolve it (i.e. handle it through a story, etc).
2
- reject: [
3
- # Downgraded to 5.5.3 - Reason: removal of functional code in faker.js - https://github.com/advisories/GHSA-5w9c-rv96-fr7g
4
- "faker",
5
- # json-schema-faker v0.5.0 - Reason: Introduces some url rendering issues and has huge changes between v0.5.0-rcv.46 and v0.5.0
6
- "json-schema-faker"
7
- ]
2
+ reject: []
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 18.20.4
1
+ 22.15.1
package/CHANGELOG.md CHANGED
@@ -1,4 +1,18 @@
1
1
  # Changelog: [mojaloop/als-consent-oracle](https://github.com/mojaloop/als-consent-oracle)
2
+ ## [14.1.0](https://github.com/mojaloop/ml-testing-toolkit-shared-lib/compare/v14.0.5...v14.1.0) (2025-06-03)
3
+
4
+
5
+ ### Features
6
+
7
+ * bump up the node version to v22.15.1 ([#23](https://github.com/mojaloop/ml-testing-toolkit-shared-lib/issues/23)) ([ccd59bd](https://github.com/mojaloop/ml-testing-toolkit-shared-lib/commit/ccd59bdc348ab1b9bce1cb2ee69f6553fb7021a5))
8
+
9
+ ### [14.0.5](https://github.com/mojaloop/ml-testing-toolkit-shared-lib/compare/v14.0.4...v14.0.5) (2025-05-16)
10
+
11
+
12
+ ### Chore
13
+
14
+ * update nodeJS to 22.15.0 and migrate from faker lib ([#21](https://github.com/mojaloop/ml-testing-toolkit-shared-lib/issues/21)) ([1eacb45](https://github.com/mojaloop/ml-testing-toolkit-shared-lib/commit/1eacb4575b250c91d0288345c4280fcdd74852eb))
15
+
2
16
  ### [14.0.4](https://github.com/mojaloop/ml-testing-toolkit-shared-lib/compare/v14.0.3...v14.0.4) (2025-02-19)
3
17
 
4
18
 
package/jest.config.js CHANGED
@@ -5,10 +5,10 @@ module.exports = {
5
5
  ],
6
6
  coverageThreshold: {
7
7
  global: {
8
- statements: 90,
9
- functions: 90,
10
- branches: 90,
11
- lines: 90
8
+ statements: 80,
9
+ functions: 80,
10
+ branches: 80,
11
+ lines: 80
12
12
  }
13
13
  },
14
14
  modulePathIgnorePatterns: [],
package/package.json CHANGED
@@ -1,15 +1,13 @@
1
1
  {
2
2
  "name": "@mojaloop/ml-testing-toolkit-shared-lib",
3
- "version": "14.0.4",
3
+ "version": "14.1.0",
4
4
  "description": "Shared library for ml-testing-toolkit re-usable functions",
5
5
  "main": "src/index.js",
6
6
  "contributors": [
7
7
  "Vijaya Kumar <vijaya.guthi@modusbox.com>",
8
- "Miguel de Barros <miguel.debarros@modusbox.com>"
8
+ "Miguel de Barros <miguel.debarros@modusbox.com>",
9
+ "Juan Correa <code@juancorrea.io>"
9
10
  ],
10
- "engines": {
11
- "node": ">=18.x"
12
- },
13
11
  "license": "Apache-2.0",
14
12
  "repository": {
15
13
  "type": "git",
@@ -22,7 +20,9 @@
22
20
  "homepage": "https://github.com/mojaloop/ml-testing-toolkit-shared-lib#readme",
23
21
  "pre-commit": [
24
22
  "lint",
25
- "dep:check"
23
+ "dep:check",
24
+ "audit:check",
25
+ "test"
26
26
  ],
27
27
  "scripts": {
28
28
  "start": "node src/index.js",
@@ -32,37 +32,37 @@
32
32
  "lint:fix": "npm run standard:fix",
33
33
  "test": "npm run test:unit",
34
34
  "test:unit": "jest --testMatch '**/test/unit/**/*.test.js'",
35
+ "test:xunit": "npm run test:unit",
35
36
  "test:int": "jest --reporters=default --reporters=jest-junit --testMatch '**/test/integration/**/*.test.js'",
36
37
  "test:coverage": "jest --coverage --coverageThreshold='{}' --testMatch '**/test/unit/**/*.test.js'",
37
38
  "test:coverage-check": "jest --coverage --testMatch '**/test/unit/**/*.test.js'",
38
39
  "test:junit": "jest --reporters=default --reporters=jest-junit --testMatch '**/test/unit/**/*.test.js'",
39
- "test:integration": "./test/integration-runner.sh ",
40
+ "test:integration": "echo 'No integration tests defined'",
41
+ "test:functional": "echo 'No functional tests defined'",
40
42
  "cover": "npx nyc --all report --reporter=lcov npm run test",
41
43
  "audit:check": "npx audit-ci --config ./audit-ci.jsonc",
42
44
  "audit:fix": "npm audit fix",
43
45
  "dep:check": "npx ncu -e 2",
44
46
  "dep:update": "npx ncu -u",
45
- "prepare": "husky || true",
46
47
  "release": "npx standard-version --no-verify --releaseCommitMessageFormat 'chore(release): {{currentTag}} [skip ci]'",
47
48
  "snapshot": "npx standard-version --no-verify --skip.changelog --prerelease snapshot --releaseCommitMessageFormat 'chore(snapshot): {{currentTag}}'"
48
49
  },
49
50
  "dependencies": {
51
+ "@apidevtools/json-schema-ref-parser": "12.0.2",
52
+ "@faker-js/faker": "9.8.0",
50
53
  "ajv": "8.17.1",
51
- "faker": "5.5.3",
52
- "json-schema-faker": "0.5.8",
53
- "json-schema-ref-parser": "9.0.9",
54
+ "json-schema-faker": "0.5.9",
54
55
  "lodash": "4.17.21",
55
56
  "node-dir": "0.1.17"
56
57
  },
57
58
  "devDependencies": {
58
- "@commitlint/cli": "^19.7.1",
59
- "@commitlint/config-conventional": "^19.7.1",
59
+ "@commitlint/cli": "^19.8.1",
60
+ "@commitlint/config-conventional": "^19.8.1",
60
61
  "@types/jest": "29.5.14",
61
62
  "audit-ci": "^7.1.0",
62
- "husky": "^9.1.7",
63
63
  "jest": "29.7.0",
64
64
  "jest-junit": "16.0.0",
65
- "npm-check-updates": "17.1.14",
65
+ "npm-check-updates": "18.0.1",
66
66
  "pre-commit": "^1.2.2",
67
67
  "replace": "^1.2.2",
68
68
  "standard": "^17.1.2",
@@ -71,7 +71,8 @@
71
71
  "overrides": {
72
72
  "cross-spawn": "7.0.6",
73
73
  "glob": "9.3.5",
74
- "rimraf": "5.0.10"
74
+ "rimraf": "5.0.10",
75
+ "@babel/helpers": "7.26.10"
75
76
  },
76
77
  "standard-version": {
77
78
  "scripts": {
@@ -31,19 +31,19 @@ const _ = require('lodash')
31
31
  // const fs = require('fs')
32
32
  // const jref = require('json-ref-lite')
33
33
  // const yaml = require('js-yaml')
34
- const faker = require('faker')
34
+ const { faker } = require('@faker-js/faker')
35
35
  const jsf = require('json-schema-faker')
36
- const $RefParser = require('json-schema-ref-parser')
36
+ const $RefParser = require('@apidevtools/json-schema-ref-parser')
37
37
  const Ajv = require('ajv')
38
38
 
39
- jsf.format('byte', () => Buffer.alloc(faker.lorem.sentence(12)).toString('base64'))
39
+ jsf.format('byte', () => Buffer.alloc(faker.lorem.sentence({ min: 12, max: 12 })).toString('base64'))
40
40
 
41
41
  jsf.option({
42
42
  alwaysFakeOptionals: true,
43
43
  ignoreMissingRefs: true,
44
44
  maxItems: 2
45
45
  })
46
- jsf.extend('faker', () => require('faker'))
46
+ jsf.extend('faker', () => require('@faker-js/faker').faker)
47
47
 
48
48
  const ajv = new Ajv({
49
49
  strict: false,
package/.husky/commit-msg DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
- npx commitlint --edit $1
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
- git update-index --again
package/.husky/pre-commit DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
- npm run lint; npm run dep:check; npm run test:unit