{"_id":"@braw/rollup-plugin-icu-messages","_rev":"5-701a9e522ffabf0917e925c248dff257","name":"@braw/rollup-plugin-icu-messages","dist-tags":{"alpha":"1.0.0-alpha.5","latest":"1.0.0-alpha.1"},"versions":{"1.0.0-alpha.1":{"name":"@braw/rollup-plugin-icu-messages","version":"1.0.0-alpha.1","description":"Transform files containing ICU MessageFormat messages.","keywords":["i18n","icu-messageformat","rollup-plugin","rollup","plugin"],"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./wrap-plugins":{"types":"./dist/wrap-plugins.d.ts","import":"./dist/wrap-plugins.mjs","require":"./dist/wrap-plugins.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build:raw":"del-cli dist && tsc --noEmit false","build":"unbuild","dev":"vitest dev","prepack":"pnpm run build","test":"vitest run","lint":"eslint src","bt":"pnpm run -s build && pnpm run -s test"},"engines":{"node":">=16"},"devDependencies":{"@ltd/j-toml":"^1.38.0","@nuxtjs/eslint-config-typescript":"^12.0.0","@rollup/plugin-json":"^6.0.0","@types/glob":"^8.0.1","@types/node":"^18.11.18","del-cli":"^5.0.0","eslint":"^8.31.0","prettier":"^2.8.3","prettier-plugin-jsdoc":"^0.4.2","semantic-release":"^20.0.2","typescript":"^4.9.4","unbuild":"^1.1.1","vitest":"^0.27.2"},"dependencies":{"@formatjs/cli-lib":"^5.1.12","@formatjs/icu-messageformat-parser":"^2.1.14","@rollup/pluginutils":"^5.0.2","glob":"^8.1.0","import-meta-resolve":"^2.2.1","pathe":"^1.1.0"},"peerDependencies":{"rollup":"^3.11.0"},"publishConfig":{"access":"public"},"gitHead":"4ba55775a25cf11c3f270b3619a22718bb7ec345","_id":"@braw/rollup-plugin-icu-messages@1.0.0-alpha.1","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-J8deZtKxW/xt+TvN9oK0+HW1MAZU225/FxNslt6sUn9xKyzdHddF04C1t6w5qZdIHQI3kNAl8I+cducqhudNEg==","shasum":"5cff120dbf39531a74bfce2535e2899d3de4661e","tarball":"https://registry.npmjs.org/@braw/rollup-plugin-icu-messages/-/rollup-plugin-icu-messages-1.0.0-alpha.1.tgz","fileCount":11,"unpackedSize":29192,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDxENQXhSUGwfIwzb2SKaYqRAKTUtFzicsIZzsfIlyBAIgFbmIiTUZUv29/d/TKh4asV2+7szFzu34p/t1TlTZ8hU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4fxuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqyvg/7BV/svw0rUsY1wFFult2BH2Zp5OiI6wIeK9MpV4Ht+lpnNSNm\r\nu6pD+XPjdShTto+e5vN1nbj/y7DO2k57bjRmIYLbpqDVpoQG4Wo//m/e105S\r\nFkORHNc2JMAbi1tH7tRxp6x0czZ1oO3bS9nDtZNbFAx4G6DjzWP04c5VkUAP\r\n97Xj3m51+9v47T2iayNc50ZChfAdmlcw8v7dClZtw40OR7gwluvS5iVfLPOQ\r\nEmHGDpyeeSTBH6oTx4aATkZbSr/dB/Oc3nup4KL8mS9ue9LJtZ43Eoc+1WXE\r\n4xavp90qtACm5bIy9I0NF1PIBjsQx9WyI/1mhGhbB/DRpoiFGRF6ywzAfRHG\r\nfTyPv/bz1e/IlWdsv3fFZQXLrmgSIXn/l2BzCJiteh4e1p1j4XYrST8pv9rF\r\nchZyoYHVsebMg/OkmUemClRbFuwR6MYF+x51DdNHlKTXicxUNo3eNdHCPdDl\r\n71OX8DsVgTdTCbsTrBA9TAlRQFEMmjaAdR4YQBSGxY7A8b4c+VpkjyqDUkxR\r\ncC8JL9trEQ4d7Vnsf87syujQ891bzLaz76SIqcHeEPhkfsVDIZA8wPbKnPo5\r\nn5h/OVLylrj0plP4nGsCqIK2tum5sSyNwezF6GsuvkQwGz1rGz7rMvpn5w7L\r\nC2O6NL+dvADVy9Qm+WIxZcd8ecat19OFD7M=\r\n=SckR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"brawaru","email":"dafri.nochiterov8+npm@gmail.com"},"directories":{},"maintainers":[{"name":"brawaru","email":"dafri.nochiterov8+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-icu-messages_1.0.0-alpha.1_1675754606168_0.948479048871611"},"_hasShrinkwrap":false,"deprecated":"This package is deprecated and not maintained anymore. Please use @vintl/unplugin instead"},"1.0.0-alpha.2":{"name":"@braw/rollup-plugin-icu-messages","version":"1.0.0-alpha.2","description":"Transform files containing ICU MessageFormat messages.","author":{"name":"Alexander 'Brawaru' Sorokin","url":"https://github.com/brawaru"},"repository":{"type":"git","url":"git+https://github.com/Brawaru/rollup-plugin-icu-messages.git"},"bugs":{"url":"https://github.com/Brawaru/rollup-plugin-icu-messages/issues"},"homepage":"https://github.com/Brawaru/rollup-plugin-icu-messages#readme","funding":"https://github.com/Brawaru/Brawaru/blob/main/SUPPORT.md","keywords":["i18n","icu-messageformat","rollup-plugin","rollup","plugin"],"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./wrap-plugins":{"types":"./dist/wrap-plugins.d.ts","import":"./dist/wrap-plugins.mjs","require":"./dist/wrap-plugins.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build:raw":"del-cli dist && tsc --noEmit false","build":"unbuild","dev":"vitest dev","prepack":"pnpm run build","test":"vitest run","lint":"eslint src","bt":"pnpm run -s build && pnpm run -s test"},"engines":{"node":">=16"},"devDependencies":{"@ltd/j-toml":"^1.38.0","@nuxtjs/eslint-config-typescript":"^12.0.0","@rollup/plugin-json":"^6.0.0","@types/glob":"^8.0.1","@types/node":"^18.11.18","del-cli":"^5.0.0","eslint":"^8.31.0","prettier":"^2.8.3","prettier-plugin-jsdoc":"^0.4.2","semantic-release":"^20.0.2","typescript":"^4.9.4","unbuild":"^1.1.1","vitest":"^0.27.2"},"dependencies":{"@formatjs/cli-lib":"^5.1.12","@formatjs/icu-messageformat-parser":"^2.1.14","@rollup/pluginutils":"^5.0.2","glob":"^8.1.0","import-meta-resolve":"^2.2.1","pathe":"^1.1.0"},"peerDependencies":{"rollup":"^3.11.0"},"publishConfig":{"access":"public"},"readme":"# rollup-plugin-icu-messages\n\n> Transform files containing ICU MessageFormat messages.\n\n## Summary\n\nThis Rollup plugin adds a transform hook that pre-parses all messages in the JSON file into an AST that can be used at runtime without the need to bring in a parser, allowing the bundle size to be reduced. Read more about how this works on the [Format.JS website →](https://formatjs.io/docs/guides/advanced-usage#pre-compiling-messages)\n\n## Installation\n\nWith package manager of your choice:\n\n**npm**\n\n```sh\nnpm i -D @braw/rollup-plugin-icu-messages\n```\n\n**yarn**\n\n```sh\nyarn add -D @braw/rollup-plugin-icu-messages\n```\n\n**pnpm**\n\n```sh\npnpm i -D @braw/rollup-plugin-icu-messages\n```\n\n## Usage\n\nIn your Rollup file, import the default export from the `@braw/rollup-plugin-icu-messages` and then use it as a function in your `plugins` config array.\n\nExample configuration:\n\n```ts\nimport { defineConfig } from 'rollup'\nimport { icuMessages } from '@braw/rollup-plugin-icu-messages'\n\nexport default defineConfig({\n  input: './src/index.mjs',\n  output: { dir: './dist' },\n  plugins: [\n    icuMessages({\n      include: './i18n/*.json',\n      format: 'crowdin',\n    }),\n  ],\n})\n```\n\nThe following options are supported:\n\n- `include` (optional, default: `'**/*.messages.json'`) — either a single glob string or regular expression, or an array of them, which must match the file IDs to be included in the transformation.\n- `exclude` (optional, default: `undefined`) — either a single glob string or regular expression, or an array of them, which must match the file IDs to be excluded from the transformation.\n- `indent` (optional, default: `'\\t'`) — string or a number of spaces used for indentation.\n- `parse` (optional, default: `(code) => JSON.parse(code)`) — a function that takes the file content and ID, parses it and returns the JS object to pass to the `format` function.\n- `format` (optional, default: `default`) — either a string with the name of the built-in formatter, or a function that accepts parsed file contents (using the `parse` function) and produces a record of messages, keyed by their IDs. For a list of built-in formatters, [see the @formatjs/cli documentation →](https://formatjs.io/docs/tooling/cli#builtin-formatters).\n- `parserOptions` (optional, default: `undefined`) — an object whose keys are message IDs and whose values are either parsing options for those messages or a function that generates parsing options based on contextual information (such as module ID, message ID, and all messages).\n\n## Usage with other JSON plugins\n\nYour configuration may already include a plugin that handles JSON or other files that may conflict with this plugin.\n\nYou can configure this plugin to include files with other extensions and store your messages in, e.g. `.messages` files. Just change `options.include` to `**/*.messages` in this case.\n\nAlternatively you can use a separate plugin in this package — `icuMessagesWrapPlugins`, exported from `@braw/rollup-plugin-icu-messages/wrap-plugins`.\n\n<details>\n<summary>Example configuration</summary>\n\n```ts\nimport { defineConfig } from 'rollup'\nimport json from '@rollup/plugin-json'\nimport { icuMessages } from '@braw/rollup-plugin-icu-messages'\nimport { icuMessagesWrapPlugins } from '@braw/rollup-plugin-icu-messages/wrap-plugins'\n\nexport default defineConfig({\n  input: './src/index.mjs',\n  output: { dir: './dist' },\n  plugins: [\n    json(),\n    icuMessages({\n      include: './i18n/*.json',\n      format: 'crowdin',\n    }),\n    icuMessagesWrapPlugins({\n      extendDefaults: true,\n      wrappers: {\n        'my-plugin'(plugin, filter) {\n          // implement plugin wrapping here\n          // use filter to check if the file is handled by icuMessages plugin\n        },\n      },\n    }),\n  ],\n})\n```\n\n</details>\n","readmeFilename":"README.md","gitHead":"8083a49f5bb83100ef7d5cad04e4679552b530e0","_id":"@braw/rollup-plugin-icu-messages@1.0.0-alpha.2","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-w/IzBe87/N2Mt/l/2ejIUiD7ZWD8JqnGItQksU0fGyTIWTjdI/ge1KluySnz+lsXjAvjkP00QAdYf9VjUiaGTg==","shasum":"886ef675af4fd9d6edb8189a91378ef79cb6c03c","tarball":"https://registry.npmjs.org/@braw/rollup-plugin-icu-messages/-/rollup-plugin-icu-messages-1.0.0-alpha.2.tgz","fileCount":11,"unpackedSize":34787,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDGVKEuaa8O57MaGo2JuWNZ9WEArEB6+PZL6/h9PXjy1AiEAmPEjmLClBUx0E6xV+FrRal2s1os6IpVf9JLBRwF8HAc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj622qACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpXaQ/+OICp8v5kNpynRsmCNT21tTvepmat8B83kcgpHhuGTQBkfIa+\r\nn9B4EMkuS79KbTHYY0Yr24peCnqE7FcNHDF47Ck4x9hvTlou9UjwS9/L/NKJ\r\nvx+JrOEqpI4xz7g9BCGoM+CNFimstm5tf2TwPqI9O8GzxGbYyVqYp02X0RNs\r\nCHgewYlpKaYEWkJcd9O1LIElDPLKcXiray5EF4ZhsM0dcb3+MLcLfhpDQLKN\r\noF5ua0NIUnK/UtjnjgEQ1DIUngzpIfR3YTxCQFrVa9GwfmOMIt9jghcGuD59\r\nrZ7700dSigY6NffF5zse8c5Y/NuUDKtBQyPLrU9maBRrp+pVITfXsDF//MAa\r\nKZPp1x/D77wqKgJ3RiRw8nhcQVOR9sbysY7TfKs93/PYVVAsPhhoC7Em+ntM\r\n/aIi/jZXKzdd/gERdwrK1+QHMMZI5eyIq70wh90IjEpBVOtfHNSjIEXxqtZy\r\n/1K6VQxjbYBEEaIrjii/61/VZA+3XV9RhJmR14xl/QkQ0CInDGhTQ0fXCyGn\r\niGv/7Ek9/yogZ3GVU/HGBs+vVnrve8VG2+d7cUDRNUzMdMnYYbd865cXKSec\r\ni1+mBiVdC50ZBWr17JAUQzput79SjZnynYzlIl1OyiS66nhvFNzPnUVwHDu6\r\nPIfAyGPfjdYy2SQBYVEVDs3/yvQ9pAZjSqU=\r\n=pWkd\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"brawaru","email":"dafri.nochiterov8+npm@gmail.com"},"directories":{},"maintainers":[{"name":"brawaru","email":"dafri.nochiterov8+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-icu-messages_1.0.0-alpha.2_1676373418033_0.51282611778244"},"_hasShrinkwrap":false,"deprecated":"This package is deprecated and not maintained anymore. Please use @vintl/unplugin instead"},"1.0.0-alpha.3":{"name":"@braw/rollup-plugin-icu-messages","version":"1.0.0-alpha.3","description":"Transform files containing ICU MessageFormat messages.","author":{"name":"Alexander 'Brawaru' Sorokin","url":"https://github.com/brawaru"},"repository":{"type":"git","url":"git+https://github.com/Brawaru/rollup-plugin-icu-messages.git"},"bugs":{"url":"https://github.com/Brawaru/rollup-plugin-icu-messages/issues"},"homepage":"https://github.com/Brawaru/rollup-plugin-icu-messages#readme","funding":"https://github.com/Brawaru/Brawaru/blob/main/SUPPORT.md","keywords":["i18n","icu-messageformat","rollup-plugin","rollup","plugin"],"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./wrap-plugins":{"types":"./dist/wrap-plugins.d.ts","import":"./dist/wrap-plugins.mjs","require":"./dist/wrap-plugins.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build:raw":"del-cli dist && tsc --noEmit false","build":"unbuild","dev":"vitest dev","prepack":"pnpm run build","test":"vitest run","lint":"eslint src","bt":"pnpm run -s build && pnpm run -s test"},"engines":{"node":">=16"},"devDependencies":{"@ltd/j-toml":"^1.38.0","@nuxtjs/eslint-config-typescript":"^12.0.0","@rollup/plugin-json":"^6.0.0","@types/glob":"^8.0.1","@types/node":"^18.11.18","del-cli":"^5.0.0","eslint":"^8.31.0","prettier":"^2.8.3","prettier-plugin-jsdoc":"^0.4.2","semantic-release":"^20.0.2","typescript":"^4.9.4","unbuild":"^1.1.1","vitest":"^0.27.2"},"dependencies":{"@formatjs/cli-lib":"^5.1.12","@formatjs/icu-messageformat-parser":"^2.1.14","@rollup/pluginutils":"^5.0.2","glob":"^8.1.0","import-meta-resolve":"^2.2.1","pathe":"^1.1.0"},"peerDependencies":{"rollup":"^3","vite":"^4"},"peerDependenciesMeta":{"vite":{"optional":true},"rollup":{"optional":false}},"publishConfig":{"access":"public"},"readme":"# rollup-plugin-icu-messages\n\n> Transform files containing ICU MessageFormat messages.\n\n## Summary\n\nThis Rollup plugin adds a transform hook that pre-parses all messages in the JSON file into an AST that can be used at runtime without the need to bring in a parser, allowing the bundle size to be reduced. Read more about how this works on the [Format.JS website →](https://formatjs.io/docs/guides/advanced-usage#pre-compiling-messages)\n\n## Installation\n\nWith package manager of your choice:\n\n**npm**\n\n```sh\nnpm i -D @braw/rollup-plugin-icu-messages\n```\n\n**yarn**\n\n```sh\nyarn add -D @braw/rollup-plugin-icu-messages\n```\n\n**pnpm**\n\n```sh\npnpm i -D @braw/rollup-plugin-icu-messages\n```\n\n## Usage\n\nIn your Rollup file, import the default export from the `@braw/rollup-plugin-icu-messages` and then use it as a function in your `plugins` config array.\n\nExample configuration:\n\n```ts\nimport { defineConfig } from 'rollup'\nimport { icuMessages } from '@braw/rollup-plugin-icu-messages'\n\nexport default defineConfig({\n  input: './src/index.mjs',\n  output: { dir: './dist' },\n  plugins: [\n    icuMessages({\n      include: './i18n/*.json',\n      format: 'crowdin',\n    }),\n  ],\n})\n```\n\nThe following options are supported:\n\n- `include` (optional, default: `'**/*.messages.json'`) — either a single glob string or regular expression, or an array of them, which must match the file IDs to be included in the transformation.\n- `exclude` (optional, default: `undefined`) — either a single glob string or regular expression, or an array of them, which must match the file IDs to be excluded from the transformation.\n- `indent` (optional, default: `'\\t'`) — string or a number of spaces used for indentation.\n- `parse` (optional, default: `(code) => JSON.parse(code)`) — a function that takes the file content and ID, parses it and returns the JS object to pass to the `format` function.\n- `format` (optional, default: `default`) — either a string with the name of the built-in formatter, or a function that accepts parsed file contents (using the `parse` function) and produces a record of messages, keyed by their IDs. For a list of built-in formatters, [see the @formatjs/cli documentation →](https://formatjs.io/docs/tooling/cli#builtin-formatters).\n- `parserOptions` (optional, default: `undefined`) — an object whose keys are message IDs and whose values are either parsing options for those messages or a function that generates parsing options based on contextual information (such as module ID, message ID, and all messages).\n\n## Usage with other JSON plugins\n\nYour configuration may already include a plugin that handles JSON or other files that may conflict with this plugin.\n\nYou can configure this plugin to include files with other extensions and store your messages in, e.g. `.messages` files. Just change `options.include` to `**/*.messages` in this case.\n\nAlternatively you can use a separate plugin in this package — `icuMessagesWrapPlugins`, exported from `@braw/rollup-plugin-icu-messages/wrap-plugins`. If you use Vite, there is also `icuMessagesWrapPluginsVite`.\n\n<details>\n<summary>Example configuration</summary>\n\n```ts\nimport { defineConfig } from 'rollup'\nimport json from '@rollup/plugin-json'\nimport { icuMessages } from '@braw/rollup-plugin-icu-messages'\nimport { icuMessagesWrapPlugins } from '@braw/rollup-plugin-icu-messages/wrap-plugins'\n\nexport default defineConfig({\n  input: './src/index.mjs',\n  output: { dir: './dist' },\n  plugins: [\n    json(),\n    icuMessages({\n      include: './i18n/*.json',\n      format: 'crowdin',\n    }),\n    icuMessagesWrapPlugins({\n      extendDefaults: true,\n      wrappers: {\n        'my-plugin'(plugin, filter) {\n          // implement plugin wrapping here\n          // use filter to check if the file is handled by icuMessages plugin\n        },\n      },\n    }),\n  ],\n})\n```\n\n</details>\n","readmeFilename":"README.md","gitHead":"110ca8d3c8cd18fdec26769deb01e95db29d6f1d","_id":"@braw/rollup-plugin-icu-messages@1.0.0-alpha.3","_nodeVersion":"18.14.1","_npmVersion":"9.3.1","dist":{"integrity":"sha512-ovSP6n5yOPIHSb1BiO0bAXEQaTQcDnoaDw28ZsKvSTq+4ZjNzoflI2c89GwB4YaJ2zGhkrl4A/CHIWgaK0MDZA==","shasum":"c1f72fb8cbdbeffed4e0a64bc430b610a6044be1","tarball":"https://registry.npmjs.org/@braw/rollup-plugin-icu-messages/-/rollup-plugin-icu-messages-1.0.0-alpha.3.tgz","fileCount":11,"unpackedSize":36975,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGrSfT0HxkG3obShXTIavC3kJ/4xaXUltvA/SBY/5u4mAiB0pkVtBsswR7Ycql0qRYj13iLIwMt9qsP+k85nZscAZQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj95tQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoZnw//Wz/z8QkXew68SI5KNQHzcinYuYOBnov0dQO5WqUnYsPiLczp\r\nXqLpF9APmP2hAJTqdMIKEDON2v6IWIcio14Wwb+a6cs9PoRl9FxT8yl+dgvm\r\nem3X7j+N5IewD3llk54+4i9CstssJ3oh1sBOlCf0FXBp0M6vSz3PbvFnTkqU\r\nuUUkyyKLRl3KCC0dY3SzWCnryg5/8zrTZCNWdA1pYvd/IaoGD+XU6mi+UfZI\r\nEpEu6kR3SHQH40QK17fMmJIU1/q3PQGSh7PqxWxp88C7uwspCP/8EHGsiQ8/\r\nZii+ALGiMPCShwv4K6Kdg/zl5E2DE3ZUGO9Agwj5vZVSOcIp49EY+fAjMeeo\r\nLNW0PuD5mNVeSI0rna7gWF0NlpjJwYd2Vw7Y8Ss7+9E2hYIn6UvYpwQDFe6G\r\n3Mpev58+vqKyBlqNMHNBIao2HhRqqOlGFy8DfCBOsyIPlCwWjeoaeJyvy9h3\r\nwtrXH/Bw0yoeWfg97aI8yC8jIP9yFhRzvl3n/RRjcPpMspKjSdm+y589RS0+\r\n5Osc3anYz0gk+D7yXA0ZHYKr09gF8pXCmuP9pNScCpzEZ89HnDlDUqk2MgW/\r\n7Oy6CBsJ0l01XVdt4XL099QIr0KjV3St7/WxywDYQriYqMq5zQwB9jIiW6ff\r\noJkD1yFYgzdJe43NQei8jRj+Fzw4sy7jFkM=\r\n=n28d\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"brawaru","email":"dafri.nochiterov8+npm@gmail.com"},"directories":{},"maintainers":[{"name":"brawaru","email":"dafri.nochiterov8+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-icu-messages_1.0.0-alpha.3_1677171536455_0.9006991797770592"},"_hasShrinkwrap":false,"deprecated":"This package is deprecated and not maintained anymore. Please use @vintl/unplugin instead"},"1.0.0-alpha.4":{"name":"@braw/rollup-plugin-icu-messages","version":"1.0.0-alpha.4","description":"Transform files containing ICU MessageFormat messages.","author":{"name":"Alexander 'Brawaru' Sorokin","url":"https://github.com/brawaru"},"repository":{"type":"git","url":"git+https://github.com/Brawaru/rollup-plugin-icu-messages.git"},"bugs":{"url":"https://github.com/Brawaru/rollup-plugin-icu-messages/issues"},"homepage":"https://github.com/Brawaru/rollup-plugin-icu-messages#readme","funding":"https://github.com/Brawaru/Brawaru/blob/main/SUPPORT.md","keywords":["i18n","icu-messageformat","rollup-plugin","rollup","plugin"],"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./wrap-plugins":{"types":"./dist/wrap-plugins.d.ts","import":"./dist/wrap-plugins.mjs","require":"./dist/wrap-plugins.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build:raw":"del-cli dist && tsc --noEmit false","build":"unbuild","dev":"vitest dev","prepack":"pnpm run build","test":"vitest run","lint":"eslint src","bt":"pnpm run -s build && pnpm run -s test"},"engines":{"node":">=16"},"devDependencies":{"@ltd/j-toml":"^1.38.0","@nuxtjs/eslint-config-typescript":"^12.0.0","@rollup/plugin-json":"^6.0.0","@types/glob":"^8.0.1","@types/node":"^18.11.18","del-cli":"^5.0.0","eslint":"^8.31.0","prettier":"^2.8.3","prettier-plugin-jsdoc":"^0.4.2","semantic-release":"^20.0.2","typescript":"^4.9.4","unbuild":"^1.1.1","vitest":"^0.27.2"},"dependencies":{"@formatjs/cli-lib":"^5.1.12","@formatjs/icu-messageformat-parser":"^2.1.14","@rollup/pluginutils":"^5.0.2","glob":"^8.1.0","import-meta-resolve":"^2.2.1","pathe":"^1.1.0"},"peerDependencies":{"rollup":"^3","vite":"^4"},"peerDependenciesMeta":{"vite":{"optional":true},"rollup":{"optional":false}},"publishConfig":{"access":"public"},"readme":"# rollup-plugin-icu-messages\n\n> Transform files containing ICU MessageFormat messages.\n\n## Summary\n\nThis Rollup plugin adds a transform hook that pre-parses all messages in the JSON file into an AST that can be used at runtime without the need to bring in a parser, allowing the bundle size to be reduced. Read more about how this works on the [Format.JS website →](https://formatjs.io/docs/guides/advanced-usage#pre-compiling-messages)\n\n## Installation\n\nWith package manager of your choice:\n\n**npm**\n\n```sh\nnpm i -D @braw/rollup-plugin-icu-messages\n```\n\n**yarn**\n\n```sh\nyarn add -D @braw/rollup-plugin-icu-messages\n```\n\n**pnpm**\n\n```sh\npnpm i -D @braw/rollup-plugin-icu-messages\n```\n\n## Usage\n\nIn your Rollup file, import the default export from the `@braw/rollup-plugin-icu-messages` and then use it as a function in your `plugins` config array.\n\nExample configuration:\n\n```ts\nimport { defineConfig } from 'rollup'\nimport { icuMessages } from '@braw/rollup-plugin-icu-messages'\n\nexport default defineConfig({\n  input: './src/index.mjs',\n  output: { dir: './dist' },\n  plugins: [\n    icuMessages({\n      include: './i18n/*.json',\n      format: 'crowdin',\n    }),\n  ],\n})\n```\n\nThe following options are supported:\n\n- `include` (optional, default: `'**/*.messages.json'`) — either a single glob string or regular expression, or an array of them, which must match the file IDs to be included in the transformation.\n- `exclude` (optional, default: `undefined`) — either a single glob string or regular expression, or an array of them, which must match the file IDs to be excluded from the transformation.\n- `indent` (optional, default: `'\\t'`) — string or a number of spaces used for indentation.\n- `parse` (optional, default: `(code) => JSON.parse(code)`) — a function that takes the file content and ID, parses it and returns the JS object to pass to the `format` function.\n- `format` (optional, default: `default`) — either a string with the name of the built-in formatter, or a function that accepts parsed file contents (using the `parse` function) and produces a record of messages, keyed by their IDs. For a list of built-in formatters, [see the @formatjs/cli documentation →](https://formatjs.io/docs/tooling/cli#builtin-formatters).\n- `parserOptions` (optional, default: `undefined`) — an object whose keys are message IDs and whose values are either parsing options for those messages or a function that generates parsing options based on contextual information (such as module ID, message ID, and all messages).\n\n## Usage with other JSON plugins\n\nYour configuration may already include a plugin that handles JSON or other files that may conflict with this plugin.\n\nYou can configure this plugin to include files with other extensions and store your messages in, e.g. `.messages` files. Just change `options.include` to `**/*.messages` in this case.\n\nAlternatively you can use a separate plugin in this package — `icuMessagesWrapPlugins`, exported from `@braw/rollup-plugin-icu-messages/wrap-plugins`. If you use Vite, there is also `icuMessagesWrapPluginsVite`.\n\n<details>\n<summary>Example configuration</summary>\n\n```ts\nimport { defineConfig } from 'rollup'\nimport json from '@rollup/plugin-json'\nimport { icuMessages } from '@braw/rollup-plugin-icu-messages'\nimport { icuMessagesWrapPlugins } from '@braw/rollup-plugin-icu-messages/wrap-plugins'\n\nexport default defineConfig({\n  input: './src/index.mjs',\n  output: { dir: './dist' },\n  plugins: [\n    json(),\n    icuMessages({\n      include: './i18n/*.json',\n      format: 'crowdin',\n    }),\n    icuMessagesWrapPlugins({\n      extendDefaults: true,\n      wrappers: {\n        'my-plugin'(plugin, filter) {\n          // implement plugin wrapping here\n          // use filter to check if the file is handled by icuMessages plugin\n        },\n      },\n    }),\n  ],\n})\n```\n\n</details>\n","readmeFilename":"README.md","gitHead":"fa94adad84145a68ad0519af199a32ec0cf1f9e8","_id":"@braw/rollup-plugin-icu-messages@1.0.0-alpha.4","_nodeVersion":"18.14.1","_npmVersion":"9.3.1","dist":{"integrity":"sha512-6SkFh+WUpUxcGfVHrg1NWgUv516DWKYnv0/7gzo9fhrIKPF/5ZP5iEOPyL4cfERABlL4eL3WlCX95W9XJDoCrA==","shasum":"4b621ccc3490848aabb009cf5a104850597daa33","tarball":"https://registry.npmjs.org/@braw/rollup-plugin-icu-messages/-/rollup-plugin-icu-messages-1.0.0-alpha.4.tgz","fileCount":11,"unpackedSize":36961,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaoUVZFrjYwkbQ/x9dw/u5G24IMq1B3xGZwOjGCXRilgIgZvViz/fUCHjK15EjcRpmqLXQBw5G8jIqXLsZYcrJ1bU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj952RACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqp6w//XOsLQFHlKZs6vZIH28HbO50RYRBGvCzNNbZidT6+7feS+YMG\r\niT9Y+pF0BNrQCWhFAaak6veMp9a8LSIt0B5f7xnsS8hknxfIaRfUzJIcyiRn\r\n8z+BjvqmFaHuoc0E48TNyr5mKquIBjU8CV7l6cVB42RGzl0cYXzNTEJMu6bq\r\nOyBrK2d87n3gQWAMRmp27uligRgE0JuR6AjqqPnXpNQLBP9J1J0XJqYL2J21\r\nENb4hpZF2910I3PTKt4cjWtoGwup68XntRe/WR/ImFybGM3xHvmNrj2ZrXiv\r\nQNXe1PjLsu2RHZuDqygfUBh9IJ7p9PnnkKL1CB3FYb0MFS3YwNkmWUE0vGF5\r\nWKxFuYjUAla2HmhiQok95e/wvMR2ljqHqQgVeBYhMwcT2ZvTzydVmy7mReas\r\nxg9bX2J7cxL8P2hreyAi1nqsQsi7P3tPLHtxkDejaRicsGA7I5foRl1TaT4M\r\nnx+dw8Myn1nGlePdnsCrbAvEAFG95K7RDchYNVMf4MevJZIGsez6jGGlAWTV\r\nTYVIlix4gdlwjPwIEH6bUt1Zf+Xmgc4z3RCOFbUGcMVMb9uSg2hVXwfAPG5G\r\nGlgBsXIVe2e9n+kjGHMbYtu+sdej5/8P1blXST6d4A9UcYftXlnTWzVDyAZJ\r\nX0hZoFS/GjfhjQenwwla5S+UZp22hJ9OZYs=\r\n=3mi0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"brawaru","email":"dafri.nochiterov8+npm@gmail.com"},"directories":{},"maintainers":[{"name":"brawaru","email":"dafri.nochiterov8+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-icu-messages_1.0.0-alpha.4_1677172112939_0.5413012123112977"},"_hasShrinkwrap":false,"deprecated":"This package is deprecated and not maintained anymore. Please use @vintl/unplugin instead"},"1.0.0-alpha.5":{"name":"@braw/rollup-plugin-icu-messages","version":"1.0.0-alpha.5","description":"Transform files containing ICU MessageFormat messages.","author":{"name":"Alexander 'Brawaru' Sorokin","url":"https://github.com/brawaru"},"repository":{"type":"git","url":"git+https://github.com/Brawaru/rollup-plugin-icu-messages.git"},"bugs":{"url":"https://github.com/Brawaru/rollup-plugin-icu-messages/issues"},"homepage":"https://github.com/Brawaru/rollup-plugin-icu-messages#readme","funding":"https://github.com/Brawaru/Brawaru/blob/main/SUPPORT.md","keywords":["i18n","icu-messageformat","rollup-plugin","rollup","plugin"],"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./wrap-plugins":{"types":"./dist/wrap-plugins.d.ts","import":"./dist/wrap-plugins.mjs","require":"./dist/wrap-plugins.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build:raw":"del-cli dist && tsc --noEmit false","build":"unbuild","dev":"vitest dev","prepack":"pnpm run build","test":"vitest run","lint":"eslint src","bt":"pnpm run -s build && pnpm run -s test"},"engines":{"node":">=16"},"devDependencies":{"@ltd/j-toml":"^1.38.0","@nuxtjs/eslint-config-typescript":"^12.0.0","@rollup/plugin-json":"^6.0.0","@types/glob":"^8.0.1","@types/node":"^18.11.18","del-cli":"^5.0.0","eslint":"^8.31.0","prettier":"^2.8.3","prettier-plugin-jsdoc":"^0.4.2","semantic-release":"^20.0.2","typescript":"^4.9.4","unbuild":"^1.1.1","vitest":"^0.27.2"},"dependencies":{"@formatjs/cli-lib":"^5.1.12","@formatjs/icu-messageformat-parser":"^2.1.14","@rollup/pluginutils":"^5.0.2","glob":"^8.1.0","import-meta-resolve":"^2.2.1","pathe":"^1.1.0"},"peerDependencies":{"rollup":"^3","vite":"^4"},"peerDependenciesMeta":{"vite":{"optional":true},"rollup":{"optional":false}},"publishConfig":{"access":"public"},"readme":"# rollup-plugin-icu-messages\n\n> Transform files containing ICU MessageFormat messages.\n\n## Summary\n\nThis Rollup plugin adds a transform hook that pre-parses all messages in the JSON file into an AST that can be used at runtime without the need to bring in a parser, allowing the bundle size to be reduced. Read more about how this works on the [Format.JS website →](https://formatjs.io/docs/guides/advanced-usage#pre-compiling-messages)\n\n## Installation\n\nWith package manager of your choice:\n\n**npm**\n\n```sh\nnpm i -D @braw/rollup-plugin-icu-messages\n```\n\n**yarn**\n\n```sh\nyarn add -D @braw/rollup-plugin-icu-messages\n```\n\n**pnpm**\n\n```sh\npnpm i -D @braw/rollup-plugin-icu-messages\n```\n\n## Usage\n\nIn your Rollup file, import the default export from the `@braw/rollup-plugin-icu-messages` and then use it as a function in your `plugins` config array.\n\nExample configuration:\n\n```ts\nimport { defineConfig } from 'rollup'\nimport { icuMessages } from '@braw/rollup-plugin-icu-messages'\n\nexport default defineConfig({\n  input: './src/index.mjs',\n  output: { dir: './dist' },\n  plugins: [\n    icuMessages({\n      include: './i18n/*.json',\n      format: 'crowdin',\n    }),\n  ],\n})\n```\n\nThe following options are supported:\n\n- `include` (optional, default: `'**/*.messages.json'`) — either a single glob string or regular expression, or an array of them, which must match the file IDs to be included in the transformation.\n- `exclude` (optional, default: `undefined`) — either a single glob string or regular expression, or an array of them, which must match the file IDs to be excluded from the transformation.\n- `indent` (optional, default: `'\\t'`) — string or a number of spaces used for indentation.\n- `parse` (optional, default: `(code) => JSON.parse(code)`) — a function that takes the file content and ID, parses it and returns the JS object to pass to the `format` function.\n- `format` (optional, default: `default`) — either a string with the name of the built-in formatter, or a function that accepts parsed file contents (using the `parse` function) and produces a record of messages, keyed by their IDs. For a list of built-in formatters, [see the @formatjs/cli documentation →](https://formatjs.io/docs/tooling/cli#builtin-formatters).\n- `parserOptions` (optional, default: `undefined`) — an object whose keys are message IDs and whose values are either parsing options for those messages or a function that generates parsing options based on contextual information (such as module ID, message ID, and all messages).\n\n## Usage with other JSON plugins\n\nYour configuration may already include a plugin that handles JSON or other files that may conflict with this plugin.\n\nYou can configure this plugin to include files with other extensions and store your messages in, e.g. `.messages` files. Just change `options.include` to `**/*.messages` in this case.\n\nAlternatively you can use a separate plugin in this package — `icuMessagesWrapPlugins`, exported from `@braw/rollup-plugin-icu-messages/wrap-plugins`. If you use Vite, there is also `icuMessagesWrapPluginsVite`.\n\n<details>\n<summary>Example configuration</summary>\n\n```ts\nimport { defineConfig } from 'rollup'\nimport json from '@rollup/plugin-json'\nimport { icuMessages } from '@braw/rollup-plugin-icu-messages'\nimport { icuMessagesWrapPlugins } from '@braw/rollup-plugin-icu-messages/wrap-plugins'\n\nexport default defineConfig({\n  input: './src/index.mjs',\n  output: { dir: './dist' },\n  plugins: [\n    json(),\n    icuMessages({\n      include: './i18n/*.json',\n      format: 'crowdin',\n    }),\n    icuMessagesWrapPlugins({\n      extendDefaults: true,\n      wrappers: {\n        'my-plugin'(plugin, filter) {\n          // implement plugin wrapping here\n          // use filter to check if the file is handled by icuMessages plugin\n        },\n      },\n    }),\n  ],\n})\n```\n\n</details>\n","readmeFilename":"README.md","gitHead":"97bd7bb357c2bb1ec064314b0e6145881fcb6ca5","_id":"@braw/rollup-plugin-icu-messages@1.0.0-alpha.5","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-EZczjCeM20gKCcJyUIZbl+1DcI+8KS4zNWD2NzMMS2s2dQSF7/jnMnzGx38ETVPyDDOpP1rGeYDAtCrxz/Vnzw==","shasum":"cfc2e0470560f1d5b1b39f7770ac18e7020b42e2","tarball":"https://registry.npmjs.org/@braw/rollup-plugin-icu-messages/-/rollup-plugin-icu-messages-1.0.0-alpha.5.tgz","fileCount":13,"unpackedSize":37395,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDRgOqO5wacmvgtKA+PTaguV1be0UjzkvEndCeKHYsarAiEAti5KQRtpq8rul3zLOlnoH74EsppbjKgP73LxUVNkUpo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkFa8lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrvig/+JvCd4NiXPbR0ju2k0hO3ydSyWjqNbJdzO82SyjbkZYdSBdtC\r\nPqeuk7eGMsweuv3UZWSF9E96bHPV2/sULI1KKAfYRjaCODPoRNq2qwD6PN7M\r\nMHdLH8Oi8Qj9hFgHunlRVZgackdJKHMRoP0ogdet9yFQvVOkKFqk7GKPsQF/\r\nXw048KfL3fwa4OjMpmIkVsdKXvzT24fg4gJY4lrs8vdKmM717crEoHGImu0u\r\nldqjsNdDfBGqgYQEZTxbpmhxjoJFsUL1TENY8c7YfBSAXuyGdfgD5isruyBi\r\nroEj6QCCQfn73Nro9j9tRe2LKmldE/aFCXuUo7PfHc8t3mx6b9yCuDVw1Wfj\r\nH4Xtn1821ifAn0oeSA840OcXTDyTBaCWEYcnU30Gnyfh2Rr94pr/wdb0INPU\r\nnSeybbjgENXu0TETMNUaCEeS/nt3PKN5WKSOkgdMPS0pZy+eHGHzbthpE+Ru\r\nG1G0XtJGI7+qH4XpYQCXKnjHQeYtyaOBNE94HgVMk3TLzCjffZg4yBD0v7Qq\r\ndKrUFYRZKFHi7cP5/IX6cSMPm7EfSX4z/EGShPbDHH6DXJaQvZsI6pqTOI/n\r\nhg6o3+UTo04hpZxdmp3Q25MnkIyBgVZCyyDcnB/LxMnaHudYAXPxGFXlQZoY\r\nUZjyCAJ6Oww5Qm1YTW0lhPJ+9dZpMKYvoLk=\r\n=jQsc\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"brawaru","email":"dafri.nochiterov8+npm@gmail.com"},"directories":{},"maintainers":[{"name":"brawaru","email":"dafri.nochiterov8+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-icu-messages_1.0.0-alpha.5_1679142693296_0.7570754902926213"},"_hasShrinkwrap":false,"deprecated":"This package is deprecated and not maintained anymore. Please use @vintl/unplugin instead"}},"time":{"created":"2023-02-07T07:23:26.081Z","1.0.0-alpha.1":"2023-02-07T07:23:26.353Z","modified":"2023-03-23T20:26:18.420Z","1.0.0-alpha.2":"2023-02-14T11:16:58.176Z","1.0.0-alpha.3":"2023-02-23T16:58:56.703Z","1.0.0-alpha.4":"2023-02-23T17:08:33.139Z","1.0.0-alpha.5":"2023-03-18T12:31:33.533Z"},"maintainers":[{"name":"brawaru","email":"dafri.nochiterov8+npm@gmail.com"}],"description":"Transform files containing ICU MessageFormat messages.","keywords":["i18n","icu-messageformat","rollup-plugin","rollup","plugin"],"license":"MIT","readme":"","readmeFilename":""}