Skip to content

Commit

Permalink
changed qwik-city to qwik-router
Browse files Browse the repository at this point in the history
  • Loading branch information
shairez committed Oct 28, 2024
1 parent 7d5a282 commit efb2d0d
Show file tree
Hide file tree
Showing 760 changed files with 5,459 additions and 4,464 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://unpkg.com/@changesets/config@3.0.1/schema.json",
"changelog": ["./changelog-github-custom.cjs", { "repo": "QwikDev/qwik" }],
"commit": false,
"fixed": [["@qwik.dev/core", "@qwik.dev/city", "eslint-plugin-qwik", "create-qwik"]],
"fixed": [["@qwik.dev/core", "@qwik.dev/router", "eslint-plugin-qwik", "create-qwik"]],
"linked": [],
"access": "public",
"baseBranch": "build/v2",
Expand Down
2 changes: 1 addition & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"qwik-docs": "0.0.1",
"eslint-plugin-qwik": "2.0.0-0",
"@qwik.dev/core": "2.0.0-0",
"@qwik.dev/city": "2.0.0-0",
"@qwik.dev/router": "2.0.0-0",
"insights": "0.1.0",
"@qwik.dev/dom": "2.1.19",
"@qwik.dev/react": "2.0.0-0",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/tricky-meals-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@qwik.dev/router': major
---

Renamed "Qwik City" to "Qwik Router" and package to "@qwik.dev/router"
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ body:
- Qwik Rollup / Vite plugin
- Qwik Optimizer (rust)
- Qwik React
- Qwik City (routing)
- Qwik Router
- Starters / CLI
- Qwik Playground
validations:
Expand Down
52 changes: 26 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ jobs:
with:
lookup-only: true
path: |
packages/qwik-city/lib
packages/qwik-router/lib
packages/qwik-react/lib
packages/eslint-plugin-qwik/dist
packages/create-qwik/dist
# note that all inputs need to be listed here, including qwik, for correct cache invalidation
key: ${{ hashfiles('qwik-key.txt', 'rust-key.txt', 'packages/qwik-city/**/*', 'packages/qwik-react/**/*', 'packages/eslint-plugin-qwik/**/*', 'packages/create-qwik/**/*', '!**/*.unit.*') }}
key: ${{ hashfiles('qwik-key.txt', 'rust-key.txt', 'packages/qwik-router/**/*', 'packages/qwik-react/**/*', 'packages/eslint-plugin-qwik/**/*', 'packages/create-qwik/**/*', '!**/*.unit.*') }}
- run: 'echo ${{ steps.cache-others.outputs.cache-primary-key }} > others-key.txt'
- name: 'check cache: docs'
id: cache-docs
Expand Down Expand Up @@ -397,40 +397,40 @@ jobs:
if: needs.changes.outputs.build-others == 'true'
run: corepack pnpm install

- name: 'build: qwik-city & others'
- name: 'build: qwik-router & others'
if: needs.changes.outputs.build-others == 'true'
run: pnpm build --tsc --api --qwikcity --cli --qwikreact --eslint --set-dist-tag="${{ needs.changes.outputs.disttag }}"
run: pnpm build --tsc --api --qwikrouter --cli --qwikreact --eslint --set-dist-tag="${{ needs.changes.outputs.disttag }}"
- name: Save others cache
if: needs.changes.outputs.build-others == 'true'
uses: actions/cache/save@v4
with:
key: ${{ needs.changes.outputs.hash-others }}
path: |
packages/qwik-city/lib
packages/qwik-router/lib
packages/qwik-react/lib
packages/eslint-plugin-qwik/dist
packages/create-qwik/dist
- name: 'restore: qwik-city & others'
- name: 'restore: qwik-router & others'
if: needs.changes.outputs.build-others != 'true'
uses: actions/cache/restore@v4
with:
path: |
packages/qwik-city/lib
packages/qwik-router/lib
packages/qwik-react/lib
packages/eslint-plugin-qwik/dist
packages/create-qwik/dist
key: ${{ needs.changes.outputs.hash-others }}

