Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR restructures the JS WinML variant into a thin wrapper package (foundry-local-sdk-winml) that depends on foundry-local-sdk, intending to let users install the WinML variant but continue importing from foundry-local-sdk while swapping in WinML native binaries.
Changes:
- Updates the packaging script to publish
foundry-local-sdk-winmlas a wrapper that depends onfoundry-local-sdkand does not shipdist/. - Updates the WinML install script to target the standard SDK’s installation directory for native binary placement.
- Extends the shared install utilities to support installing binaries into an explicit SDK root (rather than only this package’s own directory).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| sdk/js/script/pack.cjs | Converts the WinML package into a thin wrapper (no dist/, depends on foundry-local-sdk). |
| sdk/js/script/install-winml.cjs | Attempts to run preinstall + download WinML-native binaries into the standard SDK’s platform directory. |
| sdk/js/script/install-utils.cjs | Adds sdkRoot support to direct extraction to a different @foundry-local-core/<platform> directory. |
Comments suppressed due to low confidence (1)
sdk/js/script/install-utils.cjs:180
runInstall()returns early if the required files already exist andnpm_config_nightlyisn’t set. For the WinML wrapper use-case (overwriting an existing standard install), this prevents the WinML artifacts from ever being applied. Add an explicitforce/overwriteoption (or a check that detects whether the existing Core is the WinML variant) and use it frominstall-winml.cjs.
async function runInstall(artifacts, sdkRoot) {
if (!RID) {
console.warn(`[foundry-local] Unsupported platform: ${platformKey}. Skipping.`);
return;
}
const binDir = sdkRoot
? path.join(sdkRoot, 'packages', '@foundry-local-core', platformKey)
: DEFAULT_BIN_DIR;
if (fs.existsSync(binDir) && REQUIRED_FILES.every(f => fs.existsSync(path.join(binDir, f)))) {
if (process.env.npm_config_nightly === 'true') {
console.log(`[foundry-local] Nightly requested. Forcing reinstall...`);
fs.rmSync(binDir, { recursive: true, force: true });
} else {
console.log(`[foundry-local] Native libraries already installed.`);
return;
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…es with winml binaries (#596) - allows users to do `npm install foundry-local-sdk-winml` and then do `import { FoundryLocalManager } from 'foundry-local-sdk';` like the other SDKs do - creates a compute version stage at the beginning of mega pipeline so all artifacts are generated with the same version string down to the timestamp minute - new node_modules/ structure: <img width="341" height="396" alt="image" src="https://github.com/user-attachments/assets/2c228a14-1e34-406d-9802-c752190d4c53" /> --------- Co-authored-by: Prathik Rao <prathikrao@microsoft.com>
npm install foundry-local-sdk-winmland then doimport { FoundryLocalManager } from 'foundry-local-sdk';like the other SDKs do