From 5170e44920458090b8b43ee9cfe5010c25dfe22b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Sun, 4 Dec 2022 18:20:45 +0900 Subject: [PATCH] chore: rename test packages (#11172) --- CONTRIBUTING.md | 2 + package.json | 2 +- playground/alias/dir/module/package.json | 2 +- playground/alias/package.json | 4 +- playground/alias/vite.config.js | 2 +- playground/assets-sanitize/package.json | 2 +- playground/assets/package.json | 2 +- playground/backend-integration/package.json | 2 +- playground/build-old/package.json | 2 +- playground/cli-module/package.json | 2 +- playground/cli/package.json | 2 +- playground/css-codesplit-cjs/package.json | 2 +- playground/css-codesplit/package.json | 2 +- playground/css-sourcemap/package.json | 2 +- playground/css/__tests__/css.spec.ts | 4 - playground/css/css-dep/package.json | 2 +- playground/css/css-js-dep/package.json | 2 +- playground/css/dep.css | 2 +- playground/css/index.html | 3 - playground/css/main.js | 2 +- playground/css/package.json | 6 +- playground/css/sass.scss | 2 +- playground/css/stylus.styl | 1 - playground/data-uri/package.json | 2 +- playground/define/commonjs-dep/package.json | 2 +- playground/define/index.html | 6 +- playground/define/package.json | 4 +- playground/dynamic-import/nested/deps.js | 2 +- playground/dynamic-import/package.json | 4 +- playground/dynamic-import/pkg/package.json | 2 +- playground/env-nested/package.json | 2 +- playground/env/package.json | 2 +- playground/extensions/package.json | 2 +- .../external/dep-that-imports/package.json | 2 +- .../external/dep-that-requires/package.json | 2 +- playground/external/package.json | 6 +- playground/external/src/main.js | 4 +- playground/file-delete-restore/package.json | 2 +- playground/fs-serve/package.json | 2 +- playground/glob-import/package.json | 2 +- playground/hmr/package.json | 2 +- playground/html/package.json | 2 +- .../import-assertion-dep/package.json | 2 +- playground/import-assertion/index.html | 2 +- playground/import-assertion/package.json | 4 +- playground/js-sourcemap/package.json | 2 +- playground/json/index.html | 2 +- playground/json/json-module/package.json | 2 +- playground/json/package.json | 4 +- playground/legacy/package.json | 2 +- playground/lib/package.json | 2 +- playground/minify/package.json | 2 +- playground/multiple-entrypoints/package.json | 2 +- playground/nested-deps/index.html | 12 +- playground/nested-deps/package.json | 12 +- .../nested-deps/test-package-a/package.json | 2 +- .../nested-deps/test-package-b/package.json | 2 +- .../nested-deps/test-package-c/package.json | 2 +- playground/nested-deps/test-package-c/side.js | 2 +- .../nested-deps/test-package-d/index.js | 2 +- .../nested-deps/test-package-d/package.json | 4 +- .../test-package-d-nested/package.json | 2 +- .../nested-deps/test-package-e/index.js | 4 +- .../nested-deps/test-package-e/package.json | 6 +- .../test-package-e-excluded/package.json | 2 +- .../test-package-e-included/package.json | 2 +- playground/nested-deps/vite.config.js | 14 +- playground/object-hooks/package.json | 2 +- .../__tests__/optimize-deps.spec.ts | 2 +- .../added-in-entries/package.json | 2 +- playground/optimize-deps/cjs-dynamic.js | 4 +- playground/optimize-deps/dedupe.js | 2 +- .../dep-cjs-browser-field-bare/package.json | 2 +- .../dep-cjs-compiled-from-cjs/package.json | 2 +- .../dep-cjs-compiled-from-esm/package.json | 2 +- .../dep-cjs-with-assets/package.json | 2 +- .../dep-esbuild-plugin-transform/package.json | 2 +- .../dep-linked-include/package.json | 2 +- .../optimize-deps/dep-linked/package.json | 2 +- .../optimize-deps/dep-node-env/package.json | 2 +- .../dep-non-optimized/package.json | 2 +- .../optimize-deps/dep-not-js/package.json | 2 +- .../dep-relative-to-main/package.json | 2 +- .../dep-with-builtin-module-cjs/package.json | 2 +- .../dep-with-builtin-module-esm/package.json | 2 +- .../dep-with-dynamic-import/package.json | 2 +- .../dep-with-optional-peer-dep/package.json | 2 +- playground/optimize-deps/entry.js | 2 +- playground/optimize-deps/index.html | 37 +- .../optimize-deps/nested-exclude/index.js | 2 +- .../optimize-deps/nested-exclude/package.json | 4 +- .../optimize-deps/nested-include/package.json | 2 +- .../non-optimizable-include/package.json | 2 +- playground/optimize-deps/package.json | 38 +- playground/optimize-deps/vite.config.js | 8 +- playground/optimize-missing-deps/main.js | 2 +- .../missing-dep/index.js | 2 +- .../missing-dep/package.json | 4 +- .../multi-entry-dep/package.json | 2 +- playground/optimize-missing-deps/package.json | 4 +- playground/package.json | 2 +- playground/preload/dep-a/package.json | 2 +- playground/preload/dep-including-a/index.js | 2 +- .../preload/dep-including-a/package.json | 4 +- playground/preload/index.html | 2 +- playground/preload/package.json | 6 +- playground/preload/src/components/About.vue | 2 +- .../{moduleA => module-a}/linked.js | 0 .../{moduleA => module-a}/package.json | 2 +- .../{moduleA => module-a}/src/data.js | 0 .../{moduleA => module-a}/src/index.js | 0 playground/preserve-symlinks/package.json | 4 +- playground/preserve-symlinks/src/main.js | 2 +- playground/resolve-config/package.json | 2 +- playground/resolve-linked/package.json | 2 +- playground/resolve/browser-field/package.json | 2 +- .../browser-module-field1/package.json | 2 +- .../browser-module-field2/package.json | 2 +- .../browser-module-field3/package.json | 2 +- .../resolve/custom-condition/package.json | 2 +- .../resolve/custom-main-field/package.json | 2 +- playground/resolve/exports-env/package.json | 2 +- .../exports-legacy-fallback/package.json | 2 +- playground/resolve/exports-path/package.json | 2 +- playground/resolve/index.html | 64 +-- .../resolve/inline-package/package.json | 2 +- playground/resolve/package.json | 24 +- .../package.json | 2 +- playground/resolve/vite.config.js | 2 +- playground/ssr-deps/css-lib/package.json | 2 +- .../define-properties-exports/package.json | 2 +- .../define-property-exports/package.json | 2 +- .../ssr-deps/external-entry/package.json | 2 +- .../package.json | 2 +- .../ssr-deps/forwarded-export/package.json | 2 +- .../ssr-deps/import-builtin-cjs/package.json | 2 +- playground/ssr-deps/index.html | 2 +- .../ssr-deps/linked-no-external/package.json | 2 +- .../ssr-deps/nested-external/package.json | 2 +- .../ssr-deps/no-external-cjs/package.json | 2 +- .../ssr-deps/no-external-css/package.json | 2 +- .../package.json | 2 +- .../object-assigned-exports/package.json | 2 +- .../only-object-assigned-exports/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- playground/ssr-deps/package.json | 42 +- playground/ssr-deps/pkg-exports/package.json | 2 +- .../ssr-deps/primitive-export/package.json | 2 +- .../ssr-deps/read-file-content/package.json | 2 +- .../ssr-deps/require-absolute/package.json | 2 +- playground/ssr-deps/server.js | 19 +- playground/ssr-deps/src/app.js | 40 +- .../ts-transpiled-exports/package.json | 2 +- playground/ssr-html/package.json | 2 +- .../ssr-noexternal/external-cjs/package.json | 2 +- playground/ssr-noexternal/package.json | 4 +- .../require-external-cjs/main.js | 2 +- .../require-external-cjs/package.json | 4 +- playground/ssr-noexternal/src/entry-server.js | 2 +- playground/ssr-noexternal/vite.config.js | 6 +- playground/ssr-pug/package.json | 2 +- .../ssr-resolve/__tests__/ssr-resolve.spec.ts | 12 +- playground/ssr-resolve/entries/package.json | 2 +- playground/ssr-resolve/main.js | 6 +- playground/ssr-resolve/package.json | 6 +- .../ssr-resolve/pkg-exports/package.json | 2 +- playground/ssr-webworker/package.json | 4 +- playground/ssr-webworker/src/entry-worker.jsx | 2 +- playground/tailwind-sourcemap/package.json | 2 +- playground/tailwind/package.json | 2 +- playground/transform-plugin/package.json | 2 +- .../tsconfig-json-load-error/package.json | 2 +- playground/tsconfig-json/package.json | 2 +- playground/wasm/package.json | 2 +- .../worker/dep-to-optimize/package.json | 2 +- playground/worker/my-worker.ts | 2 +- playground/worker/package.json | 4 +- pnpm-lock.yaml | 434 +++++++++--------- 179 files changed, 588 insertions(+), 564 deletions(-) rename playground/preserve-symlinks/{moduleA => module-a}/linked.js (100%) rename playground/preserve-symlinks/{moduleA => module-a}/package.json (65%) rename playground/preserve-symlinks/{moduleA => module-a}/src/data.js (100%) rename playground/preserve-symlinks/{moduleA => module-a}/src/index.js (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3065a63be5fc7a..6123e651a90d2c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -147,6 +147,8 @@ test('?raw import', async () => { In many test cases, we need to mock dependencies using `link:` and `file:` protocols. `pnpm` treats `link:` as symlinks and `file:` as hardlinks. To test dependencies as if they were copied into `node_modules`, use the `file:` protocol. Otherwise, use the `link:` protocol. +For a mock dependency, make sure you add a `@vitejs/test-` prefix to the package name. This will avoid possible issues like false-positive alerts. + ## Debug Logging You can set the `DEBUG` environment variable to turn on debugging logs (e.g. `DEBUG="vite:resolve"`). To see all debug logs, you can set `DEBUG="vite:*"`, but be warned that it will be quite noisy. You can run `grep -r "createDebugger('vite:" packages/vite/src/` to see a list of available debug scopes. diff --git a/package.json b/package.json index d2c87177ef40b5..11c7311c25205c 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "vite-monorepo", + "name": "@vitejs/vite-monorepo", "private": true, "engines": { "node": "^14.18.0 || >=16.0.0" diff --git a/playground/alias/dir/module/package.json b/playground/alias/dir/module/package.json index 5065df363f87ee..8d3b7c4c8edc67 100644 --- a/playground/alias/dir/module/package.json +++ b/playground/alias/dir/module/package.json @@ -1,5 +1,5 @@ { - "name": "@vite/aliased-module", + "name": "@vitejs/test-aliased-module", "private": true, "type": "module", "version": "0.0.0" diff --git a/playground/alias/package.json b/playground/alias/package.json index d9f145331777b3..1dfa8d79783bfe 100644 --- a/playground/alias/package.json +++ b/playground/alias/package.json @@ -1,5 +1,5 @@ { - "name": "test-alias", + "name": "@vitejs/test-alias", "private": true, "version": "0.0.0", "scripts": { @@ -14,6 +14,6 @@ "@vue/shared": "^3.2.45" }, "devDependencies": { - "resolve-linked": "workspace:*" + "@vitejs/test-resolve-linked": "workspace:*" } } diff --git a/playground/alias/vite.config.js b/playground/alias/vite.config.js index 97ffcde1adc676..cdabb2594d8367 100644 --- a/playground/alias/vite.config.js +++ b/playground/alias/vite.config.js @@ -8,7 +8,7 @@ module.exports = { alias: [ { find: 'fs', replacement: path.resolve(__dirname, 'test.js') }, { find: 'fs-dir', replacement: path.resolve(__dirname, 'dir') }, - { find: 'dep', replacement: 'resolve-linked' }, + { find: 'dep', replacement: '@vitejs/test-resolve-linked' }, { find: /^regex\/(.*)/, replacement: `${path.resolve(__dirname, 'dir')}/$1`, diff --git a/playground/assets-sanitize/package.json b/playground/assets-sanitize/package.json index 3ade78a2bd33fe..5deedbfaf97f38 100644 --- a/playground/assets-sanitize/package.json +++ b/playground/assets-sanitize/package.json @@ -1,5 +1,5 @@ { - "name": "test-assets-sanitize", + "name": "@vitejs/test-assets-sanitize", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/assets/package.json b/playground/assets/package.json index 6d28ed91719070..beec899e36bd68 100644 --- a/playground/assets/package.json +++ b/playground/assets/package.json @@ -1,5 +1,5 @@ { - "name": "test-assets", + "name": "@vitejs/test-assets", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/backend-integration/package.json b/playground/backend-integration/package.json index 7941502b6a439d..08cc035890143a 100644 --- a/playground/backend-integration/package.json +++ b/playground/backend-integration/package.json @@ -1,5 +1,5 @@ { - "name": "test-backend-integration", + "name": "@vitejs/test-backend-integration", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/build-old/package.json b/playground/build-old/package.json index bb7f1b9b861538..9766699a41d435 100644 --- a/playground/build-old/package.json +++ b/playground/build-old/package.json @@ -1,5 +1,5 @@ { - "name": "test-build-old", + "name": "@vitejs/test-build-old", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/cli-module/package.json b/playground/cli-module/package.json index 30a94d2bb877ad..581a990df95260 100644 --- a/playground/cli-module/package.json +++ b/playground/cli-module/package.json @@ -1,5 +1,5 @@ { - "name": "test-cli-module", + "name": "@vitejs/test-cli-module", "private": true, "version": "0.0.0", "type": "module", diff --git a/playground/cli/package.json b/playground/cli/package.json index d2f8476d409c2e..39b7efc3b24304 100644 --- a/playground/cli/package.json +++ b/playground/cli/package.json @@ -1,5 +1,5 @@ { - "name": "test-cli", + "name": "@vitejs/test-cli", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/css-codesplit-cjs/package.json b/playground/css-codesplit-cjs/package.json index 3504b18053b39b..97f1473d267e46 100644 --- a/playground/css-codesplit-cjs/package.json +++ b/playground/css-codesplit-cjs/package.json @@ -1,5 +1,5 @@ { - "name": "test-css-codesplit-cjs", + "name": "@vitejs/test-css-codesplit-cjs", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/css-codesplit/package.json b/playground/css-codesplit/package.json index b6fe27f6d35759..ac3149030dceaf 100644 --- a/playground/css-codesplit/package.json +++ b/playground/css-codesplit/package.json @@ -1,5 +1,5 @@ { - "name": "test-css-codesplit", + "name": "@vitejs/test-css-codesplit", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/css-sourcemap/package.json b/playground/css-sourcemap/package.json index 8892a42fae1f99..ea3f93f6705565 100644 --- a/playground/css-sourcemap/package.json +++ b/playground/css-sourcemap/package.json @@ -1,5 +1,5 @@ { - "name": "test-css-sourcemap", + "name": "@vitejs/test-css-sourcemap", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/css/__tests__/css.spec.ts b/playground/css/__tests__/css.spec.ts index 77878820eab415..3f058e24768c07 100644 --- a/playground/css/__tests__/css.spec.ts +++ b/playground/css/__tests__/css.spec.ts @@ -284,10 +284,6 @@ test('@import dependency w/ sass entry', async () => { expect(await getColor('.css-dep-sass')).toBe('orange') }) -test('@import dependency w/ stylus entry', async () => { - expect(await getColor('.css-dep-stylus')).toBe('red') -}) - test('@import dependency w/out package scss', async () => { expect(await getColor('.sass-dep')).toBe('lavender') }) diff --git a/playground/css/css-dep/package.json b/playground/css/css-dep/package.json index 451510a672485f..204e8c71b0ebba 100644 --- a/playground/css/css-dep/package.json +++ b/playground/css/css-dep/package.json @@ -1,5 +1,5 @@ { - "name": "css-dep", + "name": "@vitejs/test-css-dep", "private": true, "version": "1.0.0", "main": "index.js", diff --git a/playground/css/css-js-dep/package.json b/playground/css/css-js-dep/package.json index d762f6566fdbdc..ce96e1e3c2b3f9 100644 --- a/playground/css/css-js-dep/package.json +++ b/playground/css/css-js-dep/package.json @@ -1,5 +1,5 @@ { - "name": "css-js-dep", + "name": "@vitejs/test-css-js-dep", "private": true, "type": "module", "version": "1.0.0", diff --git a/playground/css/dep.css b/playground/css/dep.css index 8d5b62847cd70e..ad3e1bcd12480c 100644 --- a/playground/css/dep.css +++ b/playground/css/dep.css @@ -1 +1 @@ -@import 'css-dep'; +@import '@vitejs/test-css-dep'; diff --git a/playground/css/index.html b/playground/css/index.html index 93f77dfa2eb970..486c927832bce8 100644 --- a/playground/css/index.html +++ b/playground/css/index.html @@ -124,9 +124,6 @@

CSS

@import dependency w/ sass entrypoints: this should be orange

-

- @import dependency w/ styl entrypoints: this should be red -

PostCSS dir-dependency: this should be grey

diff --git a/playground/css/main.js b/playground/css/main.js index 5a2b726c1b7e92..e38ff356315879 100644 --- a/playground/css/main.js +++ b/playground/css/main.js @@ -46,7 +46,7 @@ import './dep.css' import './glob-dep.css' // eslint-disable-next-line import/order -import { barModuleClasses } from 'css-js-dep' +import { barModuleClasses } from '@vitejs/test-css-js-dep' document .querySelector('.css-js-dep-module') .classList.add(barModuleClasses.cssJsDepModule) diff --git a/playground/css/package.json b/playground/css/package.json index 14971a77f73166..3504ce9bce2745 100644 --- a/playground/css/package.json +++ b/playground/css/package.json @@ -1,5 +1,5 @@ { - "name": "test-css", + "name": "@vitejs/test-css", "private": true, "version": "0.0.0", "scripts": { @@ -12,8 +12,8 @@ "preview:relative-base": "vite --config ./vite.config-relative-base.js preview" }, "devDependencies": { - "css-dep": "link:./css-dep", - "css-js-dep": "file:./css-js-dep", + "@vitejs/test-css-dep": "link:./css-dep", + "@vitejs/test-css-js-dep": "file:./css-js-dep", "fast-glob": "^3.2.12", "less": "^4.1.3", "postcss-nested": "^5.0.6", diff --git a/playground/css/sass.scss b/playground/css/sass.scss index 721e6b9bfbca6c..796d9ba68b0c05 100644 --- a/playground/css/sass.scss +++ b/playground/css/sass.scss @@ -1,6 +1,6 @@ @import '=/nested'; // alias + custom index resolving -> /nested/_index.scss @import '=/nested/partial'; // sass convention: omitting leading _ for partials -@import 'css-dep'; // package w/ sass entry points +@import '@vitejs/test-css-dep'; // package w/ sass entry points @import 'virtual-dep'; // virtual file added through importer @import '=/pkg-dep'; // package w/out sass field @import '=/weapp.wxss'; // wxss file diff --git a/playground/css/stylus.styl b/playground/css/stylus.styl index 7b77ca36531be8..d43ba92d7a99ce 100644 --- a/playground/css/stylus.styl +++ b/playground/css/stylus.styl @@ -1,5 +1,4 @@ @import './nested/nested' -@import 'css-dep'; // package w/ styl entry points $color ?= blue diff --git a/playground/data-uri/package.json b/playground/data-uri/package.json index 4d30ad97b9acbb..c19befed0bca09 100644 --- a/playground/data-uri/package.json +++ b/playground/data-uri/package.json @@ -1,5 +1,5 @@ { - "name": "test-data-uri", + "name": "@vitejs/test-data-uri", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/define/commonjs-dep/package.json b/playground/define/commonjs-dep/package.json index 3047ae68c9f75a..f8ac503baaf9a9 100644 --- a/playground/define/commonjs-dep/package.json +++ b/playground/define/commonjs-dep/package.json @@ -1,5 +1,5 @@ { - "name": "commonjs-dep", + "name": "@vitejs/test-commonjs-dep", "private": true, "version": "1.0.0", "type": "commonjs" diff --git a/playground/define/index.html b/playground/define/index.html index 7d81d42d8966a1..da1fa0fc5f3a23 100644 --- a/playground/define/index.html +++ b/playground/define/index.html @@ -56,7 +56,11 @@

Define

document.querySelector(el).textContent = text } - import { defined, importMetaEnvUndefined, processEnvUndefined } from 'dep' + import { + defined, + importMetaEnvUndefined, + processEnvUndefined, + } from '@vitejs/test-commonjs-dep' text('.define-in-dep', JSON.stringify(defined)) text('.import-meta-env-undefined', importMetaEnvUndefined) text('.process-env-undefined', processEnvUndefined) diff --git a/playground/define/package.json b/playground/define/package.json index 987330d432c9a9..9a144c76a4dfb0 100644 --- a/playground/define/package.json +++ b/playground/define/package.json @@ -1,5 +1,5 @@ { - "name": "test-define", + "name": "@vitejs/test-define", "private": true, "version": "0.0.0", "scripts": { @@ -9,6 +9,6 @@ "preview": "vite preview" }, "dependencies": { - "dep": "file:./commonjs-dep" + "@vitejs/test-commonjs-dep": "file:./commonjs-dep" } } diff --git a/playground/dynamic-import/nested/deps.js b/playground/dynamic-import/nested/deps.js index 88fd4787941fd0..34668f67263505 100644 --- a/playground/dynamic-import/nested/deps.js +++ b/playground/dynamic-import/nested/deps.js @@ -1,3 +1,3 @@ /* don't include dynamic import inside this file */ -import 'pkg' +import '@vitejs/test-pkg' diff --git a/playground/dynamic-import/package.json b/playground/dynamic-import/package.json index 3b66d0af1873cc..55137ef5fb9375 100644 --- a/playground/dynamic-import/package.json +++ b/playground/dynamic-import/package.json @@ -1,5 +1,5 @@ { - "name": "test-dynamic-import", + "name": "@vitejs/test-dynamic-import", "private": true, "version": "0.0.0", "scripts": { @@ -9,6 +9,6 @@ "preview": "vite preview" }, "dependencies": { - "pkg": "file:./pkg" + "@vitejs/test-pkg": "file:./pkg" } } diff --git a/playground/dynamic-import/pkg/package.json b/playground/dynamic-import/pkg/package.json index 1eab564572e245..fb2e8c8815c8fa 100644 --- a/playground/dynamic-import/pkg/package.json +++ b/playground/dynamic-import/pkg/package.json @@ -1,5 +1,5 @@ { - "name": "pkg", + "name": "@vitejs/test-pkg", "type": "module", "private": true, "version": "1.0.0", diff --git a/playground/env-nested/package.json b/playground/env-nested/package.json index 530b4e621005b0..545eefb2f690d5 100644 --- a/playground/env-nested/package.json +++ b/playground/env-nested/package.json @@ -1,5 +1,5 @@ { - "name": "test-env-nested", + "name": "@vitejs/test-env-nested", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/env/package.json b/playground/env/package.json index 091afe4bd08a88..969f4061114a9d 100644 --- a/playground/env/package.json +++ b/playground/env/package.json @@ -1,5 +1,5 @@ { - "name": "test-env", + "name": "@vitejs/test-env", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/extensions/package.json b/playground/extensions/package.json index d4debfdccd2553..4457686725f4ab 100644 --- a/playground/extensions/package.json +++ b/playground/extensions/package.json @@ -1,5 +1,5 @@ { - "name": "test-extensions", + "name": "@vitejs/test-extensions", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/external/dep-that-imports/package.json b/playground/external/dep-that-imports/package.json index b688165c9fc521..0e4028ec0af878 100644 --- a/playground/external/dep-that-imports/package.json +++ b/playground/external/dep-that-imports/package.json @@ -1,5 +1,5 @@ { - "name": "@vitejs/dep-that-imports", + "name": "@vitejs/test-dep-that-imports", "private": true, "version": "0.0.0", "dependencies": { diff --git a/playground/external/dep-that-requires/package.json b/playground/external/dep-that-requires/package.json index bc1195ccfc6add..2ba1dc8be5d63a 100644 --- a/playground/external/dep-that-requires/package.json +++ b/playground/external/dep-that-requires/package.json @@ -1,5 +1,5 @@ { - "name": "@vitejs/dep-that-requires", + "name": "@vitejs/test-dep-that-requires", "private": true, "version": "0.0.0", "dependencies": { diff --git a/playground/external/package.json b/playground/external/package.json index 19ad4f96430d17..1556e2328bf30d 100644 --- a/playground/external/package.json +++ b/playground/external/package.json @@ -1,5 +1,5 @@ { - "name": "external-test", + "name": "@vitejs/test-external", "private": true, "version": "0.0.0", "scripts": { @@ -9,8 +9,8 @@ "preview": "vite preview" }, "dependencies": { - "@vitejs/dep-that-imports": "file:./dep-that-imports", - "@vitejs/dep-that-requires": "file:./dep-that-requires" + "@vitejs/test-dep-that-imports": "file:./dep-that-imports", + "@vitejs/test-dep-that-requires": "file:./dep-that-requires" }, "devDependencies": { "slash3": "npm:slash@^3.0.0", diff --git a/playground/external/src/main.js b/playground/external/src/main.js index f16b94b75706e5..46d97cebd47915 100644 --- a/playground/external/src/main.js +++ b/playground/external/src/main.js @@ -1,2 +1,2 @@ -import '@vitejs/dep-that-imports' -import '@vitejs/dep-that-requires' +import '@vitejs/test-dep-that-imports' +import '@vitejs/test-dep-that-requires' diff --git a/playground/file-delete-restore/package.json b/playground/file-delete-restore/package.json index 28a934274df169..ce3246877e945f 100644 --- a/playground/file-delete-restore/package.json +++ b/playground/file-delete-restore/package.json @@ -1,5 +1,5 @@ { - "name": "test-file-delete-restore", + "name": "@vitejs/test-file-delete-restore", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/fs-serve/package.json b/playground/fs-serve/package.json index 6a5d18e2303c53..15fdfe3294cd83 100644 --- a/playground/fs-serve/package.json +++ b/playground/fs-serve/package.json @@ -1,5 +1,5 @@ { - "name": "test-fs-serve", + "name": "@vitejs/test-fs-serve", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/glob-import/package.json b/playground/glob-import/package.json index 2dd90e31b73b25..f3ac7ae9313db5 100644 --- a/playground/glob-import/package.json +++ b/playground/glob-import/package.json @@ -1,5 +1,5 @@ { - "name": "test-import-context", + "name": "@vitejs/test-import-context", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/hmr/package.json b/playground/hmr/package.json index b797d181b17ece..8bb1d44d18bbe0 100644 --- a/playground/hmr/package.json +++ b/playground/hmr/package.json @@ -1,5 +1,5 @@ { - "name": "test-hmr", + "name": "@vitejs/test-hmr", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/html/package.json b/playground/html/package.json index 6db0bd91981ce0..9eadef9f1a71a8 100644 --- a/playground/html/package.json +++ b/playground/html/package.json @@ -1,5 +1,5 @@ { - "name": "test-html", + "name": "@vitejs/test-html", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/import-assertion/import-assertion-dep/package.json b/playground/import-assertion/import-assertion-dep/package.json index 6f701dc444bd67..9d03675fb4a5da 100644 --- a/playground/import-assertion/import-assertion-dep/package.json +++ b/playground/import-assertion/import-assertion-dep/package.json @@ -1,5 +1,5 @@ { - "name": "@vitejs/import-assertion-dep", + "name": "@vitejs/test-import-assertion-dep", "private": true, "version": "0.0.0", "type": "module", diff --git a/playground/import-assertion/index.html b/playground/import-assertion/index.html index 54b576a17ba66f..1135de1ff891e0 100644 --- a/playground/import-assertion/index.html +++ b/playground/import-assertion/index.html @@ -10,7 +10,7 @@

From dependency

import * as data from './data.json' assert { type: 'json' } text('.src', data.foo) - import * as depData from '@vitejs/import-assertion-dep' + import * as depData from '@vitejs/test-import-assertion-dep' text('.dep', depData.hello) function text(el, text) { diff --git a/playground/import-assertion/package.json b/playground/import-assertion/package.json index 68128c59993ffb..03248a46ef4dd3 100644 --- a/playground/import-assertion/package.json +++ b/playground/import-assertion/package.json @@ -1,5 +1,5 @@ { - "name": "test-import-assertion", + "name": "@vitejs/test-import-assertion", "private": true, "version": "0.0.0", "scripts": { @@ -9,6 +9,6 @@ "preview": "vite preview" }, "dependencies": { - "@vitejs/import-assertion-dep": "file:./import-assertion-dep" + "@vitejs/test-import-assertion-dep": "file:./import-assertion-dep" } } diff --git a/playground/js-sourcemap/package.json b/playground/js-sourcemap/package.json index 92b166d2f302c2..4b82881a37e473 100644 --- a/playground/js-sourcemap/package.json +++ b/playground/js-sourcemap/package.json @@ -1,5 +1,5 @@ { - "name": "test-js-sourcemap", + "name": "@vitejs/test-js-sourcemap", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/json/index.html b/playground/json/index.html index 46ed94ab0463f7..ee076836f10b53 100644 --- a/playground/json/index.html +++ b/playground/json/index.html @@ -55,7 +55,7 @@

HMR

import raw from './test.json?raw' text('.raw', raw) - import moduleJSON from 'json-module' + import moduleJSON from '@vitejs/test-json-module' text('.module', JSON.stringify(moduleJSON)) import hasBomJson from './json-bom/has-bom.json' diff --git a/playground/json/json-module/package.json b/playground/json/json-module/package.json index 17db87793a74e3..a02c431845033f 100644 --- a/playground/json/json-module/package.json +++ b/playground/json/json-module/package.json @@ -1,4 +1,4 @@ { - "name": "json-module", + "name": "@vitejs/test-json-module", "version": "0.0.0" } diff --git a/playground/json/package.json b/playground/json/package.json index 2347cb2e1ebfb7..cf4584ffd3d451 100644 --- a/playground/json/package.json +++ b/playground/json/package.json @@ -1,5 +1,5 @@ { - "name": "test-json", + "name": "@vitejs/test-json", "private": true, "version": "0.0.0", "scripts": { @@ -13,7 +13,7 @@ }, "devDependencies": { "express": "^4.18.2", - "json-module": "file:./json-module", + "@vitejs/test-json-module": "file:./json-module", "vue": "^3.2.45" } } diff --git a/playground/legacy/package.json b/playground/legacy/package.json index 16cfc66dc1a9a7..7c001f641cb3c1 100644 --- a/playground/legacy/package.json +++ b/playground/legacy/package.json @@ -1,5 +1,5 @@ { - "name": "test-legacy", + "name": "@vitejs/test-legacy", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/lib/package.json b/playground/lib/package.json index 66b827b7c84179..89b3f8fb909c06 100644 --- a/playground/lib/package.json +++ b/playground/lib/package.json @@ -1,5 +1,5 @@ { - "name": "@example/my-lib", + "name": "@vitejs/test-my-lib", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/minify/package.json b/playground/minify/package.json index e46abf8c4b218c..75fbfe7f5e0973 100644 --- a/playground/minify/package.json +++ b/playground/minify/package.json @@ -1,5 +1,5 @@ { - "name": "test-minify", + "name": "@vitejs/test-minify", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/multiple-entrypoints/package.json b/playground/multiple-entrypoints/package.json index a64997aedc5af1..92ea62649ff4f0 100644 --- a/playground/multiple-entrypoints/package.json +++ b/playground/multiple-entrypoints/package.json @@ -1,5 +1,5 @@ { - "name": "multiple-entrypoints", + "name": "@vitejs/test-multiple-entrypoints", "private": true, "version": "0.0.0", "scripts": { diff --git a/playground/nested-deps/index.html b/playground/nested-deps/index.html index b301d32cafc012..2efb4f71044208 100644 --- a/playground/nested-deps/index.html +++ b/playground/nested-deps/index.html @@ -23,12 +23,12 @@

exclude dependency of pre-bundled dependency

nested module instance count: