Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update plugin to minimum Nx v16.8.1 #205

Merged
merged 26 commits into from
Apr 1, 2024
Merged

Conversation

simondotm
Copy link
Owner

@simondotm simondotm commented Apr 1, 2024

Migrated plugin workspace to Nx version 16.8.1
This was a key Nx release that introduced the as-provided and derived concepts for project name/directory.

I wanted to start the plugin compatibility roadmap here rather than just jump to the latest Nx, since there may be plugin users still using Nx 16.x and I want to give those users incremental Nx version updates of the plugin.

Plugin Changes:

  • The plugin app and function generators now support the --projectNameAndRootFormat=[as-provided|derived] option, to match Nx's own plugins. This is only temporary until Nx 19, when all generators will use as-provided.
  • Since new Nx workspaces default to as-provided this should make the plugin compatible with those scenarios.

e2e Changes:

  • Split the e2e tests into smaller more maintainable modules
  • e2e js lib tests now use the --bundler=tsc option instead of deprecated--buildable
  • Nx e2e test runner seemed very unstable with this release, unless the Nx daemon is disabled.
    • Was seeing strange LOCK_FILE_CHANGED errors during e2e steps that installed new packages (eg. @nx/js:build)
    • Was seeing Nx complain that it couldnt find the newly generated projects in e2e tests
    • Solution was to set CI environment var for local e2e tests.
    • The e2e ensureNxProject() function does seem to run npm install at first as well as pnpm install so the e2e project workspace contains both package-lock.json and pnpm-lock.yaml files which is odd.
    • I experimented with later versions of Nx, and e2e tests seem to just use npm. So I'm not sure how the e2e runner determines if npm or pnpm gets used - either hard coded, or inferred from the e2e host project. Dont really care. 😅

@simondotm simondotm changed the title feat: Update plugin to minimum Nx v16 8.1 feat: Update plugin to minimum Nx v16.8.1 Apr 1, 2024
@simondotm simondotm merged commit cafd479 into main Apr 1, 2024
5 checks passed
@simondotm simondotm deleted the feat/update-nx-16-8.1 branch April 1, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant