diff --git a/.gitignore b/.gitignore index 2990465c..01ab89b5 100644 --- a/.gitignore +++ b/.gitignore @@ -33,8 +33,10 @@ npm-debug.log yarn-error.log testem.log /typings -migrations.json # System Files .DS_Store Thumbs.db + +# Local Netlify folder +.netlify diff --git a/e2e/qwik-nx-e2e/tests/chore.spec.ts b/e2e/qwik-nx-e2e/tests/chore.spec.ts index 86278ec0..9c0a2fb3 100644 --- a/e2e/qwik-nx-e2e/tests/chore.spec.ts +++ b/e2e/qwik-nx-e2e/tests/chore.spec.ts @@ -1,42 +1,44 @@ import { ensureNxProject, + listFiles, readJson, runNxCommandAsync, } from '@nx/plugin/testing'; import { DEFAULT_E2E_TIMEOUT } from '@qwikifiers/e2e/utils'; -describe('appGenerator e2e', () => { - // Setting up individual workspaces per - // test can cause e2e runs to take a long time. - // For this reason, we recommend each suite only - // consumes 1 workspace. The tests should each operate - // on a unique project in the workspace, such that they - // are not dependant on one another. +describe('misc checks', () => { beforeAll(() => { ensureNxProject('qwik-nx', 'dist/packages/qwik-nx'); }); afterAll(async () => { - // `nx reset` kills the daemon, and performs - // some work which can help clean up e2e leftovers await runNxCommandAsync('reset'); }); - describe("qwik-nx's compiled package.json", () => { - it( - "qwik-nx's package.json should contain only expected dependencies", - async () => { - const packageJson = readJson('node_modules/qwik-nx/package.json'); + it( + "qwik-nx's package.json should contain only expected dependencies", + async () => { + const packageJson = readJson('node_modules/qwik-nx/package.json'); - expect(packageJson.peerDependencies).toBeUndefined(); - expect(packageJson.dependencies).toEqual({ - '@nx/devkit': '^16.0.0', - '@nx/js': '^16.0.0', - '@nx/linter': '^16.0.0', - '@nx/vite': '^16.0.0', - }); - }, - DEFAULT_E2E_TIMEOUT - ); + expect(packageJson.peerDependencies).toBeUndefined(); + expect(packageJson.dependencies).toEqual({ + '@nx/devkit': '^16.0.0', + '@nx/js': '^16.0.0', + '@nx/linter': '^16.0.0', + '@nx/vite': '^16.0.0', + }); + }, + DEFAULT_E2E_TIMEOUT + ); + + it('compiled output should contain all expected files', () => { + const expectedFiles = [ + 'executors.json', + 'migrations.json', + 'generators.json', + 'README.md', + ]; + const files = new Set(listFiles('node_modules/qwik-nx')); + expect(expectedFiles.every((f) => files.has(f))); }); }); diff --git a/e2e/utils/index.ts b/e2e/utils/index.ts index d52e74b7..030461fc 100644 --- a/e2e/utils/index.ts +++ b/e2e/utils/index.ts @@ -12,7 +12,7 @@ import { getPackageManagerCommand, } from 'nx/src/utils/package-manager'; -export const DEFAULT_E2E_TIMEOUT = 2 * 60 * 1000; +export const DEFAULT_E2E_TIMEOUT = 3 * 60 * 1000; const kill = require('kill-port'); export const isWindows = require('is-windows'); diff --git a/package.json b/package.json index 25b4693c..fae23920 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "pnpm": "^8.0.0" }, "devDependencies": { - "@builder.io/qwik": "^1.2.6", + "@builder.io/qwik": "^1.2.12", "@commitlint/cli": "^17.3.0", "@commitlint/config-angular": "^17.3.0", "@commitlint/config-conventional": "^17.3.0", diff --git a/packages/qwik-nx/migrations.json b/packages/qwik-nx/migrations.json index de26b39c..1e436ac4 100644 --- a/packages/qwik-nx/migrations.json +++ b/packages/qwik-nx/migrations.json @@ -23,6 +23,11 @@ "description": "Enabled type checking can be breaking. Adding a verbose option so that it is clear how to disable it", "cli": "nx", "implementation": "./src/migrations/add-verbose-skip-type-check-option-for-the-build-executor/add-verbose-skip-type-check-option-for-the-build-executor" + }, + "set-proper-tsconfig-path-for-qwik-vite-plugin": { + "version": "1.0.11", + "description": "set-proper-tsconfig-path-for-qwik-vite-plugin", + "implementation": "./src/migrations/set-proper-tsconfig-path-for-qwik-vite-plugin/set-proper-tsconfig-path-for-qwik-vite-plugin" } }, "packageJsonUpdates": { @@ -262,6 +267,20 @@ "version": "^0.32.0" } } + }, + "1.0.11": { + "version": "1.0.11", + "packages": { + "@builder.io/qwik": { + "version": "~1.2.12" + }, + "@builder.io/qwik-city": { + "version": "~1.2.12" + }, + "eslint-plugin-qwik": { + "version": "~1.2.12" + } + } } } } 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 09e117b6..0256a49e 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 @@ -427,6 +427,7 @@ export default defineConfig({ ssr: { outDir: '../../dist/apps/myapp/server', }, + tsconfigFileNames: ['tsconfig.app.json'], }), tsconfigPaths({ root: '../../' }), ], diff --git a/packages/qwik-nx/src/generators/application/files/src/components/router-head/router-head.tsx__template__ b/packages/qwik-nx/src/generators/application/files/src/components/router-head/router-head.tsx__template__ index 588ce9aa..f1a292b8 100644 --- a/packages/qwik-nx/src/generators/application/files/src/components/router-head/router-head.tsx__template__ +++ b/packages/qwik-nx/src/generators/application/files/src/components/router-head/router-head.tsx__template__ @@ -6,26 +6,30 @@ import { useDocumentHead, useLocation } from '@builder.io/qwik-city'; */ export const RouterHead = component$(() => { const head = useDocumentHead(); - const { url } = useLocation(); + const loc = useLocation(); return ( <> {head.title} - + {head.meta.map((m) => ( - + ))} {head.links.map((l) => ( - + ))} {head.styles.map((s) => ( -