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

fix(misc): add externalDependencies input to some plugins missing them #26291

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions packages/playwright/src/plugins/plugin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ describe('@nx/playwright/plugin', () => {
"inputs": [
"default",
"^production",
{
"externalDependencies": [
"@playwright/test",
],
},
],
"metadata": {
"description": "Runs Playwright Tests",
Expand All @@ -82,6 +87,11 @@ describe('@nx/playwright/plugin', () => {
"inputs": [
"default",
"^production",
{
"externalDependencies": [
"@playwright/test",
],
},
],
"metadata": {
"description": "Runs Playwright Tests in CI",
Expand Down Expand Up @@ -133,6 +143,11 @@ describe('@nx/playwright/plugin', () => {
"inputs": [
"default",
"^production",
{
"externalDependencies": [
"@playwright/test",
],
},
],
"metadata": {
"description": "Runs Playwright Tests",
Expand All @@ -157,6 +172,11 @@ describe('@nx/playwright/plugin', () => {
"inputs": [
"default",
"^production",
{
"externalDependencies": [
"@playwright/test",
],
},
],
"metadata": {
"description": "Runs Playwright Tests in CI",
Expand Down Expand Up @@ -230,6 +250,11 @@ describe('@nx/playwright/plugin', () => {
"inputs": [
"default",
"^production",
{
"externalDependencies": [
"@playwright/test",
],
},
],
"metadata": {
"description": "Runs Playwright Tests in CI",
Expand All @@ -249,6 +274,11 @@ describe('@nx/playwright/plugin', () => {
"inputs": [
"default",
"^production",
{
"externalDependencies": [
"@playwright/test",
],
},
],
"metadata": {
"description": "Runs Playwright Tests in tests/run-me.spec.ts in CI",
Expand All @@ -271,6 +301,11 @@ describe('@nx/playwright/plugin', () => {
"inputs": [
"default",
"^production",
{
"externalDependencies": [
"@playwright/test",
],
},
],
"metadata": {
"description": "Runs Playwright Tests in tests/run-me-2.spec.ts in CI",
Expand Down
16 changes: 10 additions & 6 deletions packages/playwright/src/plugins/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,25 @@ async function buildPlaywrightTargets(
targets[options.targetName] = {
...baseTargetConfig,
cache: true,
inputs:
'production' in namedInputs
inputs: [
...('production' in namedInputs
? ['default', '^production']
: ['default', '^default'],
: ['default', '^default']),
{ externalDependencies: ['@playwright/test'] },
],
outputs: getOutputs(projectRoot, playwrightConfig),
};

if (options.ciTargetName) {
const ciBaseTargetConfig: TargetConfiguration = {
...baseTargetConfig,
cache: true,
inputs:
'production' in namedInputs
inputs: [
...('production' in namedInputs
? ['default', '^production']
: ['default', '^default'],
: ['default', '^default']),
{ externalDependencies: ['@playwright/test'] },
],
outputs: getOutputs(projectRoot, playwrightConfig),
};

Expand Down
20 changes: 20 additions & 0 deletions packages/remix/src/plugins/__snapshots__/plugin.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ exports[`@nx/remix/plugin non-root project should create nodes 1`] = `
"inputs": [
"production",
"^production",
{
"externalDependencies": [
"@remix-run/dev",
],
},
],
"options": {
"cwd": "my-app",
Expand Down Expand Up @@ -54,6 +59,11 @@ exports[`@nx/remix/plugin non-root project should create nodes 1`] = `
"inputs": [
"production",
"^production",
{
"externalDependencies": [
"typescript",
],
},
],
"options": {
"cwd": "my-app",
Expand All @@ -80,6 +90,11 @@ exports[`@nx/remix/plugin root project should create nodes 1`] = `
"inputs": [
"production",
"^production",
{
"externalDependencies": [
"@remix-run/dev",
],
},
],
"options": {
"cwd": ".",
Expand Down Expand Up @@ -119,6 +134,11 @@ exports[`@nx/remix/plugin root project should create nodes 1`] = `
"inputs": [
"production",
"^production",
{
"externalDependencies": [
"typescript",
],
},
],
"options": {
"cwd": ".",
Expand Down
2 changes: 2 additions & 0 deletions packages/remix/src/plugins/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ function buildTarget(
...('production' in namedInputs
? ['production', '^production']
: ['default', '^default']),
{ externalDependencies: ['@remix-run/dev'] },
],
outputs: [serverBuildOutputPath, assetsBuildOutputPath],
command: 'remix build',
Expand Down Expand Up @@ -198,6 +199,7 @@ function typecheckTarget(
...('production' in namedInputs
? ['production', '^production']
: ['default', '^default']),
{ externalDependencies: ['typescript'] },
],
options: {
cwd: projectRoot,
Expand Down
10 changes: 10 additions & 0 deletions packages/rollup/src/plugins/__snapshots__/plugin.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ exports[`@nx/rollup/plugin non-root project should create nodes 1`] = `
"inputs": [
"production",
"^production",
{
"externalDependencies": [
"rollup",
],
},
],
"options": {
"cwd": "mylib",
Expand Down Expand Up @@ -45,6 +50,11 @@ exports[`@nx/rollup/plugin root project should create nodes 1`] = `
"inputs": [
"production",
"^production",
{
"externalDependencies": [
"rollup",
],
},
],
"options": {
"cwd": ".",
Expand Down
1 change: 1 addition & 0 deletions packages/rollup/src/plugins/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ async function buildRollupTarget(
...('production' in namedInputs
? ['production', '^production']
: ['default', '^default']),
{ externalDependencies: ['rollup'] },
],
outputs,
};
Expand Down