Skip to content

Commit

Permalink
chore: added initial files
Browse files Browse the repository at this point in the history
  • Loading branch information
shairez committed Jan 29, 2024
1 parent 0b7322a commit 5ca03d1
Show file tree
Hide file tree
Showing 18 changed files with 4,878 additions and 5,645 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ testem.log

# System Files
.DS_Store
Thumbs.db
Thumbs.db
.nx/cache
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
*.
dist
node_modules
coverage
coverage
/.nx/cache
7 changes: 2 additions & 5 deletions apps/qwik-app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,8 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/qwik-app/**/*.{ts,tsx,js,jsx}"]
}
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
}
},
"tags": []
Expand Down
12 changes: 10 additions & 2 deletions apps/qwik-app/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
import { qwikVite } from '@builder.io/qwik/optimizer';
import { qwikCity } from '@builder.io/qwik-city/vite';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
import { qwikNxVite } from 'qwik-nx/plugins';

export default defineConfig({
root: __dirname,
build: {
outDir: '../../dist/apps/qwik-app',
reportCompressedSize: true,
commonjsOptions: {
transformMixedEsModules: true,
},
},
plugins: [
qwikNxVite(),
qwikCity(),
Expand All @@ -16,7 +24,7 @@ export default defineConfig({
outDir: '../../dist/apps/qwik-app/server',
},
}),
tsconfigPaths({ root: '../../' }),
nxViteTsPaths(),
],
server: {
fs: {
Expand Down
133 changes: 123 additions & 10 deletions migrations.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,133 @@
{
"migrations": [
{
"version": "1.0.0",
"description": "In your entry.cloudflare-pages.ts, export fetch instead of onRequest. This is required in order to use the advanced mode of Cloudflare! it will allow future perf improvements and new features.",
"cli": "nx",
"implementation": "./src/migrations/migrate-cloudflare-integration/migrate-cloudflare-integration",
"package": "qwik-nx",
"name": "migrate-cloudflare-integration"
"version": "16.6.0-beta.6",
"description": "Prefix outputs with {workspaceRoot}/{projectRoot} if needed",
"implementation": "./src/migrations/update-15-0-0/prefix-outputs",
"package": "nx",
"name": "16.6.0-prefix-outputs"
},
{
"version": "1.0.0",
"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",
"package": "qwik-nx",
"name": "add-verbose-skip-type-check-option-for-the-build-executor"
"version": "16.8.0-beta.3",
"description": "Escape $ in env variables",
"implementation": "./src/migrations/update-16-8-0/escape-dollar-sign-env-variables",
"package": "nx",
"name": "16.8.0-escape-dollar-sign-env"
},
{
"cli": "nx",
"version": "17.0.0-beta.1",
"description": "Updates the default cache directory to .nx/cache",
"implementation": "./src/migrations/update-17-0-0/move-cache-directory",
"package": "nx",
"name": "17.0.0-move-cache-directory"
},
{
"cli": "nx",
"version": "17.0.0-beta.3",
"description": "Use minimal config for tasksRunnerOptions",
"implementation": "./src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options",
"package": "nx",
"name": "17.0.0-use-minimal-config-for-tasks-runner-options"
},
{
"version": "17.0.0-rc.1",
"description": "Migration for v17.0.0-rc.1",
"implementation": "./src/migrations/update-17-0-0/rm-default-collection-npm-scope",
"package": "nx",
"name": "rm-default-collection-npm-scope"
},
{
"cli": "nx",
"version": "16.6.0-beta.0",
"description": "Explicitly set 'updateBuildableProjectDepsInPackageJson' to 'true' in targets that rely on that value as the default.",
"factory": "./src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps",
"package": "@nx/js",
"name": "explicitly-set-projects-to-update-buildable-deps"
},
{
"cli": "nx",
"version": "16.8.2-beta.0",
"description": "Remove invalid options (strict, noInterop) for ES6 type modules.",
"factory": "./src/migrations/update-16-8-2/update-swcrc",
"package": "@nx/js",
"name": "16-8-2-update-swcrc"
},
{
"cli": "nx",
"version": "17.0.2",
"description": "Remove deprecated build options",
"implementation": "./src/migrations/update-17-0-0/remove-deprecated-build-options",
"package": "@nx/js",
"name": "update-17-0-0-remove-deprecated-build-options"
},
{
"version": "16.8.0",
"description": "update-16-8-0-add-ignored-files",
"implementation": "./src/migrations/update-16-8-0-add-ignored-files/update-16-8-0-add-ignored-files",
"package": "@nx/eslint",
"name": "update-16-8-0-add-ignored-files"
},
{
"version": "17.0.0-beta.7",
"description": "update-17-0-0-rename-to-eslint",
"implementation": "./src/migrations/update-17-0-0-rename-to-eslint/update-17-0-0-rename-to-eslint",
"package": "@nx/eslint",
"name": "update-17-0-0-rename-to-eslint"
},
{
"version": "17.1.0-beta.1",
"description": "Updates for @typescript-utils/utils v6.9.1+",
"implementation": "./src/migrations/update-17-1-0/update-typescript-eslint",
"package": "@nx/eslint",
"name": "update-typescript-eslint"
},
{
"version": "17.2.0-beta.0",
"description": "Simplify eslintFilePatterns",
"implementation": "./src/migrations/update-17-2-0/simplify-eslint-patterns",
"package": "@nx/eslint",
"name": "simplify-eslint-patterns"
},
{
"version": "16.4.1-beta.0",
"description": "Changes the testFile config in the vite:test exectutor from a string to an array of strings",
"cli": "nx",
"implementation": "./src/migrations/update-16-4-1-update-test-file-config/update-16-4-1-test-file-config",
"package": "@nx/vite",
"name": "update-16-4-1-test-file-config"
},
{
"version": "16.6.0-beta.4",
"description": "Change vite-tsconfig-paths plugin for first party nx-vite-tsconfig-paths plugin",
"cli": "nx",
"implementation": "./src/migrations/update-16-6-0-change-ts-paths-plugin/change-ts-paths-plugin",
"package": "@nx/vite",
"name": "16-6-0-change-ts-paths-plugin"
},
{
"version": "17.1.0-beta.2",
"description": "Move target defaults",
"implementation": "./src/migrations/update-17-1-0/move-target-defaults",
"package": "@nx/vite",
"name": "move-target-defaults"
},
{
"version": "17.2.0-beta.10",
"description": "Update vite config.",
"implementation": "./src/migrations/update-17-2-0/update-vite-config",
"package": "@nx/vite",
"name": "update-vite-config"
},
{
"cli": "nx",
"version": "17-2-6-beta.1",
"description": "Rename workspace rules from @nx/workspace/name to @nx/workspace-name",
"implementation": "./src/migrations/update-17-2-6-rename-workspace-rules/rename-workspace-rules",
"package": "@nx/eslint-plugin",
"name": "update-17-2-6-rename-workspace-rules"
}
]
}
38 changes: 18 additions & 20 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
{
"tasksRunnerOptions": {
"default": {
"runner": "nx-cloud",
"options": {
"cacheableOperations": [
"build",
"lint",
"test",
"e2e",
"build-storybook",
"ct"
],
"accessToken": "MzViMzc1MGQtMDQyNi00N2E3LTliMmYtYWI4ZGIxYWJjYzE3fHJlYWQtd3JpdGU="
}
}
},
"extends": "nx/presets/npm.json",
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"npmScope": "qwikifiers",
"affected": {
"defaultBase": "main"
},
Expand All @@ -27,10 +10,25 @@
},
"targetDefaults": {
"lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"]
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
"cache": true
},
"test": {
"inputs": ["default", "^default"]
"inputs": ["default", "^default"],
"cache": true
},
"build": {
"cache": true
},
"e2e": {
"cache": true
},
"build-storybook": {
"cache": true
},
"ct": {
"cache": true
}
}
},
"nxCloudAccessToken": "MzViMzc1MGQtMDQyNi00N2E3LTliMmYtYWI4ZGIxYWJjYzE3fHJlYWQtd3JpdGU="
}
46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,45 @@
"prepare": "husky install"
},
"devDependencies": {
"@builder.io/qwik": "1.1.4",
"@builder.io/qwik-city": "1.1.4",
"@builder.io/qwik": "1.4.2",
"@builder.io/qwik-city": "1.4.2",
"@commitlint/cli": "^17.6.5",
"@commitlint/config-angular": "^17.6.5",
"@commitlint/config-conventional": "^17.6.5",
"@jscutlery/semver": "^3.0.0",
"@playwright/test": "1.34.3",
"@types/eslint": "8.40.0",
"@nx/workspace": "17.2.8",
"@nx/vite": "17.2.8",
"@nx/js": "17.2.8",
"@nx/eslint-plugin": "17.2.8",
"@nx/eslint": "17.2.8",
"@playwright/experimental-ct-core": "1.42.0-alpha-jan-18-2024",
"@playwright/test": "1.41.1",
"@types/eslint": "8.56.2",
"@types/node": "20.2.5",
"@typescript-eslint/eslint-plugin": "5.59.8",
"@typescript-eslint/parser": "5.59.8",
"@typescript-eslint/eslint-plugin": "6.20.0",
"@typescript-eslint/parser": "6.20.0",
"all-contributors-cli": "^6.26.0",
"autoprefixer": "^10.4.14",
"commitizen": "^4.3.0",
"commitlint": "^17.6.5",
"cz-conventional-changelog": "^3.3.0",
"eslint": "8.41.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-qwik": "1.1.4",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-qwik": "1.4.2",
"husky": "^8.0.3",
"ngx-deploy-npm": "^6.0.0",
"nx": "16.3.1",
"nx": "17.2.8",
"postcss": "^8.4.24",
"prettier": "2.8.8",
"prettier": "3.2.4",
"pretty-quick": "^3.1.3",
"qwik-nx": "1.0.3",
"qwik-nx": "2.0.2",
"ts-node": "10.9.1",
"typescript": "5.1.3",
"undici": "5.22.1",
"vite": "4.3.9",
"vite-plugin-dts": "~2.3.0",
"typescript": "5.3.3",
"undici": "6.5.0",
"vite": "5.0.12",
"vite-plugin-dts": "3.7.2",
"vite-plugin-eslint": "^1.8.1",
"vite-tsconfig-paths": "4.2.0",
"nx-cloud": "16.0.5",
"@nx/workspace": "16.3.1",
"@nx/vite": "16.3.1",
"@nx/js": "16.3.1",
"@nx/eslint-plugin": "16.3.1",
"@nx/linter": "16.3.1"
"vite-tsconfig-paths": "4.3.1"
},
"config": {
"commitizen": {
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-ct-qwik/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"src/lib"
],
"dependencies": {
"@playwright/experimental-ct-core": "1.34.3"
"@playwright/experimental-ct-core": "1.42.0-alpha-jan-18-2024"
},
"peerDependencies": {
"@playwright/test": ">=1.34.x",
Expand Down
7 changes: 2 additions & 5 deletions packages/playwright-ct-qwik/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@
"outputs": ["{workspaceRoot}/dist/packages/playwright-ct-qwik"]
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/playwright-ct-qwik/**/*.ts"]
}
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
},
"version": {
"executor": "@jscutlery/semver:version",
Expand Down
19 changes: 19 additions & 0 deletions packages/playwright-ct-qwik/src/cli.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env node
/**
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const { program } = require('@playwright/experimental-ct-core/lib/program');
program.parse(process.argv);
28 changes: 28 additions & 0 deletions packages/playwright-ct-qwik/src/hooks.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import type { JsonObject } from '@playwright/experimental-ct-core/types/component';
import { JSXElement } from 'solid-js';

export declare function beforeMount<HooksConfig extends JsonObject>(
callback: (params: {
hooksConfig?: HooksConfig;
App: () => JSXElement;
}) => Promise<void | JSXElement>
): void;
export declare function afterMount<HooksConfig extends JsonObject>(
callback: (params: { hooksConfig?: HooksConfig }) => Promise<void>
): void;
Loading

0 comments on commit 5ca03d1

Please sign in to comment.