- name: Print QwikCity Lib Build
run: tree -a packages/qwik-city/lib/
- name: Print QwikRouter Lib Build
run: tree -a packages/qwik-router/lib/

- name: Upload QwikCity Build Artifacts
- name: Upload QwikRouter Build Artifacts
uses: actions/upload-artifact@v4
with:
name: artifact-qwikcity
name: artifact-qwikrouter
include-hidden-files: true
path: packages/qwik-city/lib/
path: packages/qwik-router/lib/
if-no-files-found: error

- name: Print qwik-react Lib Build
Expand Down Expand Up @@ -491,8 +491,8 @@ jobs:
- name: Move Distribution Artifacts
run: |
mv artifact-qwik/* packages/qwik/
mkdir -p packages/qwik-city/lib/
mv artifact-qwikcity/* packages/qwik-city/lib/
mkdir -p packages/qwik-router/lib/
mv artifact-qwikrouter/* packages/qwik-router/lib/
mkdir -p packages/create-qwik/dist/
mv artifact-create-qwik/* packages/create-qwik/dist/
mkdir -p packages/eslint-plugin-qwik/dist/
Expand Down Expand Up @@ -549,8 +549,8 @@ jobs:
- name: Move Distribution Artifacts
run: |
mv artifact-qwik/* packages/qwik/
mkdir -p packages/qwik-city/lib/
mv artifact-qwikcity/* packages/qwik-city/lib/
mkdir -p packages/qwik-router/lib/
mv artifact-qwikrouter/* packages/qwik-router/lib/
mkdir -p packages/create-qwik/dist/
mv artifact-create-qwik/* packages/create-qwik/dist/
mkdir -p packages/eslint-plugin-qwik/dist/
Expand Down Expand Up @@ -608,8 +608,8 @@ jobs:
- name: Move Distribution Artifacts
run: |
mv artifact-qwik/* packages/qwik/
mkdir -p packages/qwik-city/lib/
mv artifact-qwikcity/* packages/qwik-city/lib/
mkdir -p packages/qwik-router/lib/
mv artifact-qwikrouter/* packages/qwik-router/lib/
mkdir -p packages/create-qwik/dist/
mv artifact-create-qwik/* packages/create-qwik/dist/
mkdir -p packages/eslint-plugin-qwik/dist/
Expand Down Expand Up @@ -672,8 +672,8 @@ jobs:
- name: Move Distribution Artifacts
run: |
mv artifact-qwik/* packages/qwik/
mkdir -p packages/qwik-city/lib/
mv artifact-qwikcity/* packages/qwik-city/lib/
mkdir -p packages/qwik-router/lib/
mv artifact-qwikrouter/* packages/qwik-router/lib/
mkdir -p packages/create-qwik/dist/
mv artifact-create-qwik/* packages/create-qwik/dist/
mkdir -p packages/eslint-plugin-qwik/dist/
Expand Down Expand Up @@ -730,8 +730,8 @@ jobs:
- name: Move Distribution Artifacts
run: |
mv artifact-qwik/* packages/qwik/
mkdir -p packages/qwik-city/lib/
mv artifact-qwikcity/* packages/qwik-city/lib/
mkdir -p packages/qwik-router/lib/
mv artifact-qwikrouter/* packages/qwik-router/lib/
mkdir -p packages/create-qwik/dist/
mv artifact-create-qwik/* packages/create-qwik/dist/
mkdir -p packages/eslint-plugin-qwik/dist/
Expand Down Expand Up @@ -830,8 +830,8 @@ jobs:
- name: Move Distribution Artifacts
run: |
mv artifact-qwik/* packages/qwik/
mkdir -p packages/qwik-city/lib/
mv artifact-qwikcity/* packages/qwik-city/lib/
mkdir -p packages/qwik-router/lib/
mv artifact-qwikrouter/* packages/qwik-router/lib/
mkdir -p packages/create-qwik/dist/
mv artifact-create-qwik/* packages/create-qwik/dist/
mkdir -p packages/eslint-plugin-qwik/dist/
Expand Down Expand Up @@ -870,7 +870,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

############ TRIGGER QWIKCITY E2E TEST ############
trigger-qwikcity-e2e:
trigger-qwikrouter-e2e:
name: Trigger Qwik City E2E
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
Expand All @@ -884,7 +884,7 @@ jobs:
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.QWIK_API_TOKEN_GITHUB }}
repository: builderIO/qwik-city-e2e
repository: QwikDev/qwik-city-e2e
event-type: main-updated

############ Everything is fine ############
Expand Down
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"ms-playwright.playwright",
"rust-lang.rust-analyzer",
"ms-azuretools.vscode-docker",
"manucorporat.vermoji",
"vadimcn.vscode-lldb",
"streetsidesoftware.code-spell-checker",
"vitest.explorer"
Expand Down
8 changes: 4 additions & 4 deletions CONTINUOUS_BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This repo contains build artifacts that are generated as part of the continues b
Currently supported artifacts:

- [`@qwik.dev/core`](https://github.com/QwikDev/qwik-build)
- [`@qwik.dev/city`](https://github.com/QwikDev/qwik-city-build)
- [`@qwik.dev/router`](https://github.com/QwikDev/qwik-city-build)

The build artifact is created if:

Expand All @@ -27,7 +27,7 @@ To install a specific build artifact change you `package.json` like so (not all
{
"dependencies": {
"@qwik.dev/core": "github:QwikDev/qwik-build#SHA",
"@qwik.dev/city": "github:QwikDev/qwik-city-build#SHA"
"@qwik.dev/router": "github:QwikDev/qwik-city-build#SHA"
}
}
```
Expand All @@ -36,10 +36,10 @@ Where `#SHA` is one of the following:

- `#SHA` - Install a specific build SHA. You can get the SHA from:
- [`@qwik.dev/core`](https://github.com/QwikDev/qwik-build/commits/) commits
- [`@qwik.dev/city`](https://github.com/QwikDev/qwik-city-build/commits/) commits
- [`@qwik.dev/router`](https://github.com/QwikDev/qwik-city-build/commits/) commits
- `#build/name` (or `#main`) - Install a specific `build/*` (or `#main`) branch:
- [`@qwik.dev/core`](https://github.com/QwikDev/qwik-build/branches/) branches
- [`@qwik.dev/city`](https://github.com/QwikDev/qwik-city-build/branches/) branches
- [`@qwik.dev/router`](https://github.com/QwikDev/qwik-city-build/branches/) branches
> NOTE: Package managers will treat any SHA in the lock file which is on the branch as valid, and so they will not auto upgrade to the latest. For this reason this is not recommended.
## Bisect for regression
Expand Down
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,18 @@ If you want to work on the Rust code, use `build.full` instead of `build.local`.

### Fast build

This will build only Qwik and Qwik City and their types. This is not enough to run the docs.
This will build only Qwik and Qwik Router and their types. This is not enough to run the docs.

```shell
pnpm build.core
```

### Custom build

Once you have done a full build, the types are built, and you can build just the code you're working on. For qwik and qwik-city, you can do very fast rebuilds with
Once you have done a full build, the types are built, and you can build just the code you're working on. For qwik and qwik-router, you can do very fast rebuilds with

```shell
pnpm build --dev --qwik --qwikcity
pnpm build --dev --qwik --qwikrouter
```

The `--dev` flag skips type checking and generating.
Expand All @@ -186,7 +186,7 @@ You can run `pnpm build` without parameters to see which flags are available. No
- `--tsc`: build types
- `--api`: build API docs and type bundles. Requires `--tsc` to have run.
- `--build`: Qwik (you'll probably also need `--dev`)
- `--qwikcity`: Qwik City (you'll probably also need `--dev`)
- `--qwikrouter`: Qwik Router (you'll probably also need `--dev`)
- `--qwikreact`: Qwik React
- `--eslint`: Eslint plugin

Expand Down Expand Up @@ -229,12 +229,12 @@ Assuming qwik is in `../qwik`, run this inside the root of your app:

```shell
pnpm link ../qwik/packages/qwik
pnpm link ../qwik/packages/qwik-city
pnpm link ../qwik/packages/qwik-router
```

Other package managers probably need to first be told about the packages. For example, with `bun` you need to `cd ../qwik/packages/qwik` and `bun link`, repeat for `qwik-city`. Then in your app run `bun link @qwik.dev/core @qwik.dev/city`.
Other package managers probably need to first be told about the packages. For example, with `bun` you need to `cd ../qwik/packages/qwik` and `bun link`, repeat for `qwik-router`. Then in your app run `bun link @qwik.dev/core @qwik.dev/router`.

If you can't use package linking, just copy the contents of `packages/qwik` into your projects' `node_modules/@qwik.dev/core` folder, and/or the contents of `packages/qwik-city` into your projects' `node_modules/@qwik.dev/city` folder.
If you can't use package linking, just copy the contents of `packages/qwik` into your projects' `node_modules/@qwik.dev/core` folder, and/or the contents of `packages/qwik-router` into your projects' `node_modules/@qwik.dev/router` folder.

### Working on the docs site

Expand Down Expand Up @@ -316,7 +316,7 @@ For larger PRs, it would really help if you follow these guidelines.
- Keep your commits focused and atomic. Each commit should represent a single, coherent change.
- If you have commits like `wip lol` or `fixup`, squash them. Use `git rebase -i`.
- Commits must follow the format: `type(scope): description`
For example: `feat(qwik-city): confetti animations` or `chore: pnpm api.update`
For example: `feat(qwik-router): confetti animations` or `chore: pnpm api.update`

Common types include:

Expand Down
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
"qvisible",
"qwik",
"qwikcity",
"qwikrouter",
"qwikdeps",
"qwikdom",
"qwikevents",
Expand Down
4 changes: 2 additions & 2 deletions e2e/qwik-cli-e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Tests can be invoked by running `pnpm run test.e2e-cli`.

E2E project does the following internally:

0. Vitest is configured to run a setup function once **PRIOR TO ALL** tests. During the setup `@qwik.dev/core`, `@qwik.dev/city` and `eslint-plugin-qwik` packages will be packed with `pnpm pack` Those will be used at a step 2 for every test. Tarballs are located in `temp/tarballs` folder within this repo. It is assumed that packages are built before E2E is executed.
0. Vitest is configured to run a setup function once **PRIOR TO ALL** tests. During the setup `@qwik.dev/core`, `@qwik.dev/router` and `eslint-plugin-qwik` packages will be packed with `pnpm pack` Those will be used at a step 2 for every test. Tarballs are located in `temp/tarballs` folder within this repo. It is assumed that packages are built before E2E is executed.

1. Simulates `npm create qwik` locally using direct command `node packages/create-qwik/create-qwik.cjs playground {outputDir}`

Expand All @@ -21,7 +21,7 @@ E2E project does the following internally:

Note that provided folder should exist. If custom path is used, generated application will not be removed after the test completes, which is helpful for debugging.

2. Uses packed `@qwik.dev/core`, `@qwik.dev/city` and `eslint-plugin-qwik` packages to update package.json file of the generated application with `file:path-to-package.tgz`.
2. Uses packed `@qwik.dev/core`, `@qwik.dev/router` and `eslint-plugin-qwik` packages to update package.json file of the generated application with `file:path-to-package.tgz`.

3. Runs actual tests. Please pay attention at the `beforeAll` hook in the spec file

Expand Down
8 changes: 4 additions & 4 deletions e2e/qwik-cli-e2e/utils/setup.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { execSync } from 'child_process';
import { existsSync, writeFileSync } from 'fs';
import { join } from 'path';
import { workspaceRoot } from '.';
import { existsSync, writeFileSync } from 'fs';

const packageCfg = {
'@qwik.dev/core': {
packagePath: 'packages/qwik',
distPath: 'packages/qwik/dist',
},
'@qwik.dev/city': {
packagePath: 'packages/qwik-city',
distPath: 'packages/qwik-city/lib',
'@qwik.dev/router': {
packagePath: 'packages/qwik-router',
distPath: 'packages/qwik-router/lib',
},
'eslint-plugin-qwik': {
packagePath: 'packages/eslint-plugin-qwik',
Expand Down
Loading

0 comments on commit efb2d0d

Please sign in to comment.