From 670e2de51bd59cb130250bd7d75c9220ac88a503 Mon Sep 17 00:00:00 2001 From: gioboa Date: Fri, 31 Jul 2026 18:02:03 +0200 Subject: [PATCH] feat: 2.0.4 --- .changeset/bright-buckets-dance.md | 5 -- .changeset/bright-pictures-direct.md | 5 -- .changeset/lazy-loading-default.md | 5 -- package.json | 5 +- packages/qwik-image/package.json | 6 +-- packages/qwik-image/vite.config.ts | 27 +++++++--- pnpm-lock.yaml | 76 ---------------------------- 7 files changed, 24 insertions(+), 105 deletions(-) delete mode 100644 .changeset/bright-buckets-dance.md delete mode 100644 .changeset/bright-pictures-direct.md delete mode 100644 .changeset/lazy-loading-default.md diff --git a/.changeset/bright-buckets-dance.md b/.changeset/bright-buckets-dance.md deleted file mode 100644 index b662bf4..0000000 --- a/.changeset/bright-buckets-dance.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"qwik-image": patch ---- - -Add package license metadata. diff --git a/.changeset/bright-pictures-direct.md b/.changeset/bright-pictures-direct.md deleted file mode 100644 index 41036c1..0000000 --- a/.changeset/bright-pictures-direct.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'qwik-image': minor ---- - -Add a `Picture` component for art-directed responsive images. diff --git a/.changeset/lazy-loading-default.md b/.changeset/lazy-loading-default.md deleted file mode 100644 index 2d244fb..0000000 --- a/.changeset/lazy-loading-default.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'qwik-image': major ---- - -Images now render `loading="lazy"` by default instead of loading eagerly. Add the new `priority` prop to above-the-fold/LCP images to render `loading="eager"` and `fetchpriority="high"`; explicit `loading`/`fetchpriority` props take precedence. diff --git a/package.json b/package.json index f2e914a..d036888 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,6 @@ "pnpm": ">=11.1.3" }, "devDependencies": { - "@qwik.dev/core": "2.0.0-beta.38", - "@qwik.dev/router": "2.0.0-beta.38", "@changesets/cli": "^2.31.0", "@commitlint/cli": "17.6.1", "@commitlint/config-angular": "17.6.1", @@ -31,6 +29,8 @@ "@nx/js": "21.6.11", "@nx/vite": "21.6.11", "@nx/workspace": "21.6.11", + "@qwik.dev/core": "2.0.0-beta.38", + "@qwik.dev/router": "2.0.0-beta.38", "@types/node": "20.19.43", "@typescript-eslint/eslint-plugin": "7.7.1", "@typescript-eslint/parser": "7.7.1", @@ -54,7 +54,6 @@ "vite": "7.3.6", "vite-plugin-dts": "~2.3.0", "vite-plugin-eslint": "1.8.1", - "vite-plugin-static-copy": "4.1.1", "vite-tsconfig-paths": "~4.2.0", "vitest": "3.2.7" }, diff --git a/packages/qwik-image/package.json b/packages/qwik-image/package.json index 8ef0a1e..726fe23 100644 --- a/packages/qwik-image/package.json +++ b/packages/qwik-image/package.json @@ -1,8 +1,7 @@ { "name": "qwik-image", - "version": "2.0.3", + "version": "2.0.4", "description": "The goal is a component to support performant images on the web and automatic image optimization. That will be built as a pluggable component so devs could connect different image loaders to it (like Cloudinary, or builder)", - "main": "./index.qwik.cjs", "qwik": "./index.qwik.mjs", "module": "./index.qwik.mjs", "types": "./index.d.ts", @@ -20,8 +19,7 @@ "exports": { ".": { "types": "./index.d.ts", - "import": "./index.qwik.mjs", - "require": "./index.qwik.cjs" + "import": "./index.qwik.mjs" } }, "dependencies": {}, diff --git a/packages/qwik-image/vite.config.ts b/packages/qwik-image/vite.config.ts index 826d85e..92673b1 100644 --- a/packages/qwik-image/vite.config.ts +++ b/packages/qwik-image/vite.config.ts @@ -1,11 +1,11 @@ /// import { qwikVite } from '@qwik.dev/core/optimizer'; +import { readFileSync } from 'node:fs'; import { dirname, join } from 'path'; import { fileURLToPath } from 'url'; import { defineConfig } from 'vite'; import dts from 'vite-plugin-dts'; -import { viteStaticCopy } from 'vite-plugin-static-copy'; import tsconfigPaths from 'vite-tsconfig-paths'; import pkg from './package.json'; @@ -22,6 +22,7 @@ export default defineConfig({ qwikVite(), tsconfigPaths({ root: workspaceRoot }), dts({ + entryRoot: 'src', tsConfigFilePath: join( dirname(fileURLToPath(import.meta.url)), 'tsconfig.lib.json' @@ -29,9 +30,21 @@ export default defineConfig({ // Faster builds by skipping tests. Set this to false to enable type checking. skipDiagnostics: true, }), - viteStaticCopy({ - targets: [{ src: '../../README.md', dest: './' }], - }), + { + name: 'package-files', + generateBundle() { + this.emitFile({ + type: 'asset', + fileName: 'README.md', + source: readFileSync(join(workspaceRoot, 'README.md')), + }); + this.emitFile({ + type: 'asset', + fileName: 'package.json', + source: `${JSON.stringify(pkg, null, 2)}\n`, + }); + }, + }, ], server: { fs: { @@ -43,13 +56,13 @@ export default defineConfig({ // Configuration for building your library. // See: https://vitejs.dev/guide/build.html#library-mode build: { + emptyOutDir: true, target: 'es2020', lib: { entry: './src/index', - formats: ['es', 'cjs'] as const, + formats: ['es'] as const, // This adds .qwik so all files are processed by the optimizer - fileName: (format, entryName) => - `${entryName}.qwik.${format === 'es' ? 'mjs' : 'cjs'}`, + fileName: (_format, entryName) => `${entryName}.qwik.mjs`, }, rollupOptions: { output: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4957cbb..a925bd3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -119,9 +119,6 @@ importers: vite-plugin-eslint: specifier: 1.8.1 version: 1.8.1(eslint@8.57.1(supports-color@8.1.1))(vite@7.3.6(@types/node@20.19.43)(yaml@2.9.0)) - vite-plugin-static-copy: - specifier: 4.1.1 - version: 4.1.1(vite@7.3.6(@types/node@20.19.43)(yaml@2.9.0)) vite-tsconfig-paths: specifier: ~4.2.0 version: 4.2.0(supports-color@8.1.1)(typescript@5.4.5)(vite@7.3.6(@types/node@20.19.43)(yaml@2.9.0)) @@ -2021,10 +2018,6 @@ packages: resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} engines: {node: '>=10'} - anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} - arch@2.2.0: resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} @@ -2159,10 +2152,6 @@ packages: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} - binary-extensions@2.2.0: - resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} - engines: {node: '>=8'} - bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} @@ -2286,10 +2275,6 @@ packages: resolution: {integrity: sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==} engines: {node: '>= 0.8.0'} - chokidar@3.6.0: - resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} - engines: {node: '>= 8.10.0'} - ci-info@3.8.0: resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} engines: {node: '>=8'} @@ -3467,10 +3452,6 @@ packages: is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} - is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - is-boolean-object@1.1.2: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} @@ -4212,10 +4193,6 @@ packages: resolution: {integrity: sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==} engines: {node: ^16.14.0 || >=18.0.0} - normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - npm-package-arg@11.0.1: resolution: {integrity: sha512-M7s1BD4NxdAvBKUPqqRW957Xwcl/4Zvo8Aj+ANrzvIPzGJZElrH7Z//rSaec2ORcND6FHHLnZeY8qgTpXDMFQQ==} engines: {node: ^16.14.0 || >=18.0.0} @@ -4330,10 +4307,6 @@ packages: resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} engines: {node: '>=10'} - p-map@7.0.6: - resolution: {integrity: sha512-I4Prw6ivkd6p8PiYR1tXASOAOBzIJwu0TB7fqaX0c/8c3QAehNYmX57EijyGGGBt3c/BIowGwV03RVBtXvHEVg==} - engines: {node: '>=18'} - p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} @@ -4556,10 +4529,6 @@ packages: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} - readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} - recma-build-jsx@1.0.0: resolution: {integrity: sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew==} @@ -5349,12 +5318,6 @@ packages: eslint: '>=7' vite: '>=2' - vite-plugin-static-copy@4.1.1: - resolution: {integrity: sha512-GrlA8YklrAfSyxJ4M3fdQLOo9oNkp56IM9FYgX/WtEgeIFkPwhu4wzpufBCIuNKCa6Fn77FkRdYxkHqV0FwjAw==} - engines: {node: ^22.0.0 || >=24.0.0} - peerDependencies: - vite: ^6.0.0 || ^7.0.0 || ^8.0.0 - vite-tsconfig-paths@4.2.0: resolution: {integrity: sha512-jGpus0eUy5qbbMVGiTxCL1iB9ZGN6Bd37VGLJU39kTDD6ZfULTTb1bcc5IeTWqWJKiWV5YihCaibeASPiGi8kw==} peerDependencies: @@ -7914,11 +7877,6 @@ snapshots: ansi-styles@5.2.0: {} - anymatch@3.1.3: - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - arch@2.2.0: {} arg@4.1.3: {} @@ -8064,8 +8022,6 @@ snapshots: dependencies: is-windows: 1.0.2 - binary-extensions@2.2.0: {} - bl@4.1.0: dependencies: buffer: 5.7.1 @@ -8187,18 +8143,6 @@ snapshots: check-more-types@2.24.0: {} - chokidar@3.6.0: - dependencies: - anymatch: 3.1.3 - braces: 3.0.3 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 - ci-info@3.8.0: {} clean-stack@2.2.0: {} @@ -9667,10 +9611,6 @@ snapshots: dependencies: has-bigints: 1.0.2 - is-binary-path@2.1.0: - dependencies: - binary-extensions: 2.2.0 - is-boolean-object@1.1.2: dependencies: call-bind: 1.0.7 @@ -10642,8 +10582,6 @@ snapshots: semver: 7.8.5 validate-npm-package-license: 3.0.4 - normalize-path@3.0.0: {} - npm-package-arg@11.0.1: dependencies: hosted-git-info: 7.0.2 @@ -10825,8 +10763,6 @@ snapshots: dependencies: aggregate-error: 3.1.0 - p-map@7.0.6: {} - p-try@2.2.0: {} package-manager-detector@0.2.11: @@ -11019,10 +10955,6 @@ snapshots: string_decoder: 1.3.0 util-deprecate: 1.0.2 - readdirp@3.6.0: - dependencies: - picomatch: 2.3.1 - recma-build-jsx@1.0.0: dependencies: '@types/estree': 1.0.8 @@ -11933,14 +11865,6 @@ snapshots: rollup: 2.79.1 vite: 7.3.6(@types/node@20.19.43)(yaml@2.9.0) - vite-plugin-static-copy@4.1.1(vite@7.3.6(@types/node@20.19.43)(yaml@2.9.0)): - dependencies: - chokidar: 3.6.0 - p-map: 7.0.6 - picocolors: 1.1.1 - tinyglobby: 0.2.17 - vite: 7.3.6(@types/node@20.19.43)(yaml@2.9.0) - vite-tsconfig-paths@4.2.0(supports-color@8.1.1)(typescript@5.4.5)(vite@7.3.6(@types/node@20.19.43)(yaml@2.9.0)): dependencies: debug: 4.3.4(supports-color@8.1.1)