diff --git a/e2e/qwik-nx-e2e/tests/application-basic-behavior.suite.ts b/e2e/qwik-nx-e2e/tests/application-basic-behavior.suite.ts index 342dfd80..17109146 100644 --- a/e2e/qwik-nx-e2e/tests/application-basic-behavior.suite.ts +++ b/e2e/qwik-nx-e2e/tests/application-basic-behavior.suite.ts @@ -250,7 +250,7 @@ async function checkPageResponses(host: string) { function getHostOutput(output: string, port: number): string | undefined { // extracts the host url from the output message // the reason it's done is because it can either be in these formats: - // http://localhost:4200 or https://127.0.0.1:4200 + // http://localhost:5173 or https://127.0.0.1:5173 const regexp = new RegExp( `Local:(?:\\s{3})(http(?:s)?:\\/\\/(?:.+):${port})` ); diff --git a/e2e/qwik-nx-e2e/tests/micro-frontends.spec.ts b/e2e/qwik-nx-e2e/tests/micro-frontends.spec.ts index 8dec40d9..193919f9 100644 --- a/e2e/qwik-nx-e2e/tests/micro-frontends.spec.ts +++ b/e2e/qwik-nx-e2e/tests/micro-frontends.spec.ts @@ -14,7 +14,7 @@ import { DEFAULT_E2E_TIMEOUT, } from '@qwikifiers/e2e/utils'; -const PORTS = [4200, 4201, 4202, 4203]; +const PORTS = [5173, 5174, 5175, 5175]; describe('Micro-frontends e2e', () => { let project: string, remote1: string, remote2: string; @@ -52,8 +52,8 @@ describe('Micro-frontends e2e', () => { const configFilePath = `apps/${project}/src/config/remotes.json`; expect(() => checkFilesExist(configFilePath)).not.toThrow(); const config = readJson(configFilePath); - expect(config[remote1]).toEqual('http://localhost:4201'); - expect(config[remote2]).toEqual('http://localhost:4202'); + expect(config[remote1]).toEqual('http://localhost:5174'); + expect(config[remote2]).toEqual('http://localhost:5175'); }, DEFAULT_E2E_TIMEOUT ); @@ -155,7 +155,7 @@ describe('Micro-frontends e2e', () => { async () => { const remote3 = uniq('qwik-nx'); await runNxCommandAsync( - `generate qwik-nx:remote ${remote3} --host=${project} --port=4203 --no-interactive` + `generate qwik-nx:remote ${remote3} --host=${project} --port=5176 --no-interactive` ); const result = await runNxCommandAsync(`build ${remote3}`); expect(result.stdout).toContain( @@ -214,10 +214,10 @@ async function runHostAndRemotes( const localhost = `${prefix}Local: http://localhost:${port}/`; return stripped.includes(ip) || stripped.includes(localhost); }; - invokedHost ||= includesInvokeMessage(hostName, 4200, false); - invokedRemote1 ||= includesInvokeMessage(remote1, 4201); - invokedRemote2 ||= includesInvokeMessage(remote2, 4202); - invokedRemote3 ||= !!remote3 && includesInvokeMessage(remote3, 4203); + invokedHost ||= includesInvokeMessage(hostName, 5173, false); + invokedRemote1 ||= includesInvokeMessage(remote1, 5174); + invokedRemote2 ||= includesInvokeMessage(remote2, 5175); + invokedRemote3 ||= !!remote3 && includesInvokeMessage(remote3, 5176); showedAllRemotesInvokedInfo ||= stripConsoleColors( output.replace(/\n|\s/g, '') @@ -307,10 +307,10 @@ async function previewHostAndRemotes( builtRemote3 ||= !!remote3 && includesBuiltMessage(remote3); // serve output - invokedHost ||= includesInvokeMessage(hostName, 4200, false); - invokedRemote1 ||= includesInvokeMessage(remote1, 4201); - invokedRemote2 ||= includesInvokeMessage(remote2, 4202); - invokedRemote3 ||= !!remote3 && includesInvokeMessage(remote3, 4203); + invokedHost ||= includesInvokeMessage(hostName, 5173, false); + invokedRemote1 ||= includesInvokeMessage(remote1, 5174); + invokedRemote2 ||= includesInvokeMessage(remote2, 5175); + invokedRemote3 ||= !!remote3 && includesInvokeMessage(remote3, 5176); showedAllRemotesInvokedInfo ||= stripConsoleColors( output.replace(/\n|\s/g, '') diff --git a/e2e/qwik-nx-e2e/tests/qwik-nx-cloudflare.spec.ts b/e2e/qwik-nx-e2e/tests/qwik-nx-cloudflare.spec.ts index 381d2178..04b2eb7f 100644 --- a/e2e/qwik-nx-e2e/tests/qwik-nx-cloudflare.spec.ts +++ b/e2e/qwik-nx-e2e/tests/qwik-nx-cloudflare.spec.ts @@ -13,7 +13,7 @@ import { DEFAULT_E2E_TIMEOUT, } from '@qwikifiers/e2e/utils'; -const CLOUDFLARE_PREVIEW_PORT = 4300; +const CLOUDFLARE_PREVIEW_PORT = 4173; describe('qwik nx cloudflare generator', () => { // Setting up individual workspaces per diff --git a/packages/qwik-nx/src/generators/application/__snapshots__/generator.spec.ts.snap b/packages/qwik-nx/src/generators/application/__snapshots__/generator.spec.ts.snap index ddcc9a26..09e117b6 100644 --- a/packages/qwik-nx/src/generators/application/__snapshots__/generator.spec.ts.snap +++ b/packages/qwik-nx/src/generators/application/__snapshots__/generator.spec.ts.snap @@ -46,7 +46,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "frontend-myapp:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -54,7 +54,7 @@ Object { "options": Object { "buildTarget": "frontend-myapp:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -114,7 +114,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "frontend-myapp:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -122,7 +122,7 @@ Object { "options": Object { "buildTarget": "frontend-myapp:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -182,7 +182,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "myapp:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -190,7 +190,7 @@ Object { "options": Object { "buildTarget": "myapp:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -250,7 +250,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "frontend-myapp:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -258,7 +258,7 @@ Object { "options": Object { "buildTarget": "frontend-myapp:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -318,7 +318,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "myapp:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -326,7 +326,7 @@ Object { "options": Object { "buildTarget": "myapp:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -386,7 +386,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "frontend-myapp:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -394,7 +394,7 @@ Object { "options": Object { "buildTarget": "frontend-myapp:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -486,7 +486,7 @@ exports[`qwik-nx generator should run successfully 2`] = ` \\"executor\\": \\"@nx/vite:preview-server\\", \\"options\\": { \\"buildTarget\\": \\"myapp:build\\", - \\"port\\": 4300 + \\"port\\": 4173 } }, \\"serve\\": { @@ -494,7 +494,7 @@ exports[`qwik-nx generator should run successfully 2`] = ` \\"options\\": { \\"buildTarget\\": \\"myapp:build.client\\", \\"mode\\": \\"ssr\\", - \\"port\\": 4200 + \\"port\\": 5173 } }, \\"serve.debug\\": { diff --git a/packages/qwik-nx/src/generators/application/schema.json b/packages/qwik-nx/src/generators/application/schema.json index 757b2565..47d05126 100644 --- a/packages/qwik-nx/src/generators/application/schema.json +++ b/packages/qwik-nx/src/generators/application/schema.json @@ -87,12 +87,12 @@ "devServerPort": { "type": "number", "description": "The port for the dev server of the app.", - "default": 4200 + "default": 5173 }, "previewServerPort": { "type": "number", "description": "The port for the preview server of the app.", - "default": 4300 + "default": 4173 } }, "required": ["name"] diff --git a/packages/qwik-nx/src/generators/application/utils/normalize-options.ts b/packages/qwik-nx/src/generators/application/utils/normalize-options.ts index 88bf9c98..b195a6ca 100644 --- a/packages/qwik-nx/src/generators/application/utils/normalize-options.ts +++ b/packages/qwik-nx/src/generators/application/utils/normalize-options.ts @@ -49,7 +49,7 @@ export function normalizeOptions( styleExtension, setupVitest: options.unitTestRunner === 'vitest', parsedTags, - devServerPort: options.devServerPort ?? 4200, - previewServerPort: options.previewServerPort ?? 4300, + devServerPort: options.devServerPort ?? 5173, + previewServerPort: options.previewServerPort ?? 4173, }; } diff --git a/packages/qwik-nx/src/generators/host/__snapshots__/generator.spec.ts.snap b/packages/qwik-nx/src/generators/host/__snapshots__/generator.spec.ts.snap index ae95f1ff..02c48e47 100644 --- a/packages/qwik-nx/src/generators/host/__snapshots__/generator.spec.ts.snap +++ b/packages/qwik-nx/src/generators/host/__snapshots__/generator.spec.ts.snap @@ -46,7 +46,7 @@ Object { "executor": "qwik-nx:micro-frontends-preview-server", "options": Object { "buildTarget": "frontend-myhostapp:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -54,7 +54,7 @@ Object { "options": Object { "buildTarget": "frontend-myhostapp:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -124,7 +124,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "frontend-remote1:build", - "port": 4201, + "port": 5174, }, }, "serve": Object { @@ -132,7 +132,7 @@ Object { "options": Object { "buildTarget": "frontend-remote1:build.client", "mode": "ssr", - "port": 4201, + "port": 5174, }, }, "serve.debug": Object { @@ -202,7 +202,7 @@ Object { "executor": "qwik-nx:micro-frontends-preview-server", "options": Object { "buildTarget": "frontend-myhostapp:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -210,7 +210,7 @@ Object { "options": Object { "buildTarget": "frontend-myhostapp:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -280,7 +280,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "frontend-remote1:build", - "port": 4201, + "port": 5174, }, }, "serve": Object { @@ -288,7 +288,7 @@ Object { "options": Object { "buildTarget": "frontend-remote1:build.client", "mode": "ssr", - "port": 4201, + "port": 5174, }, }, "serve.debug": Object { @@ -358,7 +358,7 @@ Object { "executor": "qwik-nx:micro-frontends-preview-server", "options": Object { "buildTarget": "myhostapp:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -366,7 +366,7 @@ Object { "options": Object { "buildTarget": "myhostapp:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -436,7 +436,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "remote1:build", - "port": 4201, + "port": 5174, }, }, "serve": Object { @@ -444,7 +444,7 @@ Object { "options": Object { "buildTarget": "remote1:build.client", "mode": "ssr", - "port": 4201, + "port": 5174, }, }, "serve.debug": Object { @@ -514,7 +514,7 @@ Object { "executor": "qwik-nx:micro-frontends-preview-server", "options": Object { "buildTarget": "frontend-myhostapp:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -522,7 +522,7 @@ Object { "options": Object { "buildTarget": "frontend-myhostapp:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -592,7 +592,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "frontend-remote1:build", - "port": 4201, + "port": 5174, }, }, "serve": Object { @@ -600,7 +600,7 @@ Object { "options": Object { "buildTarget": "frontend-remote1:build.client", "mode": "ssr", - "port": 4201, + "port": 5174, }, }, "serve.debug": Object { @@ -670,7 +670,7 @@ Object { "executor": "qwik-nx:micro-frontends-preview-server", "options": Object { "buildTarget": "myhostapp:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -678,7 +678,7 @@ Object { "options": Object { "buildTarget": "myhostapp:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -748,7 +748,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "remote1:build", - "port": 4201, + "port": 5174, }, }, "serve": Object { @@ -756,7 +756,7 @@ Object { "options": Object { "buildTarget": "remote1:build.client", "mode": "ssr", - "port": 4201, + "port": 5174, }, }, "serve.debug": Object { @@ -826,7 +826,7 @@ Object { "executor": "qwik-nx:micro-frontends-preview-server", "options": Object { "buildTarget": "frontend-myhostapp:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -834,7 +834,7 @@ Object { "options": Object { "buildTarget": "frontend-myhostapp:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -904,7 +904,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "frontend-remote1:build", - "port": 4201, + "port": 5174, }, }, "serve": Object { @@ -912,7 +912,7 @@ Object { "options": Object { "buildTarget": "frontend-remote1:build.client", "mode": "ssr", - "port": 4201, + "port": 5174, }, }, "serve.debug": Object { @@ -1070,7 +1070,7 @@ exports[`host generator should run successfully 3`] = ` \\"executor\\": \\"qwik-nx:micro-frontends-preview-server\\", \\"options\\": { \\"buildTarget\\": \\"myhostapp:build\\", - \\"port\\": 4300 + \\"port\\": 4173 } }, \\"test\\": { @@ -1086,7 +1086,7 @@ exports[`host generator should run successfully 3`] = ` \\"options\\": { \\"buildTarget\\": \\"myhostapp:build.client\\", \\"mode\\": \\"ssr\\", - \\"port\\": 4200 + \\"port\\": 5173 } }, \\"serve.debug\\": { @@ -1563,7 +1563,7 @@ exports[`host generator should run successfully 7`] = ` \\"executor\\": \\"@nx/vite:preview-server\\", \\"options\\": { \\"buildTarget\\": \\"remote1:build\\", - \\"port\\": 4201 + \\"port\\": 5174 } }, \\"test\\": { @@ -1579,7 +1579,7 @@ exports[`host generator should run successfully 7`] = ` \\"options\\": { \\"buildTarget\\": \\"remote1:build.client\\", \\"mode\\": \\"ssr\\", - \\"port\\": 4201 + \\"port\\": 5174 } }, \\"serve.debug\\": { @@ -1727,7 +1727,7 @@ exports[`host generator should run successfully 10`] = ` \\"executor\\": \\"@nx/vite:preview-server\\", \\"options\\": { \\"buildTarget\\": \\"remote2:build\\", - \\"port\\": 4202 + \\"port\\": 5175 } }, \\"test\\": { @@ -1743,7 +1743,7 @@ exports[`host generator should run successfully 10`] = ` \\"options\\": { \\"buildTarget\\": \\"remote2:build.client\\", \\"mode\\": \\"ssr\\", - \\"port\\": 4202 + \\"port\\": 5175 } }, \\"serve.debug\\": { diff --git a/packages/qwik-nx/src/generators/host/generator.spec.ts b/packages/qwik-nx/src/generators/host/generator.spec.ts index de228f74..e71dd4ce 100644 --- a/packages/qwik-nx/src/generators/host/generator.spec.ts +++ b/packages/qwik-nx/src/generators/host/generator.spec.ts @@ -23,8 +23,8 @@ describe('host generator', () => { expect(readJson(appTree, 'apps/myhostapp/src/config/remotes.json')).toEqual( { - remote1: 'http://localhost:4201', - remote2: 'http://localhost:4202', + remote1: 'http://localhost:5174', + remote2: 'http://localhost:5175', } ); diff --git a/packages/qwik-nx/src/generators/host/schema.json b/packages/qwik-nx/src/generators/host/schema.json index aa9de275..e16006e4 100644 --- a/packages/qwik-nx/src/generators/host/schema.json +++ b/packages/qwik-nx/src/generators/host/schema.json @@ -89,7 +89,7 @@ "port": { "type": "number", "description": "The port for the dev and preview servers of the app (they're the same by default in MF setup).", - "default": 4200 + "default": 5173 }, "remotes": { "type": "array", diff --git a/packages/qwik-nx/src/generators/preset/schema.json b/packages/qwik-nx/src/generators/preset/schema.json index 04fb1e35..72a5ea9e 100644 --- a/packages/qwik-nx/src/generators/preset/schema.json +++ b/packages/qwik-nx/src/generators/preset/schema.json @@ -74,12 +74,12 @@ "devServerPort": { "type": "number", "description": "The port for the dev server of the app.", - "default": 4200 + "default": 5173 }, "previewServerPort": { "type": "number", "description": "The port for the preview server of the app.", - "default": 4300 + "default": 4173 } }, "required": ["qwikAppName"] diff --git a/packages/qwik-nx/src/generators/remote/__snapshots__/generator.spec.ts.snap b/packages/qwik-nx/src/generators/remote/__snapshots__/generator.spec.ts.snap index 8e39560b..8cf6afd1 100644 --- a/packages/qwik-nx/src/generators/remote/__snapshots__/generator.spec.ts.snap +++ b/packages/qwik-nx/src/generators/remote/__snapshots__/generator.spec.ts.snap @@ -46,7 +46,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "frontend-myremote:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -54,7 +54,7 @@ Object { "options": Object { "buildTarget": "frontend-myremote:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -124,7 +124,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "frontend-myremote:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -132,7 +132,7 @@ Object { "options": Object { "buildTarget": "frontend-myremote:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -202,7 +202,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "myremote:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -210,7 +210,7 @@ Object { "options": Object { "buildTarget": "myremote:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -280,7 +280,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "frontend-myremote:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -288,7 +288,7 @@ Object { "options": Object { "buildTarget": "frontend-myremote:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -358,7 +358,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "myremote:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -366,7 +366,7 @@ Object { "options": Object { "buildTarget": "myremote:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -436,7 +436,7 @@ Object { "executor": "@nx/vite:preview-server", "options": Object { "buildTarget": "frontend-myremote:build", - "port": 4300, + "port": 4173, }, }, "serve": Object { @@ -444,7 +444,7 @@ Object { "options": Object { "buildTarget": "frontend-myremote:build.client", "mode": "ssr", - "port": 4200, + "port": 5173, }, }, "serve.debug": Object { @@ -554,7 +554,7 @@ exports[`remote generator should run successfully 2`] = ` \\"executor\\": \\"@nx/vite:preview-server\\", \\"options\\": { \\"buildTarget\\": \\"myremote:build\\", - \\"port\\": 4300 + \\"port\\": 4173 } }, \\"test\\": { @@ -570,7 +570,7 @@ exports[`remote generator should run successfully 2`] = ` \\"options\\": { \\"buildTarget\\": \\"myremote:build.client\\", \\"mode\\": \\"ssr\\", - \\"port\\": 4200 + \\"port\\": 5173 } }, \\"serve.debug\\": { diff --git a/packages/qwik-nx/src/generators/remote/schema.json b/packages/qwik-nx/src/generators/remote/schema.json index 71091485..1dbe5be7 100644 --- a/packages/qwik-nx/src/generators/remote/schema.json +++ b/packages/qwik-nx/src/generators/remote/schema.json @@ -88,7 +88,7 @@ "port": { "type": "number", "description": "The port for the dev and preview servers of the app (they're the same by default in MF setup).", - "default": 4200 + "default": 5173 }, "host": { "type": "string", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c262f95f..be0760a3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.0' +lockfileVersion: '6.1' settings: autoInstallPeers: true