diff --git a/package.json b/package.json index fc778ab0..10e6ceed 100644 --- a/package.json +++ b/package.json @@ -18,10 +18,10 @@ "homepage": "https://ckeditor.com/ckeditor-5", "type": "module", "devDependencies": { - "@ckeditor/ckeditor5-dev-bump-year": "^44.0.0", - "@ckeditor/ckeditor5-dev-ci": "^44.0.0", - "@ckeditor/ckeditor5-dev-release-tools": "^44.0.0", - "@ckeditor/ckeditor5-dev-web-crawler": "^44.0.0", + "@ckeditor/ckeditor5-dev-bump-year": "^45.0.0", + "@ckeditor/ckeditor5-dev-ci": "^45.0.0", + "@ckeditor/ckeditor5-dev-release-tools": "^45.0.0", + "@ckeditor/ckeditor5-dev-web-crawler": "^45.0.0", "@vitest/coverage-v8": "^2.1.1", "chalk": "^5.0.0", "coveralls": "^3.1.1", diff --git a/packages/ckeditor5-package-generator/lib/templates/js-legacy/README.md b/packages/ckeditor5-package-generator/lib/templates/js-legacy/README.md index 9f969e39..6bb2d1b5 100644 --- a/packages/ckeditor5-package-generator/lib/templates/js-legacy/README.md +++ b/packages/ckeditor5-package-generator/lib/templates/js-legacy/README.md @@ -14,9 +14,8 @@ This package was created by the [ckeditor5-package-generator](https://www.npmjs. * [`build:dist`](#builddist) * [`dll:build`](#dllbuild) * [`dll:serve`](#dllserve) - * [`translations:collect`](#translationscollect) - * [`translations:download`](#translationsdownload) - * [`translations:upload`](#translationsupload) + * [`translations:synchronize`](#translationssynchronize) + * [`translations:validate`](#translationsvalidate) * [License](#license) ## Developing the package @@ -124,48 +123,37 @@ Examples: <%= packageManager %> run dll:serve ``` -### `translations:collect` +### `translations:synchronize` -Collects translation messages (arguments of the `t()` function) and context files, then validates whether the provided values do not interfere with the values specified in the `@ckeditor/ckeditor5-core` package. +Synchronizes translation messages (arguments of the `t()` function) by performing the following steps: + + * Collect all translation messages from the package by finding `t()` calls in source files. + * Detect if translation context is valid, i.e. whether the provided values do not interfere with the values specified in the `@ckeditor/ckeditor5-core` package. + * If there are no validation errors, update all translation files (`*.po` files) to be in sync with the context file: + * unused translation entries are removed, + * missing translation entries are added with empty string as the message translation, + * missing translation files are created for languages that do not have own `*.po` file yet. The task may end with an error if one of the following conditions is met: * Found the `Unused context` error – entries specified in the `lang/contexts.json` file are not used in source files. They should be removed. -* Found the `Context is duplicated for the id` error – some of the entries are duplicated. Consider removing them from the `lang/contexts.json` file, or rewrite them. -* Found the `Context for the message id is missing` error – entries specified in source files are not described in the `lang/contexts.json` file. They should be added. - -Examples: - -```bash -<%= packageManager %> run translations:collect -``` - -### `translations:download` - -Download translations from the Transifex server. Depending on users' activity in the project, it creates translation files used for building the editor. - -The task requires passing the URL to Transifex API. Usually, it matches the following format: `https://www.transifex.com/api/2/project/[PROJECT_SLUG]`. - -To avoid passing the `--transifex` option whenever you call the command, you can store it in `package.json`, next to the `ckeditor5-package-tools translations:download` command. +* Found the `Duplicated contex` error – some of the entries are duplicated. Consider removing them from the `lang/contexts.json` file, or rewriting them. +* Found the `Missing context` error – entries specified in source files are not described in the `lang/contexts.json` file. They should be added. Examples: ```bash -<%= packageManager %> run translations:download <%= cliSeparator %>--transifex [API URL] +<%= packageManager %> run translations:synchronize ``` -### `translations:upload` - -Uploads translation messages onto the Transifex server. It allows users to create translations into other languages using the Transifex platform. - -The task requires passing the URL to the Transifex API. Usually, it matches the following format: `https://www.transifex.com/api/2/project/[PROJECT_SLUG]`. +### `translations:validate` -To avoid passing the `--transifex` option whenever you call the command, you can store it in `package.json`, next to the `ckeditor5-package-tools translations:upload` command. +Peforms only validation steps as described in [`translations:synchronize`](#translationssynchronize) script, but without modifying any files. It only checks the correctness of the context file against the `t()` function calls. Examples: ```bash -<%= packageManager %> run translations:upload <%= cliSeparator %>--transifex [API URL] +<%= packageManager %> run translations:validate ``` ## License diff --git a/packages/ckeditor5-package-generator/lib/templates/js-legacy/package.json b/packages/ckeditor5-package-generator/lib/templates/js-legacy/package.json index f4db7f4e..494d5c50 100644 --- a/packages/ckeditor5-package-generator/lib/templates/js-legacy/package.json +++ b/packages/ckeditor5-package-generator/lib/templates/js-legacy/package.json @@ -66,9 +66,8 @@ "test": "vitest", "test:debug": "vitest --inspect-brk --no-file-parallelism --browser.headless=false", "prepare": "<%= packageManager %> run dll:build && <%= packageManager %> run build:dist", - "translations:collect": "ckeditor5-package-tools translations:collect", - "translations:download": "ckeditor5-package-tools translations:download", - "translations:upload": "ckeditor5-package-tools translations:upload" + "translations:synchronize": "ckeditor5-package-tools translations:synchronize", + "translations:validate": "ckeditor5-package-tools translations:synchronize --validate-only" }, "lint-staged": { "**/*.js": [ diff --git a/packages/ckeditor5-package-generator/lib/templates/js/README.md b/packages/ckeditor5-package-generator/lib/templates/js/README.md index ab4b2df1..091af882 100644 --- a/packages/ckeditor5-package-generator/lib/templates/js/README.md +++ b/packages/ckeditor5-package-generator/lib/templates/js/README.md @@ -12,9 +12,8 @@ This package was created by the [ckeditor5-package-generator](https://www.npmjs. * [`lint`](#lint) * [`stylelint`](#stylelint) * [`build:dist`](#builddist) - * [`translations:collect`](#translationscollect) - * [`translations:download`](#translationsdownload) - * [`translations:upload`](#translationsupload) + * [`translations:synchronize`](#translationssynchronize) + * [`translations:validate`](#translationsvalidate) * [License](#license) ## Developing the package @@ -96,48 +95,37 @@ Examples: npm run build:dist ``` -### `translations:collect` +### `translations:synchronize` -Collects translation messages (arguments of the `t()` function) and context files, then validates whether the provided values do not interfere with the values specified in the `@ckeditor/ckeditor5-core` package. +Synchronizes translation messages (arguments of the `t()` function) by performing the following steps: + + * Collect all translation messages from the package by finding `t()` calls in source files. + * Detect if translation context is valid, i.e. whether the provided values do not interfere with the values specified in the `@ckeditor/ckeditor5-core` package. + * If there are no validation errors, update all translation files (`*.po` files) to be in sync with the context file: + * unused translation entries are removed, + * missing translation entries are added with empty string as the message translation, + * missing translation files are created for languages that do not have own `*.po` file yet. The task may end with an error if one of the following conditions is met: * Found the `Unused context` error – entries specified in the `lang/contexts.json` file are not used in source files. They should be removed. -* Found the `Context is duplicated for the id` error – some of the entries are duplicated. Consider removing them from the `lang/contexts.json` file, or rewriting them. -* Found the `Context for the message id is missing` error – entries specified in source files are not described in the `lang/contexts.json` file. They should be added. - -Examples: - -```bash -<%= packageManager %> run translations:collect -``` - -### `translations:download` - -Download translations from the Transifex server. Depending on users' activity in the project, it creates translation files used for building the editor. - -The task requires passing the URL to Transifex API. Usually, it matches the following format: `https://www.transifex.com/api/2/project/[PROJECT_SLUG]`. - -To avoid passing the `--transifex` option whenever you call the command, you can store it in `package.json`, next to the `ckeditor5-package-tools translations:download` command. +* Found the `Duplicated contex` error – some of the entries are duplicated. Consider removing them from the `lang/contexts.json` file, or rewriting them. +* Found the `Missing context` error – entries specified in source files are not described in the `lang/contexts.json` file. They should be added. Examples: ```bash -<%= packageManager %> run translations:download <%= cliSeparator %>--transifex [API URL] +<%= packageManager %> run translations:synchronize ``` -### `translations:upload` - -Uploads translation messages onto the Transifex server. It allows users to create translations into other languages using the Transifex platform. - -The task requires passing the URL to the Transifex API. Usually, it matches the following format: `https://www.transifex.com/api/2/project/[PROJECT_SLUG]`. +### `translations:validate` -To avoid passing the `--transifex` option whenever you call the command, you can store it in `package.json`, next to the `ckeditor5-package-tools translations:upload` command. +Peforms only validation steps as described in [`translations:synchronize`](#translationssynchronize) script, but without modifying any files. It only checks the correctness of the context file against the `t()` function calls. Examples: ```bash -<%= packageManager %> run translations:upload <%= cliSeparator %>--transifex [API URL] +<%= packageManager %> run translations:validate ``` ## License diff --git a/packages/ckeditor5-package-generator/lib/templates/js/package.json b/packages/ckeditor5-package-generator/lib/templates/js/package.json index 78e248ea..8dc11745 100644 --- a/packages/ckeditor5-package-generator/lib/templates/js/package.json +++ b/packages/ckeditor5-package-generator/lib/templates/js/package.json @@ -57,9 +57,8 @@ "test": "vitest", "test:debug": "vitest --inspect-brk --no-file-parallelism --browser.headless=false", "prepare": "<%= packageManager %> run build:dist", - "translations:collect": "ckeditor5-package-tools translations:collect", - "translations:download": "ckeditor5-package-tools translations:download", - "translations:upload": "ckeditor5-package-tools translations:upload" + "translations:synchronize": "ckeditor5-package-tools translations:synchronize", + "translations:validate": "ckeditor5-package-tools translations:synchronize --validate-only" }, "lint-staged": { "**/*.js": [ diff --git a/packages/ckeditor5-package-generator/lib/templates/ts-legacy/README.md b/packages/ckeditor5-package-generator/lib/templates/ts-legacy/README.md index 1e0d21f8..016115ca 100644 --- a/packages/ckeditor5-package-generator/lib/templates/ts-legacy/README.md +++ b/packages/ckeditor5-package-generator/lib/templates/ts-legacy/README.md @@ -14,9 +14,8 @@ This package was created by the [ckeditor5-package-generator](https://www.npmjs. * [`build:dist`](#builddist) * [`dll:build`](#dllbuild) * [`dll:serve`](#dllserve) - * [`translations:collect`](#translationscollect) - * [`translations:download`](#translationsdownload) - * [`translations:upload`](#translationsupload) + * [`translations:synchronize`](#translationssynchronize) + * [`translations:validate`](#translationsvalidate) * [`ts:build` and `ts:clear`](#tsbuild-and-tsclear) * [License](#license) @@ -125,48 +124,37 @@ Examples: <%= packageManager %> run dll:serve ``` -### `translations:collect` +### `translations:synchronize` -Collects translation messages (arguments of the `t()` function) and context files, then validates whether the provided values do not interfere with the values specified in the `@ckeditor/ckeditor5-core` package. +Synchronizes translation messages (arguments of the `t()` function) by performing the following steps: + + * Collect all translation messages from the package by finding `t()` calls in source files. + * Detect if translation context is valid, i.e. whether the provided values do not interfere with the values specified in the `@ckeditor/ckeditor5-core` package. + * If there are no validation errors, update all translation files (`*.po` files) to be in sync with the context file: + * unused translation entries are removed, + * missing translation entries are added with empty string as the message translation, + * missing translation files are created for languages that do not have own `*.po` file yet. The task may end with an error if one of the following conditions is met: * Found the `Unused context` error – entries specified in the `lang/contexts.json` file are not used in source files. They should be removed. -* Found the `Context is duplicated for the id` error – some of the entries are duplicated. Consider removing them from the `lang/contexts.json` file, or rewrite them. -* Found the `Context for the message id is missing` error – entries specified in source files are not described in the `lang/contexts.json` file. They should be added. - -Examples: - -```bash -<%= packageManager %> run translations:collect -``` - -### `translations:download` - -Download translations from the Transifex server. Depending on users' activity in the project, it creates translation files used for building the editor. - -The task requires passing the URL to Transifex API. Usually, it matches the following format: `https://www.transifex.com/api/2/project/[PROJECT_SLUG]`. - -To avoid passing the `--transifex` option whenever you call the command, you can store it in `package.json`, next to the `ckeditor5-package-tools translations:download` command. +* Found the `Duplicated contex` error – some of the entries are duplicated. Consider removing them from the `lang/contexts.json` file, or rewriting them. +* Found the `Missing context` error – entries specified in source files are not described in the `lang/contexts.json` file. They should be added. Examples: ```bash -<%= packageManager %> run translations:download <%= cliSeparator %>--transifex [API URL] +<%= packageManager %> run translations:synchronize ``` -### `translations:upload` - -Uploads translation messages onto the Transifex server. It allows users to create translations into other languages using the Transifex platform. - -The task requires passing the URL to the Transifex API. Usually, it matches the following format: `https://www.transifex.com/api/2/project/[PROJECT_SLUG]`. +### `translations:validate` -To avoid passing the `--transifex` option whenever you call the command, you can store it in `package.json`, next to the `ckeditor5-package-tools translations:upload` command. +Peforms only validation steps as described in [`translations:synchronize`](#translationssynchronize) script, but without modifying any files. It only checks the correctness of the context file against the `t()` function calls. Examples: ```bash -<%= packageManager %> run translations:upload <%= cliSeparator %>--transifex [API URL] +<%= packageManager %> run translations:validate ``` ### `ts:build` and `ts:clear` diff --git a/packages/ckeditor5-package-generator/lib/templates/ts-legacy/package.json b/packages/ckeditor5-package-generator/lib/templates/ts-legacy/package.json index 55582391..3de8fdbd 100644 --- a/packages/ckeditor5-package-generator/lib/templates/ts-legacy/package.json +++ b/packages/ckeditor5-package-generator/lib/templates/ts-legacy/package.json @@ -81,9 +81,8 @@ "prepare": "<%= packageManager %> run dll:build && <%= packageManager %> run build:dist", "prepublishOnly": "<%= packageManager %> run ts:build && ckeditor5-package-tools export-package-as-javascript", "postpublish": "<%= packageManager %> run ts:clear && ckeditor5-package-tools export-package-as-typescript", - "translations:collect": "ckeditor5-package-tools translations:collect", - "translations:download": "ckeditor5-package-tools translations:download", - "translations:upload": "ckeditor5-package-tools translations:upload" + "translations:synchronize": "ckeditor5-package-tools translations:synchronize", + "translations:validate": "ckeditor5-package-tools translations:synchronize --validate-only" }, "lint-staged": { "**/*.{js,ts}": [ diff --git a/packages/ckeditor5-package-generator/lib/templates/ts/README.md b/packages/ckeditor5-package-generator/lib/templates/ts/README.md index a9462a5f..6a71ea19 100644 --- a/packages/ckeditor5-package-generator/lib/templates/ts/README.md +++ b/packages/ckeditor5-package-generator/lib/templates/ts/README.md @@ -12,9 +12,8 @@ This package was created by the [ckeditor5-package-generator](https://www.npmjs. * [`lint`](#lint) * [`stylelint`](#stylelint) * [`build:dist`](#builddist) - * [`translations:collect`](#translationscollect) - * [`translations:download`](#translationsdownload) - * [`translations:upload`](#translationsupload) + * [`translations:synchronize`](#translationssynchronize) + * [`translations:validate`](#translationsvalidate) * [`ts:build` and `ts:clear`](#tsbuild-and-tsclear) * [License](#license) @@ -98,48 +97,37 @@ Examples: npm run build:dist ``` -### `translations:collect` +### `translations:synchronize` -Collects translation messages (arguments of the `t()` function) and context files, then validates whether the provided values do not interfere with the values specified in the `@ckeditor/ckeditor5-core` package. +Synchronizes translation messages (arguments of the `t()` function) by performing the following steps: + + * Collect all translation messages from the package by finding `t()` calls in source files. + * Detect if translation context is valid, i.e. whether the provided values do not interfere with the values specified in the `@ckeditor/ckeditor5-core` package. + * If there are no validation errors, update all translation files (`*.po` files) to be in sync with the context file: + * unused translation entries are removed, + * missing translation entries are added with empty string as the message translation, + * missing translation files are created for languages that do not have own `*.po` file yet. The task may end with an error if one of the following conditions is met: * Found the `Unused context` error – entries specified in the `lang/contexts.json` file are not used in source files. They should be removed. -* Found the `Context is duplicated for the id` error – some of the entries are duplicated. Consider removing them from the `lang/contexts.json` file, or rewrite them. -* Found the `Context for the message id is missing` error – entries specified in source files are not described in the `lang/contexts.json` file. They should be added. - -Examples: - -```bash -<%= packageManager %> run translations:collect -``` - -### `translations:download` - -Download translations from the Transifex server. Depending on users' activity in the project, it creates translation files used for building the editor. - -The task requires passing the URL to Transifex API. Usually, it matches the following format: `https://www.transifex.com/api/2/project/[PROJECT_SLUG]`. - -To avoid passing the `--transifex` option whenever you call the command, you can store it in `package.json`, next to the `ckeditor5-package-tools translations:download` command. +* Found the `Duplicated contex` error – some of the entries are duplicated. Consider removing them from the `lang/contexts.json` file, or rewriting them. +* Found the `Missing context` error – entries specified in source files are not described in the `lang/contexts.json` file. They should be added. Examples: ```bash -<%= packageManager %> run translations:download <%= cliSeparator %>--transifex [API URL] +<%= packageManager %> run translations:synchronize ``` -### `translations:upload` - -Uploads translation messages onto the Transifex server. It allows users to create translations into other languages using the Transifex platform. - -The task requires passing the URL to the Transifex API. Usually, it matches the following format: `https://www.transifex.com/api/2/project/[PROJECT_SLUG]`. +### `translations:validate` -To avoid passing the `--transifex` option whenever you call the command, you can store it in `package.json`, next to the `ckeditor5-package-tools translations:upload` command. +Peforms only validation steps as described in [`translations:synchronize`](#translationssynchronize) script, but without modifying any files. It only checks the correctness of the context file against the `t()` function calls. Examples: ```bash -<%= packageManager %> run translations:upload <%= cliSeparator %>--transifex [API URL] +<%= packageManager %> run translations:validate ``` ### `ts:build` and `ts:clear` diff --git a/packages/ckeditor5-package-generator/lib/templates/ts/package.json b/packages/ckeditor5-package-generator/lib/templates/ts/package.json index e002a2df..1c3420f7 100644 --- a/packages/ckeditor5-package-generator/lib/templates/ts/package.json +++ b/packages/ckeditor5-package-generator/lib/templates/ts/package.json @@ -69,9 +69,8 @@ "prepare": "<%= packageManager %> run build:dist", "prepublishOnly": "<%= packageManager %> run ts:build && ckeditor5-package-tools export-package-as-javascript", "postpublish": "<%= packageManager %> run ts:clear && ckeditor5-package-tools export-package-as-typescript", - "translations:collect": "ckeditor5-package-tools translations:collect", - "translations:download": "ckeditor5-package-tools translations:download", - "translations:upload": "ckeditor5-package-tools translations:upload" + "translations:synchronize": "ckeditor5-package-tools translations:synchronize", + "translations:validate": "ckeditor5-package-tools translations:synchronize --validate-only" }, "lint-staged": { "**/*.{js,ts}": [ diff --git a/packages/ckeditor5-package-generator/package.json b/packages/ckeditor5-package-generator/package.json index 7a69a5b6..2c4ace13 100644 --- a/packages/ckeditor5-package-generator/package.json +++ b/packages/ckeditor5-package-generator/package.json @@ -11,7 +11,7 @@ }, "type": "module", "dependencies": { - "@ckeditor/ckeditor5-dev-utils": "^44.0.0", + "@ckeditor/ckeditor5-dev-utils": "^45.0.0", "chalk": "^5.0.0", "commander": "^8.1.0", "fs-extra": "^11.2.0", diff --git a/packages/ckeditor5-package-tools/README.md b/packages/ckeditor5-package-tools/README.md index 1599f78c..b82759ef 100644 --- a/packages/ckeditor5-package-tools/README.md +++ b/packages/ckeditor5-package-tools/README.md @@ -18,9 +18,8 @@ The following scripts are available in the package: * `test:debug` – run tests using [Vitest](https://vitest.dev/) testing framework and allows debugging them. Once Vitest starts it will stop execution and wait for you to open developer tools that can connect to Node.js inspector, * `start` – prepares the [development server](https://webpack.js.org/configuration/dev-server/) with the live-reloading mechanism, * `dll:build` – prepares a file compatible with [CKEditor 5 DLL](https://ckeditor.com/docs/ckeditor5/latest/builds/guides/development/dll-builds.html) that exposes plugins from the package, -* `translations:collect` – collects translations context and prepares them to be sent to [Transifex](https://www.transifex.com/), -* `translations:upload` – uploads collected contexts to [Transifex](https://www.transifex.com/), -* `translations:download` – downloads translated contexts from [Transifex](https://www.transifex.com/), +* `translations:synchronize` – validates and synchronizes the translation messages by updating all translation files (`*.po` files) to be in sync with the context file, +* `translations:validate` – only validates the translation messages against the context file, * `export-package-as-javascript` – changes `main` entry in `package.json` file to point to a `.js` file, * `export-package-as-typescript` – changes `main` entry in `package.json` file to point to a `.ts` file. @@ -36,14 +35,6 @@ Available scripts can be called via npm scripts in the `package.json` file, e.g. } ``` -The `translations:download` and `translations:upload` tasks require the `--transifex` modifier: - -```json -{ - "translations:download": "ckeditor5-package-tools translations:download --transifex [API URL]" -} -``` - ### Integration with Node.js scripts Available scripts can be called manually as Node scripts, e.g.: @@ -56,8 +47,6 @@ packageTools[ 'dll:build' ]( /* Ckeditor5PackageToolsOptions */ ); All available scripts require the `Ckeditor5PackageToolsOptions` object. Its interface is described in the [`lib/utils/parse-arguments.js`](https://github.com/ckeditor/ckeditor5-package-generator/blob/master/packages/ckeditor5-package-tools/lib/utils/parse-arguments.js) file. -Additionally, `translations:download` and `translations:upload` tasks require the `transifex` option to be passed in the `Ckeditor5PackageToolsOptions` object. - ## Contribute The source code of this package is available on GitHub in https://github.com/ckeditor/ckeditor5-package-generator/tree/master/packages/ckeditor5-package-tools. diff --git a/packages/ckeditor5-package-tools/lib/index.js b/packages/ckeditor5-package-tools/lib/index.js index 4d35508a..1c4d5408 100644 --- a/packages/ckeditor5-package-tools/lib/index.js +++ b/packages/ckeditor5-package-tools/lib/index.js @@ -5,9 +5,7 @@ import start from './tasks/start.js'; import dllBuild from './tasks/dll-build.js'; -import translationsCollect from './tasks/translations-collect.js'; -import translationsUpload from './tasks/translations-upload.js'; -import translationsDownload from './tasks/translations-download.js'; +import synchronizeTranslations from './tasks/synchronize-translations.js'; import exportPackageAsJavaScript from './tasks/export-package-as-javascript.js'; import exportPackageAsTypeScript from './tasks/export-package-as-typescript.js'; @@ -20,16 +18,8 @@ export default { return dllBuild( options ); }, - 'translations:collect'( options ) { - return translationsCollect( options ); - }, - - 'translations:upload'( options ) { - return translationsUpload( options ); - }, - - 'translations:download'( options ) { - return translationsDownload( options ); + 'translations:synchronize'( options ) { + return synchronizeTranslations( options ); }, 'export-package-as-javascript'( options ) { diff --git a/packages/ckeditor5-package-tools/lib/tasks/translations-collect.js b/packages/ckeditor5-package-tools/lib/tasks/synchronize-translations.js similarity index 77% rename from packages/ckeditor5-package-tools/lib/tasks/translations-collect.js rename to packages/ckeditor5-package-tools/lib/tasks/synchronize-translations.js index e2e8df8d..25764ef3 100644 --- a/packages/ckeditor5-package-tools/lib/tasks/translations-collect.js +++ b/packages/ckeditor5-package-tools/lib/tasks/synchronize-translations.js @@ -5,13 +5,13 @@ import path from 'path'; import glob from 'glob'; -import { createPotFiles } from '@ckeditor/ckeditor5-dev-transifex'; +import { synchronizeTranslations } from '@ckeditor/ckeditor5-dev-translations'; export default options => { // Glob handles posix paths. const sourceFilesGlob = path.join( options.cwd, 'src', '**', '*.[jt]s' ).split( /[\\/]/g ).join( '/' ); - return createPotFiles( { + return synchronizeTranslations( { // An array containing absolute paths the package sources. sourceFiles: glob.sync( sourceFilesGlob ), @@ -24,8 +24,8 @@ export default options => { // Ignore unused from the core package, as the shared context may but does not have to be used. ignoreUnusedCorePackageContexts: true, - // Where to save translation files. - translationsDirectory: path.join( options.cwd, 'tmp', '.transifex' ), + // Whether to validate the translations contexts against the source messages only. No files will be updated. + validateOnly: options.validateOnly, // Skip the license header. skipLicenseHeader: true diff --git a/packages/ckeditor5-package-tools/lib/tasks/translations-download.js b/packages/ckeditor5-package-tools/lib/tasks/translations-download.js deleted file mode 100644 index a238df45..00000000 --- a/packages/ckeditor5-package-tools/lib/tasks/translations-download.js +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @license Copyright (c) 2020-2024, CKSource Holding sp. z o.o. All rights reserved. - * For licensing, see LICENSE.md. - */ - -import fs from 'fs-extra'; -import path from 'path'; -import { getToken, downloadTranslations } from '@ckeditor/ckeditor5-dev-transifex'; - -export default async options => { - if ( !options.organization ) { - throw new Error( 'The organization name is required. Use --organization [organization name] to provide the value.' ); - } - - if ( !options.project ) { - throw new Error( 'The project name is required. Use --project [project name] to provide the value.' ); - } - - if ( options.transifex ) { - throw new Error( 'The --transifex [API end-point] option is no longer supported. Use `--organization` and `--project` instead.' ); - } - - const pkgJson = fs.readJsonSync( path.join( options.cwd, 'package.json' ) ); - const packageName = pkgJson.name.includes( '/' ) ? pkgJson.name.split( '/' ).pop() : pkgJson.name; - - return downloadTranslations( { - // Token used for authentication with the Transifex service. - token: await getToken(), - - // List of packages that will be processed. - packages: new Map( [ - [ packageName, '.' ] - ] ), - - // Transifex project details. - organizationName: options.organization, - projectName: options.project, - - // An absolute path to the package. - cwd: options.cwd, - - // Skip CKEditor 5 contribute URL in created `*.po` files. - simplifyLicenseHeader: true - } ); -}; diff --git a/packages/ckeditor5-package-tools/lib/tasks/translations-upload.js b/packages/ckeditor5-package-tools/lib/tasks/translations-upload.js deleted file mode 100644 index 182e93aa..00000000 --- a/packages/ckeditor5-package-tools/lib/tasks/translations-upload.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @license Copyright (c) 2020-2024, CKSource Holding sp. z o.o. All rights reserved. - * For licensing, see LICENSE.md. - */ - -import fs from 'fs-extra'; -import path from 'path'; -import { getToken, uploadPotFiles } from '@ckeditor/ckeditor5-dev-transifex'; - -export default async options => { - if ( !options.organization ) { - throw new Error( 'The organization name is required. Use --organization [organization name] to provide the value.' ); - } - - if ( !options.project ) { - throw new Error( 'The project name is required. Use --project [project name] to provide the value.' ); - } - - if ( options.transifex ) { - throw new Error( 'The --transifex [API end-point] option is no longer supported. Use `--organization` and `--project` instead.' ); - } - - const pkgJson = fs.readJsonSync( path.join( options.cwd, 'package.json' ) ); - const packageName = pkgJson.name.includes( '/' ) ? pkgJson.name.split( '/' ).pop() : pkgJson.name; - - return uploadPotFiles( { - // Token used for authentication with the Transifex service. - token: await getToken(), - - // Transifex project details. - organizationName: options.organization, - projectName: options.project, - - // List of packages that will be processed. - packages: new Map( [ - [ packageName, path.join( 'tmp', '.transifex', packageName ) ] - ] ), - - // An absolute path to the package. - cwd: options.cwd - } ); -}; diff --git a/packages/ckeditor5-package-tools/lib/utils/parse-arguments.js b/packages/ckeditor5-package-tools/lib/utils/parse-arguments.js index f9295217..49a22fd0 100644 --- a/packages/ckeditor5-package-tools/lib/utils/parse-arguments.js +++ b/packages/ckeditor5-package-tools/lib/utils/parse-arguments.js @@ -8,15 +8,15 @@ import minimist from 'minimist'; export default args => { const config = { string: [ - 'organization', - 'project' + 'language' ], boolean: [ 'open', 'production', 'verbose', - 'watch' + 'watch', + 'validate-only' ], alias: { @@ -28,15 +28,17 @@ export default args => { open: true, language: 'en', verbose: false, - organization: null, production: false, - project: null, - watch: false + watch: false, + 'validate-only': false } }; const options = minimist( args, config ); + // Convert to camelCase. + replaceKebabCaseWithCamelCase( options, [ 'validate-only' ] ); + // Delete all aliases because we do not want to use them in the code. // They are useful when calling a command from CLI point of view. for ( const alias of Object.keys( config.alias ) ) { @@ -52,6 +54,15 @@ export default args => { return options; }; +function replaceKebabCaseWithCamelCase( options, keys ) { + for ( const key of keys ) { + const camelCaseKey = key.replace( /-./g, match => match[ 1 ].toUpperCase() ); + + options[ camelCaseKey ] = options[ key ]; + delete options[ key ]; + } +} + /** * @typedef {Object} Ckeditor5PackageToolsOptions * @@ -59,8 +70,6 @@ export default args => { * * @property {String} task A name of a task to execute. * - * @property {String|null} transifex An end-point API URL to upload/download translations from the Transifex service. - * * @property {Array.} _ Additional modifiers for the executed task that could not be matched with the supported options. * * @property {Boolean} [watch=false] When building the DLL file, it listens to changes in the source. @@ -69,6 +78,8 @@ export default args => { * * @property {Boolean} [production=false] Whether to prepare an optimized build. * + * @property {Boolean} [validateOnly=false] Whether to validate the translations contexts against the source messages only. + * * @property {String} [language='en'] Language that will be used to build an editor when starting the development server. * * @property {Boolean} [open=true] When starting the development server, the default system browser will launch the compiled sample. diff --git a/packages/ckeditor5-package-tools/package.json b/packages/ckeditor5-package-tools/package.json index 31226073..efa0a48f 100644 --- a/packages/ckeditor5-package-tools/package.json +++ b/packages/ckeditor5-package-tools/package.json @@ -12,9 +12,8 @@ "main": "lib/index.js", "type": "module", "dependencies": { - "@ckeditor/ckeditor5-dev-transifex": "^44.0.0", - "@ckeditor/ckeditor5-dev-translations": "^44.0.0", - "@ckeditor/ckeditor5-dev-utils": "^44.0.0", + "@ckeditor/ckeditor5-dev-translations": "^45.0.0", + "@ckeditor/ckeditor5-dev-utils": "^45.0.0", "buffer": "^6.0.3", "chalk": "^5.0.0", "css-loader": "^5.2.7", diff --git a/packages/ckeditor5-package-tools/tests/index.js b/packages/ckeditor5-package-tools/tests/index.js index eaadd597..d503faff 100644 --- a/packages/ckeditor5-package-tools/tests/index.js +++ b/packages/ckeditor5-package-tools/tests/index.js @@ -6,18 +6,14 @@ import { describe, it, expect, vi } from 'vitest'; import start from '../lib/tasks/start.js'; import dllBuild from '../lib/tasks/dll-build.js'; -import translationsCollect from '../lib/tasks/translations-collect.js'; -import translationsUpload from '../lib/tasks/translations-upload.js'; -import translationsDownload from '../lib/tasks/translations-download.js'; +import synchronizeTranslations from '../lib/tasks/synchronize-translations.js'; import exportPackageAsJavaScript from '../lib/tasks/export-package-as-javascript.js'; import exportPackageAsTypeScript from '../lib/tasks/export-package-as-typescript.js'; import tasks from '../lib/index.js'; vi.mock( '../lib/tasks/start.js' ); vi.mock( '../lib/tasks/dll-build.js' ); -vi.mock( '../lib/tasks/translations-collect.js' ); -vi.mock( '../lib/tasks/translations-upload.js' ); -vi.mock( '../lib/tasks/translations-download.js' ); +vi.mock( '../lib/tasks/synchronize-translations.js' ); vi.mock( '../lib/tasks/export-package-as-javascript.js' ); vi.mock( '../lib/tasks/export-package-as-typescript.js' ); @@ -64,60 +60,22 @@ describe( 'lib/index', () => { } ); } ); - describe( '#translations:collect', () => { + describe( '#translations:synchronize', () => { it( 'is available', () => { - expect( tasks[ 'translations:collect' ] ).toBeTypeOf( 'function' ); + expect( tasks[ 'translations:synchronize' ] ).toBeTypeOf( 'function' ); } ); it( 'executes the proper function from the "tasks/" directory', () => { - tasks[ 'translations:collect' ](); + tasks[ 'translations:synchronize' ](); - expect( translationsCollect ).toBeCalledTimes( 1 ); + expect( synchronizeTranslations ).toBeCalledTimes( 1 ); } ); it( 'passes arguments directly to the function', () => { const options = { foo: 1, bar: true }; - tasks[ 'translations:collect' ]( options ); + tasks[ 'translations:synchronize' ]( options ); - expect( translationsCollect ).toHaveBeenCalledWith( options ); - } ); - } ); - - describe( '#translations:download', () => { - it( 'is available', () => { - expect( tasks[ 'translations:download' ] ).toBeTypeOf( 'function' ); - } ); - - it( 'executes the proper function from the "tasks/" directory', () => { - tasks[ 'translations:download' ](); - - expect( translationsDownload ).toBeCalledTimes( 1 ); - } ); - - it( 'passes arguments directly to the function', () => { - const options = { foo: 1, bar: true }; - tasks[ 'translations:download' ]( options ); - - expect( translationsDownload ).toHaveBeenCalledWith( options ); - } ); - } ); - - describe( '#translations:upload', () => { - it( 'is available', () => { - expect( tasks[ 'translations:upload' ] ).toBeTypeOf( 'function' ); - } ); - - it( 'executes the proper function from the "tasks/" directory', () => { - tasks[ 'translations:upload' ](); - - expect( translationsUpload ).toBeCalledTimes( 1 ); - } ); - - it( 'passes arguments directly to the function', () => { - const options = { foo: 1, bar: true }; - tasks[ 'translations:upload' ]( options ); - - expect( translationsUpload ).toHaveBeenCalledWith( options ); + expect( synchronizeTranslations ).toHaveBeenCalledWith( options ); } ); } ); diff --git a/packages/ckeditor5-package-tools/tests/tasks/translations-collect.js b/packages/ckeditor5-package-tools/tests/tasks/synchronize-translations.js similarity index 59% rename from packages/ckeditor5-package-tools/tests/tasks/translations-collect.js rename to packages/ckeditor5-package-tools/tests/tasks/synchronize-translations.js index a676c6e2..ecd787d1 100644 --- a/packages/ckeditor5-package-tools/tests/tasks/translations-collect.js +++ b/packages/ckeditor5-package-tools/tests/tasks/synchronize-translations.js @@ -3,10 +3,10 @@ * For licensing, see LICENSE.md. */ -import { describe, it, expect, vi, beforeEach } from 'vitest'; +import { describe, it, expect, vi } from 'vitest'; import glob from 'glob'; -import { createPotFiles } from '@ckeditor/ckeditor5-dev-transifex'; -import translationsCollect from '../../lib/tasks/translations-collect.js'; +import * as devTranslations from '@ckeditor/ckeditor5-dev-translations'; +import synchronizeTranslations from '../../lib/tasks/synchronize-translations.js'; vi.mock( 'path', () => ( { default: { @@ -14,18 +14,14 @@ vi.mock( 'path', () => ( { } } ) ); vi.mock( 'glob' ); -vi.mock( '@ckeditor/ckeditor5-dev-transifex' ); - -describe( 'lib/tasks/translations-collect', () => { - beforeEach( () => { - vi.mocked( createPotFiles ).mockReturnValue( 'OK' ); - } ); +vi.mock( '@ckeditor/ckeditor5-dev-translations' ); +describe( 'lib/tasks/synchronize-translations', () => { it( 'should be a function', () => { - expect( translationsCollect ).toBeTypeOf( 'function' ); + expect( synchronizeTranslations ).toBeTypeOf( 'function' ); } ); - it( 'creates translation files (JavaScript)', () => { + it( 'synchronizes translation messages (JavaScript)', () => { const sourceFiles = [ '/workspace/ckeditor5-foo/src/index.js', '/workspace/ckeditor5-foo/src/myplugin.js' @@ -33,17 +29,16 @@ describe( 'lib/tasks/translations-collect', () => { vi.mocked( glob.sync ).mockReturnValue( sourceFiles ); - const results = translationsCollect( { - cwd: '/workspace' + synchronizeTranslations( { + cwd: '/workspace', + validateOnly: false } ); - expect( results ).toEqual( 'OK' ); - expect( glob.sync ).toHaveBeenCalledTimes( 1 ); expect( glob.sync ).toHaveBeenCalledWith( '/workspace/src/**/*.[jt]s' ); - expect( createPotFiles ).toHaveBeenCalledTimes( 1 ); - expect( createPotFiles ).toHaveBeenCalledWith( { + expect( devTranslations.synchronizeTranslations ).toHaveBeenCalledTimes( 1 ); + expect( devTranslations.synchronizeTranslations ).toHaveBeenCalledWith( { // Verify results returned by `glob.sync()`. sourceFiles, // Verify a path to the `@ckeditor/ckeditor5-core` package. @@ -56,12 +51,12 @@ describe( 'lib/tasks/translations-collect', () => { ], // Verify the license header in translation files. skipLicenseHeader: true, - // Verify a path where translations will be stored. - translationsDirectory: '/workspace/tmp/.transifex' + // Verify the validation-only mode. + validateOnly: false } ); } ); - it( 'creates translation files (TypeScript)', () => { + it( 'synchronizes translation messages (TypeScript)', () => { const sourceFiles = [ '/workspace/ckeditor5-foo/src/index.ts', '/workspace/ckeditor5-foo/src/myplugin.ts' @@ -69,17 +64,16 @@ describe( 'lib/tasks/translations-collect', () => { vi.mocked( glob.sync ).mockReturnValue( sourceFiles ); - const results = translationsCollect( { - cwd: '/workspace' + synchronizeTranslations( { + cwd: '/workspace', + validateOnly: false } ); - expect( results ).toEqual( 'OK' ); - expect( glob.sync ).toHaveBeenCalledTimes( 1 ); expect( glob.sync ).toHaveBeenCalledWith( '/workspace/src/**/*.[jt]s' ); - expect( createPotFiles ).toHaveBeenCalledTimes( 1 ); - expect( createPotFiles ).toHaveBeenCalledWith( { + expect( devTranslations.synchronizeTranslations ).toHaveBeenCalledTimes( 1 ); + expect( devTranslations.synchronizeTranslations ).toHaveBeenCalledWith( { // Verify results returned by `glob.sync()`. sourceFiles, // Verify a path to the `@ckeditor/ckeditor5-core` package. @@ -92,18 +86,28 @@ describe( 'lib/tasks/translations-collect', () => { ], // Verify the license header in translation files. skipLicenseHeader: true, - // Verify a path where translations will be stored. - translationsDirectory: '/workspace/tmp/.transifex' + // Verify the validation-only mode. + validateOnly: false } ); } ); + it( 'validates translation messages', () => { + synchronizeTranslations( { + validateOnly: true + } ); + + expect( devTranslations.synchronizeTranslations ).toHaveBeenCalledTimes( 1 ); + expect( devTranslations.synchronizeTranslations ).toHaveBeenCalledWith( expect.objectContaining( { + // Verify the validation-only mode. + validateOnly: true + } ) ); + } ); + it( 'passes posix paths to glob', () => { - const results = translationsCollect( { + synchronizeTranslations( { cwd: 'C:\\workspace' } ); - expect( results ).toEqual( 'OK' ); - expect( glob.sync ).toHaveBeenCalledTimes( 1 ); expect( glob.sync ).toHaveBeenCalledWith( 'C:/workspace/src/**/*.[jt]s' ); } ); diff --git a/packages/ckeditor5-package-tools/tests/tasks/translations-download.js b/packages/ckeditor5-package-tools/tests/tasks/translations-download.js deleted file mode 100644 index 513510a3..00000000 --- a/packages/ckeditor5-package-tools/tests/tasks/translations-download.js +++ /dev/null @@ -1,127 +0,0 @@ -/** - * @license Copyright (c) 2020-2024, CKSource Holding sp. z o.o. All rights reserved. - * For licensing, see LICENSE.md. - */ - -import { describe, it, expect, vi, beforeEach } from 'vitest'; -import fs from 'fs-extra'; -import { getToken, downloadTranslations } from '@ckeditor/ckeditor5-dev-transifex'; -import translationsDownload from '../../lib/tasks/translations-download.js'; - -vi.mock( 'path', () => ( { - default: { - join: ( ...chunks ) => chunks.join( '/' ) - } -} ) ); -vi.mock( 'fs-extra' ); -vi.mock( '@ckeditor/ckeditor5-dev-transifex' ); - -describe( 'lib/tasks/translations-download', () => { - beforeEach( () => { - vi.mocked( getToken ).mockResolvedValue( 'secretToken' ); - vi.mocked( downloadTranslations ).mockResolvedValue( 'OK' ); - vi.mocked( fs.readJsonSync ).mockImplementation( filePath => { - if ( filePath === '/workspace/package.json' ) { - return { - name: '@ckeditor/ckeditor5-foo' - }; - } - } ); - } ); - - it( 'should be a function', () => { - expect( translationsDownload ).toBeTypeOf( 'function' ); - } ); - - it( 'downloads translation files for package "ckeditor5-foo"', async () => { - vi.mocked( fs.readJsonSync ).mockImplementation( filePath => { - if ( filePath === '/workspace/package.json' ) { - return { - name: 'ckeditor5-foo' - }; - } - } ); - - const results = await translationsDownload( { - cwd: '/workspace', - organization: 'foo', - project: 'bar' - } ); - - expect( results ).toEqual( 'OK' ); - - expect( downloadTranslations ).toHaveBeenCalledTimes( 1 ); - expect( downloadTranslations ).toHaveBeenCalledWith( { - token: 'secretToken', - organizationName: 'foo', - projectName: 'bar', - cwd: '/workspace', - packages: new Map( [ - [ 'ckeditor5-foo', '.' ] - ] ), - simplifyLicenseHeader: true - } ); - } ); - - it( 'downloads translation files for package "@ckeditor/ckeditor5-foo"', async () => { - const results = await translationsDownload( { - cwd: '/workspace', - organization: 'foo', - project: 'bar' - } ); - - expect( results ).toEqual( 'OK' ); - - expect( downloadTranslations ).toHaveBeenCalledTimes( 1 ); - expect( downloadTranslations ).toHaveBeenCalledWith( { - token: 'secretToken', - organizationName: 'foo', - projectName: 'bar', - cwd: '/workspace', - packages: new Map( [ - [ 'ckeditor5-foo', '.' ] - ] ), - simplifyLicenseHeader: true - } ); - } ); - - it( 'throws an error if the "organization" option is not specified', async () => { - try { - await translationsDownload( { - cwd: '/workspace' - } ); - } catch ( err ) { - expect( err.message ).toEqual( - 'The organization name is required. Use --organization [organization name] to provide the value.' - ); - } - } ); - - it( 'throws an error if the "project" option is not specified', async () => { - try { - await translationsDownload( { - cwd: '/workspace', - organization: 'foo' - } ); - } catch ( err ) { - expect( err.message ).toEqual( - 'The project name is required. Use --project [project name] to provide the value.' - ); - } - } ); - - it( 'throws an error if the "transifex" option is specified', async () => { - try { - await translationsDownload( { - cwd: '/workspace', - organization: 'foo', - project: 'bar', - transifex: 'https://api.example.com' - } ); - } catch ( err ) { - expect( err.message ).toEqual( - 'The --transifex [API end-point] option is no longer supported. Use `--organization` and `--project` instead.' - ); - } - } ); -} ); diff --git a/packages/ckeditor5-package-tools/tests/tasks/translations-upload.js b/packages/ckeditor5-package-tools/tests/tasks/translations-upload.js deleted file mode 100644 index 8ddc7cc7..00000000 --- a/packages/ckeditor5-package-tools/tests/tasks/translations-upload.js +++ /dev/null @@ -1,125 +0,0 @@ -/** - * @license Copyright (c) 2020-2024, CKSource Holding sp. z o.o. All rights reserved. - * For licensing, see LICENSE.md. - */ - -import { describe, it, expect, vi, beforeEach } from 'vitest'; -import fs from 'fs-extra'; -import { getToken, uploadPotFiles } from '@ckeditor/ckeditor5-dev-transifex'; -import translationsUpload from '../../lib/tasks/translations-upload.js'; - -vi.mock( 'path', () => ( { - default: { - join: ( ...chunks ) => chunks.join( '/' ) - } -} ) ); -vi.mock( 'fs-extra' ); -vi.mock( '@ckeditor/ckeditor5-dev-transifex' ); - -describe( 'lib/tasks/translations-upload', () => { - beforeEach( () => { - vi.mocked( getToken ).mockResolvedValue( 'secretToken' ); - vi.mocked( uploadPotFiles ).mockResolvedValue( 'OK' ); - vi.mocked( fs.readJsonSync ).mockImplementation( filePath => { - if ( filePath === '/workspace/package.json' ) { - return { - name: '@ckeditor/ckeditor5-foo' - }; - } - } ); - } ); - - it( 'should be a function', () => { - expect( translationsUpload ).toBeTypeOf( 'function' ); - } ); - - it( 'uploads translation files for package "ckeditor5-foo"', async () => { - vi.mocked( fs.readJsonSync ).mockImplementation( filePath => { - if ( filePath === '/workspace/package.json' ) { - return { - name: 'ckeditor5-foo' - }; - } - } ); - - const results = await translationsUpload( { - cwd: '/workspace', - organization: 'foo', - project: 'bar' - } ); - - expect( results ).toEqual( 'OK' ); - - expect( uploadPotFiles ).toHaveBeenCalledTimes( 1 ); - expect( uploadPotFiles ).toHaveBeenCalledWith( { - token: 'secretToken', - cwd: '/workspace', - organizationName: 'foo', - packages: new Map( [ - [ 'ckeditor5-foo', 'tmp/.transifex/ckeditor5-foo' ] - ] ), - projectName: 'bar' - } ); - } ); - - it( 'uploads translation files for package "@ckeditor/ckeditor5-foo"', async () => { - const results = await translationsUpload( { - cwd: '/workspace', - organization: 'foo', - project: 'bar' - } ); - - expect( results ).toEqual( 'OK' ); - - expect( uploadPotFiles ).toHaveBeenCalledTimes( 1 ); - expect( uploadPotFiles ).toHaveBeenCalledWith( { - token: 'secretToken', - cwd: '/workspace', - organizationName: 'foo', - packages: new Map( [ - [ 'ckeditor5-foo', 'tmp/.transifex/ckeditor5-foo' ] - ] ), - projectName: 'bar' - } ); - } ); - - it( 'throws an error if the "organization" option is not specified', async () => { - try { - await translationsUpload( { - cwd: '/workspace' - } ); - } catch ( err ) { - expect( err.message ).toEqual( - 'The organization name is required. Use --organization [organization name] to provide the value.' - ); - } - } ); - - it( 'throws an error if the "project" option is not specified', async () => { - try { - await translationsUpload( { - cwd: '/workspace', - organization: 'foo' - } ); - } catch ( err ) { - expect( err.message ).toEqual( - 'The project name is required. Use --project [project name] to provide the value.' - ); - } - } ); - - it( 'throws an error if the "transifex" option is specified', async () => { - try { - await translationsUpload( { - cwd: '/workspace', - organization: 'foo', - project: 'bar', - transifex: 'https://api.example.com' - } ); - } catch ( err ) { - expect( err.message ).toEqual( - 'The --transifex [API end-point] option is no longer supported. Use `--organization` and `--project` instead.' - ); - } - } ); -} ); diff --git a/packages/ckeditor5-package-tools/tests/utils/parse-arguments.js b/packages/ckeditor5-package-tools/tests/utils/parse-arguments.js index 350e942c..5cdbfd56 100644 --- a/packages/ckeditor5-package-tools/tests/utils/parse-arguments.js +++ b/packages/ckeditor5-package-tools/tests/utils/parse-arguments.js @@ -21,9 +21,7 @@ describe( 'lib/utils/parse-arguments', () => { expect( options.watch ).toEqual( false ); expect( options.open ).toEqual( true ); expect( options.language ).toEqual( 'en' ); - expect( options.organization ).toEqual( null ); - expect( options.project ).toEqual( null ); - expect( options.transifex ).toEqual( undefined ); + expect( options.validateOnly ).toEqual( false ); } ); it( 'assigns the current work directory as the "#cwd" property', () => { @@ -97,15 +95,9 @@ describe( 'lib/utils/parse-arguments', () => { expect( options.language ).toEqual( 'pl' ); } ); - it( 'allows specifying the organization option', () => { - const options = parseArguments( [ 'task-to-execute', '--organization', 'bar' ] ); + it( 'allows specifying the validate-only mode option', () => { + const options = parseArguments( [ 'task-to-execute', '--validate-only' ] ); - expect( options.organization ).toEqual( 'bar' ); - } ); - - it( 'allows specifying the project option', () => { - const options = parseArguments( [ 'task-to-execute', '--project', 'foo' ] ); - - expect( options.project ).toEqual( 'foo' ); + expect( options.validateOnly ).toEqual( true ); } ); } ); diff --git a/scripts/ci/verify-build.js b/scripts/ci/verify-build.js index 6d43d8a7..fd212cb4 100644 --- a/scripts/ci/verify-build.js +++ b/scripts/ci/verify-build.js @@ -98,7 +98,7 @@ async function verifyBuild( { language, packageManager, customPluginName, instal executeCommand( [ 'yarn', 'run', 'stylelint' ], { cwd: NEW_PACKAGE_DIRECTORY } ); logProcess( 'Verifying translations...' ); - executeCommand( [ 'yarn', 'run', 'translations:collect' ], { cwd: NEW_PACKAGE_DIRECTORY } ); + executeCommand( [ 'yarn', 'run', 'translations:validate' ], { cwd: NEW_PACKAGE_DIRECTORY } ); logProcess( 'Verifying release process...' ); const { stderr } = executeCommand( [ 'npm', 'publish', '--dry-run' ], { cwd: NEW_PACKAGE_DIRECTORY, pipeStderr: true } ); diff --git a/yarn.lock b/yarn.lock index f8fb2b90..ee09cbed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -99,29 +99,29 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@ckeditor/ckeditor5-dev-bump-year@^44.0.0": - version "44.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-dev-bump-year/-/ckeditor5-dev-bump-year-44.2.1.tgz#2624d4a85d755718ca2e84e71171654773ee001a" - integrity sha512-3tQwUIcDblW9qO+aKSNQfQHyV38HjTcM+F4o7O/8HlHy5Bh+H+dFbSqXejTqg3jNY16H2+Q44j7Yk/3BbR+SEA== +"@ckeditor/ckeditor5-dev-bump-year@^45.0.0": + version "45.0.8" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-dev-bump-year/-/ckeditor5-dev-bump-year-45.0.8.tgz#e0042e6f8d8a6f67b37a87848b5f0a987571efd7" + integrity sha512-e+CFBkA+hxz58mGRNQGhYERKbw3/XC3dorvSyD7eMpKvGu/7iapI7nq+lKe9CQZI2giy6yPo4YsQnV51RDvyHw== dependencies: chalk "^5.0.0" glob "^10.0.0" -"@ckeditor/ckeditor5-dev-ci@^44.0.0": - version "44.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-dev-ci/-/ckeditor5-dev-ci-44.2.1.tgz#276d0334abf1a2f7ad50f6d00e4f9dc70ccaaeeb" - integrity sha512-eqjKwlQp+aHG5Em1Y9q1jG8TMsb91WMzMhKkidtC558qJC6EAx6sYgvfs5WhBOpeRHhOE3dKyB81hV5A5ndRXQ== +"@ckeditor/ckeditor5-dev-ci@^45.0.0": + version "45.0.8" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-dev-ci/-/ckeditor5-dev-ci-45.0.8.tgz#fe3e3fe62fc2f4d5996f470f49ad04cd01f738b5" + integrity sha512-P3c2D1VmiWoVHVySpU2e0xeWLMeQ2kBbfr2+o0rrr+ky9ZkaZfL6fC0b/ojCSMtn125CNzPULPtZtjP/HNf0LQ== dependencies: "@octokit/rest" "^21.0.0" minimist "^1.2.8" slack-notify "^2.0.6" -"@ckeditor/ckeditor5-dev-release-tools@^44.0.0": - version "44.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-dev-release-tools/-/ckeditor5-dev-release-tools-44.2.1.tgz#8ed7d5ffc7b476d39e053bd3bd5d78aba6946001" - integrity sha512-PKVmfqtOn52/o6jf5laFgVTNpPZae2+383MqThuQCCz+JGBKNHytgsflaMc0kCUynUiwk1h0PD2yCi7+aY94qQ== +"@ckeditor/ckeditor5-dev-release-tools@^45.0.0": + version "45.0.8" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-dev-release-tools/-/ckeditor5-dev-release-tools-45.0.8.tgz#41d594148f7ad09db42de65e8d5e29f35f91b270" + integrity sha512-aZSi7rClTNEBUK0ITWpKIM+1z5ma+FpW5XQiKdCZZIrjNiky7gvyiTteC6K0V6eQab12IHbjbtJrcIHNEMIqKA== dependencies: - "@ckeditor/ckeditor5-dev-utils" "^44.2.1" + "@ckeditor/ckeditor5-dev-utils" "^45.0.8" "@octokit/rest" "^21.0.0" chalk "^5.0.0" cli-columns "^4.0.0" @@ -143,39 +143,29 @@ simple-git "^3.27.0" upath "^2.0.1" -"@ckeditor/ckeditor5-dev-transifex@^44.0.0": - version "44.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-dev-transifex/-/ckeditor5-dev-transifex-44.2.1.tgz#b258dcb10fb42a02bed6422cf8f3fc6c53e114e7" - integrity sha512-+DD3OXobO/2aonkxCs0zmN7IQcxUhZ+ZM/HLtBt4biS4nrJ2L0sCac+xcrynEyYZ409NZSw42Hiu4i9Ly20+2Q== - dependencies: - "@ckeditor/ckeditor5-dev-translations" "^44.2.1" - "@ckeditor/ckeditor5-dev-utils" "^44.2.1" - "@transifex/api" "^7.0.0" - chalk "^5.0.0" - cli-table "^0.3.1" - del "^7.0.0" - fs-extra "^11.0.0" - inquirer "^11.0.0" - -"@ckeditor/ckeditor5-dev-translations@^44.0.0", "@ckeditor/ckeditor5-dev-translations@^44.2.1": - version "44.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-dev-translations/-/ckeditor5-dev-translations-44.2.1.tgz#ed9610434ce2ab752aef04f405b2918962962891" - integrity sha512-ZX/ilBnKyps6S93Xl8k5RHOYo/k2KzJElOQa+bvKHuc69NrxfCZcDYZnv8oFK9oVHIF5tc8QGe8gwrZsBDYeTw== +"@ckeditor/ckeditor5-dev-translations@^45.0.0", "@ckeditor/ckeditor5-dev-translations@^45.0.8": + version "45.0.8" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-dev-translations/-/ckeditor5-dev-translations-45.0.8.tgz#0ecf7a9867736a404e103f9ecdcb0fe5c6f0950a" + integrity sha512-+tgAiyjn4u2B5SWeLoZr/POxsmkSBfr+iv6ZCkYluVF1irdOLHncCFAoEFB2sAh9LD3e5zjD+xkW8Cq0m6PqJg== dependencies: "@babel/parser" "^7.18.9" "@babel/traverse" "^7.18.9" + "@ckeditor/ckeditor5-dev-utils" "^45.0.8" chalk "^5.0.0" fs-extra "^11.0.0" + glob "^10.0.0" + plural-forms "^0.5.5" pofile "^1.0.9" rimraf "^5.0.0" + upath "^2.0.1" webpack-sources "^3.0.0" -"@ckeditor/ckeditor5-dev-utils@^44.0.0", "@ckeditor/ckeditor5-dev-utils@^44.2.1": - version "44.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-dev-utils/-/ckeditor5-dev-utils-44.2.1.tgz#4779b099813e2fd0c5e2fd935e9f2b6f678cbd6a" - integrity sha512-ga1spmr3mGq5lQbH4VVYyXFowx1YqKO4YpyUE6IzegiyMECePEfLMoTjl+8PrAcUGdExaUhHJEesPmpFP5rwSA== +"@ckeditor/ckeditor5-dev-utils@^45.0.0", "@ckeditor/ckeditor5-dev-utils@^45.0.8": + version "45.0.8" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-dev-utils/-/ckeditor5-dev-utils-45.0.8.tgz#e3f246a621b7f508a5e56cb60d681059abb6cb22" + integrity sha512-forw2L6sMitVf5KRxQfGoS+jEv+Nd7NWz0THzZ38YzWH0QdH6Ifumiu0OhGKZm8fzjm+S+pAZs/G+9cTUZcfdg== dependencies: - "@ckeditor/ckeditor5-dev-translations" "^44.2.1" + "@ckeditor/ckeditor5-dev-translations" "^45.0.8" chalk "^5.0.0" cli-cursor "^5.0.0" cli-spinners "^3.0.0" @@ -197,10 +187,10 @@ terser-webpack-plugin "^5.0.0" through2 "^4.0.0" -"@ckeditor/ckeditor5-dev-web-crawler@^44.0.0": - version "44.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-dev-web-crawler/-/ckeditor5-dev-web-crawler-44.2.1.tgz#34e5869095f7e134d84ee9d8c06804465d94712e" - integrity sha512-cBka2Ki4rZtz1/LRBIomxeeQasPWeYWiFySVS7jyqJ5zgIPVpK+ZI9UAoZSlC0PcfcIy2ONbYZlio//qXwIbEw== +"@ckeditor/ckeditor5-dev-web-crawler@^45.0.0": + version "45.0.8" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-dev-web-crawler/-/ckeditor5-dev-web-crawler-45.0.8.tgz#7d4849166ab8fcd76f131d94b5ecf6e5ebbd47d5" + integrity sha512-ft+YcrXB6JUCmbRW73vOnhpjyOCmejQ/4AbpXmxyfTZ5zOeesAVvQaw4xhrKtWGjDeWiv355gucrsf5CuyCPSw== dependencies: chalk "^5.0.0" ora "^8.0.0" @@ -1039,13 +1029,6 @@ "@sigstore/core" "^2.0.0" "@sigstore/protobuf-specs" "^0.3.2" -"@transifex/api@^7.0.0": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@transifex/api/-/api-7.1.3.tgz#a6b59698012a003a17fe47b89ae615a635db870e" - integrity sha512-oT6QXhRqduGqDNMfyRK4+u1RrAux0sCJe7rtFvEDc6oDg8h6dIr+2O2o8oSOio6E+JFS9KVrRbCIy2jFsPtRFQ== - dependencies: - core-js "^3.35.0" - "@trysound/sax@0.2.0": version "0.2.0" resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" @@ -1196,9 +1179,9 @@ "@types/node" "*" "@types/node@*", "@types/node@^22.5.5": - version "22.8.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.8.2.tgz#8e82bb8201c0caf751dcdc61b0a262d2002d438b" - integrity sha512-NzaRNFV+FZkvK/KLCsNdTvID0SThyrs5SHB6tsD/lajr22FGC73N2QeDPM2wHtVde8mgcXuSsHQkH5cX1pbPLw== + version "22.8.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.8.4.tgz#ab754f7ac52e1fe74174f761c5b03acaf06da0dc" + integrity sha512-SpNNxkftTJOPk0oN+y2bIqurEXHTA2AOZ3EJDDKeJ5VzkvvORSvmQXGQarcOzWV1ac7DCaPBEdMDxBsM+d8jWw== dependencies: undici-types "~6.19.8" @@ -1631,14 +1614,6 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -aggregate-error@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-4.0.1.tgz#25091fe1573b9e0be892aeda15c7c66a545f758e" - integrity sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w== - dependencies: - clean-stack "^4.0.0" - indent-string "^5.0.0" - ajv-formats@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" @@ -2041,9 +2016,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001669: - version "1.0.30001674" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001674.tgz#eb200a716c3e796d33d30b9c8890517a72f862c8" - integrity sha512-jOsKlZVRnzfhLojb+Ykb+gyUSp9Xb57So+fAiFlLzzTKpqg8xxSav0e40c8/4F/v9N8QSvrRRaLeVzQbLqomYw== + version "1.0.30001675" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001675.tgz#0c1f01fc9cc543b61839753a4c234f995588d1b9" + integrity sha512-/wV1bQwPrkLiQMjaJF5yUMVM/VdRPOCU8QZ+PmG6uW6DvYSrNY1bpwHI/3mOcUosLaJCzYDi5o91IQB51ft6cg== caseless@~0.12.0: version "0.12.0" @@ -2140,13 +2115,6 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== -clean-stack@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-4.2.0.tgz#c464e4cde4ac789f4e0735c5d75beb49d7b30b31" - integrity sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg== - dependencies: - escape-string-regexp "5.0.0" - cli-columns@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cli-columns/-/cli-columns-4.0.0.tgz#9fe4d65975238d55218c41bd2ed296a7fa555646" @@ -2179,13 +2147,6 @@ cli-spinners@^3.0.0: resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-3.2.0.tgz#ad2532abb0aaed479ff0020aaa910e067f8aa675" integrity sha512-pXftdQloMZzjCr3pCTIRniDcys6dDzgpgVhAHHk6TKBDbRuP1MkuetTF5KSv4YUutbOPa7+7ZrAJ2kVtbMqyXA== -cli-table@^0.3.1: - version "0.3.11" - resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.11.tgz#ac69cdecbe81dccdba4889b9a18b7da312a9d3ee" - integrity sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ== - dependencies: - colors "1.0.3" - cli-truncate@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" @@ -2251,11 +2212,6 @@ colorette@^2.0.10, colorette@^2.0.16: resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== -colors@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" - integrity sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw== - combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -2381,11 +2337,6 @@ cookie@0.7.1: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.1.tgz#2f73c42142d5d5cf71310a74fc4ae61670e5dbc9" integrity sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w== -core-js@^3.35.0: - version "3.38.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.38.1.tgz#aa375b79a286a670388a1a363363d53677c0383e" - integrity sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw== - core-util-is@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -2680,20 +2631,6 @@ define-lazy-prop@^3.0.0: resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f" integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg== -del@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/del/-/del-7.1.0.tgz#0de0044d556b649ff05387f1fa7c885e155fd1b6" - integrity sha512-v2KyNk7efxhlyHpjEvfyxaAihKKK0nWCuf6ZtqZcFFpQRG0bJ12Qsr0RpvsICMjAAZ8DOVCxrlqpxISlMHC4Kg== - dependencies: - globby "^13.1.2" - graceful-fs "^4.2.10" - is-glob "^4.0.3" - is-path-cwd "^3.0.0" - is-path-inside "^4.0.0" - p-map "^5.5.0" - rimraf "^3.0.2" - slash "^4.0.0" - delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -2963,11 +2900,6 @@ escape-html@~1.0.3: resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== -escape-string-regexp@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8" - integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== - escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -3253,7 +3185,7 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-glob@^3.2.9, fast-glob@^3.3.0, fast-glob@^3.3.2: +fast-glob@^3.2.9, fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -3606,17 +3538,6 @@ globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -globby@^13.1.2: - version "13.2.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-13.2.2.tgz#63b90b1bf68619c2135475cbd4e71e66aa090592" - integrity sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w== - dependencies: - dir-glob "^3.0.1" - fast-glob "^3.3.0" - ignore "^5.2.4" - merge2 "^1.4.1" - slash "^4.0.0" - globjoin@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/globjoin/-/globjoin-0.1.4.tgz#2f4494ac8919e3767c5cbb691e9f463324285d43" @@ -3629,7 +3550,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -3880,7 +3801,7 @@ ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.2.0, ignore@^5.2.4: +ignore@^5.2.0: version "5.3.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== @@ -3908,11 +3829,6 @@ indent-string@^4.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== -indent-string@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-5.0.0.tgz#4fd2980fccaf8622d14c64d694f4cf33c81951a5" - integrity sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg== - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -4056,16 +3972,6 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== -is-path-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-3.0.0.tgz#889b41e55c8588b1eb2a96a61d05740a674521c7" - integrity sha512-kyiNFFLU0Ampr6SDZitD/DwUo4Zs1nSdnygUBqsu3LooL00Qvb5j+UnvApUn/TTj1J3OuE6BTdQ5rudKmU2ZaA== - -is-path-inside@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-4.0.0.tgz#805aeb62c47c1b12fc3fd13bfb3ed1e7430071db" - integrity sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA== - is-plain-obj@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" @@ -4782,9 +4688,9 @@ mkdirp@^3.0.1: integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg== mocha@^10.0.0: - version "10.7.3" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.3.tgz#ae32003cabbd52b59aece17846056a68eb4b0752" - integrity sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A== + version "10.8.1" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.8.1.tgz#dc56251be909d7bea999c50f604c50e8dfd9d075" + integrity sha512-WxSpEWgF03HfgNKBuysfK40DUaOSVX5zxgLDoieMGO+zyE69iq2eQ1vBypvIJ5mOPKpuVAqWiTbt4Orj7L6wVw== dependencies: ansi-colors "^4.1.3" browser-stdout "^1.3.1" @@ -5109,13 +5015,6 @@ p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" -p-map@^5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-5.5.0.tgz#054ca8ca778dfa4cf3f8db6638ccb5b937266715" - integrity sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg== - dependencies: - aggregate-error "^4.0.0" - p-map@^7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/p-map/-/p-map-7.0.2.tgz#7c5119fada4755660f70199a66aa3fe2f85a1fe8" @@ -5265,6 +5164,11 @@ please-upgrade-node@^3.2.0: dependencies: semver-compare "^1.0.0" +plural-forms@^0.5.5: + version "0.5.5" + resolved "https://registry.yarnpkg.com/plural-forms/-/plural-forms-0.5.5.tgz#d15ca5597aff37373c97edc039ba11659461120e" + integrity sha512-rJw4xp22izsfJOVqta5Hyvep2lR3xPkFUtj7dyQtpf/FbxUiX7PQCajTn2EHDRylizH5N/Uqqodfdu22I0ju+g== + pofile@^1.0.9: version "1.1.4" resolved "https://registry.yarnpkg.com/pofile/-/pofile-1.1.4.tgz#eab7e29f5017589b2a61b2259dff608c0cad76a2" @@ -6186,11 +6090,6 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slash@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" - integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== - slice-ansi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787"