create-qwik 1.13.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,73 @@
1
+ import js from "@eslint/js";
2
+ import globals from "globals";
3
+ import tseslint from "typescript-eslint";
4
+ import { globalIgnores } from "eslint/config";
5
+ import { qwikEslint9Plugin } from "eslint-plugin-qwik";
6
+
7
+ const ignores = [
8
+ "**/*.log",
9
+ "**/.DS_Store",
10
+ "**/*.",
11
+ ".vscode/settings.json",
12
+ "**/.history",
13
+ "**/.yarn",
14
+ "**/bazel-*",
15
+ "**/bazel-bin",
16
+ "**/bazel-out",
17
+ "**/bazel-qwik",
18
+ "**/bazel-testlogs",
19
+ "**/dist",
20
+ "**/dist-dev",
21
+ "**/lib",
22
+ "**/lib-types",
23
+ "**/etc",
24
+ "**/external",
25
+ "**/node_modules",
26
+ "**/temp",
27
+ "**/tsc-out",
28
+ "**/tsdoc-metadata.json",
29
+ "**/target",
30
+ "**/output",
31
+ "**/rollup.config.js",
32
+ "**/build",
33
+ "**/.cache",
34
+ "**/.vscode",
35
+ "**/.rollup.cache",
36
+ "**/dist",
37
+ "**/tsconfig.tsbuildinfo",
38
+ "**/vite.config.ts",
39
+ "**/*.spec.tsx",
40
+ "**/*.spec.ts",
41
+ "**/.netlify",
42
+ "**/pnpm-lock.yaml",
43
+ "**/package-lock.json",
44
+ "**/yarn.lock",
45
+ "**/server",
46
+ "eslint.config.js",
47
+ ];
48
+
49
+ export default tseslint.config(
50
+ globalIgnores(ignores),
51
+ js.configs.recommended,
52
+ tseslint.configs.recommended,
53
+ qwikEslint9Plugin.configs.recommended,
54
+ {
55
+ languageOptions: {
56
+ globals: {
57
+ ...globals.browser,
58
+ ...globals.node,
59
+ ...globals.es2021,
60
+ ...globals.serviceworker,
61
+ },
62
+ parserOptions: {
63
+ projectService: true,
64
+ tsconfigRootDir: import.meta.dirname,
65
+ },
66
+ },
67
+ },
68
+ {
69
+ rules: {
70
+ "@typescript-eslint/no-explicit-any": "off",
71
+ },
72
+ },
73
+ );
@@ -16,14 +16,13 @@
16
16
  "qwik": "qwik"
17
17
  },
