mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-18 16:02:10 +00:00
40dbab531e
* fix(cli): resolve cross-folder relative imports during lockgen on fresh DB
On a fresh workspace, lockfile generation for scripts that imported other
scripts via cross-folder relative imports (or barrel re-exporters) failed with
"Failed to find relative import" because the dep job's bun build hit the
server before any helper was deployed. Three independent bugs combined to
produce this:
1. wmill sync push --auto-metadata regenerated locks per script without
building a DoubleLinkedDependencyTree or calling uploadScripts, so
temp_script_refs was never sent to dependencies_async.
2. wmill script generate-metadata (the deprecated alias) had its own old
in-line implementation that bypassed the tree entirely.
3. The TypeScript WASM parser dropped re-exports (export * from, export { x }
from) when called with skip_type_only=false — the path used by
parse_relative_imports — so barrel files looked like leaves to the CLI's
dependency tree and their sibling helpers were missing from
temp_script_refs.
Fix:
- sync.ts: --auto-metadata mirrors generate-metadata's flow (dryRun pass to
populate tree → propagateStaleness → uploadScripts → real pass with tree).
- script.ts: deprecated wmill script generate-metadata now delegates to the
canonical generateMetadata, which already does the tree+upload dance.
- parser-ts: visit_export_all and visit_named_export had inverted skip_type_only
guards; aligned with visit_import_decl's pattern.
Includes 4 E2E tests reproducing each customer-hit failure path and a Rust
unit test for the re-export parser fix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: bump windmill-parser-wasm-ts to 1.695.0
Pin the parser package to the version published with the re-export fix
(visit_export_all / visit_named_export skip_type_only=false) so the CLI
and frontend pick it up at the next release.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(cli): restore legacy stale-check in deprecated alias, add tree to gen pass
Delegating wmill script generate-metadata fully to the canonical handler
broke 4 workspace_deps_filter tests that rely on the legacy hash-with-deps
formula and the "No metadata to update" output string.
Restore the original in-line implementation (legacy stale-check preserved),
but add a DoubleLinkedDependencyTree + uploadScripts pass before the actual
generation step. The customer's bug only manifests on real lockgen, not on
the dry-run staleness check, so this preserves the existing test contract
while still fixing cross-folder relative imports for the deprecated alias.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
55 lines
1.7 KiB
JSON
55 lines
1.7 KiB
JSON
{
|
|
"name": "wmill-dev",
|
|
"private": true,
|
|
"type": "module",
|
|
"bin": {
|
|
"wmill": "src/main.ts"
|
|
},
|
|
"scripts": {
|
|
"dev": "bun run src/main.ts",
|
|
"build": "./build.sh",
|
|
"test": "bun test test/",
|
|
"test:unit": "UNIT_ONLY=1 bun test test/*_unit*",
|
|
"check": "bunx tsc --noEmit",
|
|
"gen-client": "./gen_wm_client.sh && ./windmill-utils-internal/gen_wm_client.sh"
|
|
},
|
|
"dependencies": {
|
|
"@cliffy/ansi": "npm:@jsr/cliffy__ansi@1.0.0",
|
|
"@cliffy/command": "npm:@jsr/cliffy__command@1.0.0",
|
|
"@cliffy/prompt": "npm:@jsr/cliffy__prompt@1.0.0",
|
|
"@cliffy/table": "npm:@jsr/cliffy__table@1.0.0",
|
|
"@windmill-labs/shared-utils": "^1.0.12",
|
|
"diff": "^5.2.0",
|
|
"esbuild": "0.28.0",
|
|
"get-port": "7.1.0",
|
|
"jszip": "3.8.0",
|
|
"minimatch": "^10.0.0",
|
|
"open": "^10.0.0",
|
|
"svelte": "^5.45.2",
|
|
"tar-stream": "^3.1.7",
|
|
"windmill-parser-wasm-csharp": "1.510.1",
|
|
"windmill-parser-wasm-go": "1.510.1",
|
|
"windmill-parser-wasm-java": "1.510.1",
|
|
"windmill-parser-wasm-nu": "1.510.1",
|
|
"windmill-parser-wasm-php": "1.647.1",
|
|
"windmill-parser-wasm-py": "1.693.1",
|
|
"windmill-parser-wasm-py-imports": "1.693.1",
|
|
"windmill-parser-wasm-regex": "1.692.0",
|
|
"windmill-parser-wasm-ruby": "1.526.1",
|
|
"windmill-parser-wasm-rust": "1.647.1",
|
|
"windmill-parser-wasm-ts": "1.695.0",
|
|
"windmill-parser-wasm-yaml": "1.593.0",
|
|
"windmill-yaml-validator": "1.1.1",
|
|
"ws": "8.18.0",
|
|
"yaml": "^2.7.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bun": "^1.3.9",
|
|
"@types/diff": "^5.2.3",
|
|
"@types/node": "^22.0.0",
|
|
"@types/tar-stream": "^3.1.4",
|
|
"@types/ws": "^8.5.0",
|
|
"typescript": "^5.7.0"
|
|
}
|
|
}
|