Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions packages/cli/snap-tests-global/migration-add-git-hooks/snap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@ VITE+ - The Unified Toolchain for the Web
{
"name": "migration-add-git-hooks",
"devDependencies": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vite-plus": "latest"
},
"pnpm": {
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
},
"peerDependencyRules": {
"allowAny": [
"vite",
"vitest"
],
"allowedVersions": {
"vite": "*",
"vitest": "*"
}
}
"vite": "catalog:",
"vite-plus": "catalog:"
},
"packageManager": "pnpm@<semver>",
"scripts": {
"prepare": "vp config"
}
}

> cat pnpm-workspace.yaml # check pnpm-workspace.yaml has overrides and catalog
catalog:
vite: npm:@voidzero-dev/vite-plus-core@latest
vitest: npm:@voidzero-dev/vite-plus-test@latest
vite-plus: latest
overrides:
vite: 'catalog:'
vitest: 'catalog:'
peerDependencyRules:
allowAny:
- vite
- vitest
allowedVersions:
vite: '*'
vitest: '*'

> cat .vite-hooks/pre-commit # check pre-commit hook
vp staged

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"commands": [
{ "command": "git init", "ignoreOutput": true },
{
"command": "git init",
"ignoreOutput": true
},
"vp migrate --no-interactive # migration should add git hooks setup",
"cat package.json # check package.json has prepare script and lint-staged config",
"cat pnpm-workspace.yaml # check pnpm-workspace.yaml has overrides and catalog",
"cat .vite-hooks/pre-commit # check pre-commit hook",
"test -d .vite-hooks/_ && echo 'hook shims exist' || echo 'no hook shims' # check vp config ran",
"git config --local core.hooksPath # should be set to .vite-hooks/_",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,26 @@ export default defineConfig({
> cat package.json # check package.json
{
"devDependencies": {
"vite-plus": "latest"
},
"pnpm": {
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
},
"peerDependencyRules": {
"allowAny": [
"vite",
"vitest"
],
"allowedVersions": {
"vite": "*",
"vitest": "*"
}
}
"vite-plus": "catalog:"
},
"packageManager": "pnpm@<semver>",
"scripts": {
"prepare": "vp config"
}
}

> cat pnpm-workspace.yaml # check pnpm-workspace.yaml has overrides and catalog
catalog:
vite: npm:@voidzero-dev/vite-plus-core@latest
vitest: npm:@voidzero-dev/vite-plus-test@latest
vite-plus: latest
overrides:
vite: 'catalog:'
vitest: 'catalog:'
peerDependencyRules:
allowAny:
- vite
- vitest
allowedVersions:
vite: '*'
vitest: '*'
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"cat vite.config.ts # check vite.config.ts",
"test ! -f .oxlintrc.json # check .oxlintrc.json is removed",
"test ! -f .oxfmtrc.json # check .oxfmtrc.json is removed",
"cat package.json # check package.json"
"cat package.json # check package.json",
"cat pnpm-workspace.yaml # check pnpm-workspace.yaml has overrides and catalog"
]
}
34 changes: 17 additions & 17 deletions packages/cli/snap-tests-global/migration-baseurl-tsconfig/snap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@ export default defineConfig({
> cat package.json # check package.json
{
"devDependencies": {
"vite-plus": "latest"
},
"pnpm": {
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
},
"peerDependencyRules": {
"allowAny": [
"vite",
"vitest"
],
"allowedVersions": {
"vite": "*",
"vitest": "*"
}
}
"vite-plus": "catalog:"
},
"packageManager": "pnpm@<semver>",
"scripts": {
"prepare": "vp config"
}
}

> cat pnpm-workspace.yaml # check pnpm-workspace.yaml has overrides and catalog
catalog:
vite: npm:@voidzero-dev/vite-plus-core@latest
vitest: npm:@voidzero-dev/vite-plus-test@latest
vite-plus: latest
overrides:
vite: 'catalog:'
vitest: 'catalog:'
peerDependencyRules:
allowAny:
- vite
- vitest
allowedVersions:
vite: '*'
vitest: '*'
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"commands": [
"vp migrate --no-interactive # migration should skip typeAware/typeCheck when tsconfig has baseUrl",
"cat vite.config.ts # check vite.config.ts should NOT have typeAware or typeCheck",
"cat vite.config.ts # check vite.config.ts \u2014 should NOT have typeAware or typeCheck",
"test ! -f .oxlintrc.json # check .oxlintrc.json is removed",
"cat package.json # check package.json"
"cat package.json # check package.json",
"cat pnpm-workspace.yaml # check pnpm-workspace.yaml has overrides and catalog"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@ VITE+ - The Unified Toolchain for the Web
"prepare": "vp config"
},
"devDependencies": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vite-plus": "latest"
},
"pnpm": {
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
},
"peerDependencyRules": {
"allowAny": [
"vite",
"vitest"
],
"allowedVersions": {
"vite": "*",
"vitest": "*"
}
}
"vite": "catalog:",
"vite-plus": "catalog:"
},
"packageManager": "pnpm@<semver>"
}

