Repository navigation
Conversation
Publish the existing Lara import paths and CLI through emitted JavaScript and declarations. Resolve the default Weaver script from the launcher's extension so source mode keeps using Weaver.ts and packed mode uses Weaver.js. Add focused runtime checks for both modes.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e001eaf67
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "./vitest.config.ts": "./vitest.config.ts", | ||
| "./vitest/*.js": "./dist/vitest/*.js", | ||
| "./vitest/*": "./dist/vitest/*.js", | ||
| "./vitest/*.ts": "./dist/vitest/*.js", |
There was a problem hiding this comment.
Point the emitted Vitest config at the JavaScript environment
When an installed package imports @specs-feup/lara/vitest/weaverVitestConfig.ts, this export now loads dist/vitest/weaverVitestConfig.js, but createWeaverVitestConfig() still constructs its environment URL as ./weaverEnvironment.ts in vitest/weaverVitestConfig.ts:22-24. The packed package contains only dist/vitest/weaverEnvironment.js, so Vitest receives an absolute path to a nonexistent file and downstream suites using this shared configuration fail before any tests run. Resolve the environment extension from the emitted module or otherwise ensure the referenced file is packaged.
Useful? React with 👍 / 👎.
Resolve the shared test environment from the config module extension so source and packed JavaScript modes select their matching files. Keep the default repository config's Java path stable across source and dist layouts. Exclude emitted source tests, clean stale dist output, ignore dist during Vitest discovery, and add a packed-package Vitest smoke.
Convert configured environment URLs back to native paths for filesystem checks and invoke npm through the current Node executable using npm_execpath.
|



Installed Lara packages exported TypeScript from node_modules, which Node 24 refuses to strip. Emit JavaScript and declarations before packing, route package exports and the CLI to those artifacts, and select the default Weaver script according to whether the launcher runs from source or emitted code. This supports the paired Clava packaging fix without changing the Java transport.
Validation: TypeScript build and package-runtime tests passed. Packed Node 24 local and global installs passed Clava and Lara CLI help and exported API imports. The local smoke approved only the java addon install script under npm 11 before rebuilding it. Final Lara source suite passes 54 cases with one expected-failure case; paired Clava passes 162 cases with two skips. The emitted Vitest environment and default Java-binary paths now match source behavior, generated test copies are excluded, and a packed-package config smoke passes. Windows-specific launcher/path checks were source-reviewed and corrected; local smoke execution was on Linux. CI currently stops before compilation because the shared dependency resolver reports ambiguous Specs branches.
This PR targets the existing Lara 4 lineage. No stable publication or master merge is requested.