@socialgouv/kali-data-types 3.191.0 → 3.193.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socialgouv/kali-data-types",
3
- "version": "3.191.0",
3
+ "version": "3.193.0",
4
4
  "devDependencies": {
5
5
  "@babel/core": "^7.16.0",
6
6
  "@babel/plugin-transform-modules-commonjs": "^7.16.0",
@@ -56,9 +56,7 @@
56
56
  "test:type": "tsc --noEmit",
57
57
  "test:unit": "jest",
58
58
  "test:update": "jest --updateSnapshot",
59
- "test:watch": "yarn test:unit --watch",
60
- "build": "tsc && rm -rf ./dist/update-cc/data-cc && cp -r ./update-cc/data-cc ./dist/update-cc/data-cc",
61
- "update-cc": "npm run build && node dist/update-cc/index.js"
59
+ "test:watch": "yarn test:unit --watch"
62
60
  },
63
61
  "types": "./src/index.d.ts",
64
62
  "babel": {
@@ -7,11 +7,11 @@ describe(`libs/getAgreementIdFromIdOrIdcc()`, () => {
7
7
  });
8
8
 
9
9
  it(`with an existing agreement IDCC (string)`, () => {
10
- expect(getAgreementIdFromIdOrIdcc("1480")).toBe("KALICONT000005635444");
10
+ expect(getAgreementIdFromIdOrIdcc("3239")).toBe("KALICONT000044594539");
11
11
  });
12
12
 
13
13
  it(`with an existing agreement IDCC (number)`, () => {
14
- expect(getAgreementIdFromIdOrIdcc(1480)).toBe("KALICONT000005635444");
14
+ expect(getAgreementIdFromIdOrIdcc(3239)).toBe("KALICONT000044594539");
15
15
  });
16
16
  });
17
17
 
@@ -29,7 +29,7 @@ const isAgreementId = id => typeof id === "string" && /^KALICONT\d{12}$/.test(id
29
29
  function getAgreementIdFromIdOrIdcc(agreementIdOrIdcc) {
30
30
  if (isAgreementIdcc(agreementIdOrIdcc)) {
31
31
  const idcc = Number(agreementIdOrIdcc);
32
- const matchIdcc = ({ num }) => num === idcc;
32
+ const matchIdcc = ({ num }) => Number(num) === idcc;
33
33
  const maybeAgreement = INDEXED_AGREEMENTS.find(matchIdcc);
34
34
  if (maybeAgreement === undefined) {
35
35
  throw new Error(`No agreement found with this IDCC (${idcc}).`);