GeezerVison is showing github.com — test: migrate vp create snap tests to the PTY snapshot suite by fengmk2 · Pull Request #2071 · voidzero-dev/vite-plus
test: migrate vp create snap tests to the PTY snapshot suite
#2071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement . We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Uh oh!
There was an error while loading. Please reload this page.
Show file tree
Hide file tree
Changes from all commits
Commits
File filter
Filter by extension
.cjs
(4)
.json
(66)
.md
(34)
.mjs
(1)
.tgz
(7)
.toml
(34)
.ts
(3)
.txt
(23)
.yaml
(6)
dotfile
(1)
All 10 file types selected
Only manifest files
Deleted files
Viewed files
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Hide whitespace
Diff view
Hide whitespace
There are no files selected for viewing
File renamed without changes.
Original file line number
Diff line number
Diff line change
@@ -0,0 +1,8 @@
[[case]]
name = "command_create_help"
vp = "global"
steps = [
{ argv = ["vp", "create", "-h"], continue-on-failure = true },
{ argv = ["vp", "create", "--help"], continue-on-failure = true },
{ argv = ["vp", "help", "create"], continue-on-failure = true },
]
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,10 @@
> vp create -h
# command_create_help
## `vp create -h`
```
VITE+ - The Unified Toolchain for the Web
Usage: vp create [TEMPLATE] [OPTIONS] [-- TEMPLATE_OPTIONS]
Use any builtin, local or remote template with Vite+.
Expand Down
Expand Up
@@ -62,9 +68,13 @@ Examples:
vp create @your-org:web # direct manifest-entry selection
Documentation: https://viteplus.dev/guide/create
```
## `vp create --help`
```
VITE+ - The Unified Toolchain for the Web
> vp create --help
Usage: vp create [TEMPLATE] [OPTIONS] [-- TEMPLATE_OPTIONS]
Use any builtin, local or remote template with Vite+.
Expand Down
Expand Up
@@ -128,9 +138,13 @@ Examples:
vp create @your-org:web # direct manifest-entry selection
Documentation: https://viteplus.dev/guide/create
```
## `vp help create`
```
VITE+ - The Unified Toolchain for the Web
> vp help create
Usage: vp create [TEMPLATE] [OPTIONS] [-- TEMPLATE_OPTIONS]
Use any builtin, local or remote template with Vite+.
Expand Down
Expand Up
@@ -194,4 +208,4 @@ Examples:
vp create @your-org:web # direct manifest-entry selection
Documentation: https://viteplus.dev/guide/create
```
File renamed without changes.
Original file line number
Diff line number
Diff line change
@@ -0,0 +1,15 @@
[[case]]
name = "create_approve_builds_bun"
vp = "local"
skip-platforms = ["windows"]
env = { ADBLOCK = "1" }
unset-env = ["VP_SKIP_INSTALL", "CI"]
local-registry = true
steps = [
{ argv = ["vp", "create", "@your-org:with-build-dep", "--no-interactive", "--approve-builds", "--package-manager", "bun", "--directory", "approved-app"], comment = "--approve-builds runs `bun pm trust` for the gated build script (core-js)", continue-on-failure = true },
{ argv = ["vpt", "print-file", "approved-app/package.json"], comment = "core-js recorded under trustedDependencies", continue-on-failure = true },
{ argv = ["vp", "create", "@your-org:with-build-dep", "--no-interactive", "--package-manager", "bun", "--directory", "default-app"], comment = "default run surfaces the gated build with guidance, leaving it untrusted", continue-on-failure = true },
{ argv = ["vpt", "print-file", "default-app/package.json"], comment = "no trustedDependencies, the build was not run", continue-on-failure = true },
{ argv = ["vp", "pm", "approve-builds", "core-js"], cwd = "default-app", comment = "the guidance's `vp pm approve-builds` command approves the gated build", continue-on-failure = true },
{ argv = ["vpt", "print-file", "default-app/package.json"], comment = "core-js is now recorded under trustedDependencies", continue-on-failure = true },
]
Original file line number
Diff line number
Diff line change
@@ -0,0 +1,142 @@
# create_approve_builds_bun
## `vp create @your-org:with-build-dep --no-interactive --approve-builds --package-manager bun --directory approved-app`
--approve-builds runs `bun pm trust` for the gated build script (core-js)
```
◇ Scaffolded approved-app
• Node <version> bun <version>
✓ Dependencies installed in <duration>
→ Next: cd approved-app && vp run
```
## `vpt print-file approved-app/package.json`
core-js recorded under trustedDependencies
```
{
"name": "approved-app",
"version": "0.0.0",
"private": true,
"scripts": {
"prepare": "vp config"
},
"dependencies": {
"core-js": "3.39.0"
},
"devDependencies": {
"vite": "npm:@voidzero-dev/vite-plus-core@<version>",
"vite-plus": "<version>"
},
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@<version>"
},
"devEngines": {
"packageManager": {
"name": "bun",
"version": "1.3.14",
"onFail": "download"
}
},
"trustedDependencies": [
"core-js"
]
}
```
## `vp create @your-org:with-build-dep --no-interactive --package-manager bun --directory default-app`
default run surfaces the gated build with guidance, leaving it untrusted
```
Build scripts were not run for: core-js.
These dependencies may not work until built. Run vp pm approve-builds core-js in the project to approve them, or re-create with --approve-builds.
◇ Scaffolded default-app
• Node <version> bun <version>
✓ Dependencies installed in <duration>
→ Next: cd default-app && vp run
```
## `vpt print-file default-app/package.json`
no trustedDependencies, the build was not run
```
{
"name": "default-app",
"version": "0.0.0",
"private": true,
"scripts": {
"prepare": "vp config"
},
"dependencies": {
"core-js": "3.39.0"
},
"devDependencies": {
"vite": "npm:@voidzero-dev/vite-plus-core@<version>",
"vite-plus": "<version>"
},
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@<version>"
},
"devEngines": {
"packageManager": {
"name": "bun",
"version": "1.3.14",
"onFail": "download"
}
}
}
```
## `cd default-app && vp pm approve-builds core-js`
the guidance's `vp pm approve-builds` command approves the gated build
```
bun pm trust <version> (0d9b296a)
./node_modules/core-js @3.39.0
✓ [postinstall]: node -e "try{require('./postinstall')}catch(e){}"
1 script ran across 1 package [<duration>]
```
## `vpt print-file default-app/package.json`
core-js is now recorded under trustedDependencies
```
{
"name": "default-app",
"version": "0.0.0",
"private": true,
"scripts": {
"prepare": "vp config"
},
"dependencies": {
"core-js": "3.39.0"
},
"devDependencies": {
"vite": "npm:@voidzero-dev/vite-plus-core@<version>",
"vite-plus": "<version>"
},
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@<version>"
},
"devEngines": {
"packageManager": {
"name": "bun",
"version": "1.3.14",
"onFail": "download"
}
},
"trustedDependencies": [
"core-js"
]
}
```
File renamed without changes.
File renamed without changes.
Original file line number
Diff line number
Diff line change
@@ -0,0 +1,14 @@
[[case]]
name = "create_approve_builds_migrate_pnpm11"
vp = "local"
env = { ADBLOCK = "1" }
unset-env = ["VP_SKIP_INSTALL", "CI"]
local-registry = true
steps = [
{ argv = ["vp", "create", "@your-org:with-build-dep", "--no-interactive", "--approve-builds", "--directory", "approved-app"], comment = "template ships Prettier, so create installs+migrates before the main install; the gated build (core-js) must still be surfaced and approved", continue-on-failure = true },
{ argv = ["vpt", "print-file", "approved-app/pnpm-workspace.yaml"], comment = "approval recorded under allowBuilds despite the migration pre-install", continue-on-failure = true },
{ argv = ["vp", "create", "@your-org:with-build-dep", "--no-interactive", "--directory", "default-app"], comment = "default run surfaces the gated build with guidance, leaving it unapproved", continue-on-failure = true },
{ argv = ["vpt", "print-file", "default-app/pnpm-workspace.yaml"], comment = "no allowBuilds, the build was not run", continue-on-failure = true },
{ argv = ["vp", "pm", "approve-builds", "core-js"], cwd = "default-app", comment = "the guidance's `vp pm approve-builds` command approves the gated build", continue-on-failure = true },
{ argv = ["vpt", "print-file", "default-app/pnpm-workspace.yaml"], comment = "core-js is now allowed under allowBuilds", continue-on-failure = true },
]
Original file line number
Diff line number
Diff line change
@@ -0,0 +1,96 @@
# create_approve_builds_migrate_pnpm11
## `vp create @your-org:with-build-dep --no-interactive --approve-builds --directory approved-app`
template ships Prettier, so create installs+migrates before the main install; the gated build (core-js) must still be surfaced and approved
```
Prettier detected in workspace packages but no root config found. Package-level Prettier must be migrated manually.
◇ Scaffolded approved-app
• Node <version> pnpm <version>
✓ Dependencies installed in <duration>
→ Next: cd approved-app && vp run
```
## `vpt print-file approved-app/pnpm-workspace.yaml`
approval recorded under allowBuilds despite the migration pre-install
```
allowBuilds:
core-js: true
catalog:
vite: npm:@voidzero-dev/vite-plus-core@<version>
vite-plus: <version>
overrides:
vite: "catalog:"
peerDependencyRules:
allowAny:
- vite
allowedVersions:
vite: "*"
```
## `vp create @your-org:with-build-dep --no-interactive --directory default-app`
default run surfaces the gated build with guidance, leaving it unapproved
```
Prettier detected in workspace packages but no root config found. Package-level Prettier must be migrated manually.
Build scripts were not run for: core-js.
These dependencies may not work until built. Run vp pm approve-builds in the project to approve them, or re-create with --approve-builds.
◇ Scaffolded default-app
• Node <version> pnpm <version>
✓ Dependencies installed in <duration>
→ Next: cd default-app && vp run
```
## `vpt print-file default-app/pnpm-workspace.yaml`
no allowBuilds, the build was not run
```
allowBuilds:
core-js: set this to true or false
catalog:
vite: npm:@voidzero-dev/vite-plus-core@<version>
vite-plus: <version>
overrides:
vite: "catalog:"
peerDependencyRules:
allowAny:
- vite
allowedVersions:
vite: "*"
```
## `cd default-app && vp pm approve-builds core-js`
the guidance's `vp pm approve-builds` command approves the gated build
```
node_modules/.pnpm/[email protected] /node_modules/core-js: Running postinstall script, done in <duration>
```
## `vpt print-file default-app/pnpm-workspace.yaml`
core-js is now allowed under allowBuilds
```
allowBuilds:
core-js: true
catalog:
vite: npm:@voidzero-dev/vite-plus-core@<version>
vite-plus: <version>
overrides:
vite: "catalog:"
peerDependencyRules:
allowAny:
- vite
allowedVersions:
vite: "*"
```
File renamed without changes.
File renamed without changes.
Original file line number
Diff line number
Diff line change
@@ -0,0 +1,14 @@
[[case]]
name = "create_approve_builds_pnpm11"
vp = "local"
env = { ADBLOCK = "1" }
unset-env = ["VP_SKIP_INSTALL", "CI"]
local-registry = true
steps = [
{ argv = ["vp", "create", "@your-org:with-build-dep", "--no-interactive", "--approve-builds", "--directory", "approved-app"], comment = "--approve-builds auto-approves and runs the gated build script (core-js)", continue-on-failure = true },
{ argv = ["vpt", "print-file", "approved-app/pnpm-workspace.yaml"], comment = "approval recorded under allowBuilds", continue-on-failure = true },
{ argv = ["vp", "create", "@your-org:with-build-dep", "--no-interactive", "--directory", "default-app"], comment = "default run surfaces the gated build with guidance, leaving it unapproved", continue-on-failure = true },
{ argv = ["vpt", "print-file", "default-app/pnpm-workspace.yaml"], comment = "no allowBuilds, the build was not run", continue-on-failure = true },
{ argv = ["vp", "pm", "approve-builds", "core-js"], cwd = "default-app", comment = "the guidance's `vp pm approve-builds` command approves the gated build", continue-on-failure = true },
{ argv = ["vpt", "print-file", "default-app/pnpm-workspace.yaml"], comment = "core-js is now allowed under allowBuilds", continue-on-failure = true },
]
Loading
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Loading
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.