-
Notifications
You must be signed in to change notification settings - Fork 59
Fixes for workflow serde on latest 'workflow' package #70
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: workflow-serde
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| overrides: | ||
| workflow: link:../../../../vercel/workflow/packages/workflow | ||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -3,6 +3,10 @@ | |||
| * | ||||
| * Demonstrates using just-bash with Workflow DevKit's serialization. | ||||
| * The Bash instance is serialized between steps, preserving filesystem state. | ||||
| * | ||||
| * When this file is processed during workflow discovery, the bundler uses | ||||
| * the "workflow" export condition which provides an opaque Bash handle. | ||||
| * When step functions run, they use the real Bash implementation. | ||||
| */ | ||||
|
|
||||
| import { Bash } from "just-bash"; | ||||
|
|
@@ -12,6 +16,7 @@ export async function serialBashWorkflow() { | |||
|
|
||||
| // Step 1: Create bash instance and initialize | ||||
| let bash = await createBash(); | ||||
| console.log(bash); | ||||
|
||||
|
|
||||
| // Steps 2-4: Serial steps that modify filesystem | ||||
| bash = await appendToLog(bash, "step2"); | ||||
|
|
@@ -24,6 +29,8 @@ export async function serialBashWorkflow() { | |||
|
|
||||
| async function createBash() { | ||||
| "use step"; | ||||
| console.log(Bash); | ||||
| console.log((Bash as any).classId); | ||||
|
||||
| console.log((Bash as any).classId); |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -16,6 +16,7 @@ | |||||
| "exports": { | ||||||
| ".": { | ||||||
| "types": "./dist/index.d.ts", | ||||||
| "workflow": "./dist/bundle/workflow.js", | ||||||
| "browser": "./dist/bundle/browser.js", | ||||||
| "import": "./dist/bundle/index.js" | ||||||
| }, | ||||||
|
|
@@ -50,7 +51,7 @@ | |||||
| "build": "rm -rf dist && tsc && pnpm build:lib && pnpm build:browser && pnpm build:cli && pnpm build:shell && pnpm build:worker && pnpm build:clean && sed '1,/^-->/d' AGENTS.npm.md > dist/AGENTS.md", | ||||||
| "build:clean": "find dist -name '*.test.js' -delete && find dist -name '*.test.d.ts' -delete", | ||||||
| "build:worker": "esbuild src/commands/python3/worker.ts --bundle --platform=node --format=esm --outfile=src/commands/python3/worker.js --external:pyodide && cp src/commands/python3/worker.js dist/commands/python3/worker.js && mkdir -p dist/bin/chunks && cp src/commands/python3/worker.js dist/bin/chunks/worker.js && mkdir -p dist/bundle/chunks && cp src/commands/python3/worker.js dist/bundle/chunks/worker.js", | ||||||
| "build:lib": "esbuild dist/index.js --bundle --splitting --platform=node --format=esm --minify-syntax --minify-whitespace --keep-names --outdir=dist/bundle --chunk-names=chunks/[name]-[hash] --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:pyodide --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs && echo 'var _Bash=Bash,_InMemoryFs=InMemoryFs;' >> dist/bundle/index.js", | ||||||
| "build:lib": "esbuild dist/index.js dist/workflow.js --bundle --splitting --platform=node --format=esm --keep-names --outdir=dist/bundle --chunk-names=chunks/[name]-[hash] --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:pyodide --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs", | ||||||
|
||||||
| "build:lib": "esbuild dist/index.js dist/workflow.js --bundle --splitting --platform=node --format=esm --keep-names --outdir=dist/bundle --chunk-names=chunks/[name]-[hash] --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:pyodide --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs", | |
| "build:lib": "esbuild dist/index.js dist/workflow.js --bundle --splitting --platform=node --format=esm --minify-syntax --minify-whitespace --keep-names --outdir=dist/bundle --chunk-names=chunks/[name]-[hash] --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:pyodide --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs", |
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.
The pnpm-workspace.yaml file contains an override that links to a local path
../../../../vercel/workflow/packages/workflow, which is specific to a local development environment. This will break for other developers and in CI/CD. The override should either be removed or documented as a local development-only configuration that should not be committed.