18
18
  "devDependencies": {
19
- "@builder.io/qwik": "^1.13.0",
20
- "@builder.io/qwik-city": "^1.13.0",
21
- "@types/eslint": "8.56.10",
19
+ "@builder.io/qwik": "^1.14.0",
20
+ "@builder.io/qwik-city": "^1.14.0",
21
+ "@eslint/js": "latest",
22
22
  "@types/node": "20.14.11",
23
- "@typescript-eslint/eslint-plugin": "7.16.1",
24
- "@typescript-eslint/parser": "7.16.1",
25
- "eslint": "8.57.0",
26
- "eslint-plugin-qwik": "^1.13.0",
23
+ "typescript-eslint": "8.26.1",
24
+ "eslint": "9.25.1",
25
+ "eslint-plugin-qwik": "^1.14.0",
27
26
  "prettier": "3.3.3",
28
27
  "typescript": "5.4.5",
29
28
  "undici": "*",
@@ -14,12 +14,10 @@ import {
14
14
  renderToStream,
15
15
  type RenderToStreamOptions,
16
16
  } from "@builder.io/qwik/server";
17
- import { manifest } from "@qwik-client-manifest";
18
17
  import Root from "./root";
19
18
 
20
19
  export default function (opts: RenderToStreamOptions) {
21
20
  return renderToStream(<Root />, {
22
- manifest,
23
21
  ...opts,
24
22
  // Use container attributes to set attributes on the html tag.
25
23
  containerAttributes: {
@@ -20,6 +20,5 @@
20
20
  "~/*": ["./src/*"]
21
21
  }
22
22
  },
23
- "files": ["./.eslintrc.cjs"],
24
23
  "include": ["src", "./*.d.ts", "./*.config.ts"]
25
24
  }
@@ -1,11 +1,6 @@
1
- import { component$ } from "@builder.io/qwik";
2
- import {
3
- QwikCityProvider,
4
- RouterOutlet,
5
- ServiceWorkerRegister,
6
- } from "@builder.io/qwik-city";
1
+ import { component$, isDev } from "@builder.io/qwik";
2
+ import { QwikCityProvider, RouterOutlet } from "@builder.io/qwik-city";
7
3
  import { RouterHead } from "./components/router-head/router-head";
8
- import { isDev } from "@builder.io/qwik";
9
4
 
10
5
  import "./global.css";
11
6
 
@@ -31,7 +26,6 @@ export default component$(() => {
31
26
  </head>
32
27
  <body lang="en">
33
28
  <RouterOutlet />
34
- {!isDev && <ServiceWorkerRegister />}
35
29
  </body>
36
30
  </QwikCityProvider>
37
31
  );
@@ -0,0 +1,68 @@
1
+ import js from "@eslint/js";
2
+ import globals from "globals";
3
+ import tseslint from "typescript-eslint";
4
+ import { globalIgnores } from "eslint/config";
5
+ import { qwikEslint9Plugin } from "eslint-plugin-qwik";
6
+
7
+ const ignores = [
8
+ "**/*.log",
9
+ "**/.DS_Store",
10
+ "**/*.",
11
+ ".vscode/settings.json",
12
+ "**/.history",
13
+ "**/.yarn",
14
+ "**/bazel-*",
15
+ "**/bazel-bin",
16
+ "**/bazel-out",
17
+ "**/bazel-qwik",
18
+ "**/bazel-testlogs",
19
+ "**/dist",
20
+ "**/dist-dev",
21
+ "**/lib",
22
+ "**/lib-types",
23
+ "**/etc",
24
+ "**/external",
25
+ "**/node_modules",
26
+ "**/temp",
27
+ "**/tsc-out",
28
+ "**/tsdoc-metadata.json",
29
+ "**/target",
30
+ "**/output",
31
+ "**/rollup.config.js",
32
+ "**/build",
33
+ "**/.cache",
34
+ "**/.vscode",
35
+ "**/.rollup.cache",
36
+ "**/dist",
37
+ "**/tsconfig.tsbuildinfo",
38
+ "**/vite.config.ts",
39
+ "**/*.spec.tsx",
40
+ "**/*.spec.ts",
41
+ "**/.netlify",
42
+ "**/pnpm-lock.yaml",
43
+ "**/package-lock.json",
44
+ "**/yarn.lock",
45
+ "**/server",
46
+ "eslint.config.js",
47
+ ];
48
+
49
+ export default tseslint.config(
50
+ globalIgnores(ignores),
51
+ js.configs.recommended,
52
+ tseslint.configs.recommended,
53
+ qwikEslint9Plugin.configs.recommended,
54
+ {
55
+ languageOptions: {
56
+ globals: {
57
+ ...globals.browser,
58
+ ...globals.node,
59
+ ...globals.es2021,
60
+ ...globals.serviceworker,
61
+ },
62
+ parserOptions: {
63
+ projectService: true,
64
+ tsconfigRootDir: import.meta.dirname,
65
+ },
66
+ },
67
+ },
68
+ );
@@ -33,13 +33,12 @@
33
33
  "release": "np"
34
34
  },
35
35
  "devDependencies": {
36
- "@builder.io/qwik": "1.13.0",
37
- "@types/eslint": "8.56.10",
36
+ "@builder.io/qwik": "1.14.0",
37
+ "@eslint/js": "latest",
38
38
  "@types/node": "20.14.11",
39
- "@typescript-eslint/eslint-plugin": "7.16.1",
40
- "@typescript-eslint/parser": "7.16.1",
41
- "eslint": "8.57.0",
42
- "eslint-plugin-qwik": "1.13.0",
39
+ "typescript-eslint": "8.26.1",
40
+ "eslint": "9.25.1",
41
+ "eslint-plugin-qwik": "1.14.0",
43
42
  "np": "^8.0.4",
44
43
  "prettier": "3.3.3",
45
44
  "typescript": "5.4.5",
@@ -14,12 +14,8 @@ import {
14
14
  renderToStream,
15
15
  type RenderToStreamOptions,
16
16
  } from "@builder.io/qwik/server";
17
- import { manifest } from "@qwik-client-manifest";
18
17
  import Root from "./root";
19
18
 
20
19
  export default function (opts: RenderToStreamOptions) {
21
- return renderToStream(<Root />, {
22
- manifest,
23
- ...opts,
24
- });
20
+ return renderToStream(<Root />, opts);
25
21
  }
@@ -1,10 +1,6 @@
1
1
  import { component$ } from "@builder.io/qwik";
2
2
  import { isDev } from "@builder.io/qwik";
3
- import {
4
- QwikCityProvider,
5
- RouterOutlet,
6
- ServiceWorkerRegister,
7
- } from "@builder.io/qwik-city";
3
+ import { QwikCityProvider, RouterOutlet } from "@builder.io/qwik-city";
8
4
  import { RouterHead } from "./components/router-head/router-head";
9
5
 
10
6
  import "./global.css";
@@ -28,7 +24,6 @@ export default component$(() => {
28
24
  />
29
25
  )}
30
26
  <RouterHead />
31
- {!isDev && <ServiceWorkerRegister />}
32
27
  </head>
33
28
  <body lang="en">
34
29
  <RouterOutlet />
@@ -16,6 +16,7 @@ export default component$(() => {
16
16
  number: 20,
17
17
  });
18
18
 
19
+ // eslint-disable-next-line qwik/no-use-visible-task
19
20
  useVisibleTask$(({ cleanup }) => {
20
21
  const timeout = setTimeout(() => (state.count = 1), 500);
21
22
  cleanup(() => clearTimeout(timeout));
@@ -7,17 +7,6 @@ import Footer from "../components/starter/footer/footer";
7
7
 
8
8
  import styles from "./styles.css?inline";
9
9
 
10
- export const onGet: RequestHandler = async ({ cacheControl }) => {
11
- // Control caching for this request for best performance and to reduce hosting costs:
12
- // https://qwik.dev/docs/caching/
13
- cacheControl({
14
- // Always serve a cached response by default, up to a week stale
15
- staleWhileRevalidate: 60 * 60 * 24 * 7,
16
- // Max once every 5 seconds, revalidate on the server to get a fresh version of this page
17
- maxAge: 5,
18
- });
19
- };
20
-
21
10
  export const useServerTimeLoader = routeLoader$(() => {
22
11
  return {
23
12
  date: new Date().toISOString(),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-qwik",
3
3
  "description": "Interactive CLI for create Qwik projects and adding features.",
4
- "version": "1.13.0",
4
+ "version": "1.14.0",
5
5
  "author": "Builder.io Team",
6
6
  "bin": "./create-qwik.cjs",
7
7
  "bugs": "https://github.com/QwikDev/qwik/issues",
@@ -1,38 +0,0 @@
1
- **/*.log
2
- **/.DS_Store
3
- *.
4
- .vscode/settings.json
5
- .history
6
- .yarn
7
- bazel-*
8
- bazel-bin
9
- bazel-out
10
- bazel-qwik
11
- bazel-testlogs
12
- dist
13
- dist-dev
14
- lib
15
- lib-types
16
- etc
17
- external
18
- node_modules
19
- temp
20
- tsc-out
21
- tsdoc-metadata.json
22
- target
23
- output
24
- rollup.config.js
25
- build
26
- .cache
27
- .vscode
28
- .rollup.cache
29
- dist
30
- tsconfig.tsbuildinfo
31
- vite.config.ts
32
- *.spec.tsx
33
- *.spec.ts
34
- .netlify
35
- pnpm-lock.yaml
36
- package-lock.json
37
- yarn.lock
38
- server
@@ -1,42 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- env: {
4
- browser: true,
5
- es2021: true,
6
- node: true,
7
- },
8
- extends: [
9
- "eslint:recommended",
10
- "plugin:@typescript-eslint/recommended",
11
- "plugin:qwik/recommended",
12
- ],
13
- parser: "@typescript-eslint/parser",
14
- parserOptions: {
15
- tsconfigRootDir: __dirname,
16
- project: ["./tsconfig.json"],
17
- ecmaVersion: 2021,
18
- sourceType: "module",
19
- ecmaFeatures: {
20
- jsx: true,
21
- },
22
- },
23
- plugins: ["@typescript-eslint"],
24
- rules: {
25
- "@typescript-eslint/no-explicit-any": "off",
26
- "@typescript-eslint/explicit-module-boundary-types": "off",
27
- "@typescript-eslint/no-inferrable-types": "off",
28
- "@typescript-eslint/no-non-null-assertion": "off",
29
- "@typescript-eslint/no-empty-interface": "off",
30
- "@typescript-eslint/no-namespace": "off",
31
- "@typescript-eslint/no-empty-function": "off",
32
- "@typescript-eslint/no-this-alias": "off",
33
- "@typescript-eslint/ban-types": "off",
34
- "@typescript-eslint/ban-ts-comment": "off",
35
- "prefer-spread": "off",
36
- "no-case-declarations": "off",
37
- "no-console": "off",
38
- "@typescript-eslint/no-unused-vars": ["error"],
39
- "@typescript-eslint/consistent-type-imports": "warn",
40
- "@typescript-eslint/no-unnecessary-condition": "warn",
41
- },
42
- };
@@ -1,17 +0,0 @@
1
- /*
2
- * WHAT IS THIS FILE?
3
- *
4
- * The service-worker.ts file is used to have state of the art prefetching.
5
- * https://qwik.dev/qwikcity/prefetching/overview/
6
- *
7
- * Qwik uses a service worker to speed up your site and reduce latency, ie, not used in the traditional way of offline.
8
- * You can also use this file to add more functionality that runs in the service worker.
9
- */
10
- import { setupServiceWorker } from "@builder.io/qwik-city/service-worker";
11
-
12
- setupServiceWorker();
13
-
14
- self.addEventListener("install", () => self.skipWaiting());
15
- self.addEventListener("activate", (ev) => ev.waitUntil(self.clients.claim()));
16
-
17
- declare const self: ServiceWorkerGlobalScope;
@@ -1,17 +0,0 @@
1
- import { component$, Slot } from "@builder.io/qwik";
2
- import type { RequestHandler } from "@builder.io/qwik-city";
3
-
4
- export const onGet: RequestHandler = async ({ cacheControl }) => {
5
- // Control caching for this request for best performance and to reduce hosting costs:
6
- // https://qwik.dev/docs/caching/
7
- cacheControl({
8
- // Always serve a cached response by default, up to a week stale
9
- staleWhileRevalidate: 60 * 60 * 24 * 7,
10
- // Max once every 5 seconds, revalidate on the server to get a fresh version of this page
11
- maxAge: 5,
12
- });
13
- };
14
-
15
- export default component$(() => {
16
- return <Slot />;
17
- });
@@ -1,18 +0,0 @@
1
- /*
2
- * WHAT IS THIS FILE?
3
- *
4
- * The service-worker.ts file is used to have state of the art prefetching.
5
- * https://qwik.dev/qwikcity/prefetching/overview/
6
- *
7
- * Qwik uses a service worker to speed up your site and reduce latency, ie, not used in the traditional way of offline.
8
- * You can also use this file to add more functionality that runs in the service worker.
9
- */
10
- import { setupServiceWorker } from "@builder.io/qwik-city/service-worker";
11
-
12
- setupServiceWorker();
13
-
14
- addEventListener("install", () => self.skipWaiting());
15
-
16
- addEventListener("activate", () => self.clients.claim());
17
-
18
- declare const self: ServiceWorkerGlobalScope;
@@ -1,31 +0,0 @@
1
- **/*.log
2
- **/.DS_Store
3
- *.
4
- .vscode/settings.json
5
- .history
6
- .yarn
7
- bazel-*
8
- bazel-bin
9
- bazel-out
10
- bazel-qwik
11
- bazel-testlogs
12
- dist
13
- dist-dev
14
- lib
15
- lib-types
16
- etc
17
- external
18
- node_modules
19
- temp
20
- tsc-out
21
- tsdoc-metadata.json
22
- target
23
- output
24
- rollup.config.js
25
- build
26
- .cache
27
- .vscode
28
- .rollup.cache
29
- dist
30
- tsconfig.tsbuildinfo
31
- vite.config.ts
@@ -1,40 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- env: {
4
- browser: true,
5
- es2021: true,
6
- node: true,
7
- },
8
- extends: [
9
- "eslint:recommended",
10
- "plugin:@typescript-eslint/recommended",
11
- "plugin:qwik/recommended",
12
- ],
13
- parser: "@typescript-eslint/parser",
14
- parserOptions: {
15
- tsconfigRootDir: __dirname,
16
- project: ["./tsconfig.json"],
17
- ecmaVersion: 2021,
18
- sourceType: "module",
19
- ecmaFeatures: {
20
- jsx: true,
21
- },
22
- },
23
- plugins: ["@typescript-eslint"],
24
- rules: {
25
- "@typescript-eslint/no-explicit-any": "off",
26
- "@typescript-eslint/explicit-module-boundary-types": "off",
27
- "@typescript-eslint/no-inferrable-types": "off",
28
- "@typescript-eslint/no-non-null-assertion": "off",
29
- "@typescript-eslint/no-empty-interface": "off",
30
- "@typescript-eslint/no-namespace": "off",
31
- "@typescript-eslint/no-empty-function": "off",
32
- "@typescript-eslint/no-this-alias": "off",
33
- "@typescript-eslint/ban-types": "off",
34
- "@typescript-eslint/ban-ts-comment": "off",
35
- "prefer-spread": "off",
36
- "no-case-declarations": "off",
37
- "no-console": "off",
38
- "@typescript-eslint/no-unused-vars": ["error"],
39
- },
40
- };
@@ -1,18 +0,0 @@
1
- /*
2
- * WHAT IS THIS FILE?
3
- *
4
- * The service-worker.ts file is used to have state of the art prefetching.
5
- * https://qwik.dev/qwikcity/prefetching/overview/
6
- *
7
- * Qwik uses a service worker to speed up your site and reduce latency, ie, not used in the traditional way of offline.
8
- * You can also use this file to add more functionality that runs in the service worker.
9
- */
10
- import { setupServiceWorker } from "@builder.io/qwik-city/service-worker";
11
-
12
- setupServiceWorker();
13
-
14
- addEventListener("install", () => self.skipWaiting());
15
-
16
- addEventListener("activate", () => self.clients.claim());
17
-
18
- declare const self: ServiceWorkerGlobalScope;