diff --git a/commands/version/package.json b/commands/version/package.json index 5ce646354c..295e2184a0 100644 --- a/commands/version/package.json +++ b/commands/version/package.json @@ -48,7 +48,7 @@ "@lerna/run-topologically": "file:../../utils/run-topologically", "@lerna/temp-write": "file:../../utils/temp-write", "@lerna/validation-error": "file:../../core/validation-error", - "@nrwl/devkit": ">=14.8.6 < 16", + "@nrwl/devkit": ">=15.4.2 < 16", "chalk": "^4.1.0", "dedent": "^0.7.0", "load-json-file": "^6.2.0", diff --git a/core/lerna/commands/watch/README.md b/core/lerna/commands/watch/README.md new file mode 100644 index 0000000000..3c189df6b6 --- /dev/null +++ b/core/lerna/commands/watch/README.md @@ -0,0 +1,49 @@ +# `lerna watch` + +> Watch for changes within packages and execute commands from the root of the repository + +Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI. + +## Usage + +```sh +$ lerna watch -- +``` + +The values `$LERNA_PACKAGE_NAME` and `$LERNA_FILE_CHANGES` will be replaced with the package and the file(s) that changed, respectively. If multiple file changes are detected in one cycle, then `$LERNA_FILE_CHANGES` will list them all, separated by spaces. + +> 💡 When using `$LERNA_PACKAGE_NAME` and `$LERNA_FILE_CHANGES`, you will need to escape the dollar sign with a backslash (`\`). See the [examples](#examples) below. + +### Examples + +Watch all packages and echo the package name and the files that changed: + +```sh +$ lerna watch -- echo \$LERNA_PACKAGE_NAME \$LERNA_FILE_CHANGES +``` + +Watch only packages "package-1", "package-3" and their dependencies: + +```sh +$ lerna watch --scope "package-{1,3}" --include-dependencies -- echo \$LERNA_PACKAGE_NAME \$LERNA_FILE_CHANGES +``` + +Watch only package "package-4" and its dependencies and run the `test` script for the package that changed: + +```sh +$ lerna watch --scope="package-4" --include-dependencies -- lerna run test --scope=\$LERNA_PACKAGE_NAME +``` + +When using `npx`, the `-c` option must be used if also providing variables for substitution: + +```sh +$ npx -c 'lerna watch -- echo \$LERNA_PACKAGE_NAME \$LERNA_FILE_CHANGES' +``` + +## Options + +`lerna watch` accepts all [filter flags](https://www.npmjs.com/package/@lerna/filter-options). Filter flags can be used to select specific packages to watch. See the [examples](#examples) above. + +### `--verbose` + +Run `lerna watch` in verbose mode, where commands are logged before execution. diff --git a/core/lerna/commands/watch/command.js b/core/lerna/commands/watch/command.js new file mode 100644 index 0000000000..79f1b5a938 --- /dev/null +++ b/core/lerna/commands/watch/command.js @@ -0,0 +1,39 @@ +// @ts-check + +"use strict"; + +const { filterOptions } = require("@lerna/filter-options"); + +/** + * @see https://github.com/yargs/yargs/blob/master/docs/advanced.md#providing-a-command-module + */ +exports.command = "watch"; + +exports.describe = "Runs a command whenever packages or their dependents change."; + +exports.builder = (yargs) => { + yargs + .parserConfiguration({ + "populate--": true, + "strip-dashed": true, + }) + .option("command", { type: "string", hidden: true }) + .option("verbose", { + type: "boolean", + description: "Run watch mode in verbose mode, where commands are logged before execution.", + }) + .middleware((args) => { + const { "--": doubleDash } = args; + if (doubleDash && Array.isArray(doubleDash)) { + // eslint-disable-next-line no-param-reassign + args.command = doubleDash.join(" "); + } + }, true); + + return filterOptions(yargs); +}; + +exports.handler = function handler(argv) { + // eslint-disable-next-line global-require + return require(".")(argv); +}; diff --git a/core/lerna/commands/watch/index.js b/core/lerna/commands/watch/index.js new file mode 100644 index 0000000000..82ec312f39 --- /dev/null +++ b/core/lerna/commands/watch/index.js @@ -0,0 +1,64 @@ +// @ts-check + +"use strict"; + +const { Command } = require("@lerna/command"); +const { getFilteredPackages } = require("@lerna/filter-options"); +const { ValidationError } = require("@lerna/validation-error"); +const { watch } = require("nx/src/command-line/watch"); +const { readNxJson } = require("nx/src/config/configuration"); + +module.exports = factory; + +const getNxProjectNamesFromLernaPackageNames = (packageNames) => { + const nxJson = readNxJson(); + const nxConfiguredNpmScope = nxJson.npmScope; + + return nxConfiguredNpmScope + ? packageNames.map((name) => name.replace(`@${nxConfiguredNpmScope}/`, "")) + : packageNames; +}; + +function factory(argv) { + return new WatchCommand(argv); +} + +class WatchCommand extends Command { + get requiresGit() { + return false; + } + + async initialize() { + if (!this.options.command) { + throw new ValidationError("ENOCOMMAND", "A command to execute is required"); + } + + this.filteredPackages = await getFilteredPackages(this.packageGraph, this.execOpts, this.options); + + this.count = this.filteredPackages.length; + this.packagePlural = this.count === 1 ? "package" : "packages"; + } + + async execute() { + this.logger.info( + "watch", + "Executing command %j on changes in %d %s.", + this.options.command, + this.count, + this.packagePlural + ); + + const projectNames = getNxProjectNamesFromLernaPackageNames(this.filteredPackages.map((p) => p.name)); + + await watch({ + command: this.options.command, + projectNameEnvName: "LERNA_PACKAGE_NAME", + fileChangesEnvName: "LERNA_FILE_CHANGES", + includeDependentProjects: false, // dependent projects are accounted for via lerna filter options + projects: projectNames, + verbose: this.options.verbose, + }); + } +} + +module.exports.WatchCommand = WatchCommand; diff --git a/core/lerna/index.js b/core/lerna/index.js index 5d582c0eb8..2fe244b58f 100644 --- a/core/lerna/index.js +++ b/core/lerna/index.js @@ -22,6 +22,7 @@ const versionCmd = require("@lerna/version/command"); const repairCmd = require("./commands/repair/command"); const addCachingCmd = require("./commands/add-caching/command"); +const watchCmd = require("./commands/watch/command"); const pkg = require("./package.json"); @@ -51,6 +52,7 @@ function main(argv) { .command(publishCmd) .command(repairCmd) .command(runCmd) + .command(watchCmd) .command(versionCmd) .parse(argv, context); } diff --git a/core/lerna/package.json b/core/lerna/package.json index dbcd6e81c5..5784e993c4 100644 --- a/core/lerna/package.json +++ b/core/lerna/package.json @@ -51,6 +51,7 @@ "@lerna/create": "file:../../commands/create", "@lerna/diff": "file:../../commands/diff", "@lerna/exec": "file:../../commands/exec", + "@lerna/filter-options": "file:../filter-options", "@lerna/import": "file:../../commands/import", "@lerna/info": "file:../../commands/info", "@lerna/init": "file:../../commands/init", @@ -58,12 +59,13 @@ "@lerna/list": "file:../../commands/list", "@lerna/publish": "file:../../commands/publish", "@lerna/run": "file:../../commands/run", + "@lerna/validation-error": "file:../validation-error", "@lerna/version": "file:../../commands/version", - "@nrwl/devkit": ">=14.8.6 < 16", + "@nrwl/devkit": ">=15.4.2 < 16", "import-local": "^3.0.2", "inquirer": "^8.2.4", "npmlog": "^6.0.2", - "nx": ">=14.8.6 < 16", + "nx": ">=15.4.2 < 16", "typescript": "^3 || ^4" } } diff --git a/core/lerna/schemas/lerna-schema.json b/core/lerna/schemas/lerna-schema.json index 4db8c6eb07..e4fc571ed0 100644 --- a/core/lerna/schemas/lerna-schema.json +++ b/core/lerna/schemas/lerna-schema.json @@ -1120,6 +1120,33 @@ "$ref": "#/$defs/filters/continueIfNoMatch" } } + }, + "watch": { + "type": "object", + "description": "Options for the `watch` command.", + "properties": { + "scope": { + "$ref": "#/$defs/filters/scope" + }, + "ignore": { + "$ref": "#/$defs/filters/ignore" + }, + "private": { + "$ref": "#/$defs/filters/private" + }, + "since": { + "$ref": "#/$defs/filters/since" + }, + "excludeDependents": { + "$ref": "#/$defs/filters/excludeDependents" + }, + "includeDependents": { + "$ref": "#/$defs/filters/includeDependents" + }, + "includeDependencies": { + "$ref": "#/$defs/filters/includeDependencies" + } + } } } }, diff --git a/e2e/watch/.eslintrc.json b/e2e/watch/.eslintrc.json new file mode 100644 index 0000000000..9d9c0db55b --- /dev/null +++ b/e2e/watch/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/e2e/watch/jest.config.ts b/e2e/watch/jest.config.ts new file mode 100644 index 0000000000..9657011628 --- /dev/null +++ b/e2e/watch/jest.config.ts @@ -0,0 +1,18 @@ +/* eslint-disable */ +export default { + displayName: "e2e-watch", + preset: "../../jest.preset.js", + globals: { + "ts-jest": { + tsconfig: "/tsconfig.spec.json", + }, + }, + transform: { + "^.+\\.[tj]s$": "ts-jest", + }, + moduleFileExtensions: ["ts", "js", "html"], + coverageDirectory: "../../coverage/e2e/watch", + maxWorkers: 1, + testTimeout: 60000, + setupFiles: ["/src/test-setup.ts"], +}; diff --git a/e2e/watch/project.json b/e2e/watch/project.json new file mode 100644 index 0000000000..4ec503bf79 --- /dev/null +++ b/e2e/watch/project.json @@ -0,0 +1,52 @@ +{ + "name": "e2e-watch", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "tags": [], + "targets": { + "e2e": { + "executor": "nx:run-commands", + "options": { + "commands": [ + { + "command": "npm run e2e-start-local-registry" + }, + { + "command": "npm run e2e-build-package-publish" + }, + { + "command": "E2E_ROOT=$(npx ts-node scripts/set-e2e-root.ts) nx run-e2e-tests e2e-watch" + } + ], + "parallel": false + } + }, + "run-e2e-tests-process": { + "executor": "nx:run-commands", + "options": { + "commands": [ + { + "command": "E2E_ROOT=$(npx ts-node scripts/set-e2e-root.ts) nx run-e2e-tests e2e-watch", + "description": "This additional wrapper target exists so that we can ensure that the e2e tests run in a dedicated process with enough memory" + } + ], + "parallel": false + } + }, + "run-e2e-tests": { + "executor": "@nrwl/jest:jest", + "options": { + "jestConfig": "e2e/watch/jest.config.ts", + "passWithNoTests": true, + "runInBand": true + }, + "outputs": ["{workspaceRoot}/coverage/e2e/watch"] + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["e2e/watch/**/*.ts"] + } + } + } +} diff --git a/e2e/watch/src/test-setup.ts b/e2e/watch/src/test-setup.ts new file mode 100644 index 0000000000..bb0b4613b6 --- /dev/null +++ b/e2e/watch/src/test-setup.ts @@ -0,0 +1 @@ +jest.retryTimes(3); diff --git a/e2e/watch/src/watch-with-nx.spec.ts b/e2e/watch/src/watch-with-nx.spec.ts new file mode 100644 index 0000000000..9712f8127a --- /dev/null +++ b/e2e/watch/src/watch-with-nx.spec.ts @@ -0,0 +1,110 @@ +import { Fixture, normalizeEnvironment, wait } from "@lerna/e2e-utils"; +import { createFile } from "fs-extra"; + +expect.addSnapshotSerializer({ + serialize(str) { + return normalizeEnvironment(str); + }, + test(val) { + return val != null && typeof val === "string"; + }, +}); + +describe("lerna-watch-with-nx", () => { + let fixture: Fixture; + + beforeEach(async () => { + fixture = await Fixture.create({ + e2eRoot: process.env.E2E_ROOT, + name: "lerna-watch-with-nx", + packageManager: "npm", + initializeGit: true, + runLernaInit: true, + installDependencies: true, + }); + + await fixture.lerna("create package-a -y"); + await fixture.lerna("create package-b --dependencies package-a -y"); + await fixture.updateJson("packages/package-b/package.json", (json) => ({ + ...json, + name: "@unknown-scope/package-b", + })); + await fixture.lerna("create package-c -y"); + await fixture.updateJson("packages/package-c/package.json", (json) => ({ + ...json, + name: "@scope/package-c", + })); + + await fixture.addNxJsonToWorkspace(); + await fixture.updateJson("nx.json", (json) => ({ + ...json, + npmScope: "scope", + })); + + await fixture.createInitialGitCommit(); + }); + + afterAll(() => fixture.destroy()); + + it("should watch all packages by default, removing nx.json's 'npmScope' from package names", async () => { + const getWatchResult = await fixture.lernaWatch("-- echo \\$LERNA_PACKAGE_NAME: \\$LERNA_FILE_CHANGES"); + + await createFile(fixture.getWorkspacePath("packages/package-a/my-file.txt")); + await wait(200); + + await createFile(fixture.getWorkspacePath("packages/package-b/my-file.txt")); + await wait(200); + + await createFile(fixture.getWorkspacePath("packages/package-c/my-file.txt")); + await wait(200); + + const output = await getWatchResult(); + + // package-c will be printed without its scope since Nx automatically removes it when substituting $LERNA_PACKAGE_NAME + expect(output.combinedOutput).toMatchInlineSnapshot(` + lerna notice cli v999.9.9-e2e.0 + lerna verb rootPath /tmp/lerna-e2e/lerna-watch-with-nx/lerna-workspace + lerna info watch Executing command "echo $LERNA_PACKAGE_NAME: $LERNA_FILE_CHANGES" on changes in 3 packages. + + > NX running with args: {"command":"echo $LERNA_PACKAGE_NAME: $LERNA_FILE_CHANGES","projectNameEnvName":"LERNA_PACKAGE_NAME","fileChangesEnvName":"LERNA_FILE_CHANGES","includeDependentProjects":false,"projects":["package-a","@unknown-scope/package-b","package-c"],"verbose":true} + + + > NX starting watch process + + + > NX watch process waiting... + + + > NX about to run commands with these environments: [{"LERNA_PACKAGE_NAME":"package-a","LERNA_FILE_CHANGES":"packages/package-a/my-file.txt"}] + + package-a: packages/package-a/my-file.txt + + > NX running complete, processing the next batch + + + > NX no more commands to process + + + > NX about to run commands with these environments: [{"LERNA_PACKAGE_NAME":"@unknown-scope/package-b","LERNA_FILE_CHANGES":"packages/package-b/my-file.txt"}] + + @unknown-scope/package-b: packages/package-b/my-file.txt + + > NX running complete, processing the next batch + + + > NX no more commands to process + + + > NX about to run commands with these environments: [{"LERNA_PACKAGE_NAME":"package-c","LERNA_FILE_CHANGES":"packages/package-c/my-file.txt"}] + + package-c: packages/package-c/my-file.txt + + > NX running complete, processing the next batch + + + > NX no more commands to process + + + `); + }); +}); diff --git a/e2e/watch/src/watch.spec.ts b/e2e/watch/src/watch.spec.ts new file mode 100644 index 0000000000..397c4fdf84 --- /dev/null +++ b/e2e/watch/src/watch.spec.ts @@ -0,0 +1,274 @@ +import { Fixture, normalizeEnvironment, wait } from "@lerna/e2e-utils"; +import { createFile } from "fs-extra"; + +expect.addSnapshotSerializer({ + serialize(str) { + return normalizeEnvironment(str); + }, + test(val) { + return val != null && typeof val === "string"; + }, +}); + +describe("lerna-watch", () => { + let fixture: Fixture; + + beforeEach(async () => { + fixture = await Fixture.create({ + e2eRoot: process.env.E2E_ROOT, + name: "lerna-watch", + packageManager: "npm", + initializeGit: true, + runLernaInit: true, + installDependencies: true, + }); + + await fixture.lerna("create package-a -y"); + await fixture.lerna("create package-b --dependencies package-a -y"); + await fixture.lerna("create package-c -y"); + await fixture.updateJson("packages/package-c/package.json", (json) => ({ + ...json, + name: "@scope/package-c", + })); + + await fixture.createInitialGitCommit(); + }); + + afterAll(() => fixture.destroy()); + + it("should watch all packages by default", async () => { + const getWatchResult = await fixture.lernaWatch('-- "echo watch triggered"'); + + await createFile(fixture.getWorkspacePath("packages/package-a/my-file.txt")); + await wait(200); + + await createFile(fixture.getWorkspacePath("packages/package-b/my-file.txt")); + await wait(200); + + await createFile(fixture.getWorkspacePath("packages/package-c/my-file.txt")); + await wait(200); + + const output = await getWatchResult(); + + expect(output.combinedOutput).toMatchInlineSnapshot(` + lerna notice cli v999.9.9-e2e.0 + lerna verb rootPath /tmp/lerna-e2e/lerna-watch/lerna-workspace + lerna info watch Executing command "echo watch triggered" on changes in 3 packages. + + > NX running with args: {"command":"echo watch triggered","projectNameEnvName":"LERNA_PACKAGE_NAME","fileChangesEnvName":"LERNA_FILE_CHANGES","includeDependentProjects":false,"projects":["package-a","package-b","@scope/package-c"],"verbose":true} + + + > NX starting watch process + + + > NX watch process waiting... + + + > NX about to run commands with these environments: [{"LERNA_PACKAGE_NAME":"","LERNA_FILE_CHANGES":"packages/package-a/my-file.txt"}] + + watch triggered + + > NX running complete, processing the next batch + + + > NX no more commands to process + + + > NX about to run commands with these environments: [{"LERNA_PACKAGE_NAME":"","LERNA_FILE_CHANGES":"packages/package-b/my-file.txt"}] + + watch triggered + + > NX running complete, processing the next batch + + + > NX no more commands to process + + + > NX about to run commands with these environments: [{"LERNA_PACKAGE_NAME":"","LERNA_FILE_CHANGES":"packages/package-c/my-file.txt"}] + + watch triggered + + > NX running complete, processing the next batch + + + > NX no more commands to process + + + `); + }); + + describe("with --scope", () => { + it("should watch only specified packages", async () => { + const getWatchResult = await fixture.lernaWatch( + '--scope="package-a" --scope="@scope/package-c" -- "echo watch triggered"' + ); + + await createFile(fixture.getWorkspacePath("packages/package-a/my-file.txt")); + await wait(200); + + await createFile(fixture.getWorkspacePath("packages/package-b/my-file.txt")); + await wait(200); + + await createFile(fixture.getWorkspacePath("packages/package-c/my-file.txt")); + await wait(200); + + const output = await getWatchResult(); + + expect(output.combinedOutput).toMatchInlineSnapshot(` + lerna notice cli v999.9.9-e2e.0 + lerna verb rootPath /tmp/lerna-e2e/lerna-watch/lerna-workspace + lerna notice filter including ["package-a","@scope/package-c"] + lerna info filter [ 'package-a', '@scope/package-c' ] + lerna info watch Executing command "echo watch triggered" on changes in 2 packages. + + > NX running with args: {"command":"echo watch triggered","projectNameEnvName":"LERNA_PACKAGE_NAME","fileChangesEnvName":"LERNA_FILE_CHANGES","includeDependentProjects":false,"projects":["package-a","@scope/package-c"],"verbose":true} + + + > NX starting watch process + + + > NX watch process waiting... + + + > NX about to run commands with these environments: [{"LERNA_PACKAGE_NAME":"","LERNA_FILE_CHANGES":"packages/package-a/my-file.txt"}] + + watch triggered + + > NX running complete, processing the next batch + + + > NX no more commands to process + + + > NX about to run commands with these environments: [{"LERNA_PACKAGE_NAME":"","LERNA_FILE_CHANGES":"packages/package-c/my-file.txt"}] + + watch triggered + + > NX running complete, processing the next batch + + + > NX no more commands to process + + + `); + }); + describe("and --include-dependencies", () => { + it("should watch one package and its dependencies", async () => { + const getWatchResult = await fixture.lernaWatch( + '--scope="package-b" --include-dependencies -- "echo watch triggered"' + ); + + await createFile(fixture.getWorkspacePath("packages/package-a/my-file.txt")); + await wait(200); + + await createFile(fixture.getWorkspacePath("packages/package-b/my-file.txt")); + await wait(200); + + await createFile(fixture.getWorkspacePath("packages/package-c/my-file.txt")); + await wait(200); + + const output = await getWatchResult(); + + expect(output.combinedOutput).toMatchInlineSnapshot(` + lerna notice cli v999.9.9-e2e.0 + lerna verb rootPath /tmp/lerna-e2e/lerna-watch/lerna-workspace + lerna notice filter including "package-b" + lerna notice filter including dependencies + lerna info filter [ 'package-b' ] + lerna info watch Executing command "echo watch triggered" on changes in 2 packages. + + > NX running with args: {"command":"echo watch triggered","projectNameEnvName":"LERNA_PACKAGE_NAME","fileChangesEnvName":"LERNA_FILE_CHANGES","includeDependentProjects":false,"projects":["package-b","package-a"],"verbose":true} + + + > NX starting watch process + + + > NX watch process waiting... + + + > NX about to run commands with these environments: [{"LERNA_PACKAGE_NAME":"","LERNA_FILE_CHANGES":"packages/package-a/my-file.txt"}] + + watch triggered + + > NX running complete, processing the next batch + + + > NX no more commands to process + + + > NX about to run commands with these environments: [{"LERNA_PACKAGE_NAME":"","LERNA_FILE_CHANGES":"packages/package-b/my-file.txt"}] + + watch triggered + + > NX running complete, processing the next batch + + + > NX no more commands to process + + + `); + }); + }); + }); + + it("should replace package name and changed file names", async () => { + const getWatchResult = await fixture.lernaWatch("-- echo \\$LERNA_PACKAGE_NAME: \\$LERNA_FILE_CHANGES"); + + await createFile(fixture.getWorkspacePath("packages/package-a/my-file.txt")); + await wait(200); + + await createFile(fixture.getWorkspacePath("packages/package-b/my-file.txt")); + await wait(200); + + await createFile(fixture.getWorkspacePath("packages/package-c/my-file.txt")); + await wait(200); + + const output = await getWatchResult(); + + expect(output.combinedOutput).toMatchInlineSnapshot(` + lerna notice cli v999.9.9-e2e.0 + lerna verb rootPath /tmp/lerna-e2e/lerna-watch/lerna-workspace + lerna info watch Executing command "echo $LERNA_PACKAGE_NAME: $LERNA_FILE_CHANGES" on changes in 3 packages. + + > NX running with args: {"command":"echo $LERNA_PACKAGE_NAME: $LERNA_FILE_CHANGES","projectNameEnvName":"LERNA_PACKAGE_NAME","fileChangesEnvName":"LERNA_FILE_CHANGES","includeDependentProjects":false,"projects":["package-a","package-b","@scope/package-c"],"verbose":true} + + + > NX starting watch process + + + > NX watch process waiting... + + + > NX about to run commands with these environments: [{"LERNA_PACKAGE_NAME":"package-a","LERNA_FILE_CHANGES":"packages/package-a/my-file.txt"}] + + package-a: packages/package-a/my-file.txt + + > NX running complete, processing the next batch + + + > NX no more commands to process + + + > NX about to run commands with these environments: [{"LERNA_PACKAGE_NAME":"package-b","LERNA_FILE_CHANGES":"packages/package-b/my-file.txt"}] + + package-b: packages/package-b/my-file.txt + + > NX running complete, processing the next batch + + + > NX no more commands to process + + + > NX about to run commands with these environments: [{"LERNA_PACKAGE_NAME":"@scope/package-c","LERNA_FILE_CHANGES":"packages/package-c/my-file.txt"}] + + @scope/package-c: packages/package-c/my-file.txt + + > NX running complete, processing the next batch + + + > NX no more commands to process + + + `); + }); +}); diff --git a/e2e/watch/tsconfig.json b/e2e/watch/tsconfig.json new file mode 100644 index 0000000000..19b9eece4d --- /dev/null +++ b/e2e/watch/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "module": "commonjs" + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/e2e/watch/tsconfig.lib.json b/e2e/watch/tsconfig.lib.json new file mode 100644 index 0000000000..33eca2c2cd --- /dev/null +++ b/e2e/watch/tsconfig.lib.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "declaration": true, + "types": ["node"] + }, + "include": ["src/**/*.ts"], + "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] +} diff --git a/e2e/watch/tsconfig.spec.json b/e2e/watch/tsconfig.spec.json new file mode 100644 index 0000000000..3feb815215 --- /dev/null +++ b/e2e/watch/tsconfig.spec.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts", "src/test-setup.ts"] +} diff --git a/libs/e2e-utils/src/index.ts b/libs/e2e-utils/src/index.ts index 5fa3d0ab32..4f933e9458 100644 --- a/libs/e2e-utils/src/index.ts +++ b/libs/e2e-utils/src/index.ts @@ -1,2 +1,3 @@ export * from "./lib/fixture"; export * from "./lib/snapshot-serializer-utils"; +export * from "./lib/wait"; diff --git a/libs/e2e-utils/src/lib/fixture.ts b/libs/e2e-utils/src/lib/fixture.ts index 76cc7a4fc8..5484aa38bb 100644 --- a/libs/e2e-utils/src/lib/fixture.ts +++ b/libs/e2e-utils/src/lib/fixture.ts @@ -273,6 +273,68 @@ export class Fixture { } } + async lernaWatch(inputArgs: string): Promise<(timeoutMs?: number) => Promise> { + return new Promise((resolve, reject) => { + const command = `npx --offline --no -c 'lerna watch --verbose ${inputArgs}'`; + + let stdout = ""; + let stderr = ""; + let combinedOutput = ""; + let error: Error | null = null; + + const createResult = (): RunCommandResult => ({ + stdout: stripConsoleColors(stdout), + stderr: stripConsoleColors(stderr), + combinedOutput: stripConsoleColors(combinedOutput), + }); + + const childProcess = spawn(command, { + shell: true, + cwd: this.fixtureWorkspacePath, + env: { + ...process.env, + FORCE_COLOR: "false", + }, + }); + + childProcess.stdout.setEncoding("utf8"); + childProcess.stdout.on("data", (chunk) => { + stdout += chunk; + combinedOutput += chunk; + + if (chunk.toString().trim().includes("watch process waiting")) { + resolve( + (timeoutMs = 6000) => + new Promise((resolve) => { + setTimeout(() => { + childProcess.kill(); + resolve(createResult()); + }, timeoutMs); + }) + ); + } + }); + + childProcess.stderr.setEncoding("utf8"); + childProcess.stderr.on("data", (chunk) => { + stderr += chunk; + combinedOutput += chunk; + }); + + childProcess.on("error", (err) => { + error = err; + }); + + childProcess.on("close", () => { + if (error) { + reject(error); + } else if (stderr.includes("lerna ERR!")) { + reject(new Error(stderr)); + } + }); + }); + } + async addNxJsonToWorkspace(): Promise { writeJsonFile(this.getWorkspacePath("nx.json"), { extends: "nx/presets/npm.json", diff --git a/libs/e2e-utils/src/lib/wait.ts b/libs/e2e-utils/src/lib/wait.ts new file mode 100644 index 0000000000..3b7662bc39 --- /dev/null +++ b/libs/e2e-utils/src/lib/wait.ts @@ -0,0 +1 @@ +export const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); diff --git a/package-lock.json b/package-lock.json index 6db8ca9b4d..f34c8ca9c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -84,12 +84,12 @@ }, "devDependencies": { "@lerna-test/helpers": "file:helpers", - "@nrwl/devkit": "15.4.1", - "@nrwl/eslint-plugin-nx": "15.4.1", - "@nrwl/jest": "15.4.1", - "@nrwl/js": "15.4.1", + "@nrwl/devkit": "15.4.2", + "@nrwl/eslint-plugin-nx": "15.4.2", + "@nrwl/jest": "15.4.2", + "@nrwl/js": "15.4.2", "@nrwl/nx-cloud": "15.0.2", - "@nrwl/nx-plugin": "15.4.1", + "@nrwl/nx-plugin": "15.4.2", "@swc-node/register": "^1.4.2", "@swc/cli": "~0.1.55", "@swc/core": "^1.2.173", @@ -122,7 +122,7 @@ "node-jq": "^2.3.3", "normalize-newline": "^3.0.0", "normalize-path": "^3.0.0", - "nx": "15.4.1", + "nx": "15.4.2", "path-key": "^3.1.1", "prettier": "^2.2.1", "tacks": "1.2.6", @@ -433,7 +433,7 @@ "@lerna/run-topologically": "file:../../utils/run-topologically", "@lerna/temp-write": "file:../../utils/temp-write", "@lerna/validation-error": "file:../../core/validation-error", - "@nrwl/devkit": ">=14.8.6 < 16", + "@nrwl/devkit": ">=15.4.2 < 16", "chalk": "^4.1.0", "dedent": "^0.7.0", "load-json-file": "^6.2.0", @@ -553,6 +553,7 @@ "@lerna/create": "file:../../commands/create", "@lerna/diff": "file:../../commands/diff", "@lerna/exec": "file:../../commands/exec", + "@lerna/filter-options": "file:../filter-options", "@lerna/import": "file:../../commands/import", "@lerna/info": "file:../../commands/info", "@lerna/init": "file:../../commands/init", @@ -560,12 +561,13 @@ "@lerna/list": "file:../../commands/list", "@lerna/publish": "file:../../commands/publish", "@lerna/run": "file:../../commands/run", + "@lerna/validation-error": "file:../validation-error", "@lerna/version": "file:../../commands/version", - "@nrwl/devkit": ">=14.8.6 < 16", + "@nrwl/devkit": ">=15.4.2 < 16", "import-local": "^3.0.2", "inquirer": "^8.2.4", "npmlog": "^6.0.2", - "nx": ">=14.8.6 < 16", + "nx": ">=15.4.2 < 16", "typescript": "^3 || ^4" }, "bin": { @@ -2949,17 +2951,17 @@ } }, "node_modules/@nrwl/cli": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/cli/-/cli-15.4.1.tgz", - "integrity": "sha512-n/bhYH/nT+9k0otYgTX2Up3oPzk841NwUzxZrLHKklJkzPVAGuTOOcKF8yuBhzAnDdpZAmU3z+8YlbdtjoHb9Q==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/cli/-/cli-15.4.2.tgz", + "integrity": "sha512-k/sGhqHhXsZakJxaWLmbyDJkQd/klqBEBChax3IHXAgIO9kG0lVwXHzENRqbfw3Z8TdKEZQ4IFwBJt9Dao6bCg==", "dependencies": { - "nx": "15.4.1" + "nx": "15.4.2" } }, "node_modules/@nrwl/devkit": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-15.4.1.tgz", - "integrity": "sha512-6AWWXyUpoqWkVARgUeARSmFanvgqlb81GN8SBwUQhezTbalOPmi0TsUN6n7MHAc611MAFE9eZBd+29UM+sFXeg==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-15.4.2.tgz", + "integrity": "sha512-dg+2xF+RAWCGF9eUoIa1NRSQqO4s3goFb3XvT0Xw7V91To6XC1NL7YIcYcsdphdYcOSXs4K4MXzd/oZAEZFZ1A==", "dependencies": { "@phenomnomnominal/tsquery": "4.1.1", "ejs": "^3.1.7", @@ -2972,12 +2974,12 @@ } }, "node_modules/@nrwl/eslint-plugin-nx": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/eslint-plugin-nx/-/eslint-plugin-nx-15.4.1.tgz", - "integrity": "sha512-8EMTxLBtff8pR0MKdgDn8UAiSLuwtpff8rzAUHzZP46WcNeJPKFpUH1PWpSD9y00+Hjx5Kla3ydqw5Efjul39A==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/eslint-plugin-nx/-/eslint-plugin-nx-15.4.2.tgz", + "integrity": "sha512-5Et+G1ZvIhk4KrcqpxKUqncXjP2ozygcArMk20C/TBcU/NLJewDdY7k/9daXs1Dp14CoSqhyDI7tV9DVyrsvCg==", "dev": true, "dependencies": { - "@nrwl/devkit": "15.4.1", + "@nrwl/devkit": "15.4.2", "@typescript-eslint/utils": "^5.36.1", "chalk": "4.1.0", "confusing-browser-globals": "^1.0.9", @@ -2994,14 +2996,14 @@ } }, "node_modules/@nrwl/jest": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/jest/-/jest-15.4.1.tgz", - "integrity": "sha512-mwHFL1BQvDC1mbqSd9se7li5RzwPmDTHx6PQSeMFD86+0WhwgYee4GqFDvhF+HdRhjna3KELipQNKneOwhhhpg==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/jest/-/jest-15.4.2.tgz", + "integrity": "sha512-4NL7RUMR+lkVQgJU3MSMDY0GdRjfWCwFPrhhcLi6+OFegNYtvgyHXYM3u5PvQupfChxYk8gc2c9eVunwU3B1hQ==", "dev": true, "dependencies": { "@jest/reporters": "28.1.1", "@jest/test-result": "28.1.1", - "@nrwl/devkit": "15.4.1", + "@nrwl/devkit": "15.4.2", "@phenomnomnominal/tsquery": "4.1.1", "chalk": "4.1.0", "dotenv": "~10.0.0", @@ -3149,14 +3151,14 @@ } }, "node_modules/@nrwl/js": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/js/-/js-15.4.1.tgz", - "integrity": "sha512-qsb720YFTnzTqB+lDnlRpHRlf/UrAKiXanRpOMqaOo9x2tMhSSiJcXuirq418SdEpBop/+0FIKBor5cPVFQbqg==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/js/-/js-15.4.2.tgz", + "integrity": "sha512-L/uBjbuHRf3iylrczcFruVZDLgOfBHnHcoYAa9qBcEn3XuSGJYzxrBetO+MSobMTbUAzmysPdT2rj1v6Q4Qi8A==", "dev": true, "dependencies": { - "@nrwl/devkit": "15.4.1", - "@nrwl/linter": "15.4.1", - "@nrwl/workspace": "15.4.1", + "@nrwl/devkit": "15.4.2", + "@nrwl/linter": "15.4.2", + "@nrwl/workspace": "15.4.2", "chalk": "4.1.0", "fast-glob": "3.2.7", "fs-extra": "^10.1.0", @@ -3182,12 +3184,12 @@ } }, "node_modules/@nrwl/linter": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/linter/-/linter-15.4.1.tgz", - "integrity": "sha512-bkixkG/OsSrfVAySpId7U5y34VDkpGccp0etvrqfW4SlJZpRu4u11GIKRdyJrJ8uki7m4rtK1lxi3h2KIhxeDw==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/linter/-/linter-15.4.2.tgz", + "integrity": "sha512-S5gSzqxTRLLzTOE5mY6FOu6MYC2v355lI0zyK02RLx29XoFrnggh74QaGJDZAVwqXvQHOXXBJwo6hXWosNn3/g==", "dev": true, "dependencies": { - "@nrwl/devkit": "15.4.1", + "@nrwl/devkit": "15.4.2", "@phenomnomnominal/tsquery": "4.1.1", "tmp": "~0.2.1", "tslib": "^2.3.0" @@ -3244,15 +3246,15 @@ } }, "node_modules/@nrwl/nx-plugin": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/nx-plugin/-/nx-plugin-15.4.1.tgz", - "integrity": "sha512-N7Da00HshKhgr29Unp1ir6QDK01o6jtvPdgNbxI0joslK8SEbCjP6unYR4UJeouAjY9dEN8Y8ihf5DRzT0i0tw==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/nx-plugin/-/nx-plugin-15.4.2.tgz", + "integrity": "sha512-WObYu+dEl8UZurLuGrtAY/qwxm5UstZhE2r5gb3CEqT3cWjpXas0HWNgbJTxdqhMLXU7GqR60tZl9ahxIim6gg==", "dev": true, "dependencies": { - "@nrwl/devkit": "15.4.1", - "@nrwl/jest": "15.4.1", - "@nrwl/js": "15.4.1", - "@nrwl/linter": "15.4.1", + "@nrwl/devkit": "15.4.2", + "@nrwl/jest": "15.4.2", + "@nrwl/js": "15.4.2", + "@nrwl/linter": "15.4.2", "dotenv": "~10.0.0", "fs-extra": "^10.1.0", "tslib": "^2.3.0" @@ -3273,24 +3275,24 @@ } }, "node_modules/@nrwl/tao": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-15.4.1.tgz", - "integrity": "sha512-WPCvzr1kTPcEN4suTQs0CJ4OHMszatR+kD7j2inLyZKz3sltyw2HiancrWpHKPgAMfQNyjHezpjlBFTgZeT3dw==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-15.4.2.tgz", + "integrity": "sha512-c/hYhWMjEBvucO9cGL2h2lqH7f+4gb8DJJiuNRPwfvF+sQITLXpl9wASHlpG2unDrtnLjGFo73u5XUUqGiSKvA==", "dependencies": { - "nx": "15.4.1" + "nx": "15.4.2" }, "bin": { "tao": "index.js" } }, "node_modules/@nrwl/workspace": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/workspace/-/workspace-15.4.1.tgz", - "integrity": "sha512-OL993pwsMBT5dYOYhuRWeoLIlfzHFsRBEBeNZWJKz5fKQq5wbu4F3MjfGXLuWTG8ybk+g/RsUi7ahzTep/GMbQ==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/workspace/-/workspace-15.4.2.tgz", + "integrity": "sha512-5CgLiDeQnkaEy/kXv+Ba678dNfkKx2pDOrpiO2ZfT8MMYbrhOOKQ1xlXcUuC95YN0nMCKii+sApB/9R1BiKzyw==", "dev": true, "dependencies": { - "@nrwl/devkit": "15.4.1", - "@nrwl/linter": "15.4.1", + "@nrwl/devkit": "15.4.2", + "@nrwl/linter": "15.4.2", "@parcel/watcher": "2.0.4", "chalk": "4.1.0", "chokidar": "^3.5.1", @@ -3306,7 +3308,7 @@ "jsonc-parser": "3.2.0", "minimatch": "3.0.5", "npm-run-path": "^4.0.1", - "nx": "15.4.1", + "nx": "15.4.2", "open": "^8.4.0", "rxjs": "^6.5.4", "semver": "7.3.4", @@ -14566,13 +14568,13 @@ "dev": true }, "node_modules/nx": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/nx/-/nx-15.4.1.tgz", - "integrity": "sha512-BQXxlUZhO3QsrGDsHFYBH8ncrauaTkGE5gW5TpHVZqlrqldhDMVxg+lGZwnj+hJPdW5BgO3rc1OGKAJlwkxELg==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/nx/-/nx-15.4.2.tgz", + "integrity": "sha512-np8eJfiBy2I8RZOWCKHr1oeUMHdqLQc7V6ihrzEQe2ZYUl9CSibtKvx0v8YGToHj/vYCiolRPhliFV5sFxgWlg==", "hasInstallScript": true, "dependencies": { - "@nrwl/cli": "15.4.1", - "@nrwl/tao": "15.4.1", + "@nrwl/cli": "15.4.2", + "@nrwl/tao": "15.4.2", "@parcel/watcher": "2.0.4", "@yarnpkg/lockfile": "^1.1.0", "@yarnpkg/parsers": "^3.0.0-rc.18", @@ -20928,7 +20930,7 @@ "@lerna/run-topologically": "file:../../utils/run-topologically", "@lerna/temp-write": "file:../../utils/temp-write", "@lerna/validation-error": "file:../../core/validation-error", - "@nrwl/devkit": ">=14.8.6 < 16", + "@nrwl/devkit": ">=15.4.2 < 16", "chalk": "^4.1.0", "dedent": "^0.7.0", "load-json-file": "^6.2.0", @@ -21229,17 +21231,17 @@ } }, "@nrwl/cli": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/cli/-/cli-15.4.1.tgz", - "integrity": "sha512-n/bhYH/nT+9k0otYgTX2Up3oPzk841NwUzxZrLHKklJkzPVAGuTOOcKF8yuBhzAnDdpZAmU3z+8YlbdtjoHb9Q==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/cli/-/cli-15.4.2.tgz", + "integrity": "sha512-k/sGhqHhXsZakJxaWLmbyDJkQd/klqBEBChax3IHXAgIO9kG0lVwXHzENRqbfw3Z8TdKEZQ4IFwBJt9Dao6bCg==", "requires": { - "nx": "15.4.1" + "nx": "15.4.2" } }, "@nrwl/devkit": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-15.4.1.tgz", - "integrity": "sha512-6AWWXyUpoqWkVARgUeARSmFanvgqlb81GN8SBwUQhezTbalOPmi0TsUN6n7MHAc611MAFE9eZBd+29UM+sFXeg==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-15.4.2.tgz", + "integrity": "sha512-dg+2xF+RAWCGF9eUoIa1NRSQqO4s3goFb3XvT0Xw7V91To6XC1NL7YIcYcsdphdYcOSXs4K4MXzd/oZAEZFZ1A==", "requires": { "@phenomnomnominal/tsquery": "4.1.1", "ejs": "^3.1.7", @@ -21249,12 +21251,12 @@ } }, "@nrwl/eslint-plugin-nx": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/eslint-plugin-nx/-/eslint-plugin-nx-15.4.1.tgz", - "integrity": "sha512-8EMTxLBtff8pR0MKdgDn8UAiSLuwtpff8rzAUHzZP46WcNeJPKFpUH1PWpSD9y00+Hjx5Kla3ydqw5Efjul39A==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/eslint-plugin-nx/-/eslint-plugin-nx-15.4.2.tgz", + "integrity": "sha512-5Et+G1ZvIhk4KrcqpxKUqncXjP2ozygcArMk20C/TBcU/NLJewDdY7k/9daXs1Dp14CoSqhyDI7tV9DVyrsvCg==", "dev": true, "requires": { - "@nrwl/devkit": "15.4.1", + "@nrwl/devkit": "15.4.2", "@typescript-eslint/utils": "^5.36.1", "chalk": "4.1.0", "confusing-browser-globals": "^1.0.9", @@ -21262,14 +21264,14 @@ } }, "@nrwl/jest": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/jest/-/jest-15.4.1.tgz", - "integrity": "sha512-mwHFL1BQvDC1mbqSd9se7li5RzwPmDTHx6PQSeMFD86+0WhwgYee4GqFDvhF+HdRhjna3KELipQNKneOwhhhpg==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/jest/-/jest-15.4.2.tgz", + "integrity": "sha512-4NL7RUMR+lkVQgJU3MSMDY0GdRjfWCwFPrhhcLi6+OFegNYtvgyHXYM3u5PvQupfChxYk8gc2c9eVunwU3B1hQ==", "dev": true, "requires": { "@jest/reporters": "28.1.1", "@jest/test-result": "28.1.1", - "@nrwl/devkit": "15.4.1", + "@nrwl/devkit": "15.4.2", "@phenomnomnominal/tsquery": "4.1.1", "chalk": "4.1.0", "dotenv": "~10.0.0", @@ -21390,14 +21392,14 @@ } }, "@nrwl/js": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/js/-/js-15.4.1.tgz", - "integrity": "sha512-qsb720YFTnzTqB+lDnlRpHRlf/UrAKiXanRpOMqaOo9x2tMhSSiJcXuirq418SdEpBop/+0FIKBor5cPVFQbqg==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/js/-/js-15.4.2.tgz", + "integrity": "sha512-L/uBjbuHRf3iylrczcFruVZDLgOfBHnHcoYAa9qBcEn3XuSGJYzxrBetO+MSobMTbUAzmysPdT2rj1v6Q4Qi8A==", "dev": true, "requires": { - "@nrwl/devkit": "15.4.1", - "@nrwl/linter": "15.4.1", - "@nrwl/workspace": "15.4.1", + "@nrwl/devkit": "15.4.2", + "@nrwl/linter": "15.4.2", + "@nrwl/workspace": "15.4.2", "chalk": "4.1.0", "fast-glob": "3.2.7", "fs-extra": "^10.1.0", @@ -21422,12 +21424,12 @@ } }, "@nrwl/linter": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/linter/-/linter-15.4.1.tgz", - "integrity": "sha512-bkixkG/OsSrfVAySpId7U5y34VDkpGccp0etvrqfW4SlJZpRu4u11GIKRdyJrJ8uki7m4rtK1lxi3h2KIhxeDw==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/linter/-/linter-15.4.2.tgz", + "integrity": "sha512-S5gSzqxTRLLzTOE5mY6FOu6MYC2v355lI0zyK02RLx29XoFrnggh74QaGJDZAVwqXvQHOXXBJwo6hXWosNn3/g==", "dev": true, "requires": { - "@nrwl/devkit": "15.4.1", + "@nrwl/devkit": "15.4.2", "@phenomnomnominal/tsquery": "4.1.1", "tmp": "~0.2.1", "tslib": "^2.3.0" @@ -21469,15 +21471,15 @@ } }, "@nrwl/nx-plugin": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/nx-plugin/-/nx-plugin-15.4.1.tgz", - "integrity": "sha512-N7Da00HshKhgr29Unp1ir6QDK01o6jtvPdgNbxI0joslK8SEbCjP6unYR4UJeouAjY9dEN8Y8ihf5DRzT0i0tw==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/nx-plugin/-/nx-plugin-15.4.2.tgz", + "integrity": "sha512-WObYu+dEl8UZurLuGrtAY/qwxm5UstZhE2r5gb3CEqT3cWjpXas0HWNgbJTxdqhMLXU7GqR60tZl9ahxIim6gg==", "dev": true, "requires": { - "@nrwl/devkit": "15.4.1", - "@nrwl/jest": "15.4.1", - "@nrwl/js": "15.4.1", - "@nrwl/linter": "15.4.1", + "@nrwl/devkit": "15.4.2", + "@nrwl/jest": "15.4.2", + "@nrwl/js": "15.4.2", + "@nrwl/linter": "15.4.2", "dotenv": "~10.0.0", "fs-extra": "^10.1.0", "tslib": "^2.3.0" @@ -21497,21 +21499,21 @@ } }, "@nrwl/tao": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-15.4.1.tgz", - "integrity": "sha512-WPCvzr1kTPcEN4suTQs0CJ4OHMszatR+kD7j2inLyZKz3sltyw2HiancrWpHKPgAMfQNyjHezpjlBFTgZeT3dw==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-15.4.2.tgz", + "integrity": "sha512-c/hYhWMjEBvucO9cGL2h2lqH7f+4gb8DJJiuNRPwfvF+sQITLXpl9wASHlpG2unDrtnLjGFo73u5XUUqGiSKvA==", "requires": { - "nx": "15.4.1" + "nx": "15.4.2" } }, "@nrwl/workspace": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@nrwl/workspace/-/workspace-15.4.1.tgz", - "integrity": "sha512-OL993pwsMBT5dYOYhuRWeoLIlfzHFsRBEBeNZWJKz5fKQq5wbu4F3MjfGXLuWTG8ybk+g/RsUi7ahzTep/GMbQ==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/workspace/-/workspace-15.4.2.tgz", + "integrity": "sha512-5CgLiDeQnkaEy/kXv+Ba678dNfkKx2pDOrpiO2ZfT8MMYbrhOOKQ1xlXcUuC95YN0nMCKii+sApB/9R1BiKzyw==", "dev": true, "requires": { - "@nrwl/devkit": "15.4.1", - "@nrwl/linter": "15.4.1", + "@nrwl/devkit": "15.4.2", + "@nrwl/linter": "15.4.2", "@parcel/watcher": "2.0.4", "chalk": "4.1.0", "chokidar": "^3.5.1", @@ -21527,7 +21529,7 @@ "jsonc-parser": "3.2.0", "minimatch": "3.0.5", "npm-run-path": "^4.0.1", - "nx": "15.4.1", + "nx": "15.4.2", "open": "^8.4.0", "rxjs": "^6.5.4", "semver": "7.3.4", @@ -29112,6 +29114,7 @@ "@lerna/create": "file:../../commands/create", "@lerna/diff": "file:../../commands/diff", "@lerna/exec": "file:../../commands/exec", + "@lerna/filter-options": "file:../filter-options", "@lerna/import": "file:../../commands/import", "@lerna/info": "file:../../commands/info", "@lerna/init": "file:../../commands/init", @@ -29119,12 +29122,13 @@ "@lerna/list": "file:../../commands/list", "@lerna/publish": "file:../../commands/publish", "@lerna/run": "file:../../commands/run", + "@lerna/validation-error": "file:../validation-error", "@lerna/version": "file:../../commands/version", - "@nrwl/devkit": ">=14.8.6 < 16", + "@nrwl/devkit": ">=15.4.2 < 16", "import-local": "^3.0.2", "inquirer": "^8.2.4", "npmlog": "^6.0.2", - "nx": ">=14.8.6 < 16", + "nx": ">=15.4.2 < 16", "typescript": "^3 || ^4" } }, @@ -30244,12 +30248,12 @@ "dev": true }, "nx": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/nx/-/nx-15.4.1.tgz", - "integrity": "sha512-BQXxlUZhO3QsrGDsHFYBH8ncrauaTkGE5gW5TpHVZqlrqldhDMVxg+lGZwnj+hJPdW5BgO3rc1OGKAJlwkxELg==", + "version": "15.4.2", + "resolved": "https://registry.npmjs.org/nx/-/nx-15.4.2.tgz", + "integrity": "sha512-np8eJfiBy2I8RZOWCKHr1oeUMHdqLQc7V6ihrzEQe2ZYUl9CSibtKvx0v8YGToHj/vYCiolRPhliFV5sFxgWlg==", "requires": { - "@nrwl/cli": "15.4.1", - "@nrwl/tao": "15.4.1", + "@nrwl/cli": "15.4.2", + "@nrwl/tao": "15.4.2", "@parcel/watcher": "2.0.4", "@yarnpkg/lockfile": "^1.1.0", "@yarnpkg/parsers": "^3.0.0-rc.18", diff --git a/package.json b/package.json index a77f27b8a5..de05763a01 100644 --- a/package.json +++ b/package.json @@ -114,12 +114,12 @@ }, "devDependencies": { "@lerna-test/helpers": "file:helpers", - "@nrwl/devkit": "15.4.1", - "@nrwl/eslint-plugin-nx": "15.4.1", - "@nrwl/jest": "15.4.1", - "@nrwl/js": "15.4.1", + "@nrwl/devkit": "15.4.2", + "@nrwl/eslint-plugin-nx": "15.4.2", + "@nrwl/jest": "15.4.2", + "@nrwl/js": "15.4.2", "@nrwl/nx-cloud": "15.0.2", - "@nrwl/nx-plugin": "15.4.1", + "@nrwl/nx-plugin": "15.4.2", "@swc-node/register": "^1.4.2", "@swc/cli": "~0.1.55", "@swc/core": "^1.2.173", @@ -152,7 +152,7 @@ "node-jq": "^2.3.3", "normalize-newline": "^3.0.0", "normalize-path": "^3.0.0", - "nx": "15.4.1", + "nx": "15.4.2", "path-key": "^3.1.1", "prettier": "^2.2.1", "tacks": "1.2.6",