Repository navigation
chore: upgrade nx to v24 - #291
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The inferred @nx/vitest targets ran from the project folder, breaking the workspace-relative paths the cli and cli-e2e tests rely on. Run them from the workspace root with --root <project>, matching the removed executor. Vitest 4 passes the suite as the second argument to beforeAll/afterAll and requires the first to be destructured.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Remove per-project ignoreDeprecations (inherited from tsconfig.base.json), the unused types pin, default-valued plugin options, affected.legacy, the nx-plugin test override the jest plugin already infers, ignore-file additions, and a test artifact that was committed by mistake. Restore the original lint/test targetDefaults.
❗❗❗ report generated by this PR ❗❗❗☕ Order Coffee ☕Date/Time: 2026-10-23 20:23
|
☕ Order Coffee ☕Date/Time: 2026-10-23 20:23
|
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First of a series of dependency-update PRs, starting with the tooling. This one moves the workspace from Nx 21.6.4 to Nx 24.0.0 using
nx migrate latestand its migration run (one commit per migration that made changes).What
nx migratebumpednx,@nx/*@nx/vitest)typescriptvitevitest,@vitest/coverage-v8jest/ts-jesttypescript-eslint@swc/core,@swc-node/register,verdacciowebpack,webpack-cli,webpack-dev-serverNotable changes
Executors → inferred targets (Nx 24 removed the executors)
lintis now inferred by@nx/eslint/plugin(eslint .per project) for all 5 projects.nx-plugin:testis inferred by@nx/jest/plugin.cli:test/cli-e2e:testare inferred by@nx/vitestwithtestMode: "run"(keeps the old run-once behaviour instead of watch mode locally). Both run from the workspace root with--root <project>, like the removed executor did, because the tests use workspace-relative paths.e2e/cli-e2e/vite.config.e2e.mtswas renamed tovite.config.mtsso the plugin picks it up.nx-plugin-integrationbuild/serve are inferred by@nx/webpack/plugin; options moved intowebpack.config.jsviaNxAppWebpackPlugin, and the removedcomposePlugins/withNx/withWebhelpers are gone.targetDefaultswere removed; the name-basedlint/testdefaults are unchanged.TypeScript 6
tsconfig.base.jsonpins the TS 5 defaults this repo relies on:strict: false(nx-plugin fails type checks otherwise),esModuleInterop: false(otherwise the published nx-plugin emit changes to requiretslib),noUncheckedSideEffectImports: false(the integration app's CSS import), plusignoreDeprecations: "6.0"forbaseUrl/moduleResolution: node. Projects that opted intostrictkeep it.Vitest 4 / Vite 8
poolOptions.threads.singleThread→maxWorkers: 1(kept default isolation;isolate: falseleakedvi.mock('node:fs')across files and broke cli tests).basicreporter →['default', { summary: false }].beforeAll/afterAllin the e2e setup now take the suite as the second argument (Vitest 4 requires a destructured first argument).nxViteTsPaths(removed in Nx 24) → nativeresolve.tsconfigPaths: true.Small fixes the upgrade required
nx-pluginbuilddependsOn: [{ target, projects: 'dependencies' }]→["^build"](old form no longer supported).nx-plugin-integration:testwaited for Nx's old dev-server log line, whichwebpack-cli serveno longer prints;awaitServeStdoutis nowwebpack compiled.nx-plugintarget generator spec wrote a target as a bare string; Nx 24 rejects that when reading project config, so the fixture now uses a{ executor }object (same assertion).nx.json:releaseTagPattern→releaseTag.pattern.Verification
Compared against a clean checkout of
main:lint: all 5 projects pass, 0 errors (warning counts unchanged).build:cli,nx-plugin,nx-plugin-integrationpass.dist/packages/cliis byte-identical tomain;nx-pluginonly gains a leading"use strict"(TS 6alwaysStrict); the webpack app emits the same files (minus the emptyassets/.gitkeep).test:cli74/74,nx-plugin12/12,nx-plugin-integration:test(serve + dry-run collect) passes.cli-e2e:testis covered by CI.Known
nx-pluginexecutor under Node 26 prints a harmless "Failed to load the ES module" warning before falling back.