-
Notifications
You must be signed in to change notification settings - Fork 67
feat(nitro): support custom workflows/ dirs
#52
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
Conversation
🦋 Changeset detectedLatest commit: 660ed20 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@pi0 is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
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.
I think pathe should be a dep of nitro, instead of a peerdep for the user - otherwise lgtm
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.
Additional Comments:
packages/nitro/package.json (lines 28-33):
The package imports pathe in src/builders.ts and src/index.ts, but it's not declared as a dependency. This will cause a module resolution error at runtime.
View Details
📝 Patch Details
diff --git a/packages/nitro/package.json b/packages/nitro/package.json
index 94194ca..644cf86 100644
--- a/packages/nitro/package.json
+++ b/packages/nitro/package.json
@@ -30,7 +30,8 @@
"@workflow/swc-plugin": "workspace:*",
"@workflow/cli": "workspace:*",
"@workflow/core": "workspace:*",
- "exsolve": "^1.0.7"
+ "exsolve": "^1.0.7",
+ "pathe": "^2.0.3"
},
"devDependencies": {
"@types/node": "catalog:",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index afa6df0..35dd2d7 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -488,6 +488,9 @@ importers:
exsolve:
specifier: ^1.0.7
version: 1.0.7
+ pathe:
+ specifier: ^2.0.3
+ version: 2.0.3
devDependencies:
'@types/node':
specifier: 'catalog:'
@@ -1004,6 +1007,10 @@ importers:
version: 5.9.3
workbench/nitro:
+ dependencies:
+ pathe:
+ specifier: ^2.0.3
+ version: 2.0.3
devDependencies:
ai:
specifier: 'catalog:'
Analysis
Missing dependency declaration for pathe in @workflow/nitro
What fails: TypeScript compilation of packages/nitro fails with "Cannot find module 'pathe'" error in both src/builders.ts and src/index.ts
How to reproduce:
cd packages/nitro
npm run buildResult:
src/builders.ts(5,31): error TS2307: Cannot find module 'pathe' or its corresponding type declarations.
src/index.ts(2,22): error TS2307: Cannot find module 'pathe' or its corresponding type declarations.
Expected: Build should succeed as both files import from pathe module (lines 5 in builders.ts and line 2 in index.ts)
Root cause: While the code imports pathe with:
packages/nitro/src/builders.tsline 5:import { join, resolve } from 'pathe';packages/nitro/src/index.tsline 2:import { join } from 'pathe';
The dependency was not declared in packages/nitro/package.json. This causes module resolution to fail at build time.
Fix: Added "pathe": "^2.0.3" to the dependencies section of packages/nitro/package.json to match the version already used in workbench/nitro-v3/package.json.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Resolves #22
This PR adds support for
workflows/dir from:server/) from all scan layersworkflows: { dirs: [] }nitro config