-
Notifications
You must be signed in to change notification settings - Fork 252
feat: add create-vinext-app scaffolding CLI #406
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
base: main
Are you sure you want to change the base?
Changes from all commits
bf46d29
4b73bc3
9b700ce
82f4cfd
6a54993
aed831e
e3d3255
12e6bbf
2a0664c
2fff1a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -71,10 +71,20 @@ jobs: | |||||
| echo "Publishing vinext@${VERSION} (was ${LATEST})" | ||||||
| echo "previous=${LATEST}" >> "$GITHUB_OUTPUT" | ||||||
|
|
||||||
| - name: Publish (OIDC trusted publishing) | ||||||
| - name: Bump create-vinext-app version | ||||||
| working-directory: packages/create-vinext-app | ||||||
| run: | | ||||||
| npm version "${{ steps.version.outputs.version }}" --no-git-tag-version | ||||||
| echo "Publishing create-vinext-app@${{ steps.version.outputs.version }}" | ||||||
|
|
||||||
| - name: Publish vinext (OIDC trusted publishing) | ||||||
| working-directory: packages/vinext | ||||||
| run: pnpm publish --access public --provenance | ||||||
|
|
||||||
| - name: Publish create-vinext-app (OIDC trusted publishing) | ||||||
| working-directory: packages/create-vinext-app | ||||||
| run: npm publish --access public --provenance | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Line 82 uses If it's a pnpm workspace,
Suggested change
|
||||||
|
|
||||||
| - name: Tag release | ||||||
| run: | | ||||||
| git tag "v${{ steps.version.outputs.version }}" | ||||||
|
|
@@ -179,7 +189,7 @@ jobs: | |||||
| PAYLOAD=$(jq -n \ | ||||||
| --arg version "$VERSION" \ | ||||||
| --arg summary "$SUMMARY" \ | ||||||
| '{"text": ("*vinext v" + $version + " published to npm*\n\n" + $summary + "\n\nnpm: https://www.npmjs.com/package/vinext/v/" + $version)}') | ||||||
| '{"text": ("*vinext v" + $version + " + create-vinext-app published to npm*\n\n" + $summary + "\n\nnpm: https://www.npmjs.com/package/vinext/v/" + $version)}') | ||||||
|
|
||||||
| echo "::group::Webhook payload" | ||||||
| echo "$PAYLOAD" | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,8 @@ | ||
| { | ||
| "ignorePatterns": ["fixtures/ecosystem/**", "tests/fixtures/ecosystem/**", "examples/**"] | ||
| "ignorePatterns": [ | ||
| "fixtures/ecosystem/**", | ||
| "tests/fixtures/ecosystem/**", | ||
| "examples/**", | ||
| "packages/create-vinext-app/templates/**" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| { | ||
| "name": "create-vinext-app", | ||
| "version": "0.0.1", | ||
| "description": "Scaffold a new vinext project targeting Cloudflare Workers", | ||
| "keywords": [ | ||
| "cloudflare", | ||
| "create", | ||
| "next", | ||
| "scaffold", | ||
| "vinext", | ||
| "vite", | ||
| "workers" | ||
| ], | ||
| "license": "MIT", | ||
| "bin": { | ||
| "create-vinext-app": "dist/index.js" | ||
| }, | ||
| "files": [ | ||
| "dist", | ||
| "templates" | ||
| ], | ||
| "type": "module", | ||
| "scripts": { | ||
| "build": "tsc", | ||
| "pretest": "tsc", | ||
| "test": "vitest run", | ||
| "test:watch": "vitest" | ||
Divkix marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }, | ||
| "dependencies": { | ||
| "@clack/prompts": "^0.10.0" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "^5.8.2", | ||
| "vitest": "^3.2.1" | ||
| }, | ||
| "engines": { | ||
| "node": ">=18" | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI passes an absolute path as the positional arg.
This feeds
${{ runner.temp }}/cva-testas the project name. The code atindex.ts:140correctly handlespath.isAbsolute()by extracting the basename. However, the resultingpackage.jsonwill have"name": "cva-test"and the worker name will be"cva-test". That's fine and works, but it's worth noting that this CI step is exercising the absolute-path code path, not the typical user flow ofcreate-vinext-app my-app.Consider adding a second test that uses a plain name (the typical user flow) to ensure both paths are covered in CI.