Skip to content

Commit

Permalink
fix(misc): add externalDependencies input to some plugins missing them
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez committed May 31, 2024
1 parent 2cb7ecb commit f342917
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 6 deletions.
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

0 comments on commit f342917

Please sign in to comment.