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. 😅
Migrated plugin workspace to Nx version 16.8.1 This was a key Nx release that introduced the
as-provided
andderived
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:
app
andfunction
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 useas-provided
.as-provided
this should make the plugin compatible with those scenarios.e2e Changes:
--bundler=tsc
option instead of deprecated--buildable
LOCK_FILE_CHANGED
errors during e2e steps that installed new packages (eg.@nx/js:build
)CI
environment var for local e2e tests.ensureNxProject()
function does seem to runnpm install
at first as well aspnpm install
so the e2e project workspace contains bothpackage-lock.json
andpnpm-lock.yaml
files which is odd.npm
. So I'm not sure how the e2e runner determines ifnpm
orpnpm
gets used - either hard coded, or inferred from the e2e host project. Dont really care. 😅