From f8f01c361e3e099e2a23c9ec538525403da76694 Mon Sep 17 00:00:00 2001 From: jourdiw Date: Tue, 5 Mar 2024 10:56:28 +0100 Subject: [PATCH] fix(deps): replace dependency messageformat with @messageformat/core 3.3.0 --- package.json | 2 +- src/lib/i18n.js | 2 +- yarn.lock | 102 ++++++++++++++++++++++++++++++------------------ 3 files changed, 67 insertions(+), 39 deletions(-) diff --git a/package.json b/package.json index 425c3d1f..39dc2e33 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@codemirror/stream-parser": "^0.19.9", "@formatjs/intl-locale": "^2.4.40", "@formatjs/intl-relativetimeformat": "^9.3.2", + "@messageformat/core": "3.3.0", "@popperjs/core": "^2.11.7", "clipboard-copy": "^4.0.0", "codemirror-asciidoc": "^2.0.0", @@ -66,7 +67,6 @@ "jdenticon": "^3.1.0", "jsonschema": "^1.4.0", "lit": "^2.0.2", - "messageformat": "^2.3.0", "object-path": "^0.11.8", "resize-observer-polyfill": "^1.5.1", "whatwg-fetch": "^3.6.17" diff --git a/src/lib/i18n.js b/src/lib/i18n.js index c0ae6e64..01877f52 100644 --- a/src/lib/i18n.js +++ b/src/lib/i18n.js @@ -14,6 +14,7 @@ * limitations under the License. */ import 'whatwg-fetch'; +import MessageFormat from '@messageformat/core'; /** * @param {string} key - The translation key @@ -49,7 +50,6 @@ function getTranslation(key) { // Init private translation storage i18n._translations = {}; -const MessageFormat = require('messageformat'); i18n._messageFormatter = new MessageFormat(i18n._lang); /** diff --git a/yarn.lock b/yarn.lock index 8a5ed679..66f180b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4071,6 +4071,7 @@ __metadata: "@formatjs/intl-locale": ^2.4.40 "@formatjs/intl-relativetimeformat": ^9.3.2 "@highcharts/map-collection": 2.0.1 + "@messageformat/core": 3.3.0 "@popperjs/core": ^2.11.7 "@semantic-release/changelog": 6.0.2 "@semantic-release/git": 10.0.1 @@ -4118,7 +4119,6 @@ __metadata: lit: ^2.0.2 lit-html: 2.6.1 markdown-it: 12.3.2 - messageformat: ^2.3.0 node-static: 0.7.11 nodemon: 2.0.21 object-path: ^0.11.8 @@ -4714,6 +4714,52 @@ __metadata: languageName: node linkType: hard +"@messageformat/core@npm:3.3.0": + version: 3.3.0 + resolution: "@messageformat/core@npm:3.3.0" + dependencies: + "@messageformat/date-skeleton": ^1.0.0 + "@messageformat/number-skeleton": ^1.0.0 + "@messageformat/parser": ^5.1.0 + "@messageformat/runtime": ^3.0.1 + make-plural: ^7.0.0 + safe-identifier: ^0.4.1 + checksum: 9c4e8cb878567711b132305ba798358751f5db43cdbcd450469dd6bc880fcf7edb313bf3f0eb8ad3e78c86aeaa7c32050b611dfd3b8ec2ae4e58373973082ea0 + languageName: node + linkType: hard + +"@messageformat/date-skeleton@npm:^1.0.0": + version: 1.0.1 + resolution: "@messageformat/date-skeleton@npm:1.0.1" + checksum: 0832029a18ae54c81d4473eaa764cebbabe084d1a3253a6d4975e5802bff7416a51d43522aad9292eb9663735282a7667e2818efc92905c497ca87424d822ceb + languageName: node + linkType: hard + +"@messageformat/number-skeleton@npm:^1.0.0": + version: 1.2.0 + resolution: "@messageformat/number-skeleton@npm:1.2.0" + checksum: deb38fc45248a774e142437c5687a4ba452ab4064ac7ac985da26376238a9f54bd43e6e90ab0756fedd35d4d83e36d2dfc336abf643d52ff3850f5d1eae59e0c + languageName: node + linkType: hard + +"@messageformat/parser@npm:^5.1.0": + version: 5.1.0 + resolution: "@messageformat/parser@npm:5.1.0" + dependencies: + moo: ^0.5.1 + checksum: e5c53d1328f90bcf4bf01321c996e4aa18bff95e30b4bb508284a7f290bbaf496adffec20407596aaf6556467cbd82bee8931ca0982a4254ded651569d356da2 + languageName: node + linkType: hard + +"@messageformat/runtime@npm:^3.0.1": + version: 3.0.1 + resolution: "@messageformat/runtime@npm:3.0.1" + dependencies: + make-plural: ^7.0.0 + checksum: e69c3b0b372e15af88c285f6884ac0e3ba5fc7227b8ddc7f4bef94cb5675057126dc0ae9001e2a623d7ec61727d9b5e69b8e61be8618afe0baf40081ad3b0568 + languageName: node + linkType: hard + "@mrmlnc/readdir-enhanced@npm:^2.2.1": version: 2.2.1 resolution: "@mrmlnc/readdir-enhanced@npm:2.2.1" @@ -16988,17 +17034,10 @@ __metadata: languageName: node linkType: hard -"make-plural@npm:^4.3.0": - version: 4.3.0 - resolution: "make-plural@npm:4.3.0" - dependencies: - minimist: ^1.2.0 - dependenciesMeta: - minimist: - optional: true - bin: - make-plural: ./bin/make-plural - checksum: 1702556e988d7f0b64f10260bf897be3b32e973fbb21b59175ba2ece75ad4d49b9d8caea2ef633dd573e6009051f221fe350907d9f2a904a21e9c9b7b964fba4 +"make-plural@npm:^7.0.0": + version: 7.3.0 + resolution: "make-plural@npm:7.3.0" + checksum: bb39b4b77533f0d5fb94eec128340b54dda8c1707d6b0a98c148e5d7bc23094e123f88275a61573fa31dc2f5d7352215cee0df523cd69b5d8fcb3969a2bcf8f8 languageName: node linkType: hard @@ -17295,31 +17334,6 @@ __metadata: languageName: node linkType: hard -"messageformat-formatters@npm:^2.0.1": - version: 2.0.1 - resolution: "messageformat-formatters@npm:2.0.1" - checksum: 847d034aaf354abd6af2dc8ff3d0f98b165242545916fa060714201afa14b60a4d246951ef354fc8511de9dde36c16b69ca348ed6c79116840f9f0511cf61ab4 - languageName: node - linkType: hard - -"messageformat-parser@npm:^4.1.2": - version: 4.1.3 - resolution: "messageformat-parser@npm:4.1.3" - checksum: d5a72581116b1813460241672ffb6ff3e2f05c311d48c7d81daf368f5254447dda095756e53830664383c51c707dbf387c21b35cd341b7edd4f2945656ac476f - languageName: node - linkType: hard - -"messageformat@npm:^2.3.0": - version: 2.3.0 - resolution: "messageformat@npm:2.3.0" - dependencies: - make-plural: ^4.3.0 - messageformat-formatters: ^2.0.1 - messageformat-parser: ^4.1.2 - checksum: 9c336657cbd60c968a64b1895e84d19cb53634124814cdb60a5a87803b9d66844820fe5dae0c823f1d9b7c7776c8b5cfe434c5c45633f5ce3702c5d7a294c9da - languageName: node - linkType: hard - "methods@npm:~1.1.2": version: 1.1.2 resolution: "methods@npm:1.1.2" @@ -17707,6 +17721,13 @@ __metadata: languageName: node linkType: hard +"moo@npm:^0.5.1": + version: 0.5.2 + resolution: "moo@npm:0.5.2" + checksum: 5a41ddf1059fd0feb674d917c4774e41c877f1ca980253be4d3aae1a37f4bc513f88815041243f36f5cf67a62fb39324f3f997cf7fb17b6cb00767c165e7c499 + languageName: node + linkType: hard + "move-concurrently@npm:^1.0.1": version: 1.0.1 resolution: "move-concurrently@npm:1.0.1" @@ -21248,6 +21269,13 @@ __metadata: languageName: node linkType: hard +"safe-identifier@npm:^0.4.1": + version: 0.4.2 + resolution: "safe-identifier@npm:0.4.2" + checksum: 67e28ed89a74cf20b827419003d3cb60a0ebaec0771c2c818f4b2239bf4f96e01ad90aa8db6dc57ee90c0c438b6f46323e4b5a3d955d18d8c4e158ea035cabdd + languageName: node + linkType: hard + "safe-regex-test@npm:^1.0.0": version: 1.0.0 resolution: "safe-regex-test@npm:1.0.0"