> cat pnpm-workspace.yaml # check pnpm-workspace.yaml has overrides and catalog
catalog:
vite: npm:@voidzero-dev/vite-plus-core@latest
vitest: npm:@voidzero-dev/vite-plus-test@latest
vite-plus: latest
overrides:
vite: 'catalog:'
vitest: 'catalog:'
peerDependencyRules:
allowAny:
- vite
- vitest
allowedVersions:
vite: '*'
vitest: '*'

> cat vite.config.ts # check staged config migrated to vite.config.ts
import { defineConfig } from 'vite-plus';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"commands": [
{ "command": "git init", "ignoreOutput": true },
{
"command": "git init",
"ignoreOutput": true
},
"vp migrate --no-interactive # migration should preserve chained commands after lint-staged",
"cat package.json # check prepare rewritten and husky/lint-staged removed",
"cat pnpm-workspace.yaml # check pnpm-workspace.yaml has overrides and catalog",
"cat vite.config.ts # check staged config migrated to vite.config.ts",
"cat .vite-hooks/pre-commit # check npx lint-staged replaced but --diff HEAD~1 && npm test preserved"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@ VITE+ - The Unified Toolchain for the Web
"prepare": "npm run build && vp config --hooks-dir .config/husky"
},
"devDependencies": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vite-plus": "latest"
},
"pnpm": {
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
},
"peerDependencyRules": {
"allowAny": [
"vite",
"vitest"
],
"allowedVersions": {
"vite": "*",
"vitest": "*"
}
}
"vite": "catalog:",
"vite-plus": "catalog:"
},
"packageManager": "pnpm@<semver>"
}

> cat pnpm-workspace.yaml # check pnpm-workspace.yaml has overrides and catalog
catalog:
vite: npm:@voidzero-dev/vite-plus-core@latest
vitest: npm:@voidzero-dev/vite-plus-test@latest
vite-plus: latest
overrides:
vite: 'catalog:'
vitest: 'catalog:'
peerDependencyRules:
allowAny:
- vite
- vitest
allowedVersions:
vite: '*'
vitest: '*'

> cat .config/husky/pre-commit # pre-commit hook should be in custom dir
vp staged

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"commands": [
{ "command": "git init", "ignoreOutput": true },
{
"command": "git init",
"ignoreOutput": true
},
"vp migrate --no-interactive # migration should preserve custom husky dir in composed prepare",
"cat package.json # prepare should be 'vp config --hooks-dir .config/husky && npm run build'",
"cat pnpm-workspace.yaml # check pnpm-workspace.yaml has overrides and catalog",
"cat .config/husky/pre-commit # pre-commit hook should be in custom dir",
"cat .config/husky/_/h # hook dispatcher should resolve repo root correctly for nested dirs"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ VITE+ - The Unified Toolchain for the Web
"prepare": "vp config && npm run build"
},
"devDependencies": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vite-plus": "latest"
},
"pnpm": {
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
},
"peerDependencyRules": {
"allowAny": [
"vite",
"vitest"
],
"allowedVersions": {
"vite": "*",
"vitest": "*"
}
}
"vite": "catalog:",
"vite-plus": "catalog:"
},
"packageManager": "pnpm@<semver>"
}

> cat pnpm-workspace.yaml # check pnpm-workspace.yaml has overrides and catalog
catalog:
vite: npm:@voidzero-dev/vite-plus-core@latest
vitest: npm:@voidzero-dev/vite-plus-test@latest
vite-plus: latest
overrides:
vite: 'catalog:'
vitest: 'catalog:'
peerDependencyRules:
allowAny:
- vite
- vitest
allowedVersions:
vite: '*'
vitest: '*'
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"commands": [
{ "command": "git init", "ignoreOutput": true },
{
"command": "git init",
"ignoreOutput": true
},
"vp migrate --no-interactive # migration should replace husky in composed prepare script",
"cat package.json # check prepare becomes 'vp config --hooks-dir .husky && npm run build' without leftover husky"
"cat package.json # check prepare becomes 'vp config --hooks-dir .husky && npm run build' without leftover husky",
"cat pnpm-workspace.yaml # check pnpm-workspace.yaml has overrides and catalog"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@ VITE+ - The Unified Toolchain for the Web
"prepare": "vp config"
},
"devDependencies": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vite-plus": "latest"
},
"pnpm": {
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
},
"peerDependencyRules": {
"allowAny": [
"vite",
"vitest"
],
"allowedVersions": {
"vite": "*",
"vitest": "*"
}
}
"vite": "catalog:",
"vite-plus": "catalog:"
},
"packageManager": "pnpm@<semver>"
}

> cat pnpm-workspace.yaml # check pnpm-workspace.yaml has overrides and catalog
catalog:
vite: npm:@voidzero-dev/vite-plus-core@latest
vitest: npm:@voidzero-dev/vite-plus-test@latest
vite-plus: latest
overrides:
vite: 'catalog:'
vitest: 'catalog:'
peerDependencyRules:
allowAny:
- vite
- vitest
allowedVersions:
vite: '*'
vitest: '*'

> cat vite.config.ts # check staged config migrated to vite.config.ts
import { defineConfig } from 'vite-plus';

Expand Down
Loading
